Extend userdata printing
[lsnes.git] / manual.lyx
blob80bd6bb0b1ee3512b5e3b79d5331de766d7c6dbd
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 L <luacode>
1389 \end_layout
1391 \begin_layout Standard
1392 Synonym for evaluate-lua.
1393 \end_layout
1395 \begin_layout Subsubsection
1396 run-lua <script>
1397 \end_layout
1399 \begin_layout Standard
1400 Run specified lua file using built-in Lua interpretter.
1401 \end_layout
1403 \begin_layout Subsubsection
1404 reset-lua
1405 \end_layout
1407 \begin_layout Standard
1408 Clear the Lua VM state and restore to factory defaults.
1409 \end_layout
1411 \begin_layout Subsection
1412 Memory watch
1413 \end_layout
1415 \begin_layout Subsubsection
1416 add-watch <name> <expression>
1417 \end_layout
1419 \begin_layout Standard
1420 Adds new watch (or modifies old one).
1421 \end_layout
1423 \begin_layout Subsubsection
1424 remove-watch <name>
1425 \end_layout
1427 \begin_layout Standard
1428 Remove a watch.
1429 \end_layout
1431 \begin_layout Subsection
1432 Sound 
1433 \end_layout
1435 \begin_layout Subsubsection
1436 enable-sound <on/off> 
1437 \end_layout
1439 \begin_layout Standard
1440 Enable/Disable sound.
1441 \end_layout
1443 \begin_layout Subsubsection
1444 set-sound-device <device> 
1445 \end_layout
1447 \begin_layout Standard
1448 Set sound device to <device>
1449 \end_layout
1451 \begin_layout Subsubsection
1452 show-sound-status 
1453 \end_layout
1455 \begin_layout Standard
1456 Show status of sound system.
1457 \end_layout
1459 \begin_layout Subsubsection
1460 show-sound-devices
1461 \end_layout
1463 \begin_layout Standard
1464 Show all available devices.
1465 \end_layout
1467 \begin_layout Subsubsection
1468 set-volume <multiplier>
1469 \end_layout
1471 \begin_layout Standard
1472 Set the volume multiplier to <multiplier>.
1473  1 is normal volume, and higher numbers are louder.
1474 \end_layout
1476 \begin_layout Subsubsection
1477 set-volume <multiplier>%
1478 \end_layout
1480 \begin_layout Standard
1481 Set the volume multiplier to <multiplier> percent.
1482  100 is normal volume, and higher numbers are louder.
1483 \end_layout
1485 \begin_layout Subsubsection
1486 set-volume <multiplier>dB
1487 \end_layout
1489 \begin_layout Standard
1490 Set the volume multiplier to <multiplier> dB.
1491  0 is normal volume, and higher numbers are louder.
1492  The value may be negative.
1493 \end_layout
1495 \begin_layout Subsection
1496 Misc.
1497 \end_layout
1499 \begin_layout Subsubsection
1500 reload-rom [<file>]
1501 \end_layout
1503 \begin_layout Standard
1504 Reloads the main ROM image from <file>.
1505 \end_layout
1507 \begin_layout Subsubsection
1508 edit-subtitle <firstframe> <length> [<text>]
1509 \end_layout
1511 \begin_layout Standard
1512 Edit or delete a subtitle.
1513 \end_layout
1515 \begin_layout Subsubsection
1516 list-subtitle
1517 \end_layout
1519 \begin_layout Standard
1520 List subtitles.
1521 \end_layout
1523 \begin_layout Subsection
1524 Commentary track
1525 \end_layout
1527 \begin_layout Subsubsection
1528 list-streams
1529 \end_layout
1531 \begin_layout Standard
1532 List streams
1533 \end_layout
1535 \begin_layout Subsubsection
1536 play-stream <id>
1537 \end_layout
1539 \begin_layout Standard
1540 Play stream <id>.
1541 \end_layout
1543 \begin_layout Subsubsection
1544 delete-stream <id>
1545 \end_layout
1547 \begin_layout Standard
1548 Delete stream <id>
1549 \end_layout
1551 \begin_layout Subsubsection
1552 change-timebase <id> <newbase>
1553 \end_layout
1555 \begin_layout Standard
1556 Change time base of <id> to <newbase>.
1557  The time base can be given as samples (integer) or second (postfix with
1558  s).
1559 \end_layout
1561 \begin_layout Subsubsection
1562 import-stream-opus <timebase> <file>
1563 \end_layout
1565 \begin_layout Standard
1566 Import opus stream from <file>, placing it at <timebase>.
1567  This operation is lossless.
1568 \end_layout
1570 \begin_layout Subsubsection
1571 import-stream-pcm <timebase> <file>
1572 \end_layout
1574 \begin_layout Standard
1575 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at <timebase>.
1576 \end_layout
1578 \begin_layout Subsubsection
1579 export-stream-opus <id> <file>
1580 \end_layout
1582 \begin_layout Standard
1583 Export stream <id> as opus stream to <file>.
1584  This operation is lossless.
1585 \end_layout
1587 \begin_layout Subsubsection
1588 export-stream-pcm <id> <file>
1589 \end_layout
1591 \begin_layout Standard
1592 Export stream <id> as PCM (.sox) stream to <file>.
1594 \end_layout
1596 \begin_layout Subsubsection
1597 export-superstream <file>
1598 \end_layout
1600 \begin_layout Standard
1601 Export the entiere superstream as PCM (.sox) stream to <file>.
1602 \end_layout
1604 \begin_layout Subsubsection
1605 load-collection <file>
1606 \end_layout
1608 \begin_layout Standard
1609 Load collection (if there is existing collection, unload it) from <file>
1610 \end_layout
1612 \begin_layout Subsubsection
1613 unload-collection
1614 \end_layout
1616 \begin_layout Standard
1617 Unload collection.
1618 \end_layout
1620 \begin_layout Subsubsection
1621 +tangent
1622 \end_layout
1624 \begin_layout Standard
1625 Tangent for recording voice for commentary track.
1626  While pressed, record a stream.
1627 \end_layout
1629 \begin_layout Subsection
1630 SDL Platform commands 
1631 \end_layout
1633 \begin_layout Standard
1634 The following are valid on SDL platform.
1635 \end_layout
1637 \begin_layout Subsubsection
1638 identify-key
1639 \end_layout
1641 \begin_layout Standard
1642 Asks to press a key and then identifies that (pseudo-)key.
1643 \end_layout
1645 \begin_layout Subsubsection
1646 toggle-console 
1647 \end_layout
1649 \begin_layout Standard
1650 Toggle between windowed/fullscreen console.
1651 \end_layout
1653 \begin_layout Subsubsection
1654 scroll-fullup 
1655 \end_layout
1657 \begin_layout Standard
1658 Scroll messages window as far back as it goes.
1659 \end_layout
1661 \begin_layout Subsubsection
1662 scroll-fulldown 
1663 \end_layout
1665 \begin_layout Standard
1666 Scroll messages window as far forward as it goes.
1667 \end_layout
1669 \begin_layout Subsubsection
1670 scroll-up 
1671 \end_layout
1673 \begin_layout Standard
1674 Scroll messages window back one screenful.
1675 \end_layout
1677 \begin_layout Subsubsection
1678 scroll-down 
1679 \end_layout
1681 \begin_layout Standard
1682 Scroll messages window forward one screenful.
1683 \end_layout
1685 \begin_layout Subsubsection
1686 prompt-command <command>
1687 \end_layout
1689 \begin_layout Standard
1690 Enter command prompt, with prompt prepopulated with specified command.
1691 \end_layout
1693 \begin_layout Section
1694 Settings
1695 \end_layout
1697 \begin_layout Subsection
1698 Core settings
1699 \end_layout
1701 \begin_layout Subsubsection
1702 firmwarepath
1703 \end_layout
1705 \begin_layout Standard
1706 Set where bsnes looks for firmware files.
1707  Default is 
1708 \begin_inset Quotes eld
1709 \end_inset
1712 \begin_inset Quotes erd
1713 \end_inset
1716 \end_layout
1718 \begin_layout Subsubsection
1719 target
1720 \end_layout
1722 \begin_layout Standard
1723 Set the target .
1724  Numeric, range is 0.001 to 
1725 \begin_inset Quotes eld
1726 \end_inset
1728 infinite
1729 \begin_inset Quotes erd
1730 \end_inset
1733  Default is native framerate.
1734 \end_layout
1736 \begin_layout Subsubsection
1737 savecompression
1738 \end_layout
1740 \begin_layout Standard
1741 Set save compression level (integer 0-9).
1742  Default is 7 (0 is no compression).
1743 \end_layout
1745 \begin_layout Subsubsection
1746 advance-timeout
1747 \end_layout
1749 \begin_layout Standard
1750 Set the frame advance timeout in milliseconds.
1751  Numeric integer, range is 0-999999999.
1752  Default is 500.
1753 \end_layout
1755 \begin_layout Subsubsection
1756 advance-subframe-timeout
1757 \end_layout
1759 \begin_layout Standard
1760 Subframe advance timeout in milliseconds.
1761  Default is 100.
1762 \end_layout
1764 \begin_layout Subsubsection
1765 save-every-frame (bsnes only)
1766 \end_layout
1768 \begin_layout Standard
1769 If true, simulate saving on each frame.
1770  Trades off emulation accuracy for sync stability.
1771  Also needed if the movie assumes saving on each frame for rewind.
1772 \end_layout
1774 \begin_layout Subsection
1775 AVI dumper settings
1776 \end_layout
1778 \begin_layout Subsubsection
1779 avi-large
1780 \end_layout
1782 \begin_layout Standard
1783 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1784  outputs.
1785 \end_layout
1787 \begin_layout Subsubsection
1788 avi-left-border
1789 \end_layout
1791 \begin_layout Standard
1792 AVI dumper: Set the default left border thickness (unless lua overrides)
1793  for dumps.
1794  Range 0-8191.
1795  Default is 0.
1796 \end_layout
1798 \begin_layout Subsubsection
1799 avi-right-border
1800 \end_layout
1802 \begin_layout Standard
1803 AVI dumper: Set the default right border thickness (unless lua overrides)
1804  for dumps.
1805  Range 0-8191.
1806  Default is 0.
1807 \end_layout
1809 \begin_layout Subsubsection
1810 avi-top-border
1811 \end_layout
1813 \begin_layout Standard
1814 AVI dumper: Set the default top border thickness (unless lua overrides)
1815  for dumps.
1816  Range 0-8191.
1817  Default is 0.
1818 \end_layout
1820 \begin_layout Subsubsection
1821 avi-bottom-border
1822 \end_layout
1824 \begin_layout Standard
1825 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1826  for dumps.
1827  Range 0-8191.
1828  Default is 0.
1829 \end_layout
1831 \begin_layout Subsubsection
1832 avi-maxframes
1833 \end_layout
1835 \begin_layout Standard
1836 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1837  Range 0-999999999.
1838  Default is 0.
1839 \end_layout
1841 \begin_layout Subsubsection
1842 avi-compresison
1843 \end_layout
1845 \begin_layout Standard
1846 AVI dumper: Compression level (0-18).
1847 \end_layout
1849 \begin_layout Itemize
1850 Compression levels 10 and above are not compatible with stock CSCD codec.
1851 \end_layout
1853 \begin_layout Itemize
1854 Recomended level is 7.
1855 \end_layout
1857 \begin_layout Subsubsection
1858 avi-soundrate
1859 \end_layout
1861 \begin_layout Standard
1862 AVI dumper: Set method of determining the sound rate.
1863 \end_layout
1865 \begin_layout Itemize
1866 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1867  128, 176.4 and 192 kHz.
1868 \end_layout
1870 \begin_layout Itemize
1871 1: Round down to nearest integer.
1872 \end_layout
1874 \begin_layout Itemize
1875 2: Round up to nearest ingeter.
1876 \end_layout
1878 \begin_layout Subsection
1879 JMD options
1880 \end_layout
1882 \begin_layout Subsubsection
1883 jmd-copression
1884 \end_layout
1886 \begin_layout Standard
1887 JMD dumper: Compression level (0-9).
1888 \end_layout
1890 \begin_layout Subsection
1891 SDL platform settings
1892 \end_layout
1894 \begin_layout Subsubsection
1895 autorepeat-first-delay
1896 \end_layout
1898 \begin_layout Standard
1899 Sets the delay for first character in typematic autorepeat.
1900 \end_layout
1902 \begin_layout Subsubsection
1903 autorepeat-subsequent-delay
1904 \end_layout
1906 \begin_layout Standard
1907 Sets the delay for subsequent characters in typematic autorepeat.
1908 \end_layout
1910 \begin_layout Section
1911 Lua functions
1912 \end_layout
1914 \begin_layout Subsection
1915 Core (in main table)
1916 \end_layout
1918 \begin_layout Subsubsection
1919 print
1920 \end_layout
1922 \begin_layout Standard
1923 Print line to message console.
1924 \end_layout
1926 \begin_layout Subsubsection
1927 tostringx
1928 \end_layout
1930 \begin_layout Standard
1931 Convert arbitrary lua value into a string (using same conversions as print)
1932  and return the result.
1933 \end_layout
1935 \begin_layout Subsubsection
1936 exec(string command)
1937 \end_layout
1939 \begin_layout Standard
1940 Run command as it was entered on the command line
1941 \end_layout
1943 \begin_layout Subsubsection
1944 utime()
1945 \end_layout
1947 \begin_layout Standard
1948 Returns two values.
1949  First is time since some epoch in seconds, the second is microseconds mod
1950  10^6 since that epoch.
1951 \end_layout
1953 \begin_layout Subsubsection
1954 emulator_ready()
1955 \end_layout
1957 \begin_layout Standard
1958 Returns true if emulator has finished booting, false if not (on_startup()
1959  will be issued later).
1960 \end_layout
1962 \begin_layout Subsubsection
1963 set_idle_timeout(number timeout)
1964 \end_layout
1966 \begin_layout Standard
1967 Set number of microseconds to block idle for.
1968  After this timeout has expired, on_idle() will be called once.
1969 \end_layout
1971 \begin_layout Subsubsection
1972 set_timer_timeout(number timeout)
1973 \end_layout
1975 \begin_layout Standard
1976 Set number of microseconds to block timer for.
1977  After this timeout has expired, on_timer() will be called once.
1978 \end_layout
1980 \begin_layout Subsubsection
1981 bus_address(number snesaddr)
1982 \end_layout
1984 \begin_layout Standard
1985 Returns virtual address corresponding to specified address on SNES bus.
1986 \end_layout
1988 \begin_layout Subsubsection
1989 loopwrapper(function fun, ...)
1990 \end_layout
1992 \begin_layout Standard
1993 Calls function fun with function and specified arguments.
1994  The function passed suspends execution until the function returned is called.
1995  Handy for linear flow control among multiple invocations of a hook.
1996  Example code:
1997 \end_layout
1999 \begin_layout LyX-Code
2000 on_paint = loopwrapper(function(wait)
2001 \end_layout
2003 \begin_deeper
2004 \begin_layout LyX-Code
2005 while true do
2006 \end_layout
2008 \begin_deeper
2009 \begin_layout LyX-Code
2010 gui.text(0, 0, 
2011 \begin_inset Quotes eld
2012 \end_inset
2014 Test!
2015 \begin_inset Quotes erd
2016 \end_inset
2019 \end_layout
2021 \begin_layout LyX-Code
2022 wait();
2023 \end_layout
2025 \end_deeper
2026 \begin_layout LyX-Code
2028 \end_layout
2030 \end_deeper
2031 \begin_layout LyX-Code
2032 end);
2033 \end_layout
2035 \begin_layout Subsubsection
2036 list_bindings([string cmd])
2037 \end_layout
2039 \begin_layout Standard
2040 Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
2041  If command is specified, the table is limited to that command.
2042 \end_layout
2044 \begin_layout Subsubsection
2045 get_alias(string aname)
2046 \end_layout
2048 \begin_layout Standard
2049 Get expansion of given alias.
2050 \end_layout
2052 \begin_layout Subsubsection
2053 set_alias(string aname, string value)
2054 \end_layout
2056 \begin_layout Standard
2057 Set expansion of given alias.
2058 \end_layout
2060 \begin_layout Subsubsection
2061 create_ibind(string name, string cmd)
2062 \end_layout
2064 \begin_layout Standard
2065 Return object representing inverse binding with specified name and specified
2066  command.
2067 \end_layout
2069 \begin_layout Itemize
2070 To create press/release commands, use aliases +foo and -foo .
2071 \end_layout
2073 \begin_layout Itemize
2074 Keep the returned object around.
2075 \end_layout
2077 \begin_layout Subsection
2078 Table bit:
2079 \end_layout
2081 \begin_layout Standard
2082 Bitwise logical functions and related.
2083 \end_layout
2085 \begin_layout Subsubsection
2086 bit.none(number...) / bit.bnot(number...)
2087 \end_layout
2089 \begin_layout Standard
2090 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2091  arguments).
2092 \end_layout
2094 \begin_layout Subsubsection
2095 bit.any(number...) / bit.bor(number...)
2096 \end_layout
2098 \begin_layout Standard
2099 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2100 \end_layout
2102 \begin_layout Subsubsection
2103 bit.all(number...) / bit.band(number...)
2104 \end_layout
2106 \begin_layout Standard
2107 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2109 \end_layout
2111 \begin_layout Subsubsection
2112 bit.parity(number...) / bit.bxor(number...)
2113 \end_layout
2115 \begin_layout Standard
2116 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2117  of the arguments).
2118 \end_layout
2120 \begin_layout Subsubsection
2121 bit.lrotate(number base[, number amount[, number bits]])
2122 \end_layout
2124 \begin_layout Standard
2125 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2126 \end_layout
2128 \begin_layout Subsubsection
2129 bit.rrotate(number base[, number amount[, number bits]])
2130 \end_layout
2132 \begin_layout Standard
2133 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2134  places.
2135 \end_layout
2137 \begin_layout Subsubsection
2138 bit.lshift(number base[, number amount[, number bits]])
2139 \end_layout
2141 \begin_layout Standard
2142 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2143  The new bits are filled with zeroes.
2144 \end_layout
2146 \begin_layout Subsubsection
2147 bit.lrshift(number base[, number amount[, number bits]])
2148 \end_layout
2150 \begin_layout Standard
2151 Shift bits-bit (max 48, default 48) number logically right by amount (default
2152  1) places.
2153  The new bits are filled with zeroes.
2154 \end_layout
2156 \begin_layout Subsubsection
2157 bit.arshift(number base[, number amount[, number bits]])
2158 \end_layout
2160 \begin_layout Standard
2161 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2162  (default 1) places.
2163  The new bits are shifted in with copy of the high bit.
2164 \end_layout
2166 \begin_layout Subsubsection
2167 bit.extract(number base[, number bit0[, number bit1,...]])
2168 \end_layout
2170 \begin_layout Standard
2171 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2172 \end_layout
2174 \begin_layout Standard
2175 Notes: 
2176 \end_layout
2178 \begin_layout Itemize
2179 Bit numbers up to 51 should work reliably (then things start falling apart
2180  due to double precision issues).
2181 \end_layout
2183 \begin_layout Itemize
2184 There are two special bit positions, true and false, standing for always
2185  set bit and always clear bit.
2186 \end_layout
2188 \begin_layout Subsubsection
2189 bit.value([number bit1[, number bit2,...]])
2190 \end_layout
2192 \begin_layout Standard
2193 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2194  places and so on.
2195  As special value, nil argument is no-op.
2196 \end_layout
2198 \begin_layout Subsubsection
2199 bit.test_any(number a, number b)
2200 \end_layout
2202 \begin_layout Standard
2203 Is there a common set bit in a and b?
2204 \end_layout
2206 \begin_layout Subsubsection
2207 bit.test_all(number a, number b)
2208 \end_layout
2210 \begin_layout Standard
2211 Are all set bits in b also set in a?
2212 \end_layout
2214 \begin_layout Subsubsection
2215 bit.popcount(number a)
2216 \end_layout
2218 \begin_layout Standard
2219 Population count of a.
2220 \end_layout
2222 \begin_layout Subsubsection
2223 bit.clshift(number a, number b, [number amount,[number bits]])
2224 \end_layout
2226 \begin_layout Standard
2227 Does chained left shift on a, b by amount positions, assuming numbers to
2228  be of specified number of bits.
2229 \end_layout
2231 \begin_layout Subsubsection
2232 bit.crshift(number a, number b, [number amount,[number bits]])
2233 \end_layout
2235 \begin_layout Standard
2236 Does chained right shift on a, b by amount positions, assuming numbers to
2237  be of specified number of bits.
2238 \end_layout
2240 \begin_layout Subsubsection
2241 bit.flagdecode(number a, number bits, [string on, [string off]])
2242 \end_layout
2244 \begin_layout Standard
2245 Return string of length bits where ith character is ith character of on
2246  if bit i is on, otherwise ith character of off.
2247  Out of range reads give last character, or '*'/'-' if empty.
2248 \end_layout
2250 \begin_layout Subsubsection
2251 bit.rflagdecode(number a, number bits, [string on, [string off]])
2252 \end_layout
2254 \begin_layout Standard
2255 Like bit.flagdecode, but outputs the string in the opposite order (most significa
2256 nt bit first).
2257 \end_layout
2259 \begin_layout Subsection
2260 Table gui:
2261 \end_layout
2263 \begin_layout Standard
2264 Most of these functions can only be called in on_paint and on_video callbacks.
2265  Exceptions are noted.
2266 \end_layout
2268 \begin_layout Standard
2269 Colors are 32-bit.
2270  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2271  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2272  opaque, 255 is almost transparent).
2273  -1 is the fully transparent color.
2274  Alpha values greater than 127 do work.
2275 \end_layout
2277 \begin_layout Standard
2278 Origin of coordinates is at top left corner of game display area.
2279  Left and top gaps correspond to negative coordinates.
2280 \end_layout
2282 \begin_layout Subsubsection
2283 gui.resolution()
2284 \end_layout
2286 \begin_layout Standard
2287 Returns 2-tuple (hresolution, vresolution).
2288 \end_layout
2290 \begin_layout Subsubsection
2291 gui.<class>_gap(number gap)
2292 \end_layout
2294 \begin_layout Standard
2295 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2296  is 8191).
2297  If successful, old gap is returned.
2298 \end_layout
2300 \begin_layout Subsubsection
2301 gui.delta_<class>_gap(number gap)
2302 \end_layout
2304 \begin_layout Standard
2305 Increase the <class> (left, right, top, bottom) gap by specified value (max
2306  gap is 8191) and return the old gap (returns nothing on error).
2307 \end_layout
2309 \begin_layout Subsubsection
2310 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2311 \end_layout
2313 \begin_layout Standard
2314 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2315  16 high).
2316  Parameters:
2317 \end_layout
2319 \begin_layout Itemize
2320 x: X-coordinate to start the drawing from (and x-coordinate at begining
2321  of the lines).
2322 \end_layout
2324 \begin_layout Itemize
2325 y: Y-coordinate to start the drawing from.
2326 \end_layout
2328 \begin_layout Itemize
2329 text: The text to draw.
2330 \end_layout
2332 \begin_layout Itemize
2333 fgc: Text color (default is 0xFFFFFF (white))
2334 \end_layout
2336 \begin_layout Itemize
2337 bgc: Background color (default is -1 (transparent))
2338 \end_layout
2340 \begin_layout Subsubsection
2341 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2342 \end_layout
2344 \begin_layout Standard
2345 Like gui.text, but draw using double-width.
2346 \end_layout
2348 \begin_layout Subsubsection
2349 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2350 \end_layout
2352 \begin_layout Standard
2353 Like gui.text, but draw using double-height.
2354 \end_layout
2356 \begin_layout Subsubsection
2357 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2358 \end_layout
2360 \begin_layout Standard
2361 Like gui.text, but draw using double-width/double-height.
2362 \end_layout
2364 \begin_layout Subsubsection
2365 gui.rectangle(number x, number y, number width, number height[, number thickness[
2366 , number outline[, number fill]]])
2367 \end_layout
2369 \begin_layout Standard
2370 Draw rectangle on the GUI.
2371  Parameters:
2372 \end_layout
2374 \begin_layout Itemize
2375 x: X-coordinate of left edge.
2376 \end_layout
2378 \begin_layout Itemize
2379 y: Y-coordinate of upper edge.
2380 \end_layout
2382 \begin_layout Itemize
2383 width: Width of rectangle.
2384 \end_layout
2386 \begin_layout Itemize
2387 height: Height of rectangle.
2388 \end_layout
2390 \begin_layout Itemize
2391 thickness: Thickness of outline (default is 1).
2392 \end_layout
2394 \begin_layout Itemize
2395 outline: Color of outline (default is 0xFFFFFF (white))
2396 \end_layout
2398 \begin_layout Itemize
2399 fill: Color of fill (default is -1 (transparent))
2400 \end_layout
2402 \begin_layout Subsubsection
2403 gui.box(number x, number y, number width, number height[, number thickness[,
2404  number outline1[,number outline2[, number fill]]]])
2405 \end_layout
2407 \begin_layout Standard
2408 Draw rectangle with 3D effect on the GUI.
2409  Parameters:
2410 \end_layout
2412 \begin_layout Itemize
2413 x: X-coordinate of left edge.
2414 \end_layout
2416 \begin_layout Itemize
2417 y: Y-coordinate of upper edge.
2418 \end_layout
2420 \begin_layout Itemize
2421 width: Width of rectangle.
2422 \end_layout
2424 \begin_layout Itemize
2425 height: Height of rectangle.
2426 \end_layout
2428 \begin_layout Itemize
2429 thickness: Thickness of outline (default is 1).
2430 \end_layout
2432 \begin_layout Itemize
2433 outline1: First color of outline (default is 0xFFFFFF (white))
2434 \end_layout
2436 \begin_layout Itemize
2437 outline2: First color of outline (default is 0x808080 (dark gray))
2438 \end_layout
2440 \begin_layout Itemize
2441 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2442 \end_layout
2444 \begin_layout Subsubsection
2445 gui.pixel(number x, number y[, number color])
2446 \end_layout
2448 \begin_layout Standard
2449 Draw one pixel on the GUI.
2450  Parameters:
2451 \end_layout
2453 \begin_layout Itemize
2454 x: X-coordinate of the pixel
2455 \end_layout
2457 \begin_layout Itemize
2458 y: Y-coordinate of the pixel
2459 \end_layout
2461 \begin_layout Itemize
2462 color: Color of the pixel (default is 0xFFFFFF (white))
2463 \end_layout
2465 \begin_layout Subsubsection
2466 gui.crosshair(number x, number y[, number length[, number color]])
2467 \end_layout
2469 \begin_layout Standard
2470 Draw a crosshair.
2471  Parameters:
2472 \end_layout
2474 \begin_layout Itemize
2475 x: X-coordinate of the crosshair
2476 \end_layout
2478 \begin_layout Itemize
2479 y: Y-coordinate of the crosshair
2480 \end_layout
2482 \begin_layout Itemize
2483 length: Length of the crosshair lines (default 10).
2484 \end_layout
2486 \begin_layout Itemize
2487 color: Color of the crosshair (default is 0xFFFFFF (white))
2488 \end_layout
2490 \begin_layout Subsubsection
2491 gui.line(number x1, number y1, number x2, number y2[, number color])
2492 \end_layout
2494 \begin_layout Standard
2495 Draw a thin line.
2496  Parameters:
2497 \end_layout
2499 \begin_layout Itemize
2500 x1: X-coordinate of one end.
2501 \end_layout
2503 \begin_layout Itemize
2504 y1: Y-coordinate of one end.
2505 \end_layout
2507 \begin_layout Itemize
2508 x2: X-coordinate of the other end.
2509 \end_layout
2511 \begin_layout Itemize
2512 y2: Y-coordinate of the other end.
2513 \end_layout
2515 \begin_layout Itemize
2516 color: Color of the line (default is 0xFFFFFF (white)).
2517 \end_layout
2519 \begin_layout Subsubsection
2520 gui.circle(number x, number y, number r[, number thick[, number border[,
2521  number fil]]])
2522 \end_layout
2524 \begin_layout Standard
2525 Draw a circle.
2526  Parameters.
2527 \end_layout
2529 \begin_layout Itemize
2530 x: X-coordinate of the center
2531 \end_layout
2533 \begin_layout Itemize
2534 y: Y-coordinate of the center
2535 \end_layout
2537 \begin_layout Itemize
2538 r: The radius of the circle
2539 \end_layout
2541 \begin_layout Itemize
2542 thick: Border thickness
2543 \end_layout
2545 \begin_layout Itemize
2546 border: Border color (default is 0xFFFFFF (white))
2547 \end_layout
2549 \begin_layout Itemize
2550 fill: Fill color (default is -1 (transparent)).
2551 \end_layout
2553 \begin_layout Subsubsection
2554 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2555 \end_layout
2557 \begin_layout Standard
2558 Draw a bitmap on screen with specified palette.
2559  Parameters:
2560 \end_layout
2562 \begin_layout Itemize
2563 x: X-coordinate of left edge.
2564 \end_layout
2566 \begin_layout Itemize
2567 y: Y-coordinate of top edge.
2568 \end_layout
2570 \begin_layout Itemize
2571 bitmap: The bitmap to draw
2572 \end_layout
2574 \begin_layout Itemize
2575 palette: The palette to draw the bitmap using.
2576 \end_layout
2578 \begin_layout Subsubsection
2579 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2580 \end_layout
2582 \begin_layout Standard
2583 Draw a bitmap on screen.
2584  Parameters:
2585 \end_layout
2587 \begin_layout Itemize
2588 x: X-coordinate of left edge.
2589 \end_layout
2591 \begin_layout Itemize
2592 y: Y-coordinate of top edge.
2593 \end_layout
2595 \begin_layout Itemize
2596 bitmap: The bitmap to draw
2597 \end_layout
2599 \begin_layout Subsubsection
2600 gui.palette_new()
2601 \end_layout
2603 \begin_layout Standard
2604 Returns a new palette (initially all transparent).
2605  Can be used anywhere.
2606 \end_layout
2608 \begin_layout Subsubsection
2609 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2610 \end_layout
2612 \begin_layout Standard
2613 Returns a new bitmap/dbitmap.
2614  Can be used anywhere.
2615  Parameters:
2616 \end_layout
2618 \begin_layout Itemize
2619 w: The width of new bitmap
2620 \end_layout
2622 \begin_layout Itemize
2623 h: The height of new bitmap
2624 \end_layout
2626 \begin_layout Itemize
2627 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2628 \end_layout
2630 \begin_layout Itemize
2631 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2632 \end_layout
2634 \begin_layout Subsubsection
2635 gui.bitmap_load(string file)
2636 \end_layout
2638 \begin_layout Standard
2639 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2640  for bitmap).
2641  Can be used anywhere.
2642  Parameters:
2643 \end_layout
2645 \begin_layout Itemize
2646 file: The name of file to load.
2647 \end_layout
2649 \begin_layout Subsubsection
2650 gui.palette_set(palette palette, number index, number color)
2651 \end_layout
2653 \begin_layout Standard
2654 Sets color in palette.
2655  Can be used anywhere.
2656  Parameters:
2657 \end_layout
2659 \begin_layout Itemize
2660 palette: The palette to manipulate
2661 \end_layout
2663 \begin_layout Itemize
2664 index: Index of color (0-65535).
2665 \end_layout
2667 \begin_layout Itemize
2668 color: The color value.
2669 \end_layout
2671 \begin_layout Subsubsection
2672 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2673 \end_layout
2675 \begin_layout Standard
2676 Sets specified pixel in bitmap.
2677  Can be used anywhere.
2678  Parameters:
2679 \end_layout
2681 \begin_layout Itemize
2682 bitmap: The bitmap to manipulate
2683 \end_layout
2685 \begin_layout Itemize
2686 x: The x-coordinate of the pixel.
2687 \end_layout
2689 \begin_layout Itemize
2690 y: The y-coordinate of the pixel.
2691 \end_layout
2693 \begin_layout Itemize
2694 color: If bitmap is a bitmap, color index (0-65535).
2695  Otherwise color value.
2696 \end_layout
2698 \begin_layout Subsubsection
2699 gui.bitmap_size(bitmap/dbitmap bitmap)
2700 \end_layout
2702 \begin_layout Standard
2703 Get size of bitmap.
2704  Can be used anywhere.
2705  Parameters:
2706 \end_layout
2708 \begin_layout Itemize
2709 bitmap: The bitmap to query.
2710 \end_layout
2712 \begin_layout Standard
2713 The first return is the width, the second is the height.
2714 \end_layout
2716 \begin_layout Subsubsection
2717 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2718  src, [palette pal, ]number sx, number sy, number w, number h[, number ck])
2719 \end_layout
2721 \begin_layout Standard
2722 Blit a part of bitmap to another.
2723  Can be used anywhere.
2724  Parameters:
2725 \end_layout
2727 \begin_layout Itemize
2728 dest: Destination to blit to.
2729 \end_layout
2731 \begin_layout Itemize
2732 dx: left edge of target
2733 \end_layout
2735 \begin_layout Itemize
2736 dy: Top edge of target
2737 \end_layout
2739 \begin_layout Itemize
2740 src: The source to blit from.
2741  If destination is paletted, must be paletted.
2742 \end_layout
2744 \begin_layout Itemize
2745 pal: The palette.
2747 \emph on
2748 Only present if src is paletted, but dest is not.
2749 \end_layout
2751 \begin_layout Itemize
2752 sx: left edge of source
2753 \end_layout
2755 \begin_layout Itemize
2756 sy: Top edge of source
2757 \end_layout
2759 \begin_layout Itemize
2760 w: Width of region
2761 \end_layout
2763 \begin_layout Itemize
2764 h: Height of region.
2765 \end_layout
2767 \begin_layout Itemize
2768 ck: Color key.
2769  Pixels of this color are not blitted.
2770 \end_layout
2772 \begin_deeper
2773 \begin_layout Itemize
2774 If bitmaps are bitmaps, this is color index of colorkey.
2775  Values outside range 0-65535 cause no key to be used as colorkey.
2776 \end_layout
2778 \begin_layout Itemize
2779 If bitmaps are dbitmaps, this color value of colorkey.
2780 \end_layout
2782 \begin_layout Itemize
2783 May be absent or nil for no colorkey blit.
2784 \end_layout
2786 \end_deeper
2787 \begin_layout Subsubsection
2788 gui.bitmap_load_png(string filename)
2789 \end_layout
2791 \begin_layout Standard
2792 Load a bitmap from PNG file.
2793  Parameters:
2794 \end_layout
2796 \begin_layout Itemize
2797 filename: The name of file to load the bitmap frame.
2798 \end_layout
2800 \begin_layout Standard
2801 Return value:
2802 \end_layout
2804 \begin_layout Itemize
2805 If the PNG is of color type 3 (PALETTE), returns two value.
2806  First is BITMAP containing the image data from the PNG and second is PALETTE
2807  containg the palette data from the PNG.
2808 \end_layout
2810 \begin_layout Itemize
2811 For color types 0 (GRAY), 2 (RGB), 4 (GRAY_ALPHA) and 6 (RGBA), returns
2812  one DBITMAP containg the image data loaded from the PNG.
2813 \end_layout
2815 \begin_layout Subsubsection
2816 gui.bitmap_load_pal(string filename)
2817 \end_layout
2819 \begin_layout Standard
2820 Load a palette from file.
2821  Parameters:
2822 \end_layout
2824 \begin_layout Itemize
2825 filename: The name of the file.
2826 \end_layout
2828 \begin_layout Standard
2829 The kinds of lines supported
2830 \end_layout
2832 \begin_layout Itemize
2833 Blank or just whitespace: Ignored
2834 \end_layout
2836 \begin_layout Itemize
2837 First non-whitespace is '#': Ignored
2838 \end_layout
2840 \begin_layout Itemize
2841 <r> <g> <b>: Fully opaque color with specified RGB values (0-255)
2842 \end_layout
2844 \begin_layout Itemize
2845 <r> <g> <b> <a>: Color with specified RGB values (0-255) and specified alpha
2846  (0-256, 0 being fully transparent and 256 fully opaque).
2847 \end_layout
2849 \begin_layout Itemize
2850 transparent: Fully transparent color
2851 \end_layout
2853 \begin_layout Subsubsection
2854 gui.bitmap_load_str(string content)
2855 \end_layout
2857 \begin_layout Standard
2858 Like gui.bitmap_load, but reads the specified string directly as content.
2859 \end_layout
2861 \begin_layout Subsubsection
2862 gui.bitmap_load_png_str(string base64content)
2863 \end_layout
2865 \begin_layout Standard
2866 Like gui.bitmap_load_png, but reads the specified string (as base64-encoded)
2867  directly as content.
2868 \end_layout
2870 \begin_layout Subsubsection
2871 gui.bitmap_load_pal_str(string content)
2872 \end_layout
2874 \begin_layout Standard
2875 Like gui.bitmap_load_pal, but reads the specified string directly as content.
2876 \end_layout
2878 \begin_layout Subsubsection
2879 gui.repaint()
2880 \end_layout
2882 \begin_layout Standard
2883 Request on_repaint() to happen as soon as possible.
2884  Can be used anywhere.
2885 \end_layout
2887 \begin_layout Subsubsection
2888 gui.subframe_update(boolean on)
2889 \end_layout
2891 \begin_layout Standard
2892 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2893  or not happen (on=false).
2894  Can be used anywhere.
2895 \end_layout
2897 \begin_layout Subsubsection
2898 gui.screenshot(string filename)
2899 \end_layout
2901 \begin_layout Standard
2902 Write PNG screenshot of the current frame (no drawings) to specified file.
2903  Can be used anywhere.
2904 \end_layout
2906 \begin_layout Subsubsection
2907 gui.color(number r, number g, number b[, number a])
2908 \end_layout
2910 \begin_layout Standard
2911 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2912  each component in scale 0-255.
2913  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2914  opaque).
2915  The default alpha is 256.
2916 \end_layout
2918 \begin_layout Subsubsection
2919 gui.status(string name, string value)
2920 \end_layout
2922 \begin_layout Standard
2923 Set status field 
2924 \begin_inset Quotes eld
2925 \end_inset
2927 L[<name>]
2928 \begin_inset Quotes erd
2929 \end_inset
2931  to <value> in status area.
2932  Can be used anywhere.
2933 \end_layout
2935 \begin_layout Subsubsection
2936 gui.rainbow(number step, number steps[, number color])
2937 \end_layout
2939 \begin_layout Standard
2940 Perform hue rotation of color <color> (default bright red), by <step> steps.
2941  The number of steps per full rotation is given by absolute value of <steps>.
2942 \end_layout
2944 \begin_layout Standard
2945 If <steps> is negative, the rotation will be counterclockwise.
2946 \end_layout
2948 \begin_layout Subsubsection
2949 gui.screenshot(string filename)
2950 \end_layout
2952 \begin_layout Standard
2953 Saves a screenshot into specified file.
2954 \end_layout
2956 \begin_layout Subsubsection
2957 gui.loadfont(string filename)
2958 \end_layout
2960 \begin_layout Standard
2961 Loads font from specified file (CUSTOMFONT object).
2962 \end_layout
2964 \begin_layout Subsubsection
2965 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc[, number
2966  hlc]]])
2967 \end_layout
2969 \begin_layout Standard
2970 Draw string with custom font to screen.
2971  The parameters are the same as in gui.text, except hlc is the halo color
2972  (default is no halo).
2974 \end_layout
2976 \begin_layout Subsubsection
2977 gui.arrow(number x, number y, number length, number headwidth, number direction[,
2978  boolean fill[, number color[, number width[, number hthicknes]]]]
2979 \end_layout
2981 \begin_layout Standard
2982 Draw an arrow.
2983  Parameters:
2984 \end_layout
2986 \begin_layout Itemize
2987 x: The x-coordinate of arrow tip.
2988 \end_layout
2990 \begin_layout Itemize
2991 y: The y-coordinate of arrow tip.
2992 \end_layout
2994 \begin_layout Itemize
2995 length: Length of arrow tail
2996 \end_layout
2998 \begin_layout Itemize
2999 headwidth: Width of arrow head.
3000  Should be odd.
3001 \end_layout
3003 \begin_layout Itemize
3004 direction: Direction of arrow.
3005  0 is to right.
3006  Each unit is 45 degree rotation counterclockwise.
3007 \end_layout
3009 \begin_layout Itemize
3010 fill: If true, fill the arrow head (hthickness is ignored).
3011  Default is not to fill.
3012 \end_layout
3014 \begin_layout Itemize
3015 color: Color of arrow (default white).
3016 \end_layout
3018 \begin_layout Itemize
3019 width: Width of arrow tail.
3020  Should be odd.
3021  Default is 1.
3022 \end_layout
3024 \begin_layout Itemize
3025 hthickness: Thickness of arrow head.
3026  Default is the same as tail width.
3027 \end_layout
3029 \begin_layout Subsection
3030 table input
3031 \end_layout
3033 \begin_layout Standard
3034 Input handling.
3035  Only available in on_input callback.
3036 \end_layout
3038 \begin_layout Subsubsection
3039 input.get(number controller, number index)
3040 \end_layout
3042 \begin_layout Standard
3043 Read the specified index (0-11) from specified controller (0-7).
3044  Notes:
3045 \end_layout
3047 \begin_layout Itemize
3048 Uses physical controller numbering.
3049  Gamepad in port 2 is controller 4, not 1!
3050 \end_layout
3052 \begin_layout Subsubsection
3053 input.set(number controller, number index, number value)
3054 \end_layout
3056 \begin_layout Standard
3057 Write the specified index (0-11) from specified controller (0-7), storing
3058  value.
3059  Notes:
3060 \end_layout
3062 \begin_layout Itemize
3063 Uses physical controller numbering.
3064  Gamepad in port 2 is controller 4, not 1!
3065 \end_layout
3067 \begin_layout Subsubsection
3068 input.get2(number port, number controller, number index)
3069 \end_layout
3071 \begin_layout Standard
3072 Read the specified input tuple.
3073 \end_layout
3075 \begin_layout Itemize
3076 Port 0 is system port.
3077 \end_layout
3079 \begin_layout Subsubsection
3080 input.set2(number port, number controller, number index, number value)
3081 \end_layout
3083 \begin_layout Standard
3084 Write the specified input tuple.
3085 \end_layout
3087 \begin_layout Itemize
3088 Port 0 is system port.
3089 \end_layout
3091 \begin_layout Subsubsection
3092 input.lcid_to_pcid2(number lcid)
3093 \end_layout
3095 \begin_layout Standard
3096 Look up physical pcid pair (port, controller) corresponding to specified
3097  logical controller (1-based).
3098  Returns nothing if controller does not exist.
3099 \end_layout
3101 \begin_layout Subsubsection
3102 input.port_type(number port)
3103 \end_layout
3105 \begin_layout Standard
3106 Return type of specified port.
3107 \end_layout
3109 \begin_layout Subsubsection
3110 input.controller_info(number port, number controller)
3111 \end_layout
3113 \begin_layout Standard
3114 Get controller info for specified controller.
3115  If controller does not exist, returns nil.
3116  Otherwise returns a table with following fields:
3117 \end_layout
3119 \begin_layout Itemize
3120 type (string): Type of the controller.
3121 \end_layout
3123 \begin_layout Itemize
3124 class (string): Class of the controller.
3125 \end_layout
3127 \begin_layout Itemize
3128 classnum (number): Number of the controller within its class (1-based)
3129 \end_layout
3131 \begin_layout Itemize
3132 lcid (number): Logical controller number of the controller.
3133 \end_layout
3135 \begin_layout Itemize
3136 button_count (number): Number of buttons on controller
3137 \end_layout
3139 \begin_layout Itemize
3140 buttons (array): Array of following info about each button:
3141 \end_layout
3143 \begin_deeper
3144 \begin_layout Itemize
3145 type (string): Type of button.
3146  Currently one of 
3147 \begin_inset Quotes eld
3148 \end_inset
3150 null
3151 \begin_inset Quotes erd
3152 \end_inset
3155 \begin_inset Quotes eld
3156 \end_inset
3158 button
3159 \begin_inset Quotes erd
3160 \end_inset
3163 \begin_inset Quotes eld
3164 \end_inset
3166 axis
3167 \begin_inset Quotes erd
3168 \end_inset
3171 \begin_inset Quotes eld
3172 \end_inset
3174 raxis
3175 \begin_inset Quotes erd
3176 \end_inset
3179 \end_layout
3181 \begin_layout Itemize
3182 name (string): Name of button.
3183 \end_layout
3185 \begin_layout Itemize
3186 symbol (string): Symbol of button.
3187  Only present for type 
3188 \begin_inset Quotes eld
3189 \end_inset
3191 button
3192 \begin_inset Quotes erd
3193 \end_inset
3196 \end_layout
3198 \begin_layout Itemize
3199 hidden (boolean): True if hidden button.
3201 \end_layout
3203 \end_deeper
3204 \begin_layout Subsubsection
3205 input.veto_button()
3206 \end_layout
3208 \begin_layout Standard
3209 Signals that the button event should be vetoed.
3210  Only valid in on_button callback.
3211 \end_layout
3213 \begin_layout Subsubsection
3214 input.geta(number controller)
3215 \end_layout
3217 \begin_layout Standard
3218 Get input state for entiere controller.
3219  Returns 13 return values.
3220 \end_layout
3222 \begin_layout Itemize
3223 1st return value: Bitmask: bit i is set if i:th index is nonzero
3224 \end_layout
3226 \begin_layout Itemize
3227 2nd-13th return value: value of i:th index.
3228 \end_layout
3230 \begin_layout Subsubsection
3231 input.seta(number controller, number bitmask, number args...)
3232 \end_layout
3234 \begin_layout Standard
3235 Set state for entiere controller.
3236  args is up to 12 values for indices (overriding values in bitmask if specified).
3237 \end_layout
3239 \begin_layout Subsubsection
3240 input.controllertype(number controller)
3241 \end_layout
3243 \begin_layout Standard
3244 Get the type of controller as string.
3245  Valid values are:
3246 \end_layout
3248 \begin_layout Itemize
3249 gamepad
3250 \end_layout
3252 \begin_layout Itemize
3253 mouse
3254 \end_layout
3256 \begin_layout Itemize
3257 justifier
3258 \end_layout
3260 \begin_layout Itemize
3261 superscope
3262 \end_layout
3264 \begin_layout Subsubsection
3265 input.reset([number cycles])
3266 \end_layout
3268 \begin_layout Standard
3269 Execute reset.
3270  If cycles is greater than zero, do delayed reset.
3271  0 (or no value) causes immediate reset.
3272 \end_layout
3274 \begin_layout Itemize
3275 Only available with subframe flag false.
3276 \end_layout
3278 \begin_layout Subsubsection
3279 input.raw()
3280 \end_layout
3282 \begin_layout Standard
3283 Returns table of tables of all available keys and axes.
3284  The first table is indexed by key name (platform-dependent!), and the inner
3285  table has the following fields:
3286 \end_layout
3288 \begin_layout Itemize
3289 last_rawval: Last reported raw value for control.
3290 \end_layout
3292 \begin_layout Itemize
3293 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
3294  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
3295 \end_layout
3297 \begin_layout Itemize
3298 cal_left: Minimum calibration value.
3299  Only meaningful with axis and pressure types.
3300 \end_layout
3302 \begin_layout Itemize
3303 cal_center: Center calibration value.
3304  Only meaningful with axis and pressure types.
3305 \end_layout
3307 \begin_layout Itemize
3308 cal_right: Maximum calibration value.
3309  Only meaningful with axis and pressure types.
3310 \end_layout
3312 \begin_layout Itemize
3313 cal_tolerance: Dead zone tolerance.
3314  Only meaningful with axis and pressure types.
3315 \end_layout
3317 \begin_layout Subsubsection
3318 input.keyhook(string key, boolean state)
3319 \end_layout
3321 \begin_layout Standard
3322 Requests that keyhook events to be sent for key (state=true) or not sent
3323  (state=false).
3324 \end_layout
3326 \begin_layout Subsubsection
3327 input.joyget(number controller)
3328 \end_layout
3330 \begin_layout Standard
3331 Returns table for current controls for specified controller.
3332  The names of fields vary by controller type.
3333 \end_layout
3335 \begin_layout Itemize
3336 The buttons have the same name as those are referred to in other contexts
3337  in the emulator
3338 \end_layout
3340 \begin_layout Itemize
3341 The analog axes are 
3342 \begin_inset Quotes eld
3343 \end_inset
3345 xaxis
3346 \begin_inset Quotes erd
3347 \end_inset
3349  and 
3350 \begin_inset Quotes eld
3351 \end_inset
3353 yaxis
3354 \begin_inset Quotes erd
3355 \end_inset
3358 \end_layout
3360 \begin_layout Subsubsection
3361 input.joyset(number controller, table controls)
3362 \end_layout
3364 \begin_layout Standard
3365 Set the the state of specified controller to values specified in specified
3366  table.
3367 \end_layout
3369 \begin_layout Itemize
3370 nil does not change value
3371 \end_layout
3373 \begin_layout Itemize
3374 true/false (buttons) and integers (axes) force value.
3375 \end_layout
3377 \begin_layout Itemize
3378 string (button) inverts the input.
3379 \end_layout
3381 \begin_layout Subsubsection
3382 input.lcid_to_pcid(number controller)
3383 \end_layout
3385 \begin_layout Standard
3386 Return the physical index, physical port and controller number in port for
3387  specified (1-based) logical controller.
3388 \end_layout
3390 \begin_layout Subsection
3391 Table subtitle
3392 \end_layout
3394 \begin_layout Standard
3395 Subtitle handling
3396 \end_layout
3398 \begin_layout Subsubsection
3399 subtitle.byindex(number i)
3400 \end_layout
3402 \begin_layout Standard
3403 Read the frame and length of ith subtitle.
3404  Returns nothing if not present.
3405 \end_layout
3407 \begin_layout Subsubsection
3408 subtitle.set(number f, number l, string txt)
3409 \end_layout
3411 \begin_layout Standard
3412 Set the text of subtitle.
3413 \end_layout
3415 \begin_layout Subsubsection
3416 subtitle.get(number f, number l)
3417 \end_layout
3419 \begin_layout Standard
3420 Get the text of subtitle.
3421 \end_layout
3423 \begin_layout Subsubsection
3424 subtitle.delete(number f, number l)
3425 \end_layout
3427 \begin_layout Standard
3428 Delete specified subtitle.
3429 \end_layout
3431 \begin_layout Subsection
3432 Table hostmemory
3433 \end_layout
3435 \begin_layout Standard
3436 Host memory handling (extra memory saved to savestates).
3437  Host memory starts empty.
3438 \end_layout
3440 \begin_layout Subsubsection
3441 hostmemory.read(number address)
3442 \end_layout
3444 \begin_layout Standard
3445 Reads hostmemory slot address.
3446  Slot numbers out of range return false instead of numeric.
3447 \end_layout
3449 \begin_layout Subsubsection
3450 hostmemory.write(number address, number value)
3451 \end_layout
3453 \begin_layout Standard
3454 Writes hostmemory slot with 0-255.
3455  Slot numbers out of range cause extension of host memory slot space.
3456 \end_layout
3458 \begin_layout Subsubsection
3459 hostmemory.readbyte(number address)
3460 \end_layout
3462 \begin_layout Standard
3463 Read unsigned byte (1 element) from given address.
3464  Slots out of range return false.
3465 \end_layout
3467 \begin_layout Subsubsection
3468 hostmemory.writebyte(number address, number value)
3469 \end_layout
3471 \begin_layout Standard
3472 Write unsigned byte (1 element) to given slot.
3473  Slot numbers out of range cause extension.
3474 \end_layout
3476 \begin_layout Subsubsection
3477 hostmemory.readsbyte(number address)
3478 \end_layout
3480 \begin_layout Standard
3481 Read signed byte (1 element) from given address.
3482  Slots out of range return false.
3483 \end_layout
3485 \begin_layout Subsubsection
3486 hostmemory.writesbyte(number address, number value)
3487 \end_layout
3489 \begin_layout Standard
3490 Write signed byte (1 element) to given slot.
3491  Slot numbers out of range cause extension.
3492 \end_layout
3494 \begin_layout Subsubsection
3495 hostmemory.readword(number address)
3496 \end_layout
3498 \begin_layout Standard
3499 Read unsigned word (2 elements) from given address.
3500  Slots out of range return false.
3501 \end_layout
3503 \begin_layout Subsubsection
3504 hostmemory.writeword(number address, number value)
3505 \end_layout
3507 \begin_layout Standard
3508 Write unsigned word (2 elements) to given slot.
3509  Slot numbers out of range cause extension.
3510 \end_layout
3512 \begin_layout Subsubsection
3513 hostmemory.readsword(number address)
3514 \end_layout
3516 \begin_layout Standard
3517 Read signed word (2 elements) from given address.
3518  Slots out of range return false.
3519 \end_layout
3521 \begin_layout Subsubsection
3522 hostmemory.writesword(number address, number value)
3523 \end_layout
3525 \begin_layout Standard
3526 Write signed word (2 elements) to given slot.
3527  Slot numbers out of range cause extension.
3528 \end_layout
3530 \begin_layout Subsubsection
3531 hostmemory.readdword(number address)
3532 \end_layout
3534 \begin_layout Standard
3535 Read unsigned doubleword (4 elements) from given address.
3536  Slots out of range return false.
3537 \end_layout
3539 \begin_layout Subsubsection
3540 hostmemory.writedword(number address, number value)
3541 \end_layout
3543 \begin_layout Standard
3544 Write unsigned doubleword (4 elements) to given slot.
3545  Slot numbers out of range cause extension.
3546 \end_layout
3548 \begin_layout Subsubsection
3549 hostmemory.readsdword(number address)
3550 \end_layout
3552 \begin_layout Standard
3553 Read signed doubleword (4 elements) from given address.
3554  Slots out of range return false.
3555 \end_layout
3557 \begin_layout Subsubsection
3558 hostmemory.writesdword(number address, number value)
3559 \end_layout
3561 \begin_layout Standard
3562 Write signed doubleword (4 elements) to given slot.
3563  Slot numbers out of range cause extension.
3564 \end_layout
3566 \begin_layout Subsubsection
3567 hostmemory.readqword(number address)
3568 \end_layout
3570 \begin_layout Standard
3571 Read unsigned quadword (8 elements) from given address.
3572  Slots out of range return false.
3573 \end_layout
3575 \begin_layout Subsubsection
3576 hostmemory.writeqword(number address, number value)
3577 \end_layout
3579 \begin_layout Standard
3580 Write unsigned quadword (4 elements) to given slot.
3581  Slot numbers out of range cause extension.
3582 \end_layout
3584 \begin_layout Subsubsection
3585 hostmemory.readsqword(number address)
3586 \end_layout
3588 \begin_layout Standard
3589 Read signed quadword (8 elements) from given address.
3590  Slots out of range return false.
3591 \end_layout
3593 \begin_layout Subsubsection
3594 hostmemory.writesqword(number address, number value)
3595 \end_layout
3597 \begin_layout Standard
3598 Write signed quadword (8 elements) to given slot.
3599  Slot numbers out of range cause extension.
3600 \end_layout
3602 \begin_layout Subsection
3603 Table movie
3604 \end_layout
3606 \begin_layout Standard
3607 Movie handling
3608 \end_layout
3610 \begin_layout Subsubsection
3611 movie.currentframe()
3612 \end_layout
3614 \begin_layout Standard
3615 Return number of current frame.
3616 \end_layout
3618 \begin_layout Subsubsection
3619 movie.framecount()
3620 \end_layout
3622 \begin_layout Standard
3623 Return number of frames in movie.
3624 \end_layout
3626 \begin_layout Subsubsection
3627 movie.readonly()
3628 \end_layout
3630 \begin_layout Standard
3631 Return true if in readonly mode, false if in readwrite.
3632 \end_layout
3634 \begin_layout Subsubsection
3635 movie.rerecords()
3636 \end_layout
3638 \begin_layout Standard
3639 Returns the current value of rerecord count.
3640 \end_layout
3642 \begin_layout Subsubsection
3643 movie.set_readwrite()
3644 \end_layout
3646 \begin_layout Standard
3647 Set readwrite mode (does not cause on_readwrite callback).
3648 \end_layout
3650 \begin_layout Subsubsection
3651 movie.frame_subframes(number frame)
3652 \end_layout
3654 \begin_layout Standard
3655 Count number of subframes in specified frame (frame numbers are 1-based)
3656  and return that.
3657 \end_layout
3659 \begin_layout Subsubsection
3660 movie.read_subframes(number frame, number subframe)
3661 \end_layout
3663 \begin_layout Standard
3664 Read specifed subframe in specified frame and return data as array (100
3665  elements, numbered 0-99 currently).
3666 \end_layout
3668 \begin_layout Subsubsection
3669 movie.read_rtc()
3670 \end_layout
3672 \begin_layout Standard
3673 Returns the current value of the RTC as a pair (second, subsecond).
3674 \end_layout
3676 \begin_layout Subsubsection
3677 movie.unsafe_rewind([UNSAFEREWIND state])
3678 \end_layout
3680 \begin_layout Standard
3681 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3682 \end_layout
3684 \begin_layout Itemize
3685 If called without argument, causes emulator to start process of setting
3686  unsafe rewind point.
3687  When this has finished, callback on_set_rewind occurs, passing the rewind
3688  state to lua script.
3689 \end_layout
3691 \begin_layout Itemize
3692 If called with argument, causes emulator rewind to passed rewind point as
3693  soon as possible.
3694  Readwrite mode is implicitly activated.
3695 \end_layout
3697 \begin_layout Standard
3698 The following warnings apply to unsafe rewinding:
3699 \end_layout
3701 \begin_layout Itemize
3702 There are no safety checks against misuse (that's what 
3703 \begin_inset Quotes eld
3704 \end_inset
3706 unsafe
3707 \begin_inset Quotes erd
3708 \end_inset
3710  comes from)!
3711 \end_layout
3713 \begin_layout Itemize
3714 Only call rewind from timeline rewind point was set from.
3715 \end_layout
3717 \begin_layout Itemize
3718 Only call rewind from after the rewind point was set.
3719 \end_layout
3721 \begin_layout Subsubsection
3722 movie.copy_movie([INPUTMOVIE movie])
3723 \end_layout
3725 \begin_layout Standard
3726 Copies specified movie (if none or nil, the active movie) as new movie object
3727  (INPUTMOVIE).
3728 \end_layout
3730 \begin_layout Standard
3731 Also available as method in INPUTFRAME.
3732 \end_layout
3734 \begin_layout Subsubsection
3735 movie.get_frame([INPUTMOVIE movie,] number frame)
3736 \end_layout
3738 \begin_layout Standard
3739 Get INPUTFRAME object corresponding to specified frame in specified movie.
3740 \end_layout
3742 \begin_layout Standard
3743 Also available as method in INPUTFRAME.
3744 \end_layout
3746 \begin_layout Subsubsection
3747 movie.set_frame([INPUTMOVIE movie,] number frame, INPUTFRAME data)
3748 \end_layout
3750 \begin_layout Standard
3751 Set data in specified frame.
3752  Note: Past can't be edited in active movie.
3753 \end_layout
3755 \begin_layout Standard
3756 Also available as method in INPUTFRAME.
3757 \end_layout
3759 \begin_layout Subsubsection
3760 movie.get_size([INPUTMOVIE movie])
3761 \end_layout
3763 \begin_layout Standard
3764 Return number of subframes in specified movie.
3765 \end_layout
3767 \begin_layout Standard
3768 Also available as method in INPUTFRAME.
3769 \end_layout
3771 \begin_layout Subsubsection
3772 movie.count_frames([INPUTMOVIE movie])
3773 \end_layout
3775 \begin_layout Standard
3776 Return number of frames in movie.
3777 \end_layout
3779 \begin_layout Standard
3780 Also available as method in INPUTFRAME.
3781 \end_layout
3783 \begin_layout Subsubsection
3784 movie.find_frame([INPUTMOVIE movie], number frame)
3785 \end_layout
3787 \begin_layout Standard
3788 Returns starting subframe of given frame (frame numbers are 1-based).
3789  Returns -1 if frame number is bad.
3790 \end_layout
3792 \begin_layout Standard
3793 Also available as method in INPUTFRAME.
3794 \end_layout
3796 \begin_layout Subsubsection
3797 movie.blank_frame([INPUTMOVIE movie])
3798 \end_layout
3800 \begin_layout Standard
3801 Return blank INPUTFRAME with frame type from specified movie.
3802 \end_layout
3804 \begin_layout Standard
3805 Also available as method in INPUTFRAME.
3806 \end_layout
3808 \begin_layout Subsubsection
3809 movie.append_frames([INPUTMOVIE movie,] number frames)
3810 \end_layout
3812 \begin_layout Standard
3813 Append specified number of frames.
3814 \end_layout
3816 \begin_layout Standard
3817 Also available as method in INPUTFRAME.
3818 \end_layout
3820 \begin_layout Subsubsection
3821 movie.append_frame([INPUTMOVIE movie,] INPUTFRAME frame)
3822 \end_layout
3824 \begin_layout Standard
3825 Append specified frame.
3826  Past of current movie can't be edited.
3827 \end_layout
3829 \begin_layout Standard
3830 Also available as method in INPUTFRAME.
3831 \end_layout
3833 \begin_layout Subsubsection
3834 movie.truncate([INPUTMOVIE movie,] number frames)
3835 \end_layout
3837 \begin_layout Standard
3838 Truncate the specified movie to specified number of frames.
3839 \end_layout
3841 \begin_layout Standard
3842 Also available as method in INPUTFRAME.
3843 \end_layout
3845 \begin_layout Subsubsection
3846 movie.edit([INPUTMOVIE movie,] number frame, number port, number controller,
3847  number control, number/bool value)
3848 \end_layout
3850 \begin_layout Standard
3851 Change specified control in specified frame in specified movie.
3852  Past can't be edited in active movie.
3853 \end_layout
3855 \begin_layout Standard
3856 Also available as method in INPUTFRAME.
3857 \end_layout
3859 \begin_layout Subsubsection
3860 movie.copy_frames2([INPUTMOVIE dstmov,] number dst, [INPUTMOVIE srcmov,]
3861  number src, number count)
3862 \end_layout
3864 \begin_layout Standard
3865 Copy specified number of frames between two movies.
3866  The copy proceeeds in forward direction.
3867 \end_layout
3869 \begin_layout Subsubsection
3870 movie.copy_frames([INPUTMOVIE mov,] number dst, number src, number count,
3871  bool backwards)
3872 \end_layout
3874 \begin_layout Standard
3875 Copy specified number of frames from one point in movie to another.
3876  If backwards is true, the copy will be done backwards.
3877 \end_layout
3879 \begin_layout Standard
3880 Also available as method in INPUTFRAME.
3881 \end_layout
3883 \begin_layout Subsubsection
3884 movie.serialize([INPUTMOVIE movie,] string filename, bool binary)
3885 \end_layout
3887 \begin_layout Standard
3888 Serialize given movie into file.
3889  If binary is true, binary format (more compact and much faster) is used.
3890 \end_layout
3892 \begin_layout Standard
3893 Also available as method in INPUTFRAME.
3894 \end_layout
3896 \begin_layout Subsubsection
3897 movie.unserialize(INPUTFRAME template, string filename, bool binary)
3898 \end_layout
3900 \begin_layout Standard
3901 Unserialize movie from file.
3902  The given frame is used as template to decide the frame type.
3903  If binary is true, binary format is decoded (much faster).
3904 \end_layout
3906 \begin_layout Standard
3907 Also available as method in INPUTFRAME.
3908 \end_layout
3910 \begin_layout Subsubsection
3911 movie.current_first_subframe()
3912 \end_layout
3914 \begin_layout Standard
3915 Returns first subframe in current frame.
3916 \end_layout
3918 \begin_layout Subsubsection
3919 movie.pollcounter(number port, number controller, number control)
3920 \end_layout
3922 \begin_layout Standard
3923 Returns number of times the specified control has been polled this frame.
3924 \end_layout
3926 \begin_layout Subsubsection
3927 INPUTFRAME::get_button(number port, number controller, number control)
3928 \end_layout
3930 \begin_layout Standard
3931 Returns state of given button as boolean.
3932 \end_layout
3934 \begin_layout Subsubsection
3935 INPUTFRAME::get_axis(number port, number controller, number control)
3936 \end_layout
3938 \begin_layout Standard
3939 Returns state of given axis as number.
3940 \end_layout
3942 \begin_layout Subsubsection
3943 INPUTFRAME::set_button(number port, number controller, number control, number/bo
3944 ol value)
3945 \end_layout
3947 \begin_layout Standard
3948 Set the given button/axis to given value.
3949 \end_layout
3951 \begin_layout Subsubsection
3952 INPUTFRAME::set_axis(number port, number controller, number control)
3953 \end_layout
3955 \begin_layout Standard
3956 Same as set_button.
3957 \end_layout
3959 \begin_layout Subsubsection
3960 INPUTFRAME::serialize()
3961 \end_layout
3963 \begin_layout Standard
3964 Return string representation of frame.
3965 \end_layout
3967 \begin_layout Subsubsection
3968 INPUTFRAME::unserialize(string data)
3969 \end_layout
3971 \begin_layout Standard
3972 Set current frame from given data.
3973 \end_layout
3975 \begin_layout Subsubsection
3976 INPUTFRAME::get_stride()
3977 \end_layout
3979 \begin_layout Standard
3980 Return number of bytes needed to store the input frame.
3981  Mainly useful for some debugging.
3982 \end_layout
3984 \begin_layout Subsection
3985 Table settings
3986 \end_layout
3988 \begin_layout Standard
3989 Routines for settings manipulation
3990 \end_layout
3992 \begin_layout Subsubsection
3993 settings.get(string name)
3994 \end_layout
3996 \begin_layout Standard
3997 Get value of setting.
3998  If setting is blank, returns false.
3999  If setting value can't be obtained, returns (nil, error message).
4000 \end_layout
4002 \begin_layout Subsubsection
4003 settings.set(string name, string value)
4004 \end_layout
4006 \begin_layout Standard
4007 Set value of setting.
4008  If setting can't be set, returns (nil, error message).
4009 \end_layout
4011 \begin_layout Subsubsection
4012 settings.is_set(string name)
4013 \end_layout
4015 \begin_layout Standard
4016 Returns if setting is set.
4017  If setting does not exist, returns (nil, error message).
4018 \end_layout
4020 \begin_layout Subsubsection
4021 settings.blank(string name)
4022 \end_layout
4024 \begin_layout Standard
4025 Blanks a setting and returns true.
4026  If setting can't be blanked, returns (nil, error message).
4027 \end_layout
4029 \begin_layout Subsection
4030 Table memory
4031 \end_layout
4033 \begin_layout Standard
4034 Contains various functions for managing memory
4035 \end_layout
4037 \begin_layout Subsubsection
4038 memory.vma_count()
4039 \end_layout
4041 \begin_layout Standard
4042 Returns the number of VMAs
4043 \end_layout
4045 \begin_layout Subsubsection
4046 memory.read_vma(number index)
4047 \end_layout
4049 \begin_layout Standard
4050 Reads the specified VMA (indices start from zero).
4051  Trying to read invalid VMA gives nil.
4052  The read VMA is table with the following fields:
4053 \end_layout
4055 \begin_layout Itemize
4056 region_name (string): The readable name of the VMA
4057 \end_layout
4059 \begin_layout Itemize
4060 baseaddr (number): Base address of the VMA
4061 \end_layout
4063 \begin_layout Itemize
4064 lastaddr (number): Last address in the VMA.
4065 \end_layout
4067 \begin_layout Itemize
4068 size (number): The size of VMA in bytes.
4069 \end_layout
4071 \begin_layout Itemize
4072 readonly (boolean): True of the VMA corresponds to ROM.
4073 \end_layout
4075 \begin_layout Itemize
4076 iospace (boolean): True if the VMA is I/O space.
4077 \end_layout
4079 \begin_layout Itemize
4080 native_endian (boolean): True if the VMA has native endian as opposed to
4081  little endian.
4082 \end_layout
4084 \begin_layout Subsubsection
4085 memory.find_vma(number address)
4086 \end_layout
4088 \begin_layout Standard
4089 Finds the VMA containing specified address.
4090  Returns table in the same format as read_vma or nil if not found.
4091 \end_layout
4093 \begin_layout Subsubsection
4094 memory.readbyte(number address)
4095 \end_layout
4097 \begin_layout Standard
4098 Reads the specified address as unsigned byte and returns the result.
4099 \end_layout
4101 \begin_layout Subsubsection
4102 memory.readsbyte(number address)
4103 \end_layout
4105 \begin_layout Standard
4106 Reads the specified address as signed byte and returns the result.
4107 \end_layout
4109 \begin_layout Subsubsection
4110 memory.writebyte(number address, number value)
4111 \end_layout
4113 \begin_layout Standard
4114 Writes the specified value (negative values undergo 2's complement) to specified
4115  address (as a byte).
4116 \end_layout
4118 \begin_layout Subsubsection
4119 memory.readword(number address)
4120 \end_layout
4122 \begin_layout Standard
4123 Reads the specified address as unsigned word and returns the result.
4124 \end_layout
4126 \begin_layout Subsubsection
4127 memory.readsword(number address)
4128 \end_layout
4130 \begin_layout Standard
4131 Reads the specified address as signed word and returns the result.
4132 \end_layout
4134 \begin_layout Subsubsection
4135 memory.writeword(number address, number value)
4136 \end_layout
4138 \begin_layout Standard
4139 Writes the specified value (negative values undergo 2's complement) to specified
4140  address (as a word).
4141 \end_layout
4143 \begin_layout Subsubsection
4144 memory.readdword(number address)
4145 \end_layout
4147 \begin_layout Standard
4148 Reads the specified address as unsigned doubleword and returns the result.
4149 \end_layout
4151 \begin_layout Subsubsection
4152 memory.readsdword(number address)
4153 \end_layout
4155 \begin_layout Standard
4156 Reads the specified address as signed doubleword and returns the result.
4157 \end_layout
4159 \begin_layout Subsubsection
4160 memory.writedword(number address, number value)
4161 \end_layout
4163 \begin_layout Standard
4164 Writes the specified value (negative values undergo 2's complement) to specified
4165  address (as a doubleword).
4166 \end_layout
4168 \begin_layout Subsubsection
4169 memory.readqword(number address)
4170 \end_layout
4172 \begin_layout Standard
4173 Reads the specified address as unsigned quadword and returns the result.
4174 \end_layout
4176 \begin_layout Subsubsection
4177 memory.readsqword(number address)
4178 \end_layout
4180 \begin_layout Standard
4181 Reads the specified address as signed quadword and returns the result.
4182 \end_layout
4184 \begin_layout Subsubsection
4185 memory.writeqword(number address, number value)
4186 \end_layout
4188 \begin_layout Standard
4189 Writes the specified value (negative values undergo 2's complement) to specified
4190  address (as a quadword).
4191 \end_layout
4193 \begin_layout Subsubsection
4194 memory.hash_region(number base, number size)
4195 \end_layout
4197 \begin_layout Standard
4198 Hash specified number of bytes starting from specified address and return
4199  the SHA-256.
4200 \end_layout
4202 \begin_layout Subsubsection
4203 memory.hash_state()
4204 \end_layout
4206 \begin_layout Standard
4207 Hash the current system state.
4208  Mainly useful for debugging savestates.
4209 \end_layout
4211 \begin_layout Subsubsection
4212 memory.readregion(number base, number size)
4213 \end_layout
4215 \begin_layout Standard
4216 Read a region of memory.
4217 \end_layout
4219 \begin_layout Itemize
4220 Warning: If the region crosses VMA boundary, the results are undefined.
4221 \end_layout
4223 \begin_layout Subsubsection
4224 memory.map<type>([number base, number size])
4225 \end_layout
4227 \begin_layout Standard
4228 Returns a table mapping specified memory aperture for read/write.
4229  If parameters are omitted, entiere map space is the aperture.
4230 \end_layout
4232 \begin_layout Itemize
4233 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
4234 \end_layout
4236 \begin_layout Subsubsection
4237 memory.writeregion(number base, number size, table data)
4238 \end_layout
4240 \begin_layout Standard
4241 Write a region of memory.
4242 \end_layout
4244 \begin_layout Itemize
4245 Warning: If the region crosses VMA boundary, the results are undefined.
4246 \end_layout
4248 \begin_layout Subsubsection
4249 memory.map_structure()
4250 \end_layout
4252 \begin_layout Standard
4253 Returns a new mapping structure (MMAP_STRUCT)
4254 \end_layout
4256 \begin_layout Subsubsection
4257 MMAP_STRUCT(string key, number address, string type)
4258 \end_layout
4260 \begin_layout Standard
4261 Bind key in mmap structure to specified address with specified type.
4262 \end_layout
4264 \begin_layout Itemize
4265 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
4266 \end_layout
4268 \begin_layout Subsubsection
4269 memory.read_expr(string expr)
4270 \end_layout
4272 \begin_layout Standard
4273 Evaluate specified watch expression and return result
4274 \end_layout
4276 \begin_layout Subsection
4277 Table subtitle
4278 \end_layout
4280 \begin_layout Standard
4281 Contains functions for manipulating subtitles.
4282 \end_layout
4284 \begin_layout Subsubsection
4285 subtitle.byindex(number index)
4286 \end_layout
4288 \begin_layout Standard
4289 Get (basetime, length) pair of specified subtitle index or nothing if index
4290  isn't valid.
4291 \end_layout
4293 \begin_layout Subsubsection
4294 subtitle.get(number basetime, number length)
4295 \end_layout
4297 \begin_layout Standard
4298 Read the specified subtitle.
4299  Returns 
4300 \begin_inset Quotes eld
4301 \end_inset
4304 \begin_inset Quotes erd
4305 \end_inset
4307  if the subtitle does not exist.
4308 \end_layout
4310 \begin_layout Subsubsection
4311 subtitle.set(number basetime, number length, string content)
4312 \end_layout
4314 \begin_layout Standard
4315 Set the specified subtitle.
4316 \end_layout
4318 \begin_layout Subsubsection
4319 subtitle.deltete(number basetime, number length)
4320 \end_layout
4322 \begin_layout Standard
4323 Delete the specified subtitle.
4324 \end_layout
4326 \begin_layout Subsection
4327 Table _SYSTEM
4328 \end_layout
4330 \begin_layout Standard
4331 Contains copy of global variables from time of Lua initialization.
4332  Non-writeable.
4333 \end_layout
4335 \begin_layout Subsection
4336 Callbacks
4337 \end_layout
4339 \begin_layout Standard
4340 Various callbacks to Lua that can occur.
4341 \end_layout
4343 \begin_layout Subsubsection
4344 Callback: on_paint(bool not_synth)
4345 \end_layout
4347 \begin_layout Standard
4348 Called when screen is being painted.
4349  Any gui.* calls requiring graphic context draw on the screen.
4350 \end_layout
4352 \begin_layout Standard
4353 not_synth is true if this hook is being called in response to received frame,
4354  false otherwise.
4355 \end_layout
4357 \begin_layout Subsubsection
4358 Callback: on_video()
4359 \end_layout
4361 \begin_layout Standard
4362 Called when video dump frame is being painted.
4363  Any gui.* calls requiring graphic context draw on the video.
4364 \end_layout
4366 \begin_layout Subsubsection
4367 Callback: on_frame_emulated()
4368 \end_layout
4370 \begin_layout Standard
4371 Called when emulating frame has completed and on_paint()/on_video() calls
4372  are about to be issued.
4373 \end_layout
4375 \begin_layout Subsubsection
4376 Callback: on_frame()
4377 \end_layout
4379 \begin_layout Standard
4380 Called on each starting whole frame.
4381 \end_layout
4383 \begin_layout Subsubsection
4384 Callback: on_startup()
4385 \end_layout
4387 \begin_layout Standard
4388 Called when the emulator is starting (lsnes.rc and --run files has been run).
4389 \end_layout
4391 \begin_layout Subsubsection
4392 Callback: on_rewind()
4393 \end_layout
4395 \begin_layout Standard
4396 Called when rewind movie to beginning has completed.
4397 \end_layout
4399 \begin_layout Subsubsection
4400 Callback: on_pre_load(string name)
4401 \end_layout
4403 \begin_layout Standard
4404 Called just before savestate/movie load occurs (note: loads are always delayed,
4405  so this occurs even when load was initiated by lua).
4406 \end_layout
4408 \begin_layout Subsubsection
4409 Callback: on_err_load(string name)
4410 \end_layout
4412 \begin_layout Standard
4413 Called if loadstate goes wrong.
4414 \end_layout
4416 \begin_layout Subsubsection
4417 Callback: on_post_load(string name, boolean was_savestate)
4418 \end_layout
4420 \begin_layout Standard
4421 Called on successful loadstate.
4422  was_savestate gives if this was a savestate or a movie.
4423 \end_layout
4425 \begin_layout Subsubsection
4426 Callback: on_pre_save(string name, boolean is_savestate)
4427 \end_layout
4429 \begin_layout Standard
4430 Called just before savestate save occurs (note: movie saves are synchronous
4431  and won't trigger these callbacks if called from Lua).
4432 \end_layout
4434 \begin_layout Subsubsection
4435 Callback: on_err_save(string name)
4436 \end_layout
4438 \begin_layout Standard
4439 Called if savestate goes wrong.
4440 \end_layout
4442 \begin_layout Subsubsection
4443 Callback: on_post_save(string name, boolean is_savestate)
4444 \end_layout
4446 \begin_layout Standard
4447 Called on successful savaestate.
4448  is_savestate gives if this was a savestate or a movie.
4449 \end_layout
4451 \begin_layout Subsubsection
4452 Callback: on_quit()
4453 \end_layout
4455 \begin_layout Standard
4456 Called when emulator is shutting down.
4457 \end_layout
4459 \begin_layout Subsubsection
4460 Callback: on_input(boolean subframe)
4461 \end_layout
4463 \begin_layout Standard
4464 Called when emulator is just sending input to bsnes core.
4465  Warning: This is called even in readonly mode, but the results are ignored.
4466 \end_layout
4468 \begin_layout Subsubsection
4469 Callback: on_reset()
4470 \end_layout
4472 \begin_layout Standard
4473 Called when SNES is reset.
4474 \end_layout
4476 \begin_layout Subsubsection
4477 Callback: on_readwrite()
4478 \end_layout
4480 \begin_layout Standard
4481 Called when moving into readwrite mode as result of 
4482 \begin_inset Quotes eld
4483 \end_inset
4485 set-rwmode
4486 \begin_inset Quotes erd
4487 \end_inset
4489  command (note: moving to rwmode by Lua won't trigger this, as per recursive
4490  entry protection).
4491 \end_layout
4493 \begin_layout Subsubsection
4494 Callback: on_snoop(number port, number controller, number index, number
4495  value)
4496 \end_layout
4498 \begin_layout Standard
4499 Called each time bsnes asks for input.
4500  The value is the final value to be sent to bsnes core (readonly mode, autohold
4501  and autofire have been taken into account).
4502  Might be useful when translating movies to format suitable for console
4503  verification.
4504  Note: There is no way to modify the value to be sent.
4505 \end_layout
4507 \begin_layout Itemize
4508 Not called if callback on_snoop2 is defined.
4509 \end_layout
4511 \begin_layout Subsubsection
4512 Callback: on_snoop2(number port, number controller, number index, number
4513  value)
4514 \end_layout
4516 \begin_layout Standard
4517 Like on_snoop, but reserves port 0 for system, having first user port be
4518  port 1.
4519 \end_layout
4521 \begin_layout Subsubsection
4522 Callback: on_keyhook(string keyname, table state)
4523 \end_layout
4525 \begin_layout Standard
4526 Sent when key that has keyhook events requested changes state.
4527  Keyname is name of the key (group) and state is the state (same kind as
4528  table values in input.raw).
4529 \end_layout
4531 \begin_layout Subsubsection
4532 Callback: on_idle()
4533 \end_layout
4535 \begin_layout Standard
4536 Called when requested by set_idle_timeout(), the timeout has expired and
4537  emulator is waiting.
4538 \end_layout
4540 \begin_layout Subsubsection
4541 Callback: on_timer()
4542 \end_layout
4544 \begin_layout Standard
4545 Called when requested by set_idle_timeout() and the timeout has expired
4546  (regardless if emulator is waiting).
4547 \end_layout
4549 \begin_layout Subsubsection
4550 Callback: on_set_rewind(UNSAFEREWIND r)
4551 \end_layout
4553 \begin_layout Standard
4554 Called when unsafe rewind object has been constructed.
4555 \end_layout
4557 \begin_layout Subsubsection
4558 Callback: on_pre_rewind() 
4559 \end_layout
4561 \begin_layout Standard
4562 Called just before unsafe rewind is about to occur.
4563 \end_layout
4565 \begin_layout Subsubsection
4566 Callback: on_post_rewind() 
4567 \end_layout
4569 \begin_layout Standard
4570 Called just after unsafe rewind has occured.
4571 \end_layout
4573 \begin_layout Subsubsection
4574 Callback: on_button(number port, number controller, number index, string
4575  type)
4576 \end_layout
4578 \begin_layout Standard
4579 Called on controller button press, with following parameters:
4580 \end_layout
4582 \begin_layout Itemize
4583 port: Port number (0 is system)
4584 \end_layout
4586 \begin_layout Itemize
4587 controller: Controller within port
4588 \end_layout
4590 \begin_layout Itemize
4591 index: Index of button.
4592 \end_layout
4594 \begin_layout Itemize
4595 type: Type of event, one of:
4596 \end_layout
4598 \begin_deeper
4599 \begin_layout Itemize
4600 \begin_inset Quotes eld
4601 \end_inset
4603 pressed
4604 \begin_inset Quotes erd
4605 \end_inset
4607 : Button was pressed.
4608 \end_layout
4610 \begin_layout Itemize
4611 \begin_inset Quotes eld
4612 \end_inset
4614 released
4615 \begin_inset Quotes erd
4616 \end_inset
4618 : Button was released.
4619 \end_layout
4621 \begin_layout Itemize
4622 \begin_inset Quotes eld
4623 \end_inset
4625 hold
4626 \begin_inset Quotes erd
4627 \end_inset
4629 : Held.
4630 \end_layout
4632 \begin_layout Itemize
4633 \begin_inset Quotes eld
4634 \end_inset
4636 unhold
4637 \begin_inset Quotes erd
4638 \end_inset
4640 : Released from hold.
4641 \end_layout
4643 \begin_layout Itemize
4644 \begin_inset Quotes eld
4645 \end_inset
4647 type
4648 \begin_inset Quotes erd
4649 \end_inset
4651 : Typing input on button.
4652 \end_layout
4654 \begin_layout Itemize
4655 \begin_inset Quotes eld
4656 \end_inset
4658 untype
4659 \begin_inset Quotes erd
4660 \end_inset
4662 : Typing input undone.
4663 \end_layout
4665 \begin_layout Itemize
4666 \begin_inset Quotes eld
4667 \end_inset
4669 analog
4670 \begin_inset Quotes erd
4671 \end_inset
4673 : Analog action on axis.
4674 \end_layout
4676 \end_deeper
4677 \begin_layout Subsubsection
4678 Callback: on_movie_lost(STRING kind)
4679 \end_layout
4681 \begin_layout Standard
4682 Called just before something would happen that could lose movie data.
4683  Kind can be:
4684 \end_layout
4686 \begin_layout Itemize
4687 readwrite: Switching to readwrite mode.
4688 \end_layout
4690 \begin_layout Itemize
4691 reload: ROM is being reloaded in readwrite mode.
4692 \end_layout
4694 \begin_layout Itemize
4695 load: New movie is being loaded.
4696 \end_layout
4698 \begin_layout Itemize
4699 unsaferewind: Unsafe rewind is happening.
4700 \end_layout
4702 \begin_layout Section
4703 Movie editor
4704 \end_layout
4706 \begin_layout Itemize
4707 The editor edits in-memory movie.
4708 \end_layout
4710 \begin_layout Itemize
4711 Because past can't be edited and readwrite mode doesn't allow future, editing
4712  only works in 
4713 \emph on
4714 read only
4715 \emph default
4716  mode.
4717 \end_layout
4719 \begin_layout Itemize
4720 Keyboard triggers the normal hotkeys and bindings.
4721 \end_layout
4723 \begin_layout Subsection
4724 Left button actions
4725 \end_layout
4727 \begin_layout Itemize
4728 Clicking on cell in future (indicated by lack of redish background) toggles
4729  it (if it is a button) or prompts for a value (if it is an axis)
4730 \end_layout
4732 \begin_layout Itemize
4733 Dragging vertically toggles sequence of buttons or changes a sequence of
4734  axis values.
4735 \end_layout
4737 \begin_layout Subsection
4738 Right button actions
4739 \end_layout
4741 \begin_layout Standard
4742 The right mouse button pops up a context-sensitive menu:
4743 \end_layout
4745 \begin_layout Itemize
4746 Toggle <something>: Toggle this button
4747 \end_layout
4749 \begin_layout Itemize
4750 Change <something>: Change this axis value
4751 \end_layout
4753 \begin_layout Itemize
4754 Insert frame after: Insert a frame after this frame
4755 \end_layout
4757 \begin_layout Itemize
4758 Append frame: Append a frame to movie
4759 \end_layout
4761 \begin_layout Itemize
4762 Append frames: Append specified number of frames to movie
4763 \end_layout
4765 \begin_layout Itemize
4766 Delete frame: Delete this frame
4767 \end_layout
4769 \begin_layout Itemize
4770 Delete subframe: Delete this subframe
4771 \end_layout
4773 \begin_layout Itemize
4774 Truncate movie: Delete this subframe and everything after it.
4775 \end_layout
4777 \begin_layout Itemize
4778 Scroll to frame: Prompt for a frame and scroll the display to that frame.
4779 \end_layout
4781 \begin_layout Itemize
4782 Scroll to current frame: Scroll the display to current position
4783 \end_layout
4785 \begin_layout Itemize
4786 Run to frame: Prompts for frame and runs the emulation to that frame.
4787 \end_layout
4789 \begin_layout Itemize
4790 Change number of lines visible: Change the height of the movie display (1
4791  to 255).
4792 \end_layout
4794 \begin_layout Itemize
4795 Lock scroll to playback: While playing back or rewinding movies, the display
4796  will follow if enabled.
4797 \end_layout
4799 \begin_layout Section
4800 Memory watch expression syntax
4801 \end_layout
4803 \begin_layout Standard
4804 Memory watch expressions are in RPN (Reverse Polish Notation).
4805  At the end of expression, the top entry on stack is taken as the final
4806  result.
4807 \end_layout
4809 \begin_layout Standard
4810 Notations:
4811 \end_layout
4813 \begin_layout Itemize
4814 Evaluation order is strictly left to right.
4815 \end_layout
4817 \begin_layout Itemize
4818 a is the entry on top of stack
4819 \end_layout
4821 \begin_layout Itemize
4822 b is the entry immediately below top of stack
4823 \end_layout
4825 \begin_layout Itemize
4826 ; separates values to be pushed (no intermediate pop).
4827 \end_layout
4829 \begin_layout Itemize
4830 After end of element, all used stack slots are popped and all results are
4831  pushed.
4832 \end_layout
4834 \begin_layout Itemize
4835 When pushing multiple values, the pushes occur in order shown.
4836 \end_layout
4838 \begin_layout Standard
4839 The following operators are available:
4840 \end_layout
4842 \begin_layout Itemize
4843 + : a + b
4844 \end_layout
4846 \begin_layout Itemize
4847 - : a - b
4848 \end_layout
4850 \begin_layout Itemize
4851 * : a * b
4852 \end_layout
4854 \begin_layout Itemize
4855 / : a / b
4856 \end_layout
4858 \begin_layout Itemize
4859 % : a % b
4860 \end_layout
4862 \begin_layout Itemize
4863 a : atan(a)
4864 \end_layout
4866 \begin_layout Itemize
4867 b : read_signed_byte(a)
4868 \end_layout
4870 \begin_layout Itemize
4871 c : cos(a)
4872 \end_layout
4874 \begin_layout Itemize
4875 d : read_signed_dword(a)
4876 \end_layout
4878 \begin_layout Itemize
4879 i : quotent(a / b)
4880 \end_layout
4882 \begin_layout Itemize
4883 p :
4884 \begin_inset Formula $\pi$
4885 \end_inset
4888 \end_layout
4890 \begin_layout Itemize
4891 q : read_signed_qword(a)
4892 \end_layout
4894 \begin_layout Itemize
4895 r : sqrt(a)
4896 \end_layout
4898 \begin_layout Itemize
4899 s : sin(a)
4900 \end_layout
4902 \begin_layout Itemize
4903 t : tan(a)
4904 \end_layout
4906 \begin_layout Itemize
4907 u : a; a
4908 \end_layout
4910 \begin_layout Itemize
4911 w : read_signed_word(a)
4912 \end_layout
4914 \begin_layout Itemize
4915 A : atan2(a, b)
4916 \end_layout
4918 \begin_layout Itemize
4919 B : read_unsigned_byte(a)
4920 \end_layout
4922 \begin_layout Itemize
4923 C<number>z : Push number <number> to stack.
4924 \end_layout
4926 \begin_layout Itemize
4927 D : read_unsigned_dword(a)
4928 \end_layout
4930 \begin_layout Itemize
4931 C0x<number>z : Push number <number> (hexadecimal) to stack.
4932 \end_layout
4934 \begin_layout Itemize
4935 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
4936  for 10-16 digits).
4937 \end_layout
4939 \begin_layout Itemize
4940 Q : read_unsigned_qword(a)
4941 \end_layout
4943 \begin_layout Itemize
4944 R<digit> : round a to <digit> digits.
4945 \end_layout
4947 \begin_layout Itemize
4948 W : read_unsigned_word(a)
4949 \end_layout
4951 \begin_layout Subsection
4952 Example:
4953 \end_layout
4955 \begin_layout Standard
4956 C0x007e0878zWC0x007e002czW-
4957 \end_layout
4959 \begin_layout Enumerate
4960 Push value 0x7e0878 on top of stack (C0x007e0878z).
4961 \end_layout
4963 \begin_layout Enumerate
4964 Pop the value on top of stack (0x7e0878), read word value at that address
4965  and push the result,call it x1 (W).
4966 \end_layout
4968 \begin_layout Enumerate
4969 Push value 0x7e002c on top of stack (C0x007e002cz).
4970 \end_layout
4972 \begin_layout Enumerate
4973 Pop the value on top of stack (0x7e002c), read word value at that address
4974  and push the result,call it x2 (W).
4975 \end_layout
4977 \begin_layout Enumerate
4978 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
4979  x2 - x1 (-).
4980 \end_layout
4982 \begin_layout Enumerate
4983 Since the expression ends, the final memory watch result is the top one
4984  on stack, which is x2 - x1.
4985 \end_layout
4987 \begin_layout Section
4988 Modifier and key names:
4989 \end_layout
4991 \begin_layout Subsection
4992 SDL Platform
4993 \end_layout
4995 \begin_layout Subsubsection
4996 Modifier names
4997 \end_layout
4999 \begin_layout Standard
5000 Following modifier names are known:
5001 \end_layout
5003 \begin_layout Itemize
5004 ctrl, lctrl, rctrl: Control keys
5005 \end_layout
5007 \begin_layout Itemize
5008 alt, lalt, ralt: ALT keys.
5009 \end_layout
5011 \begin_layout Itemize
5012 shift, lshift, rshift: Shift keys.
5013 \end_layout
5015 \begin_layout Itemize
5016 meta, lmeta, rmeta: Meta keys.
5017 \end_layout
5019 \begin_layout Itemize
5020 num, caps: Numlock/Capslock (these are sticky!)
5021 \end_layout
5023 \begin_layout Itemize
5024 mode: Mode select.
5025 \end_layout
5027 \begin_layout Subsubsection
5028 Key names
5029 \end_layout
5031 \begin_layout Standard
5032 Following key names are known:
5033 \end_layout
5035 \begin_layout Itemize
5036 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
5037  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
5038  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
5039  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
5040  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
5041  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
5042  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
5043  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
5044  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
5045  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
5046  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
5047  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
5048  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
5049  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
5050  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
5051  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
5052  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
5053  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
5054  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
5055  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
5056  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
5057  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
5058  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
5059  break, menu, power, euro, undo
5060 \end_layout
5062 \begin_layout Itemize
5063 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
5064  hardware-dependent scan code of <n> (useful to bind those keys that don't
5065  have symbolic names).
5066 \end_layout
5068 \begin_layout Subsubsection
5069 Joystick pseudo-keys:
5070 \end_layout
5072 \begin_layout Itemize
5073 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
5074 \end_layout
5076 \begin_layout Itemize
5077 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
5078 \end_layout
5080 \begin_layout Itemize
5081 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
5082 \end_layout
5084 \begin_layout Itemize
5085 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
5086 \end_layout
5088 \begin_layout Itemize
5089 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
5090 \end_layout
5092 \begin_layout Itemize
5093 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
5094  position (axis modes axis and axis_inverse).
5095 \end_layout
5097 \begin_layout Itemize
5098 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
5099  position (axis modes axis and axis_inverse).
5100 \end_layout
5102 \begin_layout Itemize
5103 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
5104  modes pressure_*).
5105 \end_layout
5107 \begin_layout Subsubsection
5108 Special buttons:
5109 \end_layout
5111 \begin_layout Itemize
5112 Escape: Enter/Exit Command mode, cancel modal dialogs.
5113 \end_layout
5115 \begin_layout Itemize
5116 Return (also KPEnter): Execute command, ok modal dialog.
5117 \end_layout
5119 \begin_layout Itemize
5120 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
5121  in command history
5122 \end_layout
5124 \begin_layout Itemize
5125 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
5126  in command history
5127 \end_layout
5129 \begin_layout Itemize
5130 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
5131 \end_layout
5133 \begin_layout Itemize
5134 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
5135 \end_layout
5137 \begin_layout Itemize
5138 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
5139 \end_layout
5141 \begin_layout Itemize
5142 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
5143 \end_layout
5145 \begin_layout Itemize
5146 Delete (also KP.
5147  if no num lock; command mode): Delete character to right of cursor.
5148 \end_layout
5150 \begin_layout Itemize
5151 Insert (also KP0 if no num lock; command mode): Toggle between insert /
5152  overwrite modes.
5153 \end_layout
5155 \begin_layout Itemize
5156 Backspace (command mode): Delete character to left of cursor.
5157 \end_layout
5159 \begin_layout Itemize
5160 CTRL+LEFT (also ALT+B; command mode): Previous word.
5161 \end_layout
5163 \begin_layout Itemize
5164 CTRL+RIGHT (also ALT+F; command mode): Next word.
5165 \end_layout
5167 \begin_layout Itemize
5168 ALT+D (also CTRL+W; command mode): Delete word.
5169 \end_layout
5171 \begin_layout Itemize
5172 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
5173 \end_layout
5175 \begin_layout Subsection
5176 wxWidgets platform
5177 \end_layout
5179 \begin_layout Subsubsection
5180 Modifier names:
5181 \end_layout
5183 \begin_layout Standard
5184 Following modifier names are known:
5185 \end_layout
5187 \begin_layout Itemize
5189 \end_layout
5191 \begin_layout Itemize
5192 ctrl
5193 \end_layout
5195 \begin_layout Itemize
5196 shift 
5197 \end_layout
5199 \begin_layout Itemize
5200 meta
5201 \end_layout
5203 \begin_layout Itemize
5204 cmd (Mac OS X only)
5205 \end_layout
5207 \begin_layout Subsubsection
5208 Key names:
5209 \end_layout
5211 \begin_layout Standard
5212 Following key names are known:
5213 \end_layout
5215 \begin_layout Itemize
5216 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
5217  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
5218  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
5219  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
5220  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
5221  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
5222  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
5223  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
5224  pause, capital, end, home, lefT, up, right, down, select, print, execute,
5225  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
5226  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
5227  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
5228  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
5229  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
5230  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
5231  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
5232  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
5233  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
5234  windows_right, windows_menu, command, special1, special2, special3, special4,
5235  special5, special6, special7, special8, special9, special10, special11,
5236  special12, special13, special14, special15, special16, special17, special18,
5237  special19, special20
5238 \end_layout
5240 \begin_layout Section
5241 Movie file format
5242 \end_layout
5244 \begin_layout Standard
5245 Movie file is .zip archive in itself, normal ZIP archive tools work on it
5246  (note: If you recompress it, do not use compression methods other than
5247  store and deflate and especially do not use encryption of any kind).
5248 \end_layout
5250 \begin_layout Subsection
5251 Detecting clean start/SRAM/Savestate
5252 \end_layout
5254 \begin_layout Itemize
5255 If file has member 
5256 \begin_inset Quotes eld
5257 \end_inset
5259 savestate
5260 \begin_inset Quotes erd
5261 \end_inset
5263  it is savestate, otherwise:
5264 \end_layout
5266 \begin_layout Itemize
5267 If file has members with names starting 
5268 \begin_inset Quotes eld
5269 \end_inset
5271 moviesram.
5272 \begin_inset Quotes erd
5273 \end_inset
5275  it is movie starting from SRAM, otherwise:
5276 \end_layout
5278 \begin_layout Itemize
5279 It is movie starting from clear state.
5280 \end_layout
5282 \begin_layout Subsection
5283 Member: gametype
5284 \end_layout
5286 \begin_layout Standard
5287 Type of game ROM and region (as one line).
5288  Valid values are:
5289 \end_layout
5291 \begin_layout Standard
5292 \begin_inset Tabular
5293 <lyxtabular version="3" rows="8" columns="3">
5294 <features tabularvalignment="middle">
5295 <column alignment="center" valignment="top" width="0">
5296 <column alignment="center" valignment="top" width="0">
5297 <column alignment="center" valignment="top" width="0">
5298 <row>
5299 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5300 \begin_inset Text
5302 \begin_layout Plain Layout
5303 Value
5304 \end_layout
5306 \end_inset
5307 </cell>
5308 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5309 \begin_inset Text
5311 \begin_layout Plain Layout
5312 System
5313 \end_layout
5315 \end_inset
5316 </cell>
5317 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5318 \begin_inset Text
5320 \begin_layout Plain Layout
5321 Region
5322 \end_layout
5324 \end_inset
5325 </cell>
5326 </row>
5327 <row>
5328 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5329 \begin_inset Text
5331 \begin_layout Plain Layout
5332 snes_pal
5333 \end_layout
5335 \end_inset
5336 </cell>
5337 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5338 \begin_inset Text
5340 \begin_layout Plain Layout
5341 Super NES
5342 \end_layout
5344 \end_inset
5345 </cell>
5346 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5347 \begin_inset Text
5349 \begin_layout Plain Layout
5351 \end_layout
5353 \end_inset
5354 </cell>
5355 </row>
5356 <row>
5357 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5358 \begin_inset Text
5360 \begin_layout Plain Layout
5361 sgb_pal
5362 \end_layout
5364 \end_inset
5365 </cell>
5366 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5367 \begin_inset Text
5369 \begin_layout Plain Layout
5370 Super Game Boy
5371 \end_layout
5373 \end_inset
5374 </cell>
5375 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5376 \begin_inset Text
5378 \begin_layout Plain Layout
5380 \end_layout
5382 \end_inset
5383 </cell>
5384 </row>
5385 <row>
5386 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5387 \begin_inset Text
5389 \begin_layout Plain Layout
5390 snes_ntsc
5391 \end_layout
5393 \end_inset
5394 </cell>
5395 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5396 \begin_inset Text
5398 \begin_layout Plain Layout
5399 Super NES
5400 \end_layout
5402 \end_inset
5403 </cell>
5404 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5405 \begin_inset Text
5407 \begin_layout Plain Layout
5408 NTSC
5409 \end_layout
5411 \end_inset
5412 </cell>
5413 </row>
5414 <row>
5415 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5416 \begin_inset Text
5418 \begin_layout Plain Layout
5419 sgb_ntsc
5420 \end_layout
5422 \end_inset
5423 </cell>
5424 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5425 \begin_inset Text
5427 \begin_layout Plain Layout
5428 Super Game Boy
5429 \end_layout
5431 \end_inset
5432 </cell>
5433 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5434 \begin_inset Text
5436 \begin_layout Plain Layout
5437 NTSC
5438 \end_layout
5440 \end_inset
5441 </cell>
5442 </row>
5443 <row>
5444 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5445 \begin_inset Text
5447 \begin_layout Plain Layout
5449 \end_layout
5451 \end_inset
5452 </cell>
5453 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5454 \begin_inset Text
5456 \begin_layout Plain Layout
5457 BS-X (non-slotted)
5458 \end_layout
5460 \end_inset
5461 </cell>
5462 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5463 \begin_inset Text
5465 \begin_layout Plain Layout
5466 NTSC
5467 \end_layout
5469 \end_inset
5470 </cell>
5471 </row>
5472 <row>
5473 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5474 \begin_inset Text
5476 \begin_layout Plain Layout
5477 bsxslotted
5478 \end_layout
5480 \end_inset
5481 </cell>
5482 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5483 \begin_inset Text
5485 \begin_layout Plain Layout
5486 BS-X (slotted)
5487 \end_layout
5489 \end_inset
5490 </cell>
5491 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5492 \begin_inset Text
5494 \begin_layout Plain Layout
5495 NTSC
5496 \end_layout
5498 \end_inset
5499 </cell>
5500 </row>
5501 <row>
5502 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5503 \begin_inset Text
5505 \begin_layout Plain Layout
5506 sufamiturbo
5507 \end_layout
5509 \end_inset
5510 </cell>
5511 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5512 \begin_inset Text
5514 \begin_layout Plain Layout
5515 Sufami Turbo
5516 \end_layout
5518 \end_inset
5519 </cell>
5520 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5521 \begin_inset Text
5523 \begin_layout Plain Layout
5524 NTSC
5525 \end_layout
5527 \end_inset
5528 </cell>
5529 </row>
5530 </lyxtabular>
5532 \end_inset
5535 \end_layout
5537 \begin_layout Standard
5538 Frame rates are:
5539 \end_layout
5541 \begin_layout Standard
5542 \begin_inset Tabular
5543 <lyxtabular version="3" rows="3" columns="2">
5544 <features tabularvalignment="middle">
5545 <column alignment="center" valignment="top" width="0">
5546 <column alignment="center" valignment="top" width="0">
5547 <row>
5548 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5549 \begin_inset Text
5551 \begin_layout Plain Layout
5552 Region
5553 \end_layout
5555 \end_inset
5556 </cell>
5557 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5558 \begin_inset Text
5560 \begin_layout Plain Layout
5561 Framerate (fps)
5562 \end_layout
5564 \end_inset
5565 </cell>
5566 </row>
5567 <row>
5568 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5569 \begin_inset Text
5571 \begin_layout Plain Layout
5573 \end_layout
5575 \end_inset
5576 </cell>
5577 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5578 \begin_inset Text
5580 \begin_layout Plain Layout
5581 322445/6448
5582 \end_layout
5584 \end_inset
5585 </cell>
5586 </row>
5587 <row>
5588 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5589 \begin_inset Text
5591 \begin_layout Plain Layout
5592 NTSC
5593 \end_layout
5595 \end_inset
5596 </cell>
5597 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5598 \begin_inset Text
5600 \begin_layout Plain Layout
5601 10738636/178683
5602 \end_layout
5604 \end_inset
5605 </cell>
5606 </row>
5607 </lyxtabular>
5609 \end_inset
5612 \end_layout
5614 \begin_layout Subsection
5615 Member: port1
5616 \end_layout
5618 \begin_layout Standard
5619 Contains type of port #1 (as one line).
5620  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
5621  If not present, defaults to 'gamepad'.
5622 \end_layout
5624 \begin_layout Subsection
5625 Member: port2
5626 \end_layout
5628 \begin_layout Standard
5629 Contains type of port #2 (as one line).
5630  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
5631  'justifier' and 'justifiers'.
5632  If not present, defaults to 'none'.
5633 \end_layout
5635 \begin_layout Subsection
5636 Member: gamename
5637 \end_layout
5639 \begin_layout Standard
5640 Contains name of the game (as one line).
5641 \end_layout
5643 \begin_layout Subsection
5644 Member: authors
5645 \end_layout
5647 \begin_layout Standard
5648 Contains authors, one per line.
5649  Part before '|' is the full name, part after is the nickname.
5650 \end_layout
5652 \begin_layout Subsection
5653 Member: systemid
5654 \end_layout
5656 \begin_layout Standard
5657 Always 
5658 \begin_inset Quotes eld
5659 \end_inset
5661 lsnes-rr1
5662 \begin_inset Quotes erd
5663 \end_inset
5665  (one line).
5666  Used to reject other saves.
5667 \end_layout
5669 \begin_layout Subsection
5670 Member: controlsversion
5671 \end_layout
5673 \begin_layout Standard
5674 Always 
5675 \begin_inset Quotes eld
5676 \end_inset
5679 \begin_inset Quotes erd
5680 \end_inset
5682  (one line).
5683  Used to identify what controls are there.
5684 \end_layout
5686 \begin_layout Subsection
5687 Member: 
5688 \begin_inset Quotes eld
5689 \end_inset
5691 coreversion
5692 \begin_inset Quotes erd
5693 \end_inset
5696 \end_layout
5698 \begin_layout Standard
5699 Contains bsnes core version number (as one line).
5700 \end_layout
5702 \begin_layout Subsection
5703 Member: projectid
5704 \end_layout
5706 \begin_layout Standard
5707 Contains project ID (as one line).
5708  Used to identify if two movies are part of the same project.
5709 \end_layout
5711 \begin_layout Subsection
5712 Member: {rom,slota,slotb}{,xml}.sha256
5713 \end_layout
5715 \begin_layout Standard
5716 Contains SHA-256 of said ROM or ROM mapping file (as one line).
5717  Absent if corresponding file is absent.
5718 \end_layout
5720 \begin_layout Subsection
5721 Member: moviesram.<name>
5722 \end_layout
5724 \begin_layout Standard
5725 Raw binary startup SRAM of kind <name>.
5726  Only present in savestates and movies starting from SRAM.
5727 \end_layout
5729 \begin_layout Subsection
5730 Member: saveframe
5731 \end_layout
5733 \begin_layout Standard
5734 Contains frame number (as one line) of frame movie was saved on.
5735  Only present in savestates.
5736 \end_layout
5738 \begin_layout Subsection
5739 Member: lagcounter
5740 \end_layout
5742 \begin_layout Standard
5743 Current value of lag counter (as one line).
5744  Only present in savestates.
5745 \end_layout
5747 \begin_layout Subsection
5748 Member: pollcounters
5749 \end_layout
5751 \begin_layout Standard
5752 Contains poll counters (currently 100 of them), one per line.
5753  Each line is raw poll count if DRDY is set for it.
5754  Otherwise it is negative poll count minus one.
5755  Only present in savestates.
5756 \end_layout
5758 \begin_layout Subsection
5759 Member: hostmemory
5760 \end_layout
5762 \begin_layout Standard
5763 Raw binary dump of host memory.
5764  Only present in savestates.
5765 \end_layout
5767 \begin_layout Subsection
5768 Member: savestate
5769 \end_layout
5771 \begin_layout Standard
5772 The raw binary savestate itself.
5773  Savestate detection uses this file, only present in savestates.
5774 \end_layout
5776 \begin_layout Subsection
5777 Member: screenshot
5778 \end_layout
5780 \begin_layout Standard
5781 Screenshot of current frame.
5782  Only present in savestates.
5783  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
5784  data.
5785  Height of image is inferred from the width and size of data.
5786 \end_layout
5788 \begin_layout Subsection
5789 Member: sram.<name>
5790 \end_layout
5792 \begin_layout Standard
5793 Raw binary SRAM of kind <name> at time of savestate.
5794  Only present in savestates.
5795 \end_layout
5797 \begin_layout Subsection
5798 Member: input
5799 \end_layout
5801 \begin_layout Standard
5802 The actual input track, one line per subframe (blank lines are skipped).
5803 \end_layout
5805 \begin_layout Itemize
5806 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
5807  part of same frame as previous, otherwise it starts a new frame.
5808 \end_layout
5810 \begin_layout Itemize
5811 First subframe must start a new frame.
5812 \end_layout
5814 \begin_layout Standard
5815 Length of movie in frames is number of lines in input file that start a
5816  new frame.
5817 \end_layout
5819 \begin_layout Subsection
5820 Member: subtitles
5821 \end_layout
5823 \begin_layout Standard
5824 Subtitle track.
5825  Optional.
5826 \end_layout
5828 \begin_layout Itemize
5829 Each line is in form <firstframe> <numframes> <text>.
5830 \end_layout
5832 \begin_layout Itemize
5833 Linefeed is encoded as 
5834 \backslash
5835 n, backslash is encoded as 
5836 \backslash
5838 \backslash
5840 \end_layout
5842 \begin_layout Subsection
5843 Member: rerecords
5844 \end_layout
5846 \begin_layout Standard
5847 Contains textual base-10 rerecord count (as one line; emulator just writes
5848  this, it doesn't read it) + 1.
5849 \end_layout
5851 \begin_layout Subsection
5852 Member: rrdata
5853 \end_layout
5855 \begin_layout Standard
5856 This member stores set of load IDs.
5857  There is one load ID per rerecord (plus one corresponding to start of project).
5858 \end_layout
5860 \begin_layout Itemize
5861 This member constists of concatenation of records
5862 \end_layout
5864 \begin_layout Itemize
5865 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
5866  IDs.
5867 \end_layout
5869 \begin_layout Itemize
5870 IDs are interpretted as 256-bit big-endian integers with warparound.
5871 \end_layout
5873 \begin_layout Itemize
5874 Initial predicted ID is all zeroes.
5875 \end_layout
5877 \begin_layout Standard
5878 Format of each record is:
5879 \end_layout
5881 \begin_layout Itemize
5882 1 byte: Opcode byte.
5883  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
5884  Bit 7 is unused.
5885 \end_layout
5887 \begin_layout Itemize
5888 32-prefixlen bytes of ID.
5889 \end_layout
5891 \begin_layout Itemize
5892 countlen bytes of big-endian count (count).
5893 \end_layout
5895 \begin_layout Standard
5896 Records are processed as follows:
5897 \end_layout
5899 \begin_layout Itemize
5900 To form the first ID encoded by record, take the first prefixlen bytes predicted
5901  ID and append the read ID value to it.
5902  The result is the first ID encoded.
5903 \end_layout
5905 \begin_layout Itemize
5906 If countlen is 0, record encodes 1 ID.
5907 \end_layout
5909 \begin_layout Itemize
5910 If countlen is 1, record encodes 2+count IDs.
5911 \end_layout
5913 \begin_layout Itemize
5914 If countlen is 2, record encodes 258+count IDs.
5915 \end_layout
5917 \begin_layout Itemize
5918 If countlen is 3, record encodes 65794+count IDs.
5919 \end_layout
5921 \begin_layout Itemize
5922 The new predicted ID is the next ID after last one encoded by the record.
5923 \end_layout
5925 \begin_layout Standard
5926 The number of rerecords + 1 is equal to the sum of number of IDs encoded
5927  by all records.
5928 \end_layout
5930 \begin_layout Subsection
5931 Member: starttime.second
5932 \end_layout
5934 \begin_layout Standard
5935 Movie starting time, second part.
5936  Epoch is Unix epoch.
5937  Default is 1,000,000,000.
5938 \end_layout
5940 \begin_layout Subsection
5941 Member: starttime.subsecond
5942 \end_layout
5944 \begin_layout Standard
5945 Movie starting time, subsecond part.
5946  Unit is CPU clocks.
5947  Default is 0.
5948 \end_layout
5950 \begin_layout Subsection
5951 Member: savetime.second
5952 \end_layout
5954 \begin_layout Standard
5955 Movie saving time, second part.
5956  Default is starttime.second.
5957  Only present in savestates.
5958 \end_layout
5960 \begin_layout Subsection
5961 Member: savetime.subsecond
5962 \end_layout
5964 \begin_layout Standard
5965 Movie saving time, subsecond part.
5966  Default is starttime.subsecond.
5967  Only present in savestates.
5968 \end_layout
5970 \begin_layout Section
5971 lsvs file format (commentary tracks)
5972 \end_layout
5974 \begin_layout Subsection
5975 Clusters
5976 \end_layout
5978 \begin_layout Itemize
5979 Each cluster is 8kB (8192 bytes) in size.
5980 \end_layout
5982 \begin_layout Itemize
5983 Cluster n starts at offset 8192*n in file.
5984 \end_layout
5986 \begin_layout Itemize
5987 The following clusters are system special:
5988 \end_layout
5990 \begin_deeper
5991 \begin_layout Itemize
5992 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
5993 \end_layout
5995 \begin_layout Itemize
5996 Cluster 1 (superblock)
5997 \end_layout
5999 \end_deeper
6000 \begin_layout Subsection
6001 Cluster tables
6002 \end_layout
6004 \begin_layout Itemize
6005 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
6006  last 11 bits of n).
6007 \end_layout
6009 \begin_layout Itemize
6010 This cluster table consists of 2048 4-byte big-endian integers.
6011 \end_layout
6013 \begin_layout Itemize
6014 Each entry describes a cluster in 16MB supercluster, in order.
6015 \end_layout
6017 \begin_layout Itemize
6018 The valid values for entries are:
6019 \end_layout
6021 \begin_deeper
6022 \begin_layout Itemize
6023 0x00000000: Free cluster
6024 \end_layout
6026 \begin_layout Itemize
6027 0x00000001: Last cluster in chain.
6028 \end_layout
6030 \begin_layout Itemize
6031 0xFFFFFFFF: System cluster (cluster tables and superblock)
6032 \end_layout
6034 \begin_layout Itemize
6035 (anything else): Number of next cluster in chain.
6036  Must not be multiple of 2048.
6037 \end_layout
6039 \end_deeper
6040 \begin_layout Itemize
6041 Due to limitations of the format, there can be at most 2097052 superclusters,
6042  giving maximum file size of 16TB.
6043 \end_layout
6045 \begin_layout Subsection
6046 Stream table
6047 \end_layout
6049 \begin_layout Itemize
6050 The stream table chain always starts in cluster 2.
6051 \end_layout
6053 \begin_layout Itemize
6054 Otherwise, it follows normal chaining.
6055 \end_layout
6057 \begin_layout Itemize
6058 The stream table consists of 16-byte entries:
6059 \end_layout
6061 \begin_deeper
6062 \begin_layout Itemize
6063 The first 8 bytes of entry give big-endian beginning position of stream
6064  in units of 1/48000 s.
6065 \end_layout
6067 \begin_layout Itemize
6068 The next 4 bytes of entry give big-endian beginning cluster for control
6069  data.
6070  0 here marks the entry as not present.
6071 \end_layout
6073 \begin_layout Itemize
6074 The last 4 bytes of entry give big-endian beginning cluster for codec data.
6075 \end_layout
6077 \end_deeper
6078 \begin_layout Itemize
6079 Stream table clusters are normal clusters, following normal chaining.
6080 \end_layout
6082 \begin_layout Itemize
6083 The stream begnning position is not guarenteed unique.
6084  There can be multiple streams with the same starting position in the file.
6085 \end_layout
6087 \begin_layout Subsection
6088 Stream control data
6089 \end_layout
6091 \begin_layout Itemize
6092 The stream control data consists of entries 4 bytes each:
6093 \end_layout
6095 \begin_deeper
6096 \begin_layout Itemize
6097 The first 2 bytes of entry gives big-endian length of packet
6098 \end_layout
6100 \begin_layout Itemize
6101 The next byte of entry gives audio length of packet in units of 1/400 s.
6102 \end_layout
6104 \begin_layout Itemize
6105 The last byte is control byte.
6106 \end_layout
6108 \begin_deeper
6109 \begin_layout Itemize
6110 0 means this entry is not present and the control data ends.
6111 \end_layout
6113 \begin_layout Itemize
6114 1 is valid control entry.
6115 \end_layout
6117 \end_deeper
6118 \end_deeper
6119 \begin_layout Itemize
6120 The stream control data can also end by running into end of the readable
6121  chain.
6122 \end_layout
6124 \begin_deeper
6125 \begin_layout Itemize
6126 This happens if there happens to be exact multiple of 2048 packets in stream
6127  and number of packets is nonzero.
6128 \end_layout
6130 \end_deeper
6131 \begin_layout Itemize
6132 These clusters follow normal chaining.
6133 \end_layout
6135 \begin_layout Subsection
6136 Stream codec data
6137 \end_layout
6139 \begin_layout Itemize
6140 Stream codec data consists of raw Opus data packets packed back to back
6141  with nothing in between.
6142 \end_layout
6144 \begin_layout Itemize
6145 Warning: Due to internal limitations, this data must reside in the first
6146  65536 superclusters (that is, the first 1TB of the file).
6147 \end_layout
6149 \begin_layout Subsection
6150 Superblock
6151 \end_layout
6153 \begin_layout Itemize
6154 The superblock is stored in cluster 1.
6156 \end_layout
6158 \begin_layout Itemize
6159 The first 11 bytes are 
6160 \begin_inset Quotes eld
6161 \end_inset
6163 sefs-magic
6164 \begin_inset Quotes erd
6165 \end_inset
6167 <NUL>.
6168 \end_layout
6170 \begin_layout Itemize
6171 The rest are unused.
6172 \end_layout
6174 \begin_layout Itemize
6175 This cluster 1 is marked as system special.
6176 \end_layout
6178 \begin_layout Section
6179 Known ROM extensions
6180 \end_layout
6182 \begin_layout Itemize
6183 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
6184 \end_layout
6186 \begin_layout Itemize
6187 DMG cartridge ROMs: dmg, gb.
6188 \end_layout
6190 \begin_layout Itemize
6191 GBC cartridge ROMs: cgb, gbc.
6192 \end_layout
6194 \begin_layout Section
6195 Gamepack files
6196 \end_layout
6198 \begin_layout Itemize
6199 The first line must be: 
6200 \begin_inset Quotes eld
6201 \end_inset
6203 [GAMEPACK FILE]
6204 \begin_inset Quotes erd
6205 \end_inset
6208 \end_layout
6210 \begin_layout Itemize
6211 There is one needed line: 
6212 \begin_inset Quotes eld
6213 \end_inset
6215 type <systype>
6216 \begin_inset Quotes erd
6217 \end_inset
6220  This sets system type to <systype>.
6221  The following system types are valid:
6222 \end_layout
6224 \begin_deeper
6225 \begin_layout Itemize
6226 snes (SNES)
6227 \end_layout
6229 \begin_layout Itemize
6230 bsx (BS-X non-slotted)
6231 \end_layout
6233 \begin_layout Itemize
6234 bsxslotted (BS-X slotted)
6235 \end_layout
6237 \begin_layout Itemize
6238 sufamiturbo (Sufami Turbo)
6239 \end_layout
6241 \begin_layout Itemize
6242 sgb (Super Game Boy)
6243 \end_layout
6245 \begin_layout Itemize
6246 dmg (Game Boy)
6247 \end_layout
6249 \begin_layout Itemize
6250 gbc (Game Boy Color)
6251 \end_layout
6253 \begin_layout Itemize
6254 gbc_gba (Game Boy Color with GBA initial register values)
6255 \end_layout
6257 \end_deeper
6258 \begin_layout Itemize
6259 Optionally a region can be specified: 
6260 \begin_inset Quotes eld
6261 \end_inset
6263 region <region>
6264 \begin_inset Quotes erd
6265 \end_inset
6268  The following values are valid:
6269 \end_layout
6271 \begin_deeper
6272 \begin_layout Itemize
6273 autodetect (Autodetect region: snes and sgb only)
6274 \end_layout
6276 \begin_layout Itemize
6277 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
6278 \end_layout
6280 \begin_layout Itemize
6281 pal (PAL: snes, sgb)
6282 \end_layout
6284 \begin_layout Itemize
6285 world (World: dmg, gbc, gbc_gba)
6286 \end_layout
6288 \end_deeper
6289 \begin_layout Itemize
6290 ROM images are loaded as: 
6291 \begin_inset Quotes eld
6292 \end_inset
6294 rom <type> <file>
6295 \begin_inset Quotes erd
6296 \end_inset
6299  The following types are valid:
6300 \end_layout
6302 \begin_deeper
6303 \begin_layout Itemize
6304 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
6305  BIOS in bsx, bsxslotted, sufamiturbo)
6306 \end_layout
6308 \begin_layout Itemize
6309 bsx (Cartridge ROM in bsx, bsxslotted)
6310 \end_layout
6312 \begin_layout Itemize
6313 slot-a (Cartridge ROM in sufamiturbo)
6314 \end_layout
6316 \begin_layout Itemize
6317 slot-b (Cartridge ROM in sufamiturbo)
6318 \end_layout
6320 \end_deeper
6321 \begin_layout Itemize
6322 ROM markup can be loaded as: 
6323 \begin_inset Quotes eld
6324 \end_inset
6326 xml <type> <file>
6327 \begin_inset Quotes erd
6328 \end_inset
6331  The types valid are the same as for ROMs.
6332 \end_layout
6334 \begin_layout Itemize
6335 Patches can be loaded as 
6336 \begin_inset Quotes eld
6337 \end_inset
6339 patch[<offset>] <type> <file>
6340 \begin_inset Quotes erd
6341 \end_inset
6344  The types are the same as for ROMs.
6345 \end_layout
6347 \begin_deeper
6348 \begin_layout Itemize
6349 Offset is given in form [+-]<number>.
6350  Usually offset is either +0 or -512.
6351 \end_layout
6353 \begin_layout Itemize
6354 Default offset is +0.
6355 \end_layout
6357 \end_deeper
6358 \begin_layout Subsection
6359 Example:
6360 \end_layout
6362 \begin_layout LyX-Code
6363 [GAMEPACK FILE]
6364 \end_layout
6366 \begin_layout LyX-Code
6367 type snes
6368 \end_layout
6370 \begin_layout LyX-Code
6371 rom rom speedygonzales.sfc
6372 \end_layout
6374 \begin_layout LyX-Code
6375 patch-512 rom sonicthehedgehog.ips
6376 \end_layout
6378 \begin_layout Subsection
6379 Example 2:
6380 \end_layout
6382 \begin_layout LyX-Code
6383 [GAMEPACK FILE]
6384 \end_layout
6386 \begin_layout LyX-Code
6387 type sgb
6388 \end_layout
6390 \begin_layout LyX-Code
6391 rom rom supergameboy.sfc
6392 \end_layout
6394 \begin_layout LyX-Code
6395 rom dmg megamanV.dmg
6396 \end_layout
6398 \begin_layout Section
6399 Quick'n'dirty encode guide
6400 \end_layout
6402 \begin_layout Enumerate
6403 Start the emulator and load the ROM and movie file.
6404 \end_layout
6406 \begin_layout Enumerate
6407 Set large AVI option 'set-setting avi-large on'
6408 \end_layout
6410 \begin_layout Enumerate
6411 Enable dumping 'dump-avi tmpdump' 
6412 \end_layout
6414 \begin_layout Enumerate
6415 Unpause and let it run until you want to end dumping.
6416 \end_layout
6418 \begin_layout Enumerate
6419 Close the emulator (closing the window is the easiest way).
6420  Or use 'end-avi'.
6421 \end_layout
6423 \begin_layout Enumerate
6424 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
6425  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
6426 \end_layout
6428 \begin_layout Enumerate
6429 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
6430 \end_layout
6432 \begin_layout Enumerate
6433 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
6434  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
6435 \end_layout
6437 \begin_layout Enumerate
6438 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
6439  Now final.mkv contains quick'n'dirty encode.
6440 \end_layout
6442 \begin_layout Section
6443 Axis configurations for some gamepad types:
6444 \end_layout
6446 \begin_layout Subsection
6447 XBox360 controller:
6448 \end_layout
6450 \begin_layout Standard
6451 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
6452 \end_layout
6454 \begin_layout LyX-Code
6455 set-axis joystick0axis2 pressure-+
6456 \end_layout
6458 \begin_layout LyX-Code
6459 set-axis joystick0axis5 pressure-+
6460 \end_layout
6462 \begin_layout Itemize
6463 This is needed for SDL only.
6464  EVDEV sets those types correctly.
6465 \end_layout
6467 \begin_layout Subsection
6468 PS3 
6469 \begin_inset Quotes eld
6470 \end_inset
6472 sixaxis
6473 \begin_inset Quotes erd
6474 \end_inset
6476  controller:
6477 \end_layout
6479 \begin_layout Standard
6480 Axes 8-19 should be disabled.
6481 \end_layout
6483 \begin_layout LyX-Code
6484 set-axis joystick0axis8 disabled
6485 \end_layout
6487 \begin_layout LyX-Code
6488 set-axis joystick0axis9 disabled
6489 \end_layout
6491 \begin_layout LyX-Code
6492 set-axis joystick0axis10 disabled
6493 \end_layout
6495 \begin_layout LyX-Code
6496 set-axis joystick0axis11 disabled
6497 \end_layout
6499 \begin_layout LyX-Code
6500 set-axis joystick0axis12 disabled
6501 \end_layout
6503 \begin_layout LyX-Code
6504 set-axis joystick0axis13 disabled
6505 \end_layout
6507 \begin_layout LyX-Code
6508 set-axis joystick0axis14 disabled
6509 \end_layout
6511 \begin_layout LyX-Code
6512 set-axis joystick0axis15 disabled
6513 \end_layout
6515 \begin_layout LyX-Code
6516 set-axis joystick0axis16 disabled
6517 \end_layout
6519 \begin_layout LyX-Code
6520 set-axis joystick0axis17 disabled
6521 \end_layout
6523 \begin_layout LyX-Code
6524 set-axis joystick0axis18 disabled
6525 \end_layout
6527 \begin_layout LyX-Code
6528 set-axis joystick0axis19 disabled
6529 \end_layout
6531 \begin_layout Section
6532 Errata:
6533 \end_layout
6535 \begin_layout Subsection
6536 Problems from BSNES core:
6537 \end_layout
6539 \begin_layout Itemize
6540 The whole pending save stuff.
6541 \end_layout
6543 \begin_layout Itemize
6544 Lack of layer hiding.
6545 \end_layout
6547 \begin_layout Itemize
6548 It is slow (especially accuracy).
6549 \end_layout
6551 \begin_layout Itemize
6552 Firmwares can't be loaded from ZIP archives.
6553 \end_layout
6555 \begin_layout Subsection
6556 Other problems:
6557 \end_layout
6559 \begin_layout Itemize
6560 Modifiers don't work with pseudo-keys (SDL, EVDEV).
6561 \end_layout
6563 \begin_layout Itemize
6564 Audio for last dumped frame is not itself dumped.
6565 \end_layout
6567 \begin_layout Itemize
6568 Audio in UI is pretty bad in quality if game doesn't run at full speed.
6569 \end_layout
6571 \begin_layout Itemize
6572 No menus, command based interface (SDL).
6573 \end_layout
6575 \begin_layout Itemize
6576 Long commands don't scroll.
6577 \end_layout
6579 \begin_layout Section
6580 Changelog:
6581 \end_layout
6583 \begin_layout Subsection
6584 rr0-beta1
6585 \end_layout
6587 \begin_layout Itemize
6588 Fix -Wall warnings
6589 \end_layout
6591 \begin_layout Itemize
6592 Fix dumper video corruption with levels 10-18.
6593 \end_layout
6595 \begin_layout Subsection
6596 rr0-beta2
6597 \end_layout
6599 \begin_layout Itemize
6600 Autofire
6601 \end_layout
6603 \begin_layout Itemize
6604 Lots of code cleanups
6605 \end_layout
6607 \begin_layout Itemize
6608 Lua interface to settings
6609 \end_layout
6611 \begin_layout Itemize
6612 Allow specifying AVI borders without Lua
6613 \end_layout
6615 \begin_layout Itemize
6616 Fix scaling if vscale > 1 and originx > 0 (left border exists)
6617 \end_layout
6619 \begin_layout Itemize
6620 on_snoop lua callback
6621 \end_layout
6623 \begin_layout Itemize
6624 Faster movie loading and saving.
6625 \end_layout
6627 \begin_layout Subsection
6628 rr0-beta3
6629 \end_layout
6631 \begin_layout Itemize
6632 Joystick support
6633 \end_layout
6635 \begin_layout Subsection
6636 rr0-beta4
6637 \end_layout
6639 \begin_layout Itemize
6640 Fix multi-buttons
6641 \end_layout
6643 \begin_layout Itemize
6644 Save jukebox functionality.
6645 \end_layout
6647 \begin_layout Subsection
6648 rr0-beta5
6649 \end_layout
6651 \begin_layout Itemize
6652 Try to fix some nasty failing movie load edge cases
6653 \end_layout
6655 \begin_layout Itemize
6656 Allow specifying scripts to run on command line.
6657 \end_layout
6659 \begin_layout Subsection
6660 rr0-beta6
6661 \end_layout
6663 \begin_layout Itemize
6664 Major source code reorganization.
6665 \end_layout
6667 \begin_layout Itemize
6668 Backup savestates before overwriting.
6669 \end_layout
6671 \begin_layout Itemize
6672 Don't crash if loading initial state fails.
6673 \end_layout
6675 \begin_layout Subsection
6676 rr0-beta7
6677 \end_layout
6679 \begin_layout Itemize
6680 Fix firmware lookup
6681 \end_layout
6683 \begin_layout Itemize
6684 Fix author name parsing
6685 \end_layout
6687 \begin_layout Itemize
6688 Fix rerecord counting
6689 \end_layout
6691 \begin_layout Itemize
6692 (SDL) Print messages to console if SDL is uninitialized
6693 \end_layout
6695 \begin_layout Itemize
6696 Add movieinfo program
6697 \end_layout
6699 \begin_layout Itemize
6700 Fix loading movies starting from SRAM.
6701 \end_layout
6703 \begin_layout Subsection
6704 rr0-beta8
6705 \end_layout
6707 \begin_layout Itemize
6708 Add support for unattended dumping
6709 \end_layout
6711 \begin_layout Itemize
6712 Fix compiling for Win32
6713 \end_layout
6715 \begin_layout Itemize
6716 Don't lock up if sound can't be initialized
6717 \end_layout
6719 \begin_layout Itemize
6720 Strip trailing CR from commands
6721 \end_layout
6723 \begin_layout Itemize
6724 Don't try to do dubious things in global ctors (fix crash on startup)
6725 \end_layout
6727 \begin_layout Subsection
6728 rr0-beta9
6729 \end_layout
6731 \begin_layout Itemize
6732 Small documentation tweaking
6733 \end_layout
6735 \begin_layout Itemize
6736 Fix make clean
6737 \end_layout
6739 \begin_layout Itemize
6740 Fix major bug in modifier matching
6741 \end_layout
6743 \begin_layout Subsection
6744 rr0-beta10
6745 \end_layout
6747 \begin_layout Itemize
6748 Lots of documentation fixes
6749 \end_layout
6751 \begin_layout Itemize
6752 Use dedicated callbacks for event backcomm., not commands.
6753 \end_layout
6755 \begin_layout Itemize
6756 Ensure that the watchdog is not hit when executing delayed reset.
6757 \end_layout
6759 \begin_layout Itemize
6760 Remove errant tab from joystick message.
6761 \end_layout
6763 \begin_layout Subsection
6764 rr0-beta11
6765 \end_layout
6767 \begin_layout Itemize
6768 Make autofire operate in absolute time, not linear time
6769 \end_layout
6771 \begin_layout Itemize
6772 Reinitialize controls when resuming from loadstate
6773 \end_layout
6775 \begin_layout Itemize
6776 Some more code cleanups
6777 \end_layout
6779 \begin_layout Itemize
6780 If Lua allocator fails, call OOM_panic()
6781 \end_layout
6783 \begin_layout Itemize
6784 Byte/word/dword/qword sized host memory write/read functions.
6785 \end_layout
6787 \begin_layout Itemize
6788 Dump at correct framerate if dumping interlaced NTSC (height=448).
6789 \end_layout
6791 \begin_layout Subsection
6792 rr0-beta12
6793 \end_layout
6795 \begin_layout Itemize
6796 Actually include the complete source code
6797 \end_layout
6799 \begin_layout Itemize
6800 Keep track of RTC
6801 \end_layout
6803 \begin_layout Subsection
6804 rr0-beta13
6805 \end_layout
6807 \begin_layout Itemize
6808 Document {save,start}time.{,sub}second.
6809 \end_layout
6811 \begin_layout Itemize
6812 Intercept time() from bsnes core.
6813 \end_layout
6815 \begin_layout Subsection
6816 rr0-beta14
6817 \end_layout
6819 \begin_layout Itemize
6820 Allow disabling time() interception (allow build on Mac OS X)
6821 \end_layout
6823 \begin_layout Itemize
6824 Use SDLMain on Mac OS X (make SDL not crash)
6825 \end_layout
6827 \begin_layout Itemize
6828 Disable delayed resets (just plain too buggy for now).
6829 \end_layout
6831 \begin_layout Itemize
6832 Code cleanups
6833 \end_layout
6835 \begin_layout Itemize
6836 Use 16-bit for graphics/video instead of 32-bit.
6837 \end_layout
6839 \begin_layout Itemize
6840 gui.rectangle/gui.pixel
6841 \end_layout
6843 \begin_layout Itemize
6844 gui.crosshair
6845 \end_layout
6847 \begin_layout Itemize
6848 New CSCD writer implementation.
6849 \end_layout
6851 \begin_layout Subsection
6852 rr0-beta15
6853 \end_layout
6855 \begin_layout Itemize
6856 Fix interaction of * and +.
6857 \end_layout
6859 \begin_layout Itemize
6860 Manual improvements
6861 \end_layout
6863 \begin_layout Itemize
6864 Use gettimeofday()/usleep(), these seem portable enough.
6865 \end_layout
6867 \begin_layout Itemize
6868 Move joystick axis manipulation to keymapper code.
6869 \end_layout
6871 \begin_layout Itemize
6872 Changes to how read-only works.
6873 \end_layout
6875 \begin_layout Itemize
6876 Refactor controller input code.
6877 \end_layout
6879 \begin_layout Subsection
6880 rr0-beta16
6881 \end_layout
6883 \begin_layout Itemize
6884 Fix mouseclick scale compensation.
6885 \end_layout
6887 \begin_layout Itemize
6888 Draw area boundaries correctly in SDL code.
6889 \end_layout
6891 \begin_layout Itemize
6892 gui.screenshot.
6893 \end_layout
6895 \begin_layout Itemize
6896 Fix CSCD output (buffer overrun and race condition).
6897 \end_layout
6899 \begin_layout Subsection
6900 rr0-beta17
6901 \end_layout
6903 \begin_layout Itemize
6904 JMD dumping support.
6905 \end_layout
6907 \begin_layout Itemize
6908 Allow unattended dumping to JMD.
6909 \end_layout
6911 \begin_layout Itemize
6912 Move to BSNES v083.
6913 \end_layout
6915 \begin_layout Itemize
6916 Switch back to 32-bit colors.
6917 \end_layout
6919 \begin_layout Itemize
6920 Add Lua function gui.color.
6921 \end_layout
6923 \begin_layout Itemize
6924 Use some new C++11 features in GCC 4.6.
6925 \end_layout
6927 \begin_layout Itemize
6928 Be prepared for core frequency changes.
6929 \end_layout
6931 \begin_layout Itemize
6932 Pass colors in one chunk from Lua.
6933 \end_layout
6935 \begin_layout Subsection
6936 rr0-beta18
6937 \end_layout
6939 \begin_layout Itemize
6940 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
6941  memory.read_vma() and memory.find_vma().
6942 \end_layout
6944 \begin_layout Itemize
6945 Numerious documentation fixups
6946 \end_layout
6948 \begin_layout Itemize
6949 RTC time format changed
6950 \end_layout
6952 \begin_layout Itemize
6953 Reformat flags display
6954 \end_layout
6956 \begin_layout Itemize
6957 Allow lua package name to be overridden
6958 \end_layout
6960 \begin_layout Itemize
6961 SDUMP (high-quality dumping).
6962 \end_layout
6964 \begin_layout Itemize
6965 Split platform support to plugins.
6966 \end_layout
6968 \begin_layout Itemize
6969 Make all sound plugins support basic sound commands
6970 \end_layout
6972 \begin_layout Itemize
6973 Support portaudio for sound.
6974 \end_layout
6976 \begin_layout Itemize
6977 Allow disable Lua/SDL searching.
6978 \end_layout
6980 \begin_layout Itemize
6981 Upconvert colors when copying lcscreen to screen.
6982 \end_layout
6984 \begin_layout Itemize
6985 Reorganize source tree.
6986 \end_layout
6988 \begin_layout Itemize
6989 Evdev joystick support.
6990 \end_layout
6992 \begin_layout Itemize
6993 Refactor more code into generic window code.
6994 \end_layout
6996 \begin_layout Subsection
6997 rr0-beta19
6998 \end_layout
7000 \begin_layout Itemize
7001 Refactor message handling.
7002 \end_layout
7004 \begin_layout Itemize
7005 Rework makefile
7006 \end_layout
7008 \begin_layout Itemize
7009 Documentation fixes
7010 \end_layout
7012 \begin_layout Itemize
7013 Finish pending saves before load/quit.
7014 \end_layout
7016 \begin_layout Itemize
7017 Wxwidgets graphics plugin.
7018 \end_layout
7020 \begin_layout Subsection
7021 rr0-beta20
7022 \end_layout
7024 \begin_layout Itemize
7025 Get rid of win32-crap.[ch]pp.
7026 \end_layout
7028 \begin_layout Itemize
7029 Move files around a lot.
7030 \end_layout
7032 \begin_layout Itemize
7033 Get rid of need for host C++ compiler.
7034 \end_layout
7036 \begin_layout Itemize
7037 Bsnes v084 core.
7038 \end_layout
7040 \begin_layout Itemize
7041 Refactor inter-component communication.
7042 \end_layout
7044 \begin_layout Itemize
7045 Fix zero luma.
7046 \end_layout
7048 \begin_layout Itemize
7049 Fix crash on multiline aliases.
7050 \end_layout
7052 \begin_layout Itemize
7053 Load/Save settings in wxwidgets gui.
7054 \end_layout
7056 \begin_layout Subsection
7057 rr0-beta21
7058 \end_layout
7060 \begin_layout Itemize
7061 Patch problems in bsnes core
7062 \end_layout
7064 \begin_layout Itemize
7065 SNES is little-endian, not big-endian!
7066 \end_layout
7068 \begin_layout Itemize
7069 Fix memory corruption in lcscreen::load()
7070 \end_layout
7072 \begin_layout Subsection
7073 rr0-beta22
7074 \end_layout
7076 \begin_layout Itemize
7077 Fix interpretting repeat counts in rrdata loading.
7078 \end_layout
7080 \begin_layout Itemize
7081 New lua callback: on_frame()
7082 \end_layout
7084 \begin_layout Itemize
7085 Remove calls to runtosave() that aren't supposed to be there
7086 \end_layout
7088 \begin_layout Itemize
7089 Lua function: movie.read_rtc()
7090 \end_layout
7092 \begin_layout Itemize
7093 Ignore src/fonts/font.cpp
7094 \end_layout
7096 \begin_layout Itemize
7097 Fix more bsnes core problems
7098 \end_layout
7100 \begin_layout Itemize
7101 Control bsnes random seeding
7102 \end_layout
7104 \begin_layout Itemize
7105 Pause-on-end
7106 \end_layout
7108 \begin_layout Itemize
7109 Some bsnes core debugging features (state dump and state hash)
7110 \end_layout
7112 \begin_layout Itemize
7113 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
7114  it was 'lsnes rr0-beta21').
7115 \end_layout
7117 \begin_layout Subsection
7118 rr0-beta23
7119 \end_layout
7121 \begin_layout Itemize
7122 Fix memory corruption due to macro/field mixup
7123 \end_layout
7125 \begin_layout Itemize
7126 search-memory update
7127 \end_layout
7129 \begin_layout Itemize
7130 Allow direct-mapped framebuffer
7131 \end_layout
7133 \begin_layout Itemize
7134 SDL: Use SDL_ANYFORMAT if possible
7135 \end_layout
7137 \begin_layout Itemize
7138 SDMP2SOX: 2s delay modes.
7139 \end_layout
7141 \begin_layout Itemize
7142 Wxwidgets: Cleanups
7143 \end_layout
7145 \begin_layout Itemize
7146 Use sed -E, not sed -r.
7147  Fixes building on Mac OS X.
7148 \end_layout
7150 \begin_layout Itemize
7151 Wxwidgets: Save jukebox on exit
7152 \end_layout
7154 \begin_layout Itemize
7155 Fix RTC if using load-movie on savestate.
7156 \end_layout
7158 \begin_layout Itemize
7159 Fix crash related to full console mode.
7160 \end_layout
7162 \begin_layout Subsection
7163 rr0-beta24
7164 \end_layout
7166 \begin_layout Itemize
7167 Wxwidgets: Allow bringing application to foreground on Mac OS X.
7168 \end_layout
7170 \begin_layout Itemize
7171 Wxwidgets: Allow compiling on Mac OS X.
7172 \end_layout
7174 \begin_layout Itemize
7175 Use movie compare instead of movie hashing (faster save/load).
7176 \end_layout
7178 \begin_layout Itemize
7179 Lua: _SYSTEM table.
7180 \end_layout
7182 \begin_layout Subsection
7183 rr0-beta25
7184 \end_layout
7186 \begin_layout Itemize
7187 sdmp2sox: Pad soundtrack if using -l or -L.
7188 \end_layout
7190 \begin_layout Itemize
7191 sdmp2sox: Fix NTSC overscan.
7192 \end_layout
7194 \begin_layout Itemize
7195 sdmp2sox: Add AR correction mode.
7196 \end_layout
7198 \begin_layout Itemize
7199 call lua_close() when exiting.
7200 \end_layout
7202 \begin_layout Itemize
7203 Fix zip_writer bug causing warnings from info-zip and error from advzip.
7204 \end_layout
7206 \begin_layout Subsection
7207 rr0-beta26
7208 \end_layout
7210 \begin_layout Itemize
7211 Fix IPS patching code (use bsnes core IPS patcher).
7212 \end_layout
7214 \begin_layout Itemize
7215 Implement BPS patching (using bsnes core IPS patcher).
7216 \end_layout
7218 \begin_layout Itemize
7219 Add feature to load headered ROMs.
7220 \end_layout
7222 \begin_layout Subsection
7223 rr0-beta27
7224 \end_layout
7226 \begin_layout Itemize
7227 Show command names when showing keybindings
7228 \end_layout
7230 \begin_layout Subsection
7232 \end_layout
7234 \begin_layout Itemize
7235 Fix pause-on-end to be actually controllable
7236 \end_layout
7238 \begin_layout Itemize
7239 SDL: Poll all events in queue, not just first one (fixes slowness in command
7240  typing)
7241 \end_layout
7243 \begin_layout Itemize
7244 Wxwidgets: Fix ROM loading.
7245 \end_layout
7247 \begin_layout Subsection
7248 rr1-beta0
7249 \end_layout
7251 \begin_layout Itemize
7252 Lua: Add gui.textH, gui.textV, gui.textHV
7253 \end_layout
7255 \begin_layout Itemize
7256 Fix text colors on SDL on Mac OS X
7257 \end_layout
7259 \begin_layout Itemize
7260 Mode 'F' for finished in readonly mode.
7261 \end_layout
7263 \begin_layout Itemize
7264 Fix some WS errors.
7265 \end_layout
7267 \begin_layout Itemize
7268 Reliably pause after skip poll
7269 \end_layout
7271 \begin_layout Itemize
7272 Split UI and core into their own threads
7273 \end_layout
7275 \begin_layout Subsection
7276 rr1-beta1
7277 \end_layout
7279 \begin_layout Itemize
7280 Remove leftover dummy SRAM slot
7281 \end_layout
7283 \begin_layout Itemize
7284 Fix controller numbers.
7285 \end_layout
7287 \begin_layout Subsection
7288 rr1-beta2
7289 \end_layout
7291 \begin_layout Itemize
7292 Fix lsnes-dumpavi after interface change.
7293 \end_layout
7295 \begin_layout Itemize
7296 Also give BSNES patches for v085.
7297 \end_layout
7299 \begin_layout Itemize
7300 Pack movie data in memory.
7301 \end_layout
7303 \begin_layout Subsection
7304 rr1-beta3
7305 \end_layout
7307 \begin_layout Itemize
7308 Fix framecount/length given when loading movies.
7309 \end_layout
7311 \begin_layout Itemize
7312 Controller command memory leak fixes.
7313 \end_layout
7315 \begin_layout Itemize
7316 Don't leak palette if freeing screen object.
7317 \end_layout
7319 \begin_layout Subsection
7320 rr1-beta4
7321 \end_layout
7323 \begin_layout Itemize
7324 Detect revisions.
7325 \end_layout
7327 \begin_layout Itemize
7328 Wxwidgets: Allow controlling dumper from the menu.
7329 \end_layout
7331 \begin_layout Subsection
7332 rr1-beta5
7333 \end_layout
7335 \begin_layout Itemize
7336 Rewrite parts of manual
7337 \end_layout
7339 \begin_layout Itemize
7340 Lua: Make it work with Lua 5.2.
7341 \end_layout
7343 \begin_layout Subsection
7344 rr1-beta6
7345 \end_layout
7347 \begin_layout Itemize
7348 Win32: Fix compile errors.
7349 \end_layout
7351 \begin_layout Subsection
7352 rr1-beta7
7353 \end_layout
7355 \begin_layout Itemize
7356 Refactor controller input code.
7357 \end_layout
7359 \begin_layout Itemize
7360 Fix crash when using command line on SDL / Mac OS X.
7361 \end_layout
7363 \begin_layout Subsection
7364 rr1-beta8
7365 \end_layout
7367 \begin_layout Itemize
7368 Delete core/coroutine (obsolete)
7369 \end_layout
7371 \begin_layout Itemize
7372 Lag input display by one frame.
7373 \end_layout
7375 \begin_layout Itemize
7376 Rewind movie to beginning function.
7377 \end_layout
7379 \begin_layout Itemize
7380 Fix wrong frame number reported to Lua when repainting after loadstate
7381 \end_layout
7383 \begin_layout Itemize
7384 Support UI editing of jukebox
7385 \end_layout
7387 \begin_layout Itemize
7388 Wxwidgets: Save settings on exit.
7389 \end_layout
7391 \begin_layout Itemize
7392 Support ${project} for filenames
7393 \end_layout
7395 \begin_layout Itemize
7396 SDL: Fix command history
7397 \end_layout
7399 \begin_layout Subsection
7400 rr1-beta9
7401 \end_layout
7403 \begin_layout Itemize
7404 Fix some order-of-global-ctor bugs.
7405 \end_layout
7407 \begin_layout Subsection
7408 rr1-beta10
7409 \end_layout
7411 \begin_layout Itemize
7412 Fix crashes when quitting on Win32.
7413 \end_layout
7415 \begin_layout Subsection
7416 rr1-beta11
7417 \end_layout
7419 \begin_layout Itemize
7420 EVDEV: Queue keypresses from joystick, don't send directly
7421 \end_layout
7423 \begin_layout Itemize
7424 Wxwidgets: Load-Preserve that actually works.
7425 \end_layout
7427 \begin_layout Subsection
7428 rr1-beta12
7429 \end_layout
7431 \begin_layout Itemize
7432 Wxwidgets: GUI for memory search.
7433 \end_layout
7435 \begin_layout Itemize
7436 Warn about using synchronous queue in UI callback.
7437 \end_layout
7439 \begin_layout Subsection
7440 rr1-beta13
7441 \end_layout
7443 \begin_layout Itemize
7444 Remember last saved file for each ROM
7445 \end_layout
7447 \begin_layout Itemize
7448 Support MT dumping via boost.
7449 \end_layout
7451 \begin_layout Itemize
7452 Lua: input.raw
7453 \end_layout
7455 \begin_layout Itemize
7456 Lua: input.keyhook
7457 \end_layout
7459 \begin_layout Itemize
7460 Make mouse be ordinary input instead of special-casing
7461 \end_layout
7463 \begin_layout Itemize
7464 SDL: Don't screw up commands with NUL codepoints.
7465 \end_layout
7467 \begin_layout Subsection
7468 rr1-beta14
7469 \end_layout
7471 \begin_layout Itemize
7472 Merge status panel and main window
7473 \end_layout
7475 \begin_layout Itemize
7476 True movie slot support (the rest of it)
7477 \end_layout
7479 \begin_layout Itemize
7480 SDL: Fix compilation error
7481 \end_layout
7483 \begin_layout Itemize
7484 Elminate cross calls in dump menu code.
7485 \end_layout
7487 \begin_layout Subsection
7488 rr1-beta15
7489 \end_layout
7491 \begin_layout Itemize
7492 Cancel pending saves command
7493 \end_layout
7495 \begin_layout Itemize
7496 Wxwidgets: Code refactoring
7497 \end_layout
7499 \begin_layout Itemize
7500 Wxwidgets: Fix system -> reset
7501 \end_layout
7503 \begin_layout Itemize
7504 Wxwidgets: Read watch expressions in the right thread
7505 \end_layout
7507 \begin_layout Subsection
7508 rr1-beta16
7509 \end_layout
7511 \begin_layout Itemize
7512 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
7513  support that).
7514 \end_layout
7516 \begin_layout Itemize
7517 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
7518 \end_layout
7520 \begin_layout Itemize
7521 Don't append trailing '-' to prefix when saving movie.
7522 \end_layout
7524 \begin_layout Itemize
7525 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
7526 \end_layout
7528 \begin_layout Subsection
7530 \end_layout
7532 \begin_layout Itemize
7533 Document memory watch syntax.
7534 \end_layout
7536 \begin_layout Subsection
7537 rr1-delta1
7538 \end_layout
7540 \begin_layout Itemize
7541 Fix unattended dumping (lsnes-dumpavi)
7542 \end_layout
7544 \begin_layout Itemize
7545 Support RAW dumping
7546 \end_layout
7548 \begin_layout Itemize
7549 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
7550 \end_layout
7552 \begin_layout Itemize
7553 Add option to control sample rate preturbation in AVI dumper
7554 \end_layout
7556 \begin_layout Subsection
7557 rr1-delta2
7558 \end_layout
7560 \begin_layout Itemize
7561 Wxwidgets: Fix dumper submodes
7562 \end_layout
7564 \begin_layout Itemize
7565 Set core controller types before loadstate
7566 \end_layout
7568 \begin_layout Subsection
7569 rr1-delta2epsilon1
7570 \end_layout
7572 \begin_layout Itemize
7573 Fix compiling with bsnes v086.
7574 \end_layout
7576 \begin_layout Subsection
7577 rr1-delta3
7578 \end_layout
7580 \begin_layout Itemize
7581 Don't prompt before quitting
7582 \end_layout
7584 \begin_layout Itemize
7585 Start unpaused, preserve pause/unpause over load.
7586 \end_layout
7588 \begin_layout Itemize
7589 Try to autodetect if ROM is headered.
7590 \end_layout
7592 \begin_layout Itemize
7593 Wxwidgets: Only bring up ROM patching screen if specifically requested.
7594 \end_layout
7596 \begin_layout Itemize
7597 Allow configuring some hotkeys.
7598 \end_layout
7600 \begin_layout Subsection
7601 rr1-delta4
7602 \end_layout
7604 \begin_layout Itemize
7605 Lots of code cleanups
7606 \end_layout
7608 \begin_layout Itemize
7609 Fix JMD compression (JMD dumping was broken)
7610 \end_layout
7612 \begin_layout Itemize
7613 Don't crash if Lua C function throws an exception.
7614 \end_layout
7616 \begin_layout Itemize
7617 Support bitmap drawing in Lua.
7618 \end_layout
7620 \begin_layout Itemize
7621 Fix bsnes v085/v086 patches.
7622 \end_layout
7624 \begin_layout Itemize
7625 Improve stability on win32.
7626 \end_layout
7628 \begin_layout Subsection
7629 rr1-delta4epsilon1
7630 \end_layout
7632 \begin_layout Itemize
7633 Don't corrupt movie if movie length is integer multiple of frames per page.
7634 \end_layout
7636 \begin_layout Subsection
7637 rr1-delta5
7638 \end_layout
7640 \begin_layout Itemize
7641 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
7642 \end_layout
7644 \begin_layout Itemize
7645 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
7646 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
7648 \end_layout
7650 \begin_layout Itemize
7651 Wxwidgets: Fix internal focus lost (hotkeys stop working)
7652 \end_layout
7654 \begin_layout Itemize
7655 Wxwidgets: Fix broken modifiers
7656 \end_layout
7658 \begin_layout Itemize
7659 on_paint has parameter now.
7660 \end_layout
7662 \begin_layout Itemize
7663 Optional initital fill for bitmaps
7664 \end_layout
7666 \begin_layout Itemize
7667 Fix palette changing.
7668 \end_layout
7670 \begin_layout Itemize
7671 Optimize rendering a bit.
7672 \end_layout
7674 \begin_layout Itemize
7675 Bsnes v087 support.
7676 \end_layout
7678 \begin_layout Subsection
7679 rr1-delta5epsilon1
7680 \end_layout
7682 \begin_layout Itemize
7683 Movieinfo: Fix display of port #2 type.
7684 \end_layout
7686 \begin_layout Itemize
7687 Call on_input() after loadstate.
7688 \end_layout
7690 \begin_layout Subsection
7691 rr1-delta5epsilon2
7692 \end_layout
7694 \begin_layout Itemize
7695 Fix writing port2 data to movie.
7696 \end_layout
7698 \begin_layout Itemize
7699 Fix SRAM handling with Bsnes v087.
7700 \end_layout
7702 \begin_layout Subsection
7703 rr1-delta6
7704 \end_layout
7706 \begin_layout Itemize
7707 Library loading support
7708 \end_layout
7710 \begin_layout Itemize
7711 Built-in TSCC encoder
7712 \end_layout
7714 \begin_layout Itemize
7715 Hi-color (256T colors) dumping.
7716 \end_layout
7718 \begin_layout Itemize
7719 Dump over TCP/IP(v6)
7720 \end_layout
7722 \begin_layout Itemize
7723 Hidable status panel
7724 \end_layout
7726 \begin_layout Itemize
7727 Turbo toggle/hold
7728 \end_layout
7730 \begin_layout Itemize
7731 Adjustable sound volume
7732 \end_layout
7734 \begin_layout Itemize
7735 Screen scaling
7736 \end_layout
7738 \begin_layout Itemize
7739 Allow DnD into filename boxes
7740 \end_layout
7742 \begin_layout Itemize
7743 Configurable paths
7744 \end_layout
7746 \begin_layout Itemize
7747 Portaudio: Fix speaker popping at start
7748 \end_layout
7750 \begin_layout Itemize
7751 Lots of UI changes
7752 \end_layout
7754 \begin_layout Itemize
7755 Speed adjustment menu
7756 \end_layout
7758 \begin_layout Itemize
7759 Win32 joystick support
7760 \end_layout
7762 \begin_layout Itemize
7763 Lua: gui.rainbow and gui.box
7764 \end_layout
7766 \begin_layout Itemize
7767 Split key lists into classes (the key list was large!)
7768 \end_layout
7770 \begin_layout Itemize
7771 More save slots support
7772 \end_layout
7774 \begin_layout Itemize
7775 Wxwidgets (wxJoystick) joystick support
7776 \end_layout
7778 \begin_layout Subsection
7779 rr1-delta7
7780 \end_layout
7782 \begin_layout Itemize
7783 Lots of internal joystick refactoring
7784 \end_layout
7786 \begin_layout Itemize
7787 Evdev: Add mapping for BTN_TOOL_QUINTTAP
7788 \end_layout
7790 \begin_layout Itemize
7791 Wxwidgets: Settings mode (open settings without ROM)
7792 \end_layout
7794 \begin_layout Itemize
7795 Wxwidgets: Prompt key to use option
7796 \end_layout
7798 \begin_layout Itemize
7799 Wxwidgets: Fix crash if key goes away underneath
7800 \end_layout
7802 \begin_layout Itemize
7803 Wxwidgets: Fix mouse position in presence of scaling
7804 \end_layout
7806 \begin_layout Itemize
7807 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
7808 \end_layout
7810 \begin_layout Itemize
7811 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
7812  seem to work well on WinXP)
7813 \end_layout
7815 \begin_layout Itemize
7816 Start paused option.
7817 \end_layout
7819 \begin_layout Subsection
7820 rr1-delta7epsilon1
7821 \end_layout
7823 \begin_layout Itemize
7824 AVI: ZMBV support
7825 \end_layout
7827 \begin_layout Itemize
7828 lsnes-dumpavi: Start Lua before starting dumper
7829 \end_layout
7831 \begin_layout Itemize
7832 AVI: Fix secondary audio in mode 4.
7833 \end_layout
7835 \begin_layout Subsection
7836 rr1-delta7epsilon2
7837 \end_layout
7839 \begin_layout Itemize
7840 AVI: Refactor ZMBV a bit.
7841 \end_layout
7843 \begin_layout Itemize
7844 Fix error reading analog values from movie file
7845 \end_layout
7847 \begin_layout Subsection
7848 rr1-delta8
7849 \end_layout
7851 \begin_layout Itemize
7852 Delayed reset support
7853 \end_layout
7855 \begin_layout Itemize
7856 Lua: memory.hash_region
7857 \end_layout
7859 \begin_layout Subsection
7860 rr1-delta8epsilon1
7861 \end_layout
7863 \begin_layout Itemize
7864 Rework the build system
7865 \end_layout
7867 \begin_layout Itemize
7868 Typing input support
7869 \end_layout
7871 \begin_layout Itemize
7872 Fix building with bsnes v086 and v087.
7873 \end_layout
7875 \begin_layout Itemize
7876 SDL: Save settings on exit
7877 \end_layout
7879 \begin_layout Itemize
7880 SDL: Command to enter command line mode with given command.
7881 \end_layout
7883 \begin_layout Itemize
7884 SDL: More advanced command editing.
7885 \end_layout
7887 \begin_layout Subsection
7888 rr1-delta9
7889 \end_layout
7891 \begin_layout Itemize
7892 wxMSW: Fix the 
7893 \begin_inset Quotes eld
7894 \end_inset
7896 arrow keys and enter don't work
7897 \begin_inset Quotes erd
7898 \end_inset
7900  problem
7901 \end_layout
7903 \begin_layout Itemize
7904 MSU-1 support
7905 \end_layout
7907 \begin_layout Itemize
7908 Show mode changes due to rewinding.
7909 \end_layout
7911 \begin_layout Itemize
7912 Unsafe rewind support
7913 \end_layout
7915 \begin_layout Itemize
7916 Fix directory transversal.
7917 \end_layout
7919 \begin_layout Subsection
7920 rr1-delta10
7921 \end_layout
7923 \begin_layout Itemize
7924 AVI: Sound mode 5 (48kHz high-quality)
7925 \end_layout
7927 \begin_layout Itemize
7928 Lua: Reset Lua VM
7929 \end_layout
7931 \begin_layout Itemize
7932 Map the SNES bus into address space
7933 \end_layout
7935 \begin_layout Itemize
7936 Fix loading memory watch files with CRLF line endings
7937 \end_layout
7939 \begin_layout Subsection
7940 rr1-delta10epsilon1
7941 \end_layout
7943 \begin_layout Itemize
7944 Map bsnes internal state into memory space
7945 \end_layout
7947 \begin_layout Itemize
7948 Fix the 
7949 \begin_inset Quotes eld
7950 \end_inset
7952 click on panel wedges the emulator
7953 \begin_inset Quotes erd
7954 \end_inset
7956  for real.
7957 \end_layout
7959 \begin_layout Itemize
7960 DnD movies/saves on the main window.
7961 \end_layout
7963 \begin_layout Subsection
7964 rr1-delta11
7965 \end_layout
7967 \begin_layout Itemize
7968 Split core bindings into own module.
7969 \end_layout
7971 \begin_layout Itemize
7972 Remember invalid settings
7973 \end_layout
7975 \begin_layout Itemize
7976 Support for modified Gambatte core for GB/GBC emulation.
7977 \end_layout
7979 \begin_layout Itemize
7980 Reload/swap ROM function
7981 \end_layout
7983 \begin_layout Subsection
7984 rr1-delta11epsilon1
7985 \end_layout
7987 \begin_layout Itemize
7988 Fix step poll function
7989 \end_layout
7991 \begin_layout Subsection
7992 rr1-delta12
7993 \end_layout
7995 \begin_layout Itemize
7996 Non-insane savestate anchoring
7997 \end_layout
7999 \begin_layout Subsection
8000 rr1-delta13
8001 \end_layout
8003 \begin_layout Itemize
8004 More Memory search methods
8005 \end_layout
8007 \begin_layout Itemize
8008 Preserve movie if loading in RO mode.
8009 \end_layout
8011 \begin_layout Itemize
8012 Fix a obscure case in timeline check
8013 \end_layout
8015 \begin_layout Itemize
8016 Revamp the entiere ROM loading code
8017 \end_layout
8019 \begin_layout Itemize
8020 Support DnD on ROMs
8021 \end_layout
8023 \begin_layout Itemize
8024 Revamp menu layout
8025 \end_layout
8027 \begin_layout Itemize
8028 Standalone hotkey config dialog
8029 \end_layout
8031 \begin_layout Itemize
8032 Show bindings in more user-friendly format
8033 \end_layout
8035 \begin_layout Subsection
8036 rr1-delta13epsilon1
8037 \end_layout
8039 \begin_layout Itemize
8040 Pipedec support
8041 \end_layout
8043 \begin_layout Itemize
8044 Fix uninitialized variables in bsnes v085
8045 \end_layout
8047 \begin_layout Subsection
8048 rr1-delta14
8049 \end_layout
8051 \begin_layout Itemize
8052 Merge gambatte core into mainline (from its own branch)
8053 \end_layout
8055 \begin_layout Itemize
8056 Wxwidgets: Show expected dump file formats
8057 \end_layout
8059 \begin_layout Itemize
8060 Memory watch: Data typing
8061 \end_layout
8063 \begin_layout Itemize
8064 lsnes internal MMIO area.
8065 \end_layout
8067 \begin_layout Itemize
8068 Wxwidgets: New memory watch editor
8069 \end_layout
8071 \begin_layout Itemize
8072 Hexadecimal memory watches
8073 \end_layout
8075 \begin_layout Itemize
8076 Wxwidgets: Monospaced panel
8077 \end_layout
8079 \begin_layout Itemize
8080 Wxwidgets: Split memory watches in panel
8081 \end_layout
8083 \begin_layout Itemize
8084 Wxwidgets: Disable VMAs in memory search
8085 \end_layout
8087 \begin_layout Itemize
8088 lsnes-dumpavi: Fix speed bug
8089 \end_layout
8091 \begin_layout Itemize
8092 Movie subtitle support
8093 \end_layout
8095 \begin_layout Itemize
8096 Fix rerecord count reporting
8097 \end_layout
8099 \begin_layout Itemize
8100 Don't trash movie when loading in readonly mode.
8101 \end_layout
8103 \begin_layout Subsection
8104 rr1-delta14epsilon1
8105 \end_layout
8107 \begin_layout Itemize
8108 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
8109 \end_layout
8111 \begin_layout Itemize
8112 Fix build on Mac OS X.
8113 \end_layout
8115 \begin_layout Itemize
8116 Lua: loopwrapper
8117 \end_layout
8119 \begin_layout Itemize
8120 Wxwidgets: Hidable messages window
8121 \end_layout
8123 \begin_layout Itemize
8124 Lua: input.joyset
8125 \end_layout
8127 \begin_layout Itemize
8128 Bsnes: Support inconsistent saves
8129 \end_layout
8131 \begin_layout Itemize
8132 Bsnes: Allow simulating saving every frame
8133 \end_layout
8135 \begin_layout Itemize
8136 Fix desync if savestate is loaded in readonly mode in certain conditions.
8137 \end_layout
8139 \begin_layout Itemize
8140 Wxwidgets: Fix save dialogs on Mac OS X.
8141 \end_layout
8143 \begin_layout Itemize
8144 Wxwidgets: Fix insane status width on Win32.
8145 \end_layout
8147 \begin_layout Itemize
8148 Wxwidgets: Fix autohold processing to be faster.
8149 \end_layout
8151 \begin_layout Itemize
8152 Wxwidgets: Allow loading ROMs and movies from commandline.
8153 \end_layout
8155 \begin_layout Subsection
8156 rr1-delta15
8157 \end_layout
8159 \begin_layout Itemize
8160 Be a bit smarter with --load
8161 \end_layout
8163 \begin_layout Itemize
8164 Rewrote higher-level parts of audio system
8165 \end_layout
8167 \begin_layout Itemize
8168 Tool to build commentary tracks
8169 \end_layout
8171 \begin_layout Itemize
8172 Lua: input.joyget
8173 \end_layout
8175 \begin_layout Itemize
8176 Gambatte: Add support for SVN358
8177 \end_layout
8179 \begin_layout Itemize
8180 Use builtin font when rendering status panel.
8181 \end_layout
8183 \begin_layout Itemize
8184 Option to detach memory watch to its own window.
8185 \end_layout
8187 \begin_layout Itemize
8188 Recent ROMs/Movies menu
8189 \end_layout
8191 \begin_layout Itemize
8192 Libao support
8193 \end_layout
8195 \begin_layout Itemize
8196 Useful lag counter for SNES games that autopoll
8197 \end_layout
8199 \begin_layout Itemize
8200 Fix buffer overflow in gambatte sound output
8201 \end_layout
8203 \begin_layout Subsection
8204 rr1-delta15epsilon1
8205 \end_layout
8207 \begin_layout Itemize
8208 Don't blow up on wxGTK if the window is hidden somehow
8209 \end_layout
8211 \begin_layout Itemize
8212 Support simultaneous drop of ROM and movie.
8213 \end_layout
8215 \begin_layout Itemize
8216 Gambatte: Don't save spurious SRAMs.
8217 \end_layout
8219 \begin_layout Itemize
8220 Make SGB ROMs actually usable.
8221 \end_layout
8223 \begin_layout Itemize
8224 Fix so that saved movies appear in recent movies.
8225 \end_layout
8227 \begin_layout Itemize
8228 Don't open multiple commentary editors at once.
8229 \end_layout
8231 \begin_layout Subsection
8232 rr1-delta15epsilon2
8233 \end_layout
8235 \begin_layout Itemize
8236 Lua: memory.readregion/memory.writeregion
8237 \end_layout
8239 \begin_layout Itemize
8240 Lua: memory.map{,s}{byte,word,dword,qword}
8241 \end_layout
8243 \begin_layout Itemize
8244 Lua: memory.map_structure
8245 \end_layout
8247 \begin_layout Itemize
8248 Lua: Fix bus_address for gambatte
8249 \end_layout
8251 \begin_layout Itemize
8252 Fix features dependent of bsnes debugger
8253 \end_layout
8255 \begin_layout Itemize
8256 Cleanup bsnes debugger logic
8257 \end_layout
8259 \begin_layout Itemize
8260 Fix resets in presence of save every frame
8261 \end_layout
8263 \begin_layout Subsection
8264 rr1-delta15epsilon3
8265 \end_layout
8267 \begin_layout Itemize
8268 Lua: input.lcid_to_pcid
8269 \end_layout
8271 \begin_layout Itemize
8272 Fix off-by-one bug with slot hashes
8273 \end_layout
8275 \begin_layout Itemize
8276 Fix crashes on certain memory watch expressions
8277 \end_layout
8279 \begin_layout Itemize
8280 Lua: memory.read_expr
8281 \end_layout
8283 \begin_layout Itemize
8284 Lua: Fix memory.read_expr on nil argument
8285 \end_layout
8287 \begin_layout Itemize
8288 Fix the code to compile on G++ 4.7
8289 \end_layout
8291 \begin_layout Itemize
8292 Change button_id to be a function pointer field, not a virtual method
8293 \end_layout
8295 \begin_layout Itemize
8296 Add bsnes patches to fix libsnes to compile on GCC 4.7
8297 \end_layout
8299 \begin_layout Itemize
8300 Gambatte: Always use legacy lag counting
8301 \end_layout
8303 \begin_layout Itemize
8304 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
8305 \end_layout
8307 \begin_layout Itemize
8308 Fix analog controllers
8309 \end_layout
8311 \begin_layout Itemize
8312 Fix autohold menus
8313 \end_layout
8315 \begin_layout Itemize
8316 Fix button symbols in input display
8317 \end_layout
8319 \begin_layout Itemize
8320 Compensate for nuts bsnes superscope/justifier handling
8321 \end_layout
8323 \begin_layout Itemize
8324 Lua: Fix bit.extract boolean handling
8325 \end_layout
8327 \begin_layout Subsection
8328 rr1-delta16
8329 \end_layout
8331 \begin_layout Itemize
8332 Stop at movie end: Don't off-by-one
8333 \end_layout
8335 \begin_layout Itemize
8336 Fix crash closing lsnes with voice playback active.
8337 \end_layout
8339 \begin_layout Itemize
8340 Import/Export OggOpus for commentary tracks
8341 \end_layout
8343 \begin_layout Itemize
8344 16-button controllers.
8345 \end_layout
8347 \begin_layout Itemize
8348 Don't show nonexistent controllers in input display
8349 \end_layout
8351 \begin_layout Itemize
8352 Set voice record/playback volume from UI
8353 \end_layout
8355 \begin_layout Itemize
8356 Patches for gambatte SVN364.
8357 \end_layout
8359 \begin_layout Itemize
8360 Load markup (if exists) even without gamepack file.
8361 \end_layout
8363 \begin_layout Itemize
8364 Screen rotation & flipping
8365 \end_layout
8367 \begin_layout Itemize
8368 Lua: Some new bit functions
8369 \end_layout
8371 \begin_layout Itemize
8372 Auto-refresh voice streams on change.
8373 \end_layout
8375 \begin_layout Itemize
8376 Auto-refresh subtitles on change & new subtitle editor.
8377 \end_layout
8379 \begin_layout Itemize
8380 Fix music volume adjustment.
8381 \end_layout
8383 \begin_layout Subsection
8384 rr1-delta16epsilon1
8385 \end_layout
8387 \begin_layout Itemize
8388 Wxwidgets: Fix memory watch rendering.
8389 \end_layout
8391 \begin_layout Itemize
8392 Wxwidgets: Allow setting voice stream gain.
8393 \end_layout
8395 \begin_layout Itemize
8396 Wxwidgets: VU meters and volume adjustment.
8397 \end_layout
8399 \begin_layout Itemize
8400 Lua: Custom fonts support.
8401 \end_layout
8403 \begin_layout Itemize
8404 Lua: Fix methods stopping working when resetting Lua.
8405 \end_layout
8407 \begin_layout Itemize
8408 Fix loading standard-format movies in preserve (readonly) mode.
8409 \end_layout
8411 \begin_layout Subsection
8412 rr1-delta17
8413 \end_layout
8415 \begin_layout Itemize
8416 Primitive movie editor
8417 \end_layout
8419 \begin_layout Itemize
8420 Fix VU meter with no sound device.
8421 \end_layout
8423 \begin_layout Itemize
8424 Fix various undefined return values.
8425 \end_layout
8427 \begin_layout Itemize
8428 Show rates in VU meter window.
8429 \end_layout
8431 \begin_layout Subsection
8432 rr1-delta17epsilon1
8433 \end_layout
8435 \begin_layout Itemize
8436 Commentary tool: Set nominal bit rate and limit max bit rate.
8437 \end_layout
8439 \begin_layout Itemize
8440 Lua: Unconditionally reload host memory on loadstate
8441 \end_layout
8443 \begin_layout Itemize
8444 Lua: Query bindings, manipulate aliases, create inverse bindings
8445 \end_layout
8447 \begin_layout Itemize
8448 Lua: Fix crashes with resetting VM while some types of paint requests are
8449  in flight.
8450 \end_layout
8452 \begin_layout Itemize
8453 Lua: gui.text: Clip the text properly instead of corrupting memory in some
8454  cases.
8455 \end_layout
8457 \begin_layout Itemize
8458 Save screenshot header reliably
8459 \end_layout
8461 \begin_layout Itemize
8462 Lua: Backport input.get2 and input.set2
8463 \end_layout
8465 \begin_layout Itemize
8466 Lua: New controller info functions.
8467 \end_layout
8469 \begin_layout Itemize
8470 Movie editor: Fix reset delay counters to be the right way around.
8471 \end_layout
8473 \begin_layout Itemize
8474 Lua: on_snoop2
8475 \end_layout
8477 \begin_layout Itemize
8478 Lua: on_button and input.veto_button.
8479 \end_layout
8481 \begin_layout Subsection
8482 rr1-delta17epsilon2
8483 \end_layout
8485 \begin_layout Itemize
8486 Fix saving PNG screenshots on Win32.
8487 \end_layout
8489 \begin_layout Itemize
8490 Movie editor: Sweep axis.
8491 \end_layout
8493 \begin_layout Itemize
8494 Load selected slot in ro/rw/preserve/movie mode.
8495 \end_layout
8497 \begin_layout Itemize
8498 input.joyset: Preserve and invert user input.
8499 \end_layout
8501 \begin_layout Itemize
8502 Allow immediate saving at point of save (transfer saves).
8503 \end_layout
8505 \begin_layout Itemize
8506 Wxwidgets: Filter filenames in dialogs, autoappend extensions.
8507 \end_layout
8509 \begin_layout Itemize
8510 data/verysmall.font: Add missing glyph 70 (
8511 \begin_inset Quotes eld
8512 \end_inset
8515 \begin_inset Quotes erd
8516 \end_inset
8519 \end_layout
8521 \begin_layout Itemize
8522 Lua: Allow painting custom fonts with halo.
8523 \end_layout
8525 \begin_layout Itemize
8526 Fix memory value search to work on byte types.
8527 \end_layout
8529 \begin_layout Subsection
8530 rr1-delta17epsilon3
8531 \end_layout
8533 \begin_layout Itemize
8534 Fix status panel (and movie editor) flicker
8535 \end_layout
8537 \begin_layout Itemize
8538 Show effects of Lua in input display
8539 \end_layout
8541 \begin_layout Itemize
8542 Offer lsmv.backup as file filter too for load lsmv
8543 \end_layout
8545 \begin_layout Itemize
8546 Allow slowing down subframe advance 
8547 \end_layout
8549 \begin_layout Itemize
8550 Display current save slot information
8551 \end_layout
8553 \begin_layout Itemize
8554 Add snes9x fonts
8555 \end_layout
8557 \begin_layout Itemize
8558 Fix hotkeys stopping working after X-ing settings dialog
8559 \end_layout
8561 \begin_layout Itemize
8562 Movie editor: Fix bug if extending finished movie
8563 \end_layout
8565 \begin_layout Itemize
8566 Cap current_frame_first_subframe to movie size when recounting movie
8567 \end_layout
8569 \begin_layout Itemize
8570 Movie editor: Interpret ctrl+click as right click 
8571 \end_layout
8573 \end_body
8574 \end_document