Merge branch 'rr1-maint' into rr1-gambatte
[lsnes.git] / manual.lyx
blob2db4fdc07ca8cc5b84e39ab8bb5223f7d1e67566
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options true
7 \maintain_unincluded_children false
8 \language finnish
9 \language_package default
10 \inputencoding auto
11 \fontencoding global
12 \font_roman default
13 \font_sans default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
17 \font_sc false
18 \font_osf false
19 \font_sf_scale 100
20 \font_tt_scale 100
22 \graphics default
23 \default_output_format default
24 \output_sync 0
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
28 \use_hyperref false
29 \papersize default
30 \use_geometry false
31 \use_amsmath 1
32 \use_esint 1
33 \use_mhchem 1
34 \use_mathdots 1
35 \cite_engine basic
36 \use_bibtopic false
37 \use_indices false
38 \paperorientation portrait
39 \suppress_date false
40 \use_refstyle 1
41 \index Hakusana
42 \shortcut idx
43 \color #008000
44 \end_index
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle default
53 \tracking_changes false
54 \output_changes false
55 \html_math_output 0
56 \html_css_as_file 0
57 \html_be_strict false
58 \end_header
60 \begin_body
62 \begin_layout Section
63 Introduction
64 \end_layout
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
68 \end_layout
70 \begin_layout Section
71 Dependencies
72 \end_layout
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
94 \end_layout
96 \begin_deeper
97 \begin_layout Enumerate
98 SVN r320
99 \end_layout
101 \begin_layout Enumerate
102 Patched with included patches
103 \end_layout
105 \end_deeper
106 \begin_layout Enumerate
107 Zlib
108 \end_layout
110 \begin_layout Enumerate
111 boost_iostreams
112 \end_layout
114 \begin_layout Enumerate
115 boost_filesystem
116 \end_layout
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
120 \end_layout
122 \begin_layout Enumerate
123 libsdl (SDL only)
124 \end_layout
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
128 \end_layout
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
132 \end_layout
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
136 \end_layout
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
140 \end_layout
142 \begin_layout Enumerate
143 Lua (if Lua support is needed).
144 \end_layout
146 \begin_deeper
147 \begin_layout Itemize
148 Version 5.1.X or 5.2X.
149 \end_layout
151 \end_deeper
152 \begin_layout Enumerate
153 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
154 \end_layout
156 \begin_layout Section
157 Building
158 \end_layout
160 \begin_layout Itemize
161 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
162  bsnes core).
163 \end_layout
165 \begin_layout Itemize
166 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
167 \end_layout
169 \begin_layout Itemize
170 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
171 >', bsnes core)
172 \end_layout
174 \begin_layout Itemize
175 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
176 ersion>', gambatte core)
177 \end_layout
179 \begin_layout Itemize
180 Edit options.build (or copy of that file)
181 \end_layout
183 \begin_layout Itemize
184 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
186 \end_layout
188 \begin_layout Section
189 Command line options
190 \end_layout
192 \begin_layout Subsection
193 ROM options
194 \end_layout
196 \begin_layout Subsubsection
197 --rom=<file> (lsnes/SDL, lsnes-avidump)
198 \end_layout
200 \begin_layout Standard
201 Load <file> as ROM.
202 \end_layout
204 \begin_layout Subsection
205 Session options
206 \end_layout
208 \begin_layout Subsubsection
209 --pause
210 \end_layout
212 \begin_layout Standard
213 Start paused
214 \end_layout
216 \begin_layout Subsubsection
217 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
218 \end_layout
220 \begin_layout Standard
221 Load <filename> as movie or savestate file.
222  All other session options are ignored.
223 \end_layout
225 \begin_layout Subsubsection
226 --port1=<device> (lsnes/SDL, bsnes core only)
227 \end_layout
229 \begin_layout Standard
230 Set type of port1.
231  Valid values are:
232 \end_layout
234 \begin_layout Itemize
235 none: No device connected
236 \end_layout
238 \begin_layout Itemize
239 gamepad: One gamepad (the default)
240 \end_layout
242 \begin_layout Itemize
243 multitap: Four gamepads (warning: makes most games refuse to start)
244 \end_layout
246 \begin_layout Itemize
247 mouse: Mouse.
248 \end_layout
250 \begin_layout Subsubsection
251 --port2=<type> (lsnes/SDL, bsnes core only)
252 \end_layout
254 \begin_layout Standard
255 Set type of port2.
256  Valid values are:
257 \end_layout
259 \begin_layout Itemize
260 none: No device connected (the default)
261 \end_layout
263 \begin_layout Itemize
264 gamepad: One gamepad
265 \end_layout
267 \begin_layout Itemize
268 multitap: Four gamepads.
269 \end_layout
271 \begin_layout Itemize
272 mouse: Mouse
273 \end_layout
275 \begin_layout Itemize
276 superscope: Super Scope
277 \end_layout
279 \begin_layout Itemize
280 justifier: One justifier
281 \end_layout
283 \begin_layout Itemize
284 justifiers: Two justifiers
285 \end_layout
287 \begin_layout Subsubsection
288 --gamename=<name> (lsnes/SDL)
289 \end_layout
291 \begin_layout Standard
292 Set the name of game to <name>.
293  Default is blank.
294 \end_layout
296 \begin_layout Subsubsection
297 --author=<name> (lsnes/SDL)
298 \end_layout
300 \begin_layout Standard
301 Add author with full name of <name> (no nickname).
302 \end_layout
304 \begin_layout Subsubsection
305 --author=|<name> (lsnes/SDL)
306 \end_layout
308 \begin_layout Standard
309 Add author with nickname of <name> (no full name).
310 \end_layout
312 \begin_layout Subsubsection
313 --author=<fullname>|<nickname> (lsnes/SDL)
314 \end_layout
316 \begin_layout Standard
317 Add author with full name of <fullname> and nickname of <nickname>.
318 \end_layout
320 \begin_layout Subsubsection
321 --rtc-second=<value> (lsnes/SDL)
322 \end_layout
324 \begin_layout Standard
325 Set RTC second (0 is 1st January 1970 00:00:00Z).
326  Default is 1,000,000,000.
327 \end_layout
329 \begin_layout Subsubsection
330 --rtc-subsecond=<value> (lsnes/SDL)
331 \end_layout
333 \begin_layout Standard
334 Set RTC subsecond.
335  Range is 0-.
336  Unit is CPU cycle.
337  Default is 0.
338 \end_layout
340 \begin_layout Subsubsection
341 --anchor-savestate=<file> (lsnes/SDL)
342 \end_layout
344 \begin_layout Standard
345 Set the anchor savestate file.
346 \end_layout
348 \begin_layout Subsection
349 Misc.
350  options:
351 \end_layout
353 \begin_layout Subsubsection
354 --run=<file> (lsnes/SDL)
355 \end_layout
357 \begin_layout Standard
358 After running main RC file, run this file.
359  If multiple are specified, these execute in order specified.
360 \end_layout
362 \begin_layout Subsection
363 dump options (lsnes-dumpavi only)
364 \end_layout
366 \begin_layout Subsubsection
367 --dumper=<dumper>
368 \end_layout
370 \begin_layout Standard
371 Set the dumper to use (required).
372  Use 'list' for listing of known dumpers.
373 \end_layout
375 \begin_layout Subsubsection
376 --mode=<mode>
377 \end_layout
379 \begin_layout Standard
380 Set the mode to use (required for dumpers with multiple modes, forbidden
381  otherwise).
382  Use 'list' for known modes.
383 \end_layout
385 \begin_layout Subsubsection
386 --prefix=<prefix>
387 \end_layout
389 \begin_layout Standard
390 Set dump prefix.
391  Default is 
392 \begin_inset Quotes eld
393 \end_inset
395 avidump
396 \begin_inset Quotes erd
397 \end_inset
400 \end_layout
402 \begin_layout Subsubsection
403 --option=<name>=<value>
404 \end_layout
406 \begin_layout Standard
407 Set option <name> to value <value>.
408 \end_layout
410 \begin_layout Subsubsection
411 --length=<length>
412 \end_layout
414 \begin_layout Standard
415 Set number of frames to dump.
416  Mandatory.
417 \end_layout
419 \begin_layout Subsubsection
420 --lua=<script>
421 \end_layout
423 \begin_layout Standard
424 Run specified lua script (lsnes-dumpavi does not have initialization files).
425 \end_layout
427 \begin_layout Subsubsection
428 --load-library=<library>
429 \end_layout
431 \begin_layout Standard
432 Load the specified shared object / dynamic library / dynamic link library.
433 \end_layout
435 \begin_layout Section
436 Startup file lsnes.rc
437 \end_layout
439 \begin_layout Standard
440 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
441  This file is located in:
442 \end_layout
444 \begin_layout Itemize
445 Windows: %APPDATA%
446 \backslash
447 lsnes
448 \backslash
449 lsnes.rc (if %APPDATA% exists)
450 \end_layout
452 \begin_layout Itemize
453 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
454 \end_layout
456 \begin_layout Itemize
457 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
458 \end_layout
460 \begin_layout Itemize
461 All: ./lsnes.rc (fallback default).
462 \end_layout
464 \begin_layout Standard
465 If leading directories do not exist, attempt to create them is made.
466 \end_layout
468 \begin_layout Section
469 Internal commands
470 \end_layout
472 \begin_layout Itemize
473 Commands beginning with '*' invoke the corresponding command without alias
474  expansion.
475 \end_layout
477 \begin_layout Itemize
478 If command starts with '+' (after possible '*'), the command is executed
479  as-is when button is pressed, and when button is released, it is executed
480  with '+' replaced by '-'.
481 \end_layout
483 \begin_layout Itemize
484 Commands without '+' execute only on negative edge (release).
485 \end_layout
487 \begin_layout Subsection
488 Settings:
489 \end_layout
491 \begin_layout Standard
492 Settings control various aspects of emulator behaviour.
493 \end_layout
495 \begin_layout Subsubsection
496 set-setting <setting> <value>
497 \end_layout
499 \begin_layout Standard
500 Sets setting <setting> to value <value> (may be empty).
501 \end_layout
503 \begin_layout Subsubsection
504 unset-setting <setting>
505 \end_layout
507 \begin_layout Standard
508 Try to unset setting <setting> (not all settings can be unset).
509 \end_layout
511 \begin_layout Subsubsection
512 get-setting <setting>
513 \end_layout
515 \begin_layout Standard
516 Read value of setting <setting>
517 \end_layout
519 \begin_layout Subsubsection
520 show-settings
521 \end_layout
523 \begin_layout Standard
524 Print names and values of all settings.
525 \end_layout
527 \begin_layout Subsection
528 Keybindings
529 \end_layout
531 \begin_layout Standard
532 Keybindings bind commands or aliases to keys (or pseudo-keys).
534 \end_layout
536 \begin_layout Standard
537 Notes:
538 \end_layout
540 \begin_layout Itemize
541 Do not bind edge active (+/-) commands to keys with modifiers, that won't
542  work right!
543 \end_layout
545 \begin_layout Itemize
546 Names of keys and modifiers are platform-dependent.
547 \end_layout
549 \begin_layout Itemize
550 Be careful before binding pseudo-keys (such as joystick axes, buttons or
551  hats) with modifiers.
552  That may or may not work right.
553 \end_layout
555 \begin_layout Subsubsection
556 bind-key [<mod>/<modmask>] <key> <command>
557 \end_layout
559 \begin_layout Standard
560 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
561 ed list) are set as <mod> (comma-seperated list).
562 \end_layout
564 \begin_layout Standard
565 The names of keys and modifiers are platform-dependent.
566 \end_layout
568 \begin_layout Subsubsection
569 unbind-key [<mod>/<modmask>] <key>
570 \end_layout
572 \begin_layout Standard
573 Unbind command from <key> (with specified <mod> and <modmask>).
574 \end_layout
576 \begin_layout Subsubsection
577 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
578  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
579  [plus=<val>] [tolerance=<val>]
580 \end_layout
582 \begin_layout Standard
583 Set axis parameters for axis <axis>.
584 \end_layout
586 \begin_layout Itemize
587 disabled: Disable axis
588 \end_layout
590 \begin_layout Itemize
591 axis: Normal axis
592 \end_layout
594 \begin_layout Itemize
595 axis-inverse: Inverse axis
596 \end_layout
598 \begin_layout Itemize
599 pressure0-: Pressure sensitive.
600  Released at 0, pressed at -.
601 \end_layout
603 \begin_layout Itemize
604 pressure0+: Pressure sensitive.
605  Released at 0, pressed at +.
606 \end_layout
608 \begin_layout Itemize
609 pressure-0: Pressure sensitive.
610  Released at -, pressed at 0.
611 \end_layout
613 \begin_layout Itemize
614 pressure-+: Pressure sensitive.
615  Released at -, pressed at +.
616 \end_layout
618 \begin_layout Itemize
619 pressure+0: Pressure sensitive.
620  Released at +, pressed at 0.
621 \end_layout
623 \begin_layout Itemize
624 pressure+-: Pressure sensitive.
625  Released at +, pressed at -.
626 \end_layout
628 \begin_layout Itemize
629 minus=<val>: Calibration at extreme minus position (-32768-32767)
630 \end_layout
632 \begin_layout Itemize
633 zero=<val>: Calibration at neutral position (-32768-32767)
634 \end_layout
636 \begin_layout Itemize
637 plus=<val>: Calibration at extreme plus position (-32768-32767)
638 \end_layout
640 \begin_layout Itemize
641 tolerance=<value>: Center band tolerance (0<x<1).
642  The smaller the value, the more sensitive the control is.
643 \end_layout
645 \begin_layout Subsubsection
646 show-bindings
647 \end_layout
649 \begin_layout Standard
650 Print all key bindings in effect.
651 \end_layout
653 \begin_layout Subsection
654 Aliases
655 \end_layout
657 \begin_layout Standard
658 Aliases bind command to sequence of commands.
659  After alias has been defined, it replaces the command it shadows.
660 \end_layout
662 \begin_layout Standard
663 Notes:
664 \end_layout
666 \begin_layout Itemize
667 You can't alias command to itself.
668 \end_layout
670 \begin_layout Itemize
671 Aliases starting with +/- are edge active just like ordinary commands starting
672  with +/-.
673 \end_layout
675 \begin_layout Itemize
676 One command can be aliased to multiple commands.
677 \end_layout
679 \begin_layout Subsubsection
680 alias-command <command> <expansion>
681 \end_layout
683 \begin_layout Standard
684 Append <expansion> to alias <command>.
685  If alias does not already exist, it is created.
686 \end_layout
688 \begin_layout Subsubsection
689 unalias-command <command>
690 \end_layout
692 \begin_layout Standard
693 Clear alias expansion for <command>.
694 \end_layout
696 \begin_layout Subsubsection
697 show-aliases
698 \end_layout
700 \begin_layout Standard
701 Print all aliases and their expansions in effect.
702 \end_layout
704 \begin_layout Subsection
705 run-script <script>
706 \end_layout
708 \begin_layout Standard
709 Run <script> as if commands were entered on the command line.
710 \end_layout
712 \begin_layout Subsection
713 Video dumping
714 \end_layout
716 \begin_layout Standard
717 Following commands control video dumping:
718 \end_layout
720 \begin_layout Subsubsection
721 start-dump <dumper> [<mode>] <prefix/filename>
722 \end_layout
724 \begin_layout Standard
725 Start dumping using dumper <dumper>.
726  If mode is present or not and if prefix or filename is present depends
727  on the dumper and dumper mode.
728 \end_layout
730 \begin_layout Standard
731 The following dumpers are available:
732 \end_layout
734 \begin_layout Itemize
735 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
736 \end_layout
738 \begin_deeper
739 \begin_layout Itemize
740 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
741  Takes prefix.
742 \end_layout
744 \begin_layout Itemize
745 Mode: cscd/pcm: CSCD video, PCM audio.
746  Takes prefix.
747 \end_layout
749 \end_deeper
750 \begin_layout Itemize
751 INTERNAL-JMD: Internal .jmd dumper.
752 \end_layout
754 \begin_deeper
755 \begin_layout Itemize
756 Does not take mode.
757 \end_layout
759 \begin_layout Itemize
760 Takes a filename.
761 \end_layout
763 \end_deeper
764 \begin_layout Itemize
765 INTERNAL-RAW: Internal RAW dumper.
766 \end_layout
768 \begin_deeper
769 \begin_layout Itemize
770 Does not take mode.
771 \end_layout
773 \begin_layout Itemize
774 Takes a prefix.
775 \end_layout
777 \begin_layout Itemize
778 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
779 \end_layout
781 \begin_layout Itemize
782 Video is always upscaled to double resolution (512x448 / 512 x 478).
783 \end_layout
785 \begin_layout Itemize
786 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
787  for NTSC.
788 \end_layout
790 \end_deeper
791 \begin_layout Itemize
792 INTERNAL-SDMP: Internal SDMP dumper.
793 \end_layout
795 \begin_deeper
796 \begin_layout Itemize
797 Mode 'ms': Multi-segment.
798  Takes prefix.
799 \end_layout
801 \begin_layout Itemize
802 Mode 'ss': Single-segment.
803  Takes filename.
804 \end_layout
806 \end_deeper
807 \begin_layout Subsubsection
808 end-dump <dumper>
809 \end_layout
811 \begin_layout Standard
812 End dumping using <dumper>
813 \end_layout
815 \begin_layout Subsubsection
816 show-dumpers [<dumper>]
817 \end_layout
819 \begin_layout Standard
820 Show the list of dumpers or list of modes for <dumper>
821 \end_layout
823 \begin_layout Subsection
824 Memory manipulation
825 \end_layout
827 \begin_layout Standard
828 <address> may be decimal or hexadecimal (prefixed with '0x').
829  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
830  with '-') decimal.
831 \end_layout
833 \begin_layout Standard
834 The available element <sizes> are:
835 \end_layout
837 \begin_layout Itemize
838 byte: 1 byte
839 \end_layout
841 \begin_layout Itemize
842 word: 2 bytes
843 \end_layout
845 \begin_layout Itemize
846 dword: 4 bytes
847 \end_layout
849 \begin_layout Itemize
850 qword: 8 bytes
851 \end_layout
853 \begin_layout Standard
854 When reading RAM and ROM, multi-byte reads/writes are big-endian.
855  When dealing with DSP memory, multi-byte reads/writes are native-endian
856  (do not use operand sizes exceeding DSP bitness, except dword is OK for
857  24-bit memory).
858 \end_layout
860 \begin_layout Subsubsection
861 read-<size> <address>
862 \end_layout
864 \begin_layout Standard
865 Read the value of byte in <address>.
866 \end_layout
868 \begin_layout Subsubsection
869 read-s<size> <address>
870 \end_layout
872 \begin_layout Standard
873 Read the value of signed byte in <address>.
874 \end_layout
876 \begin_layout Subsubsection
877 write-<size> <address> <value>
878 \end_layout
880 \begin_layout Standard
881 Write <value> to byte in address <address>.
882 \end_layout
884 \begin_layout Subsubsection
885 search-memory reset
886 \end_layout
888 \begin_layout Standard
889 Reset the memory search
890 \end_layout
892 \begin_layout Subsubsection
893 search-memory count
894 \end_layout
896 \begin_layout Standard
897 Print number of candidates remaining
898 \end_layout
900 \begin_layout Subsubsection
901 search-memory print
902 \end_layout
904 \begin_layout Standard
905 Print all candidates remaining
906 \end_layout
908 \begin_layout Subsubsection
909 search-memory <usflag><sizeflag><op>
910 \end_layout
912 \begin_layout Standard
913 Searches memory for addresses satisfying criteria.
914 \end_layout
916 \begin_layout Standard
917 <usflag> can be:
918 \end_layout
920 \begin_layout Itemize
921 u: unsigned
922 \end_layout
924 \begin_layout Itemize
925 s: signed
926 \end_layout
928 \begin_layout Standard
929 <sizeflag> can be:
930 \end_layout
932 \begin_layout Itemize
933 b: byte
934 \end_layout
936 \begin_layout Itemize
937 w: word
938 \end_layout
940 \begin_layout Itemize
941 d: dword
942 \end_layout
944 \begin_layout Itemize
945 q: qword
946 \end_layout
948 \begin_layout Standard
949 <op> can be:
950 \end_layout
952 \begin_layout Itemize
953 lt: < previous value.
954 \end_layout
956 \begin_layout Itemize
957 le: <= previous value.
958 \end_layout
960 \begin_layout Itemize
961 eq: = previous value.
962 \end_layout
964 \begin_layout Itemize
965 ne: != previous value.
966 \end_layout
968 \begin_layout Itemize
969 ge: >= previous value.
970 \end_layout
972 \begin_layout Itemize
973 gt: > previous value.
974 \end_layout
976 \begin_layout Subsubsection
977 search-memory <sizeflag> <value>
978 \end_layout
980 \begin_layout Standard
981 Searches for addresses that currently have value <value>.
982  <sizeflag> is as in previous command.
983 \end_layout
985 \begin_layout Subsection
986 Main commands
987 \end_layout
989 \begin_layout Standard
990 These commands are not available in lsnesrc, but are available after ROM
991  has been loaded.
992 \end_layout
994 \begin_layout Subsubsection
995 quit-emulator [/y]
996 \end_layout
998 \begin_layout Standard
999 Quits the emulator (asking for confirmation).
1000  If /y is given, no confirmation is asked.
1001 \end_layout
1003 \begin_layout Subsubsection
1004 pause-emulator
1005 \end_layout
1007 \begin_layout Standard
1008 Toggle paused/unpaused
1009 \end_layout
1011 \begin_layout Subsubsection
1012 +advance-frame 
1013 \end_layout
1015 \begin_layout Standard
1016 Advance frame.
1017  If the button is still held after configurable timeout expires, game unpauses
1018  for the duration frame advance is held.
1019 \end_layout
1021 \begin_layout Subsubsection
1022 +advance-poll 
1023 \end_layout
1025 \begin_layout Standard
1026 Advance subframe.
1027  If the button is still held after configurable timeout expires, game unpauses
1028  for the duration frame advance is held.
1029 \end_layout
1031 \begin_layout Subsubsection
1032 advance-skiplag 
1033 \end_layout
1035 \begin_layout Standard
1036 Skip to first poll in frame after current.
1037 \end_layout
1039 \begin_layout Subsubsection
1040 reset 
1041 \end_layout
1043 \begin_layout Standard
1044 Reset the SNES after this frame.
1045 \end_layout
1047 \begin_layout Subsubsection
1048 load <filename> 
1049 \end_layout
1051 \begin_layout Standard
1052 Load savestate <filename> in current mode.
1053 \end_layout
1055 \begin_layout Subsubsection
1056 load-state <filename> 
1057 \end_layout
1059 \begin_layout Standard
1060 Load savestate <filename> in readwrite mode.
1061 \end_layout
1063 \begin_layout Subsubsection
1064 load-readonly <filename> 
1065 \end_layout
1067 \begin_layout Standard
1068 Load savestate <filename> in readonly mode.
1069 \end_layout
1071 \begin_layout Subsubsection
1072 load-preserve <filename> 
1073 \end_layout
1075 \begin_layout Standard
1076 Load savestate <filename> in readonly mode, preserving current events.
1077 \end_layout
1079 \begin_layout Subsubsection
1080 load-movie <filename> 
1081 \end_layout
1083 \begin_layout Standard
1084 Load savestate <filename>, ignoring save part in readonly mode.
1085 \end_layout
1087 \begin_layout Subsubsection
1088 save-state <filename> 
1089 \end_layout
1091 \begin_layout Standard
1092 Save system state to <filename> as soon as possible.
1093 \end_layout
1095 \begin_layout Subsubsection
1096 save-movie <filename> 
1097 \end_layout
1099 \begin_layout Standard
1100 Save movie to <filename>.
1101 \end_layout
1103 \begin_layout Subsubsection
1104 set-rwmode 
1105 \end_layout
1107 \begin_layout Standard
1108 Set read-write mode.
1109 \end_layout
1111 \begin_layout Subsubsection
1112 set-romode 
1113 \end_layout
1115 \begin_layout Standard
1116 Set read-only mode
1117 \end_layout
1119 \begin_layout Subsubsection
1120 toggle-rwmode 
1121 \end_layout
1123 \begin_layout Standard
1124 Toggle between read-only and read-write modes.
1125 \end_layout
1127 \begin_layout Subsubsection
1128 set-gamename <name> 
1129 \end_layout
1131 \begin_layout Standard
1132 Set name of the game to <name>
1133 \end_layout
1135 \begin_layout Subsubsection
1136 get-gamename 
1137 \end_layout
1139 \begin_layout Standard
1140 Print the name of the game.
1141 \end_layout
1143 \begin_layout Subsubsection
1144 add-author <author> 
1145 \end_layout
1147 \begin_layout Standard
1148 Adds new author <author>.
1149  If <author> does not contain '|' it is full name.
1150  If it contains '|', '|' splits the full name and nickname.
1151 \end_layout
1153 \begin_layout Subsubsection
1154 edit-author <num> <author> 
1155 \end_layout
1157 \begin_layout Standard
1158 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1159  format)
1160 \end_layout
1162 \begin_layout Subsubsection
1163 remove-author <num> 
1164 \end_layout
1166 \begin_layout Standard
1167 Remove author in slot <num>
1168 \end_layout
1170 \begin_layout Subsubsection
1171 print-authors 
1172 \end_layout
1174 \begin_layout Standard
1175 Print authors.
1176 \end_layout
1178 \begin_layout Subsubsection
1179 test-1, test-2, test-3
1180 \end_layout
1182 \begin_layout Standard
1183 Internal test commands.
1184  Don't use.
1185 \end_layout
1187 \begin_layout Subsubsection
1188 take-screenshot <filename> 
1189 \end_layout
1191 \begin_layout Standard
1192 Save screenshot to <filename>.
1193 \end_layout
1195 \begin_layout Subsubsection
1196 +controller<num><button>
1197 \end_layout
1199 \begin_layout Standard
1200 Press button <button> on controller <num> (1-8).
1201  The following button names are known:
1202 \end_layout
1204 \begin_layout Itemize
1205 left
1206 \end_layout
1208 \begin_layout Itemize
1209 right
1210 \end_layout
1212 \begin_layout Itemize
1214 \end_layout
1216 \begin_layout Itemize
1217 down
1218 \end_layout
1220 \begin_layout Itemize
1222 \end_layout
1224 \begin_layout Itemize
1226 \end_layout
1228 \begin_layout Itemize
1230 \end_layout
1232 \begin_layout Itemize
1234 \end_layout
1236 \begin_layout Itemize
1238 \end_layout
1240 \begin_layout Itemize
1242 \end_layout
1244 \begin_layout Itemize
1245 select
1246 \end_layout
1248 \begin_layout Itemize
1249 start
1250 \end_layout
1252 \begin_layout Itemize
1253 trigger
1254 \end_layout
1256 \begin_layout Itemize
1257 cursor
1258 \end_layout
1260 \begin_layout Itemize
1261 pause
1262 \end_layout
1264 \begin_layout Itemize
1265 turbo
1266 \end_layout
1268 \begin_layout Subsubsection
1269 controllerh<num><button>
1270 \end_layout
1272 \begin_layout Standard
1273 Hold/unhold button <button> on controller <num> (1-8).
1274  See +controller for button names.
1275 \end_layout
1277 \begin_layout Subsubsection
1278 controllerf<num><button>
1279 \end_layout
1281 \begin_layout Standard
1282 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1283  See +controller for button names.
1284 \end_layout
1286 \begin_layout Standard
1287 Cauntion: Does not work properly if outside frame advance.
1288 \end_layout
1290 \begin_layout Subsubsection
1291 autofire (<pattern>|-)...
1292 \end_layout
1294 \begin_layout Standard
1295 Set autofire pattern.
1296  Each parameter is comma-separated list of button names (in form of 1start,
1297  1A, 2B, etc..) to hold on that frame.
1298  After reaching the end of pattern, the pattern restarts from the beginning.
1299 \end_layout
1301 \begin_layout Subsubsection
1302 repaint
1303 \end_layout
1305 \begin_layout Standard
1306 Force a repaint.
1307 \end_layout
1309 \begin_layout Subsection
1310 Save jukebox 
1311 \end_layout
1313 \begin_layout Subsubsection
1314 cycle-jukebox-backward
1315 \end_layout
1317 \begin_layout Standard
1318 Cycle save jukebox backwards.
1319 \end_layout
1321 \begin_layout Subsubsection
1322 cycle-jukebox-forward
1323 \end_layout
1325 \begin_layout Standard
1326 Cycle save jukebox forwards
1327 \end_layout
1329 \begin_layout Subsubsection
1330 load-jukebox
1331 \end_layout
1333 \begin_layout Standard
1334 Do load from jukebox (current mode).
1335 \end_layout
1337 \begin_layout Subsubsection
1338 save-jukebox
1339 \end_layout
1341 \begin_layout Standard
1342 Do state save to jukebox.
1343 \end_layout
1345 \begin_layout Subsection
1346 Lua 
1347 \end_layout
1349 \begin_layout Standard
1350 Only available if lua support is compiled in.
1351 \end_layout
1353 \begin_layout Subsubsection
1354 evaluate-lua <luacode>
1355 \end_layout
1357 \begin_layout Standard
1358 Run Lua code <luacode> using built-in Lua interpretter.
1359 \end_layout
1361 \begin_layout Subsubsection
1362 run-lua <script>
1363 \end_layout
1365 \begin_layout Standard
1366 Run specified lua file using built-in Lua interpretter.
1367 \end_layout
1369 \begin_layout Subsubsection
1370 reset-lua
1371 \end_layout
1373 \begin_layout Standard
1374 Clear the Lua VM state and restore to factory defaults.
1375 \end_layout
1377 \begin_layout Subsection
1378 Memory watch
1379 \end_layout
1381 \begin_layout Subsubsection
1382 add-watch <name> <expression>
1383 \end_layout
1385 \begin_layout Standard
1386 Adds new watch (or modifies old one).
1387 \end_layout
1389 \begin_layout Subsubsection
1390 remove-watch <name>
1391 \end_layout
1393 \begin_layout Standard
1394 Remove a watch.
1395 \end_layout
1397 \begin_layout Subsection
1398 Sound 
1399 \end_layout
1401 \begin_layout Subsubsection
1402 enable-sound <on/off> 
1403 \end_layout
1405 \begin_layout Standard
1406 Enable/Disable sound.
1407 \end_layout
1409 \begin_layout Subsubsection
1410 set-sound-device <device> 
1411 \end_layout
1413 \begin_layout Standard
1414 Set sound device to <device>
1415 \end_layout
1417 \begin_layout Subsubsection
1418 show-sound-status 
1419 \end_layout
1421 \begin_layout Standard
1422 Show status of sound system.
1423 \end_layout
1425 \begin_layout Subsubsection
1426 show-sound-devices
1427 \end_layout
1429 \begin_layout Standard
1430 Show all available devices.
1431 \end_layout
1433 \begin_layout Subsubsection
1434 set-volume <multiplier>
1435 \end_layout
1437 \begin_layout Standard
1438 Set the volume multiplier to <multiplier>.
1439  1 is normal volume, and higher numbers are louder.
1440 \end_layout
1442 \begin_layout Subsubsection
1443 set-volume <multiplier>%
1444 \end_layout
1446 \begin_layout Standard
1447 Set the volume multiplier to <multiplier> percent.
1448  100 is normal volume, and higher numbers are louder.
1449 \end_layout
1451 \begin_layout Subsubsection
1452 set-volume <multiplier>dB
1453 \end_layout
1455 \begin_layout Standard
1456 Set the volume multiplier to <multiplier> dB.
1457  0 is normal volume, and higher numbers are louder.
1458  The value may be negative.
1459 \end_layout
1461 \begin_layout Subsection
1462 Misc.
1463 \end_layout
1465 \begin_layout Subsubsection
1466 reload-rom [<file>]
1467 \end_layout
1469 \begin_layout Standard
1470 Reloads the main ROM image from <file>.
1471 \end_layout
1473 \begin_layout Subsection
1474 SDL Platform commands 
1475 \end_layout
1477 \begin_layout Standard
1478 The following are valid on SDL platform.
1479 \end_layout
1481 \begin_layout Subsubsection
1482 identify-key
1483 \end_layout
1485 \begin_layout Standard
1486 Asks to press a key and then identifies that (pseudo-)key.
1487 \end_layout
1489 \begin_layout Subsubsection
1490 toggle-console 
1491 \end_layout
1493 \begin_layout Standard
1494 Toggle between windowed/fullscreen console.
1495 \end_layout
1497 \begin_layout Subsubsection
1498 scroll-fullup 
1499 \end_layout
1501 \begin_layout Standard
1502 Scroll messages window as far back as it goes.
1503 \end_layout
1505 \begin_layout Subsubsection
1506 scroll-fulldown 
1507 \end_layout
1509 \begin_layout Standard
1510 Scroll messages window as far forward as it goes.
1511 \end_layout
1513 \begin_layout Subsubsection
1514 scroll-up 
1515 \end_layout
1517 \begin_layout Standard
1518 Scroll messages window back one screenful.
1519 \end_layout
1521 \begin_layout Subsubsection
1522 scroll-down 
1523 \end_layout
1525 \begin_layout Standard
1526 Scroll messages window forward one screenful.
1527 \end_layout
1529 \begin_layout Subsubsection
1530 prompt-command <command>
1531 \end_layout
1533 \begin_layout Standard
1534 Enter command prompt, with prompt prepopulated with specified command.
1535 \end_layout
1537 \begin_layout Section
1538 Settings
1539 \end_layout
1541 \begin_layout Subsection
1542 Core settings
1543 \end_layout
1545 \begin_layout Subsubsection
1546 firmwarepath
1547 \end_layout
1549 \begin_layout Standard
1550 Set where bsnes looks for firmware files.
1551  Default is 
1552 \begin_inset Quotes eld
1553 \end_inset
1556 \begin_inset Quotes erd
1557 \end_inset
1560 \end_layout
1562 \begin_layout Subsubsection
1563 target
1564 \end_layout
1566 \begin_layout Standard
1567 Set the target .
1568  Numeric, range is 0.001 to 
1569 \begin_inset Quotes eld
1570 \end_inset
1572 infinite
1573 \begin_inset Quotes erd
1574 \end_inset
1577  Default is native framerate.
1578 \end_layout
1580 \begin_layout Subsubsection
1581 savecompression
1582 \end_layout
1584 \begin_layout Standard
1585 Set save compression level (integer 0-9).
1586  Default is 7 (0 is no compression).
1587 \end_layout
1589 \begin_layout Subsubsection
1590 advance-timeout
1591 \end_layout
1593 \begin_layout Standard
1594 Set the frame advance timeout in milliseconds.
1595  Numeric integer, range is 0-999999999.
1596  Default is 500.
1597 \end_layout
1599 \begin_layout Subsection
1600 AVI dumper settings
1601 \end_layout
1603 \begin_layout Subsubsection
1604 avi-large
1605 \end_layout
1607 \begin_layout Standard
1608 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1609  outputs.
1610 \end_layout
1612 \begin_layout Subsubsection
1613 avi-left-border
1614 \end_layout
1616 \begin_layout Standard
1617 AVI dumper: Set the default left border thickness (unless lua overrides)
1618  for dumps.
1619  Range 0-8191.
1620  Default is 0.
1621 \end_layout
1623 \begin_layout Subsubsection
1624 avi-right-border
1625 \end_layout
1627 \begin_layout Standard
1628 AVI dumper: Set the default right border thickness (unless lua overrides)
1629  for dumps.
1630  Range 0-8191.
1631  Default is 0.
1632 \end_layout
1634 \begin_layout Subsubsection
1635 avi-top-border
1636 \end_layout
1638 \begin_layout Standard
1639 AVI dumper: Set the default top border thickness (unless lua overrides)
1640  for dumps.
1641  Range 0-8191.
1642  Default is 0.
1643 \end_layout
1645 \begin_layout Subsubsection
1646 avi-bottom-border
1647 \end_layout
1649 \begin_layout Standard
1650 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1651  for dumps.
1652  Range 0-8191.
1653  Default is 0.
1654 \end_layout
1656 \begin_layout Subsubsection
1657 avi-maxframes
1658 \end_layout
1660 \begin_layout Standard
1661 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1662  Range 0-999999999.
1663  Default is 0.
1664 \end_layout
1666 \begin_layout Subsubsection
1667 avi-compresison
1668 \end_layout
1670 \begin_layout Standard
1671 AVI dumper: Compression level (0-18).
1672 \end_layout
1674 \begin_layout Itemize
1675 Compression levels 10 and above are not compatible with stock CSCD codec.
1676 \end_layout
1678 \begin_layout Itemize
1679 Recomended level is 7.
1680 \end_layout
1682 \begin_layout Subsubsection
1683 avi-soundrate
1684 \end_layout
1686 \begin_layout Standard
1687 AVI dumper: Set method of determining the sound rate.
1688 \end_layout
1690 \begin_layout Itemize
1691 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1692  128, 176.4 and 192 kHz.
1693 \end_layout
1695 \begin_layout Itemize
1696 1: Round down to nearest integer.
1697 \end_layout
1699 \begin_layout Itemize
1700 2: Round up to nearest ingeter.
1701 \end_layout
1703 \begin_layout Subsection
1704 JMD options
1705 \end_layout
1707 \begin_layout Subsubsection
1708 jmd-copression
1709 \end_layout
1711 \begin_layout Standard
1712 JMD dumper: Compression level (0-9).
1713 \end_layout
1715 \begin_layout Subsection
1716 SDL platform settings
1717 \end_layout
1719 \begin_layout Subsubsection
1720 autorepeat-first-delay
1721 \end_layout
1723 \begin_layout Standard
1724 Sets the delay for first character in typematic autorepeat.
1725 \end_layout
1727 \begin_layout Subsubsection
1728 autorepeat-subsequent-delay
1729 \end_layout
1731 \begin_layout Standard
1732 Sets the delay for subsequent characters in typematic autorepeat.
1733 \end_layout
1735 \begin_layout Section
1736 Lua functions
1737 \end_layout
1739 \begin_layout Subsection
1740 Core (in main table)
1741 \end_layout
1743 \begin_layout Subsubsection
1744 print
1745 \end_layout
1747 \begin_layout Standard
1748 Print line to message console.
1749 \end_layout
1751 \begin_layout Subsubsection
1752 exec(string command)
1753 \end_layout
1755 \begin_layout Standard
1756 Run command as it was entered on the command line
1757 \end_layout
1759 \begin_layout Subsubsection
1760 utime()
1761 \end_layout
1763 \begin_layout Standard
1764 Returns two values.
1765  First is time since some epoch in seconds, the second is microseconds mod
1766  10^6 since that epoch.
1767 \end_layout
1769 \begin_layout Subsubsection
1770 emulator_ready()
1771 \end_layout
1773 \begin_layout Standard
1774 Returns true if emulator has finished booting, false if not (on_startup()
1775  will be issued later).
1776 \end_layout
1778 \begin_layout Subsubsection
1779 set_idle_timeout(number timeout)
1780 \end_layout
1782 \begin_layout Standard
1783 Set number of microseconds to block idle for.
1784  After this timeout has expired, on_idle() will be called once.
1785 \end_layout
1787 \begin_layout Subsubsection
1788 set_timer_timeout(number timeout)
1789 \end_layout
1791 \begin_layout Standard
1792 Set number of microseconds to block timer for.
1793  After this timeout has expired, on_timer() will be called once.
1794 \end_layout
1796 \begin_layout Subsubsection
1797 bus_address(number snesaddr)
1798 \end_layout
1800 \begin_layout Standard
1801 Returns virtual address corresponding to specified address on SNES bus.
1802 \end_layout
1804 \begin_layout Subsection
1805 Table bit:
1806 \end_layout
1808 \begin_layout Standard
1809 Bitwise logical functions and related.
1810 \end_layout
1812 \begin_layout Subsubsection
1813 bit.none(number...) / bit.bnot(number...)
1814 \end_layout
1816 \begin_layout Standard
1817 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1818  arguments).
1819 \end_layout
1821 \begin_layout Subsubsection
1822 bit.any(number...) / bit.bor(number...)
1823 \end_layout
1825 \begin_layout Standard
1826 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1827 \end_layout
1829 \begin_layout Subsubsection
1830 bit.all(number...) / bit.band(number...)
1831 \end_layout
1833 \begin_layout Standard
1834 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1836 \end_layout
1838 \begin_layout Subsubsection
1839 bit.parity(number...) / bit.bxor(number...)
1840 \end_layout
1842 \begin_layout Standard
1843 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1844  of the arguments).
1845 \end_layout
1847 \begin_layout Subsubsection
1848 bit.lrotate(number base[, number amount[, number bits]])
1849 \end_layout
1851 \begin_layout Standard
1852 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1853 \end_layout
1855 \begin_layout Subsubsection
1856 bit.rrotate(number base[, number amount[, number bits]])
1857 \end_layout
1859 \begin_layout Standard
1860 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1861  places.
1862 \end_layout
1864 \begin_layout Subsubsection
1865 bit.lshift(number base[, number amount[, number bits]])
1866 \end_layout
1868 \begin_layout Standard
1869 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1870  The new bits are filled with zeroes.
1871 \end_layout
1873 \begin_layout Subsubsection
1874 bit.lrshift(number base[, number amount[, number bits]])
1875 \end_layout
1877 \begin_layout Standard
1878 Shift bits-bit (max 48, default 48) number logically right by amount (default
1879  1) places.
1880  The new bits are filled with zeroes.
1881 \end_layout
1883 \begin_layout Subsubsection
1884 bit.arshift(number base[, number amount[, number bits]])
1885 \end_layout
1887 \begin_layout Standard
1888 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1889  (default 1) places.
1890  The new bits are shifted in with copy of the high bit.
1891 \end_layout
1893 \begin_layout Subsubsection
1894 bit.extract(number base[, number bit0[, number bit1,...]])
1895 \end_layout
1897 \begin_layout Standard
1898 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1899 \end_layout
1901 \begin_layout Standard
1902 Notes: 
1903 \end_layout
1905 \begin_layout Itemize
1906 Bit numbers up to 51 should work reliably (then things start falling apart
1907  due to double precision issues).
1908 \end_layout
1910 \begin_layout Itemize
1911 There are two special bit positions, true and false, standing for always
1912  set bit and always clear bit.
1913 \end_layout
1915 \begin_layout Subsubsection
1916 bit.value([number bit1[, number bit2,...]])
1917 \end_layout
1919 \begin_layout Standard
1920 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1921  places and so on.
1922  As special value, nil argument is no-op.
1923 \end_layout
1925 \begin_layout Subsection
1926 Table gui:
1927 \end_layout
1929 \begin_layout Standard
1930 Most of these functions can only be called in on_paint and on_video callbacks.
1931  Exceptions are noted.
1932 \end_layout
1934 \begin_layout Standard
1935 Colors are 32-bit.
1936  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1937  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1938  opaque, 255 is almost transparent).
1939  -1 is the fully transparent color.
1940  Alpha values greater than 127 do work.
1941 \end_layout
1943 \begin_layout Standard
1944 Origin of coordinates is at top left corner of game display area.
1945  Left and top gaps correspond to negative coordinates.
1946 \end_layout
1948 \begin_layout Subsubsection
1949 gui.resolution()
1950 \end_layout
1952 \begin_layout Standard
1953 Returns 2-tuple (hresolution, vresolution).
1954 \end_layout
1956 \begin_layout Subsubsection
1957 gui.<class>_gap(number gap)
1958 \end_layout
1960 \begin_layout Standard
1961 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1962  is 8191).
1963 \end_layout
1965 \begin_layout Subsubsection
1966 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1967 \end_layout
1969 \begin_layout Standard
1970 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1971  16 high).
1972  Parameters:
1973 \end_layout
1975 \begin_layout Itemize
1976 x: X-coordinate to start the drawing from (and x-coordinate at begining
1977  of the lines).
1978 \end_layout
1980 \begin_layout Itemize
1981 y: Y-coordinate to start the drawing from.
1982 \end_layout
1984 \begin_layout Itemize
1985 text: The text to draw.
1986 \end_layout
1988 \begin_layout Itemize
1989 fgc: Text color (default is 0xFFFFFF (white))
1990 \end_layout
1992 \begin_layout Itemize
1993 bgc: Background color (default is -1 (transparent))
1994 \end_layout
1996 \begin_layout Subsubsection
1997 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1998 \end_layout
2000 \begin_layout Standard
2001 Like gui.text, but draw using double-width.
2002 \end_layout
2004 \begin_layout Subsubsection
2005 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2006 \end_layout
2008 \begin_layout Standard
2009 Like gui.text, but draw using double-height.
2010 \end_layout
2012 \begin_layout Subsubsection
2013 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2014 \end_layout
2016 \begin_layout Standard
2017 Like gui.text, but draw using double-width/double-height.
2018 \end_layout
2020 \begin_layout Subsubsection
2021 gui.rectangle(number x, number y, number width, number height[, number thickness[
2022 , number outline[, number fill]]])
2023 \end_layout
2025 \begin_layout Standard
2026 Draw rectangle on the GUI.
2027  Parameters:
2028 \end_layout
2030 \begin_layout Itemize
2031 x: X-coordinate of left edge.
2032 \end_layout
2034 \begin_layout Itemize
2035 y: Y-coordinate of upper edge.
2036 \end_layout
2038 \begin_layout Itemize
2039 width: Width of rectangle.
2040 \end_layout
2042 \begin_layout Itemize
2043 height: Height of rectangle.
2044 \end_layout
2046 \begin_layout Itemize
2047 thickness: Thickness of outline (default is 1).
2048 \end_layout
2050 \begin_layout Itemize
2051 outline: Color of outline (default is 0xFFFFFF (white))
2052 \end_layout
2054 \begin_layout Itemize
2055 fill: Color of fill (default is -1 (transparent))
2056 \end_layout
2058 \begin_layout Subsubsection
2059 gui.box(number x, number y, number width, number height[, number thickness[,
2060  number outline1[,number outline2[, number fill]]]])
2061 \end_layout
2063 \begin_layout Standard
2064 Draw rectangle with 3D effect on the GUI.
2065  Parameters:
2066 \end_layout
2068 \begin_layout Itemize
2069 x: X-coordinate of left edge.
2070 \end_layout
2072 \begin_layout Itemize
2073 y: Y-coordinate of upper edge.
2074 \end_layout
2076 \begin_layout Itemize
2077 width: Width of rectangle.
2078 \end_layout
2080 \begin_layout Itemize
2081 height: Height of rectangle.
2082 \end_layout
2084 \begin_layout Itemize
2085 thickness: Thickness of outline (default is 1).
2086 \end_layout
2088 \begin_layout Itemize
2089 outline1: First color of outline (default is 0xFFFFFF (white))
2090 \end_layout
2092 \begin_layout Itemize
2093 outline2: First color of outline (default is 0x808080 (dark gray))
2094 \end_layout
2096 \begin_layout Itemize
2097 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2098 \end_layout
2100 \begin_layout Subsubsection
2101 gui.pixel(number x, number y[, number color])
2102 \end_layout
2104 \begin_layout Standard
2105 Draw one pixel on the GUI.
2106  Parameters:
2107 \end_layout
2109 \begin_layout Itemize
2110 x: X-coordinate of the pixel
2111 \end_layout
2113 \begin_layout Itemize
2114 y: Y-coordinate of the pixel
2115 \end_layout
2117 \begin_layout Itemize
2118 color: Color of the pixel (default is 0xFFFFFF (white))
2119 \end_layout
2121 \begin_layout Subsubsection
2122 gui.crosshair(number x, number y[, number length[, number color]])
2123 \end_layout
2125 \begin_layout Standard
2126 Draw a crosshair.
2127  Parameters:
2128 \end_layout
2130 \begin_layout Itemize
2131 x: X-coordinate of the crosshair
2132 \end_layout
2134 \begin_layout Itemize
2135 y: Y-coordinate of the crosshair
2136 \end_layout
2138 \begin_layout Itemize
2139 length: Length of the crosshair lines (default 10).
2140 \end_layout
2142 \begin_layout Itemize
2143 color: Color of the crosshair (default is 0xFFFFFF (white))
2144 \end_layout
2146 \begin_layout Subsubsection
2147 gui.line(number x1, number y1, number x2, number y2[, number color])
2148 \end_layout
2150 \begin_layout Standard
2151 Draw a thin line.
2152  Parameters:
2153 \end_layout
2155 \begin_layout Itemize
2156 x1: X-coordinate of one end.
2157 \end_layout
2159 \begin_layout Itemize
2160 y1: Y-coordinate of one end.
2161 \end_layout
2163 \begin_layout Itemize
2164 x2: X-coordinate of the other end.
2165 \end_layout
2167 \begin_layout Itemize
2168 y2: Y-coordinate of the other end.
2169 \end_layout
2171 \begin_layout Itemize
2172 color: Color of the line (default is 0xFFFFFF (white)).
2173 \end_layout
2175 \begin_layout Subsubsection
2176 gui.circle(number x, number y, number r[, number thick[, number border[,
2177  number fil]]])
2178 \end_layout
2180 \begin_layout Standard
2181 Draw a circle.
2182  Parameters.
2183 \end_layout
2185 \begin_layout Itemize
2186 x: X-coordinate of the center
2187 \end_layout
2189 \begin_layout Itemize
2190 y: Y-coordinate of the center
2191 \end_layout
2193 \begin_layout Itemize
2194 r: The radius of the circle
2195 \end_layout
2197 \begin_layout Itemize
2198 thick: Border thickness
2199 \end_layout
2201 \begin_layout Itemize
2202 border: Border color (default is 0xFFFFFF (white))
2203 \end_layout
2205 \begin_layout Itemize
2206 fill: Fill color (default is -1 (transparent)).
2207 \end_layout
2209 \begin_layout Subsubsection
2210 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2211 \end_layout
2213 \begin_layout Standard
2214 Draw a bitmap on screen with specified palette.
2215  Parameters:
2216 \end_layout
2218 \begin_layout Itemize
2219 x: X-coordinate of left edge.
2220 \end_layout
2222 \begin_layout Itemize
2223 y: Y-coordinate of top edge.
2224 \end_layout
2226 \begin_layout Itemize
2227 bitmap: The bitmap to draw
2228 \end_layout
2230 \begin_layout Itemize
2231 palette: The palette to draw the bitmap using.
2232 \end_layout
2234 \begin_layout Subsubsection
2235 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2236 \end_layout
2238 \begin_layout Standard
2239 Draw a bitmap on screen.
2240  Parameters:
2241 \end_layout
2243 \begin_layout Itemize
2244 x: X-coordinate of left edge.
2245 \end_layout
2247 \begin_layout Itemize
2248 y: Y-coordinate of top edge.
2249 \end_layout
2251 \begin_layout Itemize
2252 bitmap: The bitmap to draw
2253 \end_layout
2255 \begin_layout Subsubsection
2256 gui.palette_new()
2257 \end_layout
2259 \begin_layout Standard
2260 Returns a new palette (initially all transparent).
2261  Can be used anywhere.
2262 \end_layout
2264 \begin_layout Subsubsection
2265 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2266 \end_layout
2268 \begin_layout Standard
2269 Returns a new bitmap/dbitmap.
2270  Can be used anywhere.
2271  Parameters:
2272 \end_layout
2274 \begin_layout Itemize
2275 w: The width of new bitmap
2276 \end_layout
2278 \begin_layout Itemize
2279 h: The height of new bitmap
2280 \end_layout
2282 \begin_layout Itemize
2283 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2284 \end_layout
2286 \begin_layout Itemize
2287 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2288 \end_layout
2290 \begin_layout Subsubsection
2291 gui.bitmap_load(string file)
2292 \end_layout
2294 \begin_layout Standard
2295 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2296  for bitmap).
2297  Can be used anywhere.
2298  Parameters:
2299 \end_layout
2301 \begin_layout Itemize
2302 file: The name of file to load.
2303 \end_layout
2305 \begin_layout Subsubsection
2306 gui.palette_set(palette palette, number index, number color)
2307 \end_layout
2309 \begin_layout Standard
2310 Sets color in palette.
2311  Can be used anywhere.
2312  Parameters:
2313 \end_layout
2315 \begin_layout Itemize
2316 palette: The palette to manipulate
2317 \end_layout
2319 \begin_layout Itemize
2320 index: Index of color (0-65535).
2321 \end_layout
2323 \begin_layout Itemize
2324 color: The color value.
2325 \end_layout
2327 \begin_layout Subsubsection
2328 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2329 \end_layout
2331 \begin_layout Standard
2332 Sets specified pixel in bitmap.
2333  Can be used anywhere.
2334  Parameters:
2335 \end_layout
2337 \begin_layout Itemize
2338 bitmap: The bitmap to manipulate
2339 \end_layout
2341 \begin_layout Itemize
2342 x: The x-coordinate of the pixel.
2343 \end_layout
2345 \begin_layout Itemize
2346 y: The y-coordinate of the pixel.
2347 \end_layout
2349 \begin_layout Itemize
2350 color: If bitmap is a bitmap, color index (0-65535).
2351  Otherwise color value.
2352 \end_layout
2354 \begin_layout Subsubsection
2355 gui.bitmap_size(bitmap/dbitmap bitmap)
2356 \end_layout
2358 \begin_layout Standard
2359 Get size of bitmap.
2360  Can be used anywhere.
2361  Parameters:
2362 \end_layout
2364 \begin_layout Itemize
2365 bitmap: The bitmap to query.
2366 \end_layout
2368 \begin_layout Standard
2369 The first return is the width, the second is the height.
2370 \end_layout
2372 \begin_layout Subsubsection
2373 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2374  src, number sx, number sy, number w, number h[, number ck])
2375 \end_layout
2377 \begin_layout Standard
2378 Blit a part of bitmap to another.
2379  Can be used anywhere.
2380  Parameters:
2381 \end_layout
2383 \begin_layout Itemize
2384 dest: Destination to blit to.
2385 \end_layout
2387 \begin_layout Itemize
2388 dx: left edge of target
2389 \end_layout
2391 \begin_layout Itemize
2392 dy: Top edge of target
2393 \end_layout
2395 \begin_layout Itemize
2396 src: The source to blit from.
2397  Must be of the same type as destination.
2398 \end_layout
2400 \begin_layout Itemize
2401 sx: left edge of source
2402 \end_layout
2404 \begin_layout Itemize
2405 sy: Top edge of source
2406 \end_layout
2408 \begin_layout Itemize
2409 w: Width of region
2410 \end_layout
2412 \begin_layout Itemize
2413 h: Height of region.
2414 \end_layout
2416 \begin_layout Itemize
2417 ck: Color key.
2418  Pixels of this color are not blitted.
2419 \end_layout
2421 \begin_deeper
2422 \begin_layout Itemize
2423 If bitmaps are bitmaps, this is color index of colorkey.
2424  Values outside range 0-65535 cause no key to be used as colorkey.
2425 \end_layout
2427 \begin_layout Itemize
2428 If bitmaps are dbitmaps, this color value of colorkey.
2429 \end_layout
2431 \begin_layout Itemize
2432 May be absent or nil for no colorkey blit.
2433 \end_layout
2435 \end_deeper
2436 \begin_layout Subsubsection
2437 gui.repaint()
2438 \end_layout
2440 \begin_layout Standard
2441 Request on_repaint() to happen as soon as possible.
2442  Can be used anywhere.
2443 \end_layout
2445 \begin_layout Subsubsection
2446 gui.subframe_update(boolean on)
2447 \end_layout
2449 \begin_layout Standard
2450 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2451  or not happen (on=false).
2452  Can be used anywhere.
2453 \end_layout
2455 \begin_layout Subsubsection
2456 gui.screenshot(string filename)
2457 \end_layout
2459 \begin_layout Standard
2460 Write PNG screenshot of the current frame (no drawings) to specified file.
2461  Can be used anywhere.
2462 \end_layout
2464 \begin_layout Subsubsection
2465 gui.color(number r, number g, number b[, number a])
2466 \end_layout
2468 \begin_layout Standard
2469 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2470  each component in scale 0-255.
2471  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2472  opaque).
2473  The default alpha is 256.
2474 \end_layout
2476 \begin_layout Subsubsection
2477 gui.status(string name, string value)
2478 \end_layout
2480 \begin_layout Standard
2481 Set status field 
2482 \begin_inset Quotes eld
2483 \end_inset
2485 L[<name>]
2486 \begin_inset Quotes erd
2487 \end_inset
2489  to <value> in status area.
2490  Can be used anywhere.
2491 \end_layout
2493 \begin_layout Subsubsection
2494 gui.rainbow(number step, number steps[, number color])
2495 \end_layout
2497 \begin_layout Standard
2498 Perform hue rotation of color <color> (default bright red), by <step> steps.
2499  The number of steps per full rotation is given by absolute value of <steps>.
2500 \end_layout
2502 \begin_layout Standard
2503 If <steps> is negative, the rotation will be counterclockwise.
2504 \end_layout
2506 \begin_layout Subsection
2507 table input
2508 \end_layout
2510 \begin_layout Standard
2511 Input handling.
2512  Only available in on_input callback.
2513 \end_layout
2515 \begin_layout Subsubsection
2516 input.get(number controller, number index)
2517 \end_layout
2519 \begin_layout Standard
2520 Read the specified index (0-11) from specified controller (0-7).
2521  Notes:
2522 \end_layout
2524 \begin_layout Itemize
2525 Uses physical controller numbering.
2526  Gamepad in port 2 is controller 4, not 1!
2527 \end_layout
2529 \begin_layout Subsubsection
2530 input.set(number controller, number index, number value)
2531 \end_layout
2533 \begin_layout Standard
2534 Write the specified index (0-11) from specified controller (0-7), storing
2535  value.
2536  Notes:
2537 \end_layout
2539 \begin_layout Itemize
2540 Uses physical controller numbering.
2541  Gamepad in port 2 is controller 4, not 1!
2542 \end_layout
2544 \begin_layout Subsubsection
2545 input.geta(number controller)
2546 \end_layout
2548 \begin_layout Standard
2549 Get input state for entiere controller.
2550  Returns 13 return values.
2551 \end_layout
2553 \begin_layout Itemize
2554 1st return value: Bitmask: bit i is set if i:th index is nonzero
2555 \end_layout
2557 \begin_layout Itemize
2558 2nd-13th return value: value of i:th index.
2559 \end_layout
2561 \begin_layout Subsubsection
2562 input.seta(number controller, number bitmask, number args...)
2563 \end_layout
2565 \begin_layout Standard
2566 Set state for entiere controller.
2567  args is up to 12 values for indices (overriding values in bitmask if specified).
2568 \end_layout
2570 \begin_layout Subsubsection
2571 input.controllertype(number controller)
2572 \end_layout
2574 \begin_layout Standard
2575 Get the type of controller as string.
2576  Valid values are:
2577 \end_layout
2579 \begin_layout Itemize
2580 gamepad
2581 \end_layout
2583 \begin_layout Itemize
2584 mouse
2585 \end_layout
2587 \begin_layout Itemize
2588 justifier
2589 \end_layout
2591 \begin_layout Itemize
2592 superscope
2593 \end_layout
2595 \begin_layout Subsubsection
2596 input.reset([number cycles])
2597 \end_layout
2599 \begin_layout Standard
2600 Execute reset.
2601  If cycles is greater than zero, do delayed reset.
2602  0 (or no value) causes immediate reset.
2603 \end_layout
2605 \begin_layout Itemize
2606 Only available with subframe flag false.
2607 \end_layout
2609 \begin_layout Subsubsection
2610 input.raw()
2611 \end_layout
2613 \begin_layout Standard
2614 Returns table of tables of all available keys and axes.
2615  The first table is indexed by key name (platform-dependent!), and the inner
2616  table has the following fields:
2617 \end_layout
2619 \begin_layout Itemize
2620 last_rawval: Last reported raw value for control.
2621 \end_layout
2623 \begin_layout Itemize
2624 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2625  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2626 \end_layout
2628 \begin_layout Itemize
2629 cal_left: Minimum calibration value.
2630  Only meaningful with axis and pressure types.
2631 \end_layout
2633 \begin_layout Itemize
2634 cal_center: Center calibration value.
2635  Only meaningful with axis and pressure types.
2636 \end_layout
2638 \begin_layout Itemize
2639 cal_right: Maximum calibration value.
2640  Only meaningful with axis and pressure types.
2641 \end_layout
2643 \begin_layout Itemize
2644 cal_tolerance: Dead zone tolerance.
2645  Only meaningful with axis and pressure types.
2646 \end_layout
2648 \begin_layout Subsubsection
2649 input.keyhook(key, state)
2650 \end_layout
2652 \begin_layout Standard
2653 Requests that keyhook events to be sent for key (state=true) or not sent
2654  (state=false).
2655 \end_layout
2657 \begin_layout Subsection
2658 Table hostmemory
2659 \end_layout
2661 \begin_layout Standard
2662 Host memory handling (extra memory saved to savestates).
2663  Host memory starts empty.
2664 \end_layout
2666 \begin_layout Subsubsection
2667 hostmemory.read(number address)
2668 \end_layout
2670 \begin_layout Standard
2671 Reads hostmemory slot address.
2672  Slot numbers out of range return false instead of numeric.
2673 \end_layout
2675 \begin_layout Subsubsection
2676 hostmemory.write(number address, number value)
2677 \end_layout
2679 \begin_layout Standard
2680 Writes hostmemory slot with 0-255.
2681  Slot numbers out of range cause extension of host memory slot space.
2682 \end_layout
2684 \begin_layout Subsubsection
2685 hostmemory.readbyte(number address)
2686 \end_layout
2688 \begin_layout Standard
2689 Read unsigned byte (1 element) from given address.
2690  Slots out of range return false.
2691 \end_layout
2693 \begin_layout Subsubsection
2694 hostmemory.writebyte(number address, number value)
2695 \end_layout
2697 \begin_layout Standard
2698 Write unsigned byte (1 element) to given slot.
2699  Slot numbers out of range cause extension.
2700 \end_layout
2702 \begin_layout Subsubsection
2703 hostmemory.readsbyte(number address)
2704 \end_layout
2706 \begin_layout Standard
2707 Read signed byte (1 element) from given address.
2708  Slots out of range return false.
2709 \end_layout
2711 \begin_layout Subsubsection
2712 hostmemory.writesbyte(number address, number value)
2713 \end_layout
2715 \begin_layout Standard
2716 Write signed byte (1 element) to given slot.
2717  Slot numbers out of range cause extension.
2718 \end_layout
2720 \begin_layout Subsubsection
2721 hostmemory.readword(number address)
2722 \end_layout
2724 \begin_layout Standard
2725 Read unsigned word (2 elements) from given address.
2726  Slots out of range return false.
2727 \end_layout
2729 \begin_layout Subsubsection
2730 hostmemory.writeword(number address, number value)
2731 \end_layout
2733 \begin_layout Standard
2734 Write unsigned word (2 elements) to given slot.
2735  Slot numbers out of range cause extension.
2736 \end_layout
2738 \begin_layout Subsubsection
2739 hostmemory.readsword(number address)
2740 \end_layout
2742 \begin_layout Standard
2743 Read signed word (2 elements) from given address.
2744  Slots out of range return false.
2745 \end_layout
2747 \begin_layout Subsubsection
2748 hostmemory.writesword(number address, number value)
2749 \end_layout
2751 \begin_layout Standard
2752 Write signed word (2 elements) to given slot.
2753  Slot numbers out of range cause extension.
2754 \end_layout
2756 \begin_layout Subsubsection
2757 hostmemory.readdword(number address)
2758 \end_layout
2760 \begin_layout Standard
2761 Read unsigned doubleword (4 elements) from given address.
2762  Slots out of range return false.
2763 \end_layout
2765 \begin_layout Subsubsection
2766 hostmemory.writedword(number address, number value)
2767 \end_layout
2769 \begin_layout Standard
2770 Write unsigned doubleword (4 elements) to given slot.
2771  Slot numbers out of range cause extension.
2772 \end_layout
2774 \begin_layout Subsubsection
2775 hostmemory.readsdword(number address)
2776 \end_layout
2778 \begin_layout Standard
2779 Read signed doubleword (4 elements) from given address.
2780  Slots out of range return false.
2781 \end_layout
2783 \begin_layout Subsubsection
2784 hostmemory.writesdword(number address, number value)
2785 \end_layout
2787 \begin_layout Standard
2788 Write signed doubleword (4 elements) to given slot.
2789  Slot numbers out of range cause extension.
2790 \end_layout
2792 \begin_layout Subsubsection
2793 hostmemory.readqword(number address)
2794 \end_layout
2796 \begin_layout Standard
2797 Read unsigned quadword (8 elements) from given address.
2798  Slots out of range return false.
2799 \end_layout
2801 \begin_layout Subsubsection
2802 hostmemory.writeqword(number address, number value)
2803 \end_layout
2805 \begin_layout Standard
2806 Write unsigned quadword (4 elements) to given slot.
2807  Slot numbers out of range cause extension.
2808 \end_layout
2810 \begin_layout Subsubsection
2811 hostmemory.readsqword(number address)
2812 \end_layout
2814 \begin_layout Standard
2815 Read signed quadword (8 elements) from given address.
2816  Slots out of range return false.
2817 \end_layout
2819 \begin_layout Subsubsection
2820 hostmemory.writesqword(number address, number value)
2821 \end_layout
2823 \begin_layout Standard
2824 Write signed quadword (8 elements) to given slot.
2825  Slot numbers out of range cause extension.
2826 \end_layout
2828 \begin_layout Subsection
2829 Table movie
2830 \end_layout
2832 \begin_layout Standard
2833 Movie handling
2834 \end_layout
2836 \begin_layout Subsubsection
2837 movie.currentframe()
2838 \end_layout
2840 \begin_layout Standard
2841 Return number of current frame.
2842 \end_layout
2844 \begin_layout Subsubsection
2845 movie.framecount()
2846 \end_layout
2848 \begin_layout Standard
2849 Return number of frames in movie.
2850 \end_layout
2852 \begin_layout Subsubsection
2853 movie.readonly()
2854 \end_layout
2856 \begin_layout Standard
2857 Return true if in readonly mode, false if in readwrite.
2858 \end_layout
2860 \begin_layout Subsubsection
2861 movie.set_readwrite()
2862 \end_layout
2864 \begin_layout Standard
2865 Set readwrite mode (does not cause on_readwrite callback).
2866 \end_layout
2868 \begin_layout Subsubsection
2869 movie.frame_subframes(number frame)
2870 \end_layout
2872 \begin_layout Standard
2873 Count number of subframes in specified frame (frame numbers are 1-based)
2874  and return that.
2875 \end_layout
2877 \begin_layout Subsubsection
2878 movie.read_subframe(number frame, number subframe)
2879 \end_layout
2881 \begin_layout Standard
2882 Read specifed subframe in specified frame and return data as array (100
2883  elements, numbered 0-99 currently).
2884 \end_layout
2886 \begin_layout Subsubsection
2887 movie.unsafe_rewind([UNSAFEREWIND state])
2888 \end_layout
2890 \begin_layout Standard
2891 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2892 \end_layout
2894 \begin_layout Itemize
2895 If called without argument, causes emulator to start process of setting
2896  unsafe rewind point.
2897  When this has finished, callback on_set_rewind occurs, passing the rewind
2898  state to lua script.
2899 \end_layout
2901 \begin_layout Itemize
2902 If called with argument, causes emulator rewind to passed rewind point as
2903  soon as possible.
2904  Readwrite mode is implicitly activated.
2905 \end_layout
2907 \begin_layout Standard
2908 The following warnings apply to unsafe rewinding:
2909 \end_layout
2911 \begin_layout Itemize
2912 There are no safety checks against misuse (that's what 
2913 \begin_inset Quotes eld
2914 \end_inset
2916 unsafe
2917 \begin_inset Quotes erd
2918 \end_inset
2920  comes from)!
2921 \end_layout
2923 \begin_layout Itemize
2924 Only call rewind from timeline rewind point was set from.
2925 \end_layout
2927 \begin_layout Itemize
2928 Only call rewind from after the rewind point was set.
2929 \end_layout
2931 \begin_layout Subsection
2932 Table settings
2933 \end_layout
2935 \begin_layout Standard
2936 Routines for settings manipulation
2937 \end_layout
2939 \begin_layout Subsubsection
2940 settings.get(string name)
2941 \end_layout
2943 \begin_layout Standard
2944 Get value of setting.
2945  If setting is blank, returns false.
2946  If setting value can't be obtained, returns (nil, error message).
2947 \end_layout
2949 \begin_layout Subsubsection
2950 settings.set(string name, string value)
2951 \end_layout
2953 \begin_layout Standard
2954 Set value of setting.
2955  If setting can't be set, returns (nil, error message).
2956 \end_layout
2958 \begin_layout Subsubsection
2959 settings.is_set(string name)
2960 \end_layout
2962 \begin_layout Standard
2963 Returns if setting is set.
2964  If setting does not exist, returns (nil, error message).
2965 \end_layout
2967 \begin_layout Subsubsection
2968 settings.blank(string name)
2969 \end_layout
2971 \begin_layout Standard
2972 Blanks a setting and returns true.
2973  If setting can't be blanked, returns (nil, error message).
2974 \end_layout
2976 \begin_layout Subsection
2977 Table memory
2978 \end_layout
2980 \begin_layout Standard
2981 Contains various functions for managing memory
2982 \end_layout
2984 \begin_layout Subsubsection
2985 memory.vma_count()
2986 \end_layout
2988 \begin_layout Standard
2989 Returns the number of VMAs
2990 \end_layout
2992 \begin_layout Subsubsection
2993 memory.read_vma(number index)
2994 \end_layout
2996 \begin_layout Standard
2997 Reads the specified VMA (indices start from zero).
2998  Trying to read invalid VMA gives nil.
2999  The read VMA is table with the following fields:
3000 \end_layout
3002 \begin_layout Itemize
3003 region_name (string): The readable name of the VMA
3004 \end_layout
3006 \begin_layout Itemize
3007 baseaddr (number): Base address of the VMA
3008 \end_layout
3010 \begin_layout Itemize
3011 lastaddr (number): Last address in the VMA.
3012 \end_layout
3014 \begin_layout Itemize
3015 size (number): The size of VMA in bytes.
3016 \end_layout
3018 \begin_layout Itemize
3019 readonly (boolean): True of the VMA corresponds to ROM.
3020 \end_layout
3022 \begin_layout Itemize
3023 iospace (boolean): True if the VMA is I/O space.
3024 \end_layout
3026 \begin_layout Itemize
3027 native_endian (boolean): True if the VMA has native endian as opposed to
3028  little endian.
3029 \end_layout
3031 \begin_layout Subsubsection
3032 memory.find_vma(number address)
3033 \end_layout
3035 \begin_layout Standard
3036 Finds the VMA containing specified address.
3037  Returns table in the same format as read_vma or nil if not found.
3038 \end_layout
3040 \begin_layout Subsubsection
3041 memory.readbyte(number address)
3042 \end_layout
3044 \begin_layout Standard
3045 Reads the specified address as unsigned byte and returns the result.
3046 \end_layout
3048 \begin_layout Subsubsection
3049 memory.readsbyte(number address)
3050 \end_layout
3052 \begin_layout Standard
3053 Reads the specified address as signed byte and returns the result.
3054 \end_layout
3056 \begin_layout Subsubsection
3057 memory.writebyte(number address, number value)
3058 \end_layout
3060 \begin_layout Standard
3061 Writes the specified value (negative values undergo 2's complement) to specified
3062  address (as a byte).
3063 \end_layout
3065 \begin_layout Subsubsection
3066 memory.readword(number address)
3067 \end_layout
3069 \begin_layout Standard
3070 Reads the specified address as unsigned word and returns the result.
3071 \end_layout
3073 \begin_layout Subsubsection
3074 memory.readsword(number address)
3075 \end_layout
3077 \begin_layout Standard
3078 Reads the specified address as signed word and returns the result.
3079 \end_layout
3081 \begin_layout Subsubsection
3082 memory.writeword(number address, number value)
3083 \end_layout
3085 \begin_layout Standard
3086 Writes the specified value (negative values undergo 2's complement) to specified
3087  address (as a word).
3088 \end_layout
3090 \begin_layout Subsubsection
3091 memory.readdword(number address)
3092 \end_layout
3094 \begin_layout Standard
3095 Reads the specified address as unsigned doubleword and returns the result.
3096 \end_layout
3098 \begin_layout Subsubsection
3099 memory.readsdword(number address)
3100 \end_layout
3102 \begin_layout Standard
3103 Reads the specified address as signed doubleword and returns the result.
3104 \end_layout
3106 \begin_layout Subsubsection
3107 memory.writedword(number address, number value)
3108 \end_layout
3110 \begin_layout Standard
3111 Writes the specified value (negative values undergo 2's complement) to specified
3112  address (as a doubleword).
3113 \end_layout
3115 \begin_layout Subsubsection
3116 memory.readqword(number address)
3117 \end_layout
3119 \begin_layout Standard
3120 Reads the specified address as unsigned quadword and returns the result.
3121 \end_layout
3123 \begin_layout Subsubsection
3124 memory.readsqword(number address)
3125 \end_layout
3127 \begin_layout Standard
3128 Reads the specified address as signed quadword and returns the result.
3129 \end_layout
3131 \begin_layout Subsubsection
3132 memory.writeqword(number address, number value)
3133 \end_layout
3135 \begin_layout Standard
3136 Writes the specified value (negative values undergo 2's complement) to specified
3137  address (as a quadword).
3138 \end_layout
3140 \begin_layout Subsubsection
3141 memory.hash_region(number base, number size)
3142 \end_layout
3144 \begin_layout Standard
3145 Hash specified number of bytes starting from specified address and return
3146  the SHA-256.
3147 \end_layout
3149 \begin_layout Subsection
3150 Table _SYSTEM
3151 \end_layout
3153 \begin_layout Standard
3154 Contains copy of global variables from time of Lua initialization.
3155  Non-writeable.
3156 \end_layout
3158 \begin_layout Subsection
3159 Callbacks
3160 \end_layout
3162 \begin_layout Standard
3163 Various callbacks to Lua that can occur.
3164 \end_layout
3166 \begin_layout Subsubsection
3167 Callback: on_paint(bool not_synth)
3168 \end_layout
3170 \begin_layout Standard
3171 Called when screen is being painted.
3172  Any gui.* calls requiring graphic context draw on the screen.
3173 \end_layout
3175 \begin_layout Standard
3176 not_synth is true if this hook is being called in response to received frame,
3177  false otherwise.
3178 \end_layout
3180 \begin_layout Subsubsection
3181 Callback: on_video()
3182 \end_layout
3184 \begin_layout Standard
3185 Called when video dump frame is being painted.
3186  Any gui.* calls requiring graphic context draw on the video.
3187 \end_layout
3189 \begin_layout Subsubsection
3190 Callback: on_frame_emulated()
3191 \end_layout
3193 \begin_layout Standard
3194 Called when emulating frame has completed and on_paint()/on_video() calls
3195  are about to be issued.
3196 \end_layout
3198 \begin_layout Subsubsection
3199 Callback: on_frame()
3200 \end_layout
3202 \begin_layout Standard
3203 Called on each starting whole frame.
3204 \end_layout
3206 \begin_layout Subsubsection
3207 Callback: on_startup()
3208 \end_layout
3210 \begin_layout Standard
3211 Called when the emulator is starting (lsnes.rc and --run files has been run).
3212 \end_layout
3214 \begin_layout Subsubsection
3215 Callback: on_rewind()
3216 \end_layout
3218 \begin_layout Standard
3219 Called when rewind movie to beginning has completed.
3220 \end_layout
3222 \begin_layout Subsubsection
3223 Callback: on_pre_load(string name)
3224 \end_layout
3226 \begin_layout Standard
3227 Called just before savestate/movie load occurs (note: loads are always delayed,
3228  so this occurs even when load was initiated by lua).
3229 \end_layout
3231 \begin_layout Subsubsection
3232 Callback: on_err_load(string name)
3233 \end_layout
3235 \begin_layout Standard
3236 Called if loadstate goes wrong.
3237 \end_layout
3239 \begin_layout Subsubsection
3240 Callback: on_post_load(string name, boolean was_savestate)
3241 \end_layout
3243 \begin_layout Standard
3244 Called on successful loadstate.
3245  was_savestate gives if this was a savestate or a movie.
3246 \end_layout
3248 \begin_layout Subsubsection
3249 Callback: on_pre_save(string name, boolean is_savestate)
3250 \end_layout
3252 \begin_layout Standard
3253 Called just before savestate save occurs (note: movie saves are synchronous
3254  and won't trigger these callbacks if called from Lua).
3255 \end_layout
3257 \begin_layout Subsubsection
3258 Callback: on_err_save(string name)
3259 \end_layout
3261 \begin_layout Standard
3262 Called if savestate goes wrong.
3263 \end_layout
3265 \begin_layout Subsubsection
3266 Callback: on_post_save(string name, boolean is_savestate)
3267 \end_layout
3269 \begin_layout Standard
3270 Called on successful savaestate.
3271  is_savestate gives if this was a savestate or a movie.
3272 \end_layout
3274 \begin_layout Subsubsection
3275 Callback: on_quit()
3276 \end_layout
3278 \begin_layout Standard
3279 Called when emulator is shutting down.
3280 \end_layout
3282 \begin_layout Subsubsection
3283 Callback: on_input(boolean subframe)
3284 \end_layout
3286 \begin_layout Standard
3287 Called when emulator is just sending input to bsnes core.
3288  Warning: This is called even in readonly mode, but the results are ignored.
3289 \end_layout
3291 \begin_layout Subsubsection
3292 Callback: on_reset()
3293 \end_layout
3295 \begin_layout Standard
3296 Called when SNES is reset.
3297 \end_layout
3299 \begin_layout Subsubsection
3300 Callback: on_readwrite()
3301 \end_layout
3303 \begin_layout Standard
3304 Called when moving into readwrite mode as result of 
3305 \begin_inset Quotes eld
3306 \end_inset
3308 set-rwmode
3309 \begin_inset Quotes erd
3310 \end_inset
3312  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3313  entry protection).
3314 \end_layout
3316 \begin_layout Subsubsection
3317 Callback: on_snoop(number port, number controller, number index, number
3318  value)
3319 \end_layout
3321 \begin_layout Standard
3322 Called each time bsnes asks for input.
3323  The value is the final value to be sent to bsnes core (readonly mode, autohold
3324  and autofire have been taken into account).
3325  Might be useful when translating movies to format suitable for console
3326  verification.
3327  Note: There is no way to modify the value to be sent.
3328 \end_layout
3330 \begin_layout Subsubsection
3331 Callback: on_keyhook(string keyname, table state)
3332 \end_layout
3334 \begin_layout Standard
3335 Sent when key that has keyhook events requested changes state.
3336  Keyname is name of the key (group) and state is the state (same kind as
3337  table values in input.raw).
3338 \end_layout
3340 \begin_layout Subsubsection
3341 Callback: on_idle()
3342 \end_layout
3344 \begin_layout Standard
3345 Called when requested by set_idle_timeout(), the timeout has expired and
3346  emulator is waiting.
3347 \end_layout
3349 \begin_layout Subsubsection
3350 Callback: on_timer()
3351 \end_layout
3353 \begin_layout Standard
3354 Called when requested by set_idle_timeout() and the timeout has expired
3355  (regardless if emulator is waiting).
3356 \end_layout
3358 \begin_layout Subsubsection
3359 Callback: on_set_rewind(UNSAFEREWIND r)
3360 \end_layout
3362 \begin_layout Standard
3363 Called when unsafe rewind object has been constructed.
3364 \end_layout
3366 \begin_layout Subsubsection
3367 Callback: on_pre_rewind() 
3368 \end_layout
3370 \begin_layout Standard
3371 Called just before unsafe rewind is about to occur.
3372 \end_layout
3374 \begin_layout Subsubsection
3375 Callback: on_post_rewind() 
3376 \end_layout
3378 \begin_layout Standard
3379 Called just after unsafe rewind has occured.
3380 \end_layout
3382 \begin_layout Section
3383 Memory watch expression syntax
3384 \end_layout
3386 \begin_layout Standard
3387 Memory watch expressions are in RPN (Reverse Polish Notation).
3388  At the end of expression, the top entry on stack is taken as the final
3389  result.
3390 \end_layout
3392 \begin_layout Standard
3393 Notations:
3394 \end_layout
3396 \begin_layout Itemize
3397 Evaluation order is strictly left to right.
3398 \end_layout
3400 \begin_layout Itemize
3401 a is the entry on top of stack
3402 \end_layout
3404 \begin_layout Itemize
3405 b is the entry immediately below top of stack
3406 \end_layout
3408 \begin_layout Itemize
3409 ; separates values to be pushed (no intermediate pop).
3410 \end_layout
3412 \begin_layout Itemize
3413 After end of element, all used stack slots are popped and all results are
3414  pushed.
3415 \end_layout
3417 \begin_layout Itemize
3418 When pushing multiple values, the pushes occur in order shown.
3419 \end_layout
3421 \begin_layout Standard
3422 The following operators are available:
3423 \end_layout
3425 \begin_layout Itemize
3426 + : a + b
3427 \end_layout
3429 \begin_layout Itemize
3430 - : a - b
3431 \end_layout
3433 \begin_layout Itemize
3434 * : a * b
3435 \end_layout
3437 \begin_layout Itemize
3438 / : a / b
3439 \end_layout
3441 \begin_layout Itemize
3442 % : a % b
3443 \end_layout
3445 \begin_layout Itemize
3446 a : atan(a)
3447 \end_layout
3449 \begin_layout Itemize
3450 b : read_signed_byte(a)
3451 \end_layout
3453 \begin_layout Itemize
3454 c : cos(a)
3455 \end_layout
3457 \begin_layout Itemize
3458 d : read_signed_dword(a)
3459 \end_layout
3461 \begin_layout Itemize
3462 i : quotent(a / b)
3463 \end_layout
3465 \begin_layout Itemize
3466 p :
3467 \begin_inset Formula $\pi$
3468 \end_inset
3471 \end_layout
3473 \begin_layout Itemize
3474 q : read_signed_qword(a)
3475 \end_layout
3477 \begin_layout Itemize
3478 r : sqrt(a)
3479 \end_layout
3481 \begin_layout Itemize
3482 s : sin(a)
3483 \end_layout
3485 \begin_layout Itemize
3486 t : tan(a)
3487 \end_layout
3489 \begin_layout Itemize
3490 u : a; a
3491 \end_layout
3493 \begin_layout Itemize
3494 w : read_signed_word(a)
3495 \end_layout
3497 \begin_layout Itemize
3498 A : atan2(a, b)
3499 \end_layout
3501 \begin_layout Itemize
3502 B : read_unsigned_byte(a)
3503 \end_layout
3505 \begin_layout Itemize
3506 C<number>z : Push number <number> to stack.
3507 \end_layout
3509 \begin_layout Itemize
3510 D : read_unsigned_dword(a)
3511 \end_layout
3513 \begin_layout Itemize
3514 C0x<number>z : Push number <number> (hexadecimal) to stack.
3515 \end_layout
3517 \begin_layout Itemize
3518 Q : read_unsigned_qword(a)
3519 \end_layout
3521 \begin_layout Itemize
3522 R<digit> : round a to <digit> digits.
3523 \end_layout
3525 \begin_layout Itemize
3526 W : read_unsigned_word(a)
3527 \end_layout
3529 \begin_layout Subsection
3530 Example:
3531 \end_layout
3533 \begin_layout Standard
3534 C0x007e0878zWC0x007e002czW-
3535 \end_layout
3537 \begin_layout Enumerate
3538 Push value 0x7e0878 on top of stack (C0x007e0878z).
3539 \end_layout
3541 \begin_layout Enumerate
3542 Pop the value on top of stack (0x7e0878), read word value at that address
3543  and push the result,call it x1 (W).
3544 \end_layout
3546 \begin_layout Enumerate
3547 Push value 0x7e002c on top of stack (C0x007e002cz).
3548 \end_layout
3550 \begin_layout Enumerate
3551 Pop the value on top of stack (0x7e002c), read word value at that address
3552  and push the result,call it x2 (W).
3553 \end_layout
3555 \begin_layout Enumerate
3556 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3557  x2 - x1 (-).
3558 \end_layout
3560 \begin_layout Enumerate
3561 Since the expression ends, the final memory watch result is the top one
3562  on stack, which is x2 - x1.
3563 \end_layout
3565 \begin_layout Section
3566 Modifier and key names:
3567 \end_layout
3569 \begin_layout Subsection
3570 SDL Platform
3571 \end_layout
3573 \begin_layout Subsubsection
3574 Modifier names
3575 \end_layout
3577 \begin_layout Standard
3578 Following modifier names are known:
3579 \end_layout
3581 \begin_layout Itemize
3582 ctrl, lctrl, rctrl: Control keys
3583 \end_layout
3585 \begin_layout Itemize
3586 alt, lalt, ralt: ALT keys.
3587 \end_layout
3589 \begin_layout Itemize
3590 shift, lshift, rshift: Shift keys.
3591 \end_layout
3593 \begin_layout Itemize
3594 meta, lmeta, rmeta: Meta keys.
3595 \end_layout
3597 \begin_layout Itemize
3598 num, caps: Numlock/Capslock (these are sticky!)
3599 \end_layout
3601 \begin_layout Itemize
3602 mode: Mode select.
3603 \end_layout
3605 \begin_layout Subsubsection
3606 Key names
3607 \end_layout
3609 \begin_layout Standard
3610 Following key names are known:
3611 \end_layout
3613 \begin_layout Itemize
3614 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3615  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3616  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3617  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3618  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3619  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3620  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3621  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3622  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3623  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3624  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3625  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3626  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3627  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3628  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3629  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3630  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3631  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3632  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3633  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3634  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3635  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3636  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3637  break, menu, power, euro, undo
3638 \end_layout
3640 \begin_layout Itemize
3641 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3642  hardware-dependent scan code of <n> (useful to bind those keys that don't
3643  have symbolic names).
3644 \end_layout
3646 \begin_layout Subsubsection
3647 Joystick pseudo-keys:
3648 \end_layout
3650 \begin_layout Itemize
3651 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3652 \end_layout
3654 \begin_layout Itemize
3655 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3656 \end_layout
3658 \begin_layout Itemize
3659 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3660 \end_layout
3662 \begin_layout Itemize
3663 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3664 \end_layout
3666 \begin_layout Itemize
3667 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3668 \end_layout
3670 \begin_layout Itemize
3671 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3672  position (axis modes axis and axis_inverse).
3673 \end_layout
3675 \begin_layout Itemize
3676 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3677  position (axis modes axis and axis_inverse).
3678 \end_layout
3680 \begin_layout Itemize
3681 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3682  modes pressure_*).
3683 \end_layout
3685 \begin_layout Subsubsection
3686 Special buttons:
3687 \end_layout
3689 \begin_layout Itemize
3690 Escape: Enter/Exit Command mode, cancel modal dialogs.
3691 \end_layout
3693 \begin_layout Itemize
3694 Return (also KPEnter): Execute command, ok modal dialog.
3695 \end_layout
3697 \begin_layout Itemize
3698 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3699  in command history
3700 \end_layout
3702 \begin_layout Itemize
3703 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3704  in command history
3705 \end_layout
3707 \begin_layout Itemize
3708 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3709 \end_layout
3711 \begin_layout Itemize
3712 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3713 \end_layout
3715 \begin_layout Itemize
3716 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3717 \end_layout
3719 \begin_layout Itemize
3720 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3721 \end_layout
3723 \begin_layout Itemize
3724 Delete (also KP.
3725  if no num lock; command mode): Delete character to right of cursor.
3726 \end_layout
3728 \begin_layout Itemize
3729 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3730  overwrite modes.
3731 \end_layout
3733 \begin_layout Itemize
3734 Backspace (command mode): Delete character to left of cursor.
3735 \end_layout
3737 \begin_layout Itemize
3738 CTRL+LEFT (also ALT+B; command mode): Previous word.
3739 \end_layout
3741 \begin_layout Itemize
3742 CTRL+RIGHT (also ALT+F; command mode): Next word.
3743 \end_layout
3745 \begin_layout Itemize
3746 ALT+D (also CTRL+W; command mode): Delete word.
3747 \end_layout
3749 \begin_layout Itemize
3750 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3751 \end_layout
3753 \begin_layout Subsection
3754 wxWidgets platform
3755 \end_layout
3757 \begin_layout Subsubsection
3758 Modifier names:
3759 \end_layout
3761 \begin_layout Standard
3762 Following modifier names are known:
3763 \end_layout
3765 \begin_layout Itemize
3767 \end_layout
3769 \begin_layout Itemize
3770 ctrl
3771 \end_layout
3773 \begin_layout Itemize
3774 shift 
3775 \end_layout
3777 \begin_layout Itemize
3778 meta
3779 \end_layout
3781 \begin_layout Itemize
3782 cmd (Mac OS X only)
3783 \end_layout
3785 \begin_layout Subsubsection
3786 Key names:
3787 \end_layout
3789 \begin_layout Standard
3790 Following key names are known:
3791 \end_layout
3793 \begin_layout Itemize
3794 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3795  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3796  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3797  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3798  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3799  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3800  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3801  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3802  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3803  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3804  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3805  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3806  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3807  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3808  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3809  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3810  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3811  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3812  windows_right, windows_menu, command, special1, special2, special3, special4,
3813  special5, special6, special7, special8, special9, special10, special11,
3814  special12, special13, special14, special15, special16, special17, special18,
3815  special19, special20
3816 \end_layout
3818 \begin_layout Section
3819 Movie file format
3820 \end_layout
3822 \begin_layout Standard
3823 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3824  (note: If you recompress it, do not use compression methods other than
3825  store and deflate and especially do not use encryption of any kind).
3826 \end_layout
3828 \begin_layout Subsection
3829 Detecting clean start/SRAM/Savestate
3830 \end_layout
3832 \begin_layout Itemize
3833 If file has member 
3834 \begin_inset Quotes eld
3835 \end_inset
3837 savestate
3838 \begin_inset Quotes erd
3839 \end_inset
3841  it is savestate, otherwise:
3842 \end_layout
3844 \begin_layout Itemize
3845 If file has members with names starting 
3846 \begin_inset Quotes eld
3847 \end_inset
3849 moviesram.
3850 \begin_inset Quotes erd
3851 \end_inset
3853  it is movie starting from SRAM, otherwise:
3854 \end_layout
3856 \begin_layout Itemize
3857 It is movie starting from clear state.
3858 \end_layout
3860 \begin_layout Subsection
3861 Member: gametype
3862 \end_layout
3864 \begin_layout Standard
3865 Type of game ROM and region (as one line).
3866  Valid values are:
3867 \end_layout
3869 \begin_layout Standard
3870 \begin_inset Tabular
3871 <lyxtabular version="3" rows="8" columns="3">
3872 <features tabularvalignment="middle">
3873 <column alignment="center" valignment="top" width="0">
3874 <column alignment="center" valignment="top" width="0">
3875 <column alignment="center" valignment="top" width="0">
3876 <row>
3877 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3878 \begin_inset Text
3880 \begin_layout Plain Layout
3881 Value
3882 \end_layout
3884 \end_inset
3885 </cell>
3886 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3887 \begin_inset Text
3889 \begin_layout Plain Layout
3890 System
3891 \end_layout
3893 \end_inset
3894 </cell>
3895 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3896 \begin_inset Text
3898 \begin_layout Plain Layout
3899 Region
3900 \end_layout
3902 \end_inset
3903 </cell>
3904 </row>
3905 <row>
3906 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3907 \begin_inset Text
3909 \begin_layout Plain Layout
3910 snes_pal
3911 \end_layout
3913 \end_inset
3914 </cell>
3915 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3916 \begin_inset Text
3918 \begin_layout Plain Layout
3919 Super NES
3920 \end_layout
3922 \end_inset
3923 </cell>
3924 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3925 \begin_inset Text
3927 \begin_layout Plain Layout
3929 \end_layout
3931 \end_inset
3932 </cell>
3933 </row>
3934 <row>
3935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3936 \begin_inset Text
3938 \begin_layout Plain Layout
3939 sgb_pal
3940 \end_layout
3942 \end_inset
3943 </cell>
3944 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3945 \begin_inset Text
3947 \begin_layout Plain Layout
3948 Super Game Boy
3949 \end_layout
3951 \end_inset
3952 </cell>
3953 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3954 \begin_inset Text
3956 \begin_layout Plain Layout
3958 \end_layout
3960 \end_inset
3961 </cell>
3962 </row>
3963 <row>
3964 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3965 \begin_inset Text
3967 \begin_layout Plain Layout
3968 snes_ntsc
3969 \end_layout
3971 \end_inset
3972 </cell>
3973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3974 \begin_inset Text
3976 \begin_layout Plain Layout
3977 Super NES
3978 \end_layout
3980 \end_inset
3981 </cell>
3982 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3983 \begin_inset Text
3985 \begin_layout Plain Layout
3986 NTSC
3987 \end_layout
3989 \end_inset
3990 </cell>
3991 </row>
3992 <row>
3993 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3994 \begin_inset Text
3996 \begin_layout Plain Layout
3997 sgb_ntsc
3998 \end_layout
4000 \end_inset
4001 </cell>
4002 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4003 \begin_inset Text
4005 \begin_layout Plain Layout
4006 Super Game Boy
4007 \end_layout
4009 \end_inset
4010 </cell>
4011 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4012 \begin_inset Text
4014 \begin_layout Plain Layout
4015 NTSC
4016 \end_layout
4018 \end_inset
4019 </cell>
4020 </row>
4021 <row>
4022 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4023 \begin_inset Text
4025 \begin_layout Plain Layout
4027 \end_layout
4029 \end_inset
4030 </cell>
4031 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4032 \begin_inset Text
4034 \begin_layout Plain Layout
4035 BS-X (non-slotted)
4036 \end_layout
4038 \end_inset
4039 </cell>
4040 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4041 \begin_inset Text
4043 \begin_layout Plain Layout
4044 NTSC
4045 \end_layout
4047 \end_inset
4048 </cell>
4049 </row>
4050 <row>
4051 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4052 \begin_inset Text
4054 \begin_layout Plain Layout
4055 bsxslotted
4056 \end_layout
4058 \end_inset
4059 </cell>
4060 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4061 \begin_inset Text
4063 \begin_layout Plain Layout
4064 BS-X (slotted)
4065 \end_layout
4067 \end_inset
4068 </cell>
4069 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4070 \begin_inset Text
4072 \begin_layout Plain Layout
4073 NTSC
4074 \end_layout
4076 \end_inset
4077 </cell>
4078 </row>
4079 <row>
4080 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4081 \begin_inset Text
4083 \begin_layout Plain Layout
4084 sufamiturbo
4085 \end_layout
4087 \end_inset
4088 </cell>
4089 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4090 \begin_inset Text
4092 \begin_layout Plain Layout
4093 Sufami Turbo
4094 \end_layout
4096 \end_inset
4097 </cell>
4098 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4099 \begin_inset Text
4101 \begin_layout Plain Layout
4102 NTSC
4103 \end_layout
4105 \end_inset
4106 </cell>
4107 </row>
4108 </lyxtabular>
4110 \end_inset
4113 \end_layout
4115 \begin_layout Standard
4116 Frame rates are:
4117 \end_layout
4119 \begin_layout Standard
4120 \begin_inset Tabular
4121 <lyxtabular version="3" rows="3" columns="2">
4122 <features tabularvalignment="middle">
4123 <column alignment="center" valignment="top" width="0">
4124 <column alignment="center" valignment="top" width="0">
4125 <row>
4126 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4127 \begin_inset Text
4129 \begin_layout Plain Layout
4130 Region
4131 \end_layout
4133 \end_inset
4134 </cell>
4135 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4136 \begin_inset Text
4138 \begin_layout Plain Layout
4139 Framerate (fps)
4140 \end_layout
4142 \end_inset
4143 </cell>
4144 </row>
4145 <row>
4146 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4147 \begin_inset Text
4149 \begin_layout Plain Layout
4151 \end_layout
4153 \end_inset
4154 </cell>
4155 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4156 \begin_inset Text
4158 \begin_layout Plain Layout
4159 322445/6448
4160 \end_layout
4162 \end_inset
4163 </cell>
4164 </row>
4165 <row>
4166 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4167 \begin_inset Text
4169 \begin_layout Plain Layout
4170 NTSC
4171 \end_layout
4173 \end_inset
4174 </cell>
4175 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4176 \begin_inset Text
4178 \begin_layout Plain Layout
4179 10738636/178683
4180 \end_layout
4182 \end_inset
4183 </cell>
4184 </row>
4185 </lyxtabular>
4187 \end_inset
4190 \end_layout
4192 \begin_layout Subsection
4193 Member: port1
4194 \end_layout
4196 \begin_layout Standard
4197 Contains type of port #1 (as one line).
4198  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4199  If not present, defaults to 'gamepad'.
4200 \end_layout
4202 \begin_layout Subsection
4203 Member: port2
4204 \end_layout
4206 \begin_layout Standard
4207 Contains type of port #2 (as one line).
4208  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4209  'justifier' and 'justifiers'.
4210  If not present, defaults to 'none'.
4211 \end_layout
4213 \begin_layout Subsection
4214 Member: gamename
4215 \end_layout
4217 \begin_layout Standard
4218 Contains name of the game (as one line).
4219 \end_layout
4221 \begin_layout Subsection
4222 Member: authors
4223 \end_layout
4225 \begin_layout Standard
4226 Contains authors, one per line.
4227  Part before '|' is the full name, part after is the nickname.
4228 \end_layout
4230 \begin_layout Subsection
4231 Member: systemid
4232 \end_layout
4234 \begin_layout Standard
4235 Always 
4236 \begin_inset Quotes eld
4237 \end_inset
4239 lsnes-rr1
4240 \begin_inset Quotes erd
4241 \end_inset
4243  (one line).
4244  Used to reject other saves.
4245 \end_layout
4247 \begin_layout Subsection
4248 Member: controlsversion
4249 \end_layout
4251 \begin_layout Standard
4252 Always 
4253 \begin_inset Quotes eld
4254 \end_inset
4257 \begin_inset Quotes erd
4258 \end_inset
4260  (one line).
4261  Used to identify what controls are there.
4262 \end_layout
4264 \begin_layout Subsection
4265 Member: 
4266 \begin_inset Quotes eld
4267 \end_inset
4269 coreversion
4270 \begin_inset Quotes erd
4271 \end_inset
4274 \end_layout
4276 \begin_layout Standard
4277 Contains bsnes core version number (as one line).
4278 \end_layout
4280 \begin_layout Subsection
4281 Member: projectid
4282 \end_layout
4284 \begin_layout Standard
4285 Contains project ID (as one line).
4286  Used to identify if two movies are part of the same project.
4287 \end_layout
4289 \begin_layout Subsection
4290 Member: {rom,slota,slotb}{,xml}.sha256
4291 \end_layout
4293 \begin_layout Standard
4294 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4295  Absent if corresponding file is absent.
4296 \end_layout
4298 \begin_layout Subsection
4299 Member: moviesram.<name>
4300 \end_layout
4302 \begin_layout Standard
4303 Raw binary startup SRAM of kind <name>.
4304  Only present in savestates and movies starting from SRAM.
4305 \end_layout
4307 \begin_layout Subsection
4308 Member: saveframe
4309 \end_layout
4311 \begin_layout Standard
4312 Contains frame number (as one line) of frame movie was saved on.
4313  Only present in savestates.
4314 \end_layout
4316 \begin_layout Subsection
4317 Member: lagcounter
4318 \end_layout
4320 \begin_layout Standard
4321 Current value of lag counter (as one line).
4322  Only present in savestates.
4323 \end_layout
4325 \begin_layout Subsection
4326 Member: pollcounters
4327 \end_layout
4329 \begin_layout Standard
4330 Contains poll counters (currently 100 of them), one per line.
4331  Each line is raw poll count if DRDY is set for it.
4332  Otherwise it is negative poll count minus one.
4333  Only present in savestates.
4334 \end_layout
4336 \begin_layout Subsection
4337 Member: hostmemory
4338 \end_layout
4340 \begin_layout Standard
4341 Raw binary dump of host memory.
4342  Only present in savestates.
4343 \end_layout
4345 \begin_layout Subsection
4346 Member: savestate
4347 \end_layout
4349 \begin_layout Standard
4350 The raw binary savestate itself.
4351  Savestate detection uses this file, only present in savestates.
4352 \end_layout
4354 \begin_layout Subsection
4355 Member: screenshot
4356 \end_layout
4358 \begin_layout Standard
4359 Screenshot of current frame.
4360  Only present in savestates.
4361  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4362  data.
4363  Height of image is inferred from the width and size of data.
4364 \end_layout
4366 \begin_layout Subsection
4367 Member: sram.<name>
4368 \end_layout
4370 \begin_layout Standard
4371 Raw binary SRAM of kind <name> at time of savestate.
4372  Only present in savestates.
4373 \end_layout
4375 \begin_layout Subsection
4376 Member: input
4377 \end_layout
4379 \begin_layout Standard
4380 The actual input track, one line per subframe (blank lines are skipped).
4381 \end_layout
4383 \begin_layout Itemize
4384 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4385  part of same frame as previous, otherwise it starts a new frame.
4386 \end_layout
4388 \begin_layout Itemize
4389 First subframe must start a new frame.
4390 \end_layout
4392 \begin_layout Standard
4393 Length of movie in frames is number of lines in input file that start a
4394  new frame.
4395 \end_layout
4397 \begin_layout Subsection
4398 Member: rerecords
4399 \end_layout
4401 \begin_layout Standard
4402 Contains textual base-10 rerecord count (as one line; emulator just writes
4403  this, it doesn't read it) + 1.
4404 \end_layout
4406 \begin_layout Subsection
4407 Member: rrdata
4408 \end_layout
4410 \begin_layout Standard
4411 This member stores set of load IDs.
4412  There is one load ID per rerecord (plus one corresponding to start of project).
4413 \end_layout
4415 \begin_layout Itemize
4416 This member constists of concatenation of records
4417 \end_layout
4419 \begin_layout Itemize
4420 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4421  IDs.
4422 \end_layout
4424 \begin_layout Itemize
4425 IDs are interpretted as 256-bit big-endian integers with warparound.
4426 \end_layout
4428 \begin_layout Itemize
4429 Initial predicted ID is all zeroes.
4430 \end_layout
4432 \begin_layout Standard
4433 Format of each record is:
4434 \end_layout
4436 \begin_layout Itemize
4437 1 byte: Opcode byte.
4438  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4439  Bit 7 is unused.
4440 \end_layout
4442 \begin_layout Itemize
4443 32-prefixlen bytes of ID.
4444 \end_layout
4446 \begin_layout Itemize
4447 countlen bytes of big-endian count (count).
4448 \end_layout
4450 \begin_layout Standard
4451 Records are processed as follows:
4452 \end_layout
4454 \begin_layout Itemize
4455 To form the first ID encoded by record, take the first prefixlen bytes predicted
4456  ID and append the read ID value to it.
4457  The result is the first ID encoded.
4458 \end_layout
4460 \begin_layout Itemize
4461 If countlen is 0, record encodes 1 ID.
4462 \end_layout
4464 \begin_layout Itemize
4465 If countlen is 1, record encodes 2+count IDs.
4466 \end_layout
4468 \begin_layout Itemize
4469 If countlen is 2, record encodes 258+count IDs.
4470 \end_layout
4472 \begin_layout Itemize
4473 If countlen is 3, record encodes 65794+count IDs.
4474 \end_layout
4476 \begin_layout Itemize
4477 The new predicted ID is the next ID after last one encoded by the record.
4478 \end_layout
4480 \begin_layout Standard
4481 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4482  by all records.
4483 \end_layout
4485 \begin_layout Subsection
4486 Member: starttime.second
4487 \end_layout
4489 \begin_layout Standard
4490 Movie starting time, second part.
4491  Epoch is Unix epoch.
4492  Default is 1,000,000,000.
4493 \end_layout
4495 \begin_layout Subsection
4496 Member: starttime.subsecond
4497 \end_layout
4499 \begin_layout Standard
4500 Movie starting time, subsecond part.
4501  Unit is CPU clocks.
4502  Default is 0.
4503 \end_layout
4505 \begin_layout Subsection
4506 Member: savetime.second
4507 \end_layout
4509 \begin_layout Standard
4510 Movie saving time, second part.
4511  Default is starttime.second.
4512  Only present in savestates.
4513 \end_layout
4515 \begin_layout Subsection
4516 Member: savetime.subsecond
4517 \end_layout
4519 \begin_layout Standard
4520 Movie saving time, subsecond part.
4521  Default is starttime.subsecond.
4522  Only present in savestates.
4523 \end_layout
4525 \begin_layout Section
4526 Known ROM extensions
4527 \end_layout
4529 \begin_layout Itemize
4530 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4531 \end_layout
4533 \begin_layout Itemize
4534 DMG cartridge ROMs: dmg, gb.
4535 \end_layout
4537 \begin_layout Itemize
4538 GBC cartridge ROMs: cgb, gbc.
4539 \end_layout
4541 \begin_layout Section
4542 Gamepack files
4543 \end_layout
4545 \begin_layout Itemize
4546 The first line must be: 
4547 \begin_inset Quotes eld
4548 \end_inset
4550 [GAMEPACK FILE]
4551 \begin_inset Quotes erd
4552 \end_inset
4555 \end_layout
4557 \begin_layout Itemize
4558 There is one needed line: 
4559 \begin_inset Quotes eld
4560 \end_inset
4562 type <systype>
4563 \begin_inset Quotes erd
4564 \end_inset
4567  This sets system type to <systype>.
4568  The following system types are valid:
4569 \end_layout
4571 \begin_deeper
4572 \begin_layout Itemize
4573 snes (SNES)
4574 \end_layout
4576 \begin_layout Itemize
4577 bsx (BS-X non-slotted)
4578 \end_layout
4580 \begin_layout Itemize
4581 bsxslotted (BS-X slotted)
4582 \end_layout
4584 \begin_layout Itemize
4585 sufamiturbo (Sufami Turbo)
4586 \end_layout
4588 \begin_layout Itemize
4589 sgb (Super Game Boy)
4590 \end_layout
4592 \begin_layout Itemize
4593 dmg (Game Boy)
4594 \end_layout
4596 \begin_layout Itemize
4597 gbc (Game Boy Color)
4598 \end_layout
4600 \begin_layout Itemize
4601 gbc_gba (Game Boy Color with GBA initial register values)
4602 \end_layout
4604 \end_deeper
4605 \begin_layout Itemize
4606 Optionally a region can be specified: 
4607 \begin_inset Quotes eld
4608 \end_inset
4610 region <region>
4611 \begin_inset Quotes erd
4612 \end_inset
4615  The following values are valid:
4616 \end_layout
4618 \begin_deeper
4619 \begin_layout Itemize
4620 autodetect (Autodetect region: snes and sgb only)
4621 \end_layout
4623 \begin_layout Itemize
4624 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4625 \end_layout
4627 \begin_layout Itemize
4628 pal (PAL: snes, sgb)
4629 \end_layout
4631 \begin_layout Itemize
4632 world (World: dmg, gbc, gbc_gba)
4633 \end_layout
4635 \end_deeper
4636 \begin_layout Itemize
4637 ROM images are loaded as: 
4638 \begin_inset Quotes eld
4639 \end_inset
4641 rom <type> <file>
4642 \begin_inset Quotes erd
4643 \end_inset
4646  The following types are valid:
4647 \end_layout
4649 \begin_deeper
4650 \begin_layout Itemize
4651 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4652  BIOS in bsx, bsxslotted, sufamiturbo)
4653 \end_layout
4655 \begin_layout Itemize
4656 bsx (Cartridge ROM in bsx, bsxslotted)
4657 \end_layout
4659 \begin_layout Itemize
4660 slot-a (Cartridge ROM in sufamiturbo)
4661 \end_layout
4663 \begin_layout Itemize
4664 slot-b (Cartridge ROM in sufamiturbo)
4665 \end_layout
4667 \end_deeper
4668 \begin_layout Itemize
4669 ROM markup can be loaded as: 
4670 \begin_inset Quotes eld
4671 \end_inset
4673 xml <type> <file>
4674 \begin_inset Quotes erd
4675 \end_inset
4678  The types valid are the same as for ROMs.
4679 \end_layout
4681 \begin_layout Itemize
4682 Patches can be loaded as 
4683 \begin_inset Quotes eld
4684 \end_inset
4686 patch[<offset>] <type> <file>
4687 \begin_inset Quotes erd
4688 \end_inset
4691  The types are the same as for ROMs.
4692 \end_layout
4694 \begin_deeper
4695 \begin_layout Itemize
4696 Offset is given in form [+-]<number>.
4697  Usually offset is either +0 or -512.
4698 \end_layout
4700 \begin_layout Itemize
4701 Default offset is +0.
4702 \end_layout
4704 \end_deeper
4705 \begin_layout Subsection
4706 Example:
4707 \end_layout
4709 \begin_layout LyX-Code
4710 [GAMEPACK FILE]
4711 \end_layout
4713 \begin_layout LyX-Code
4714 type snes
4715 \end_layout
4717 \begin_layout LyX-Code
4718 rom rom speedygonzales.sfc
4719 \end_layout
4721 \begin_layout LyX-Code
4722 patch-512 rom sonicthehedgehog.ips
4723 \end_layout
4725 \begin_layout Subsection
4726 Example 2:
4727 \end_layout
4729 \begin_layout LyX-Code
4730 [GAMEPACK FILE]
4731 \end_layout
4733 \begin_layout LyX-Code
4734 type sgb
4735 \end_layout
4737 \begin_layout LyX-Code
4738 rom rom supergameboy.sfc
4739 \end_layout
4741 \begin_layout LyX-Code
4742 rom dmg megamanV.dmg
4743 \end_layout
4745 \begin_layout Section
4746 Quick'n'dirty encode guide
4747 \end_layout
4749 \begin_layout Enumerate
4750 Start the emulator and load the ROM and movie file.
4751 \end_layout
4753 \begin_layout Enumerate
4754 Set large AVI option 'set-setting avi-large on'
4755 \end_layout
4757 \begin_layout Enumerate
4758 Enable dumping 'dump-avi tmpdump' 
4759 \end_layout
4761 \begin_layout Enumerate
4762 Unpause and let it run until you want to end dumping.
4763 \end_layout
4765 \begin_layout Enumerate
4766 Close the emulator (closing the window is the easiest way).
4767  Or use 'end-avi'.
4768 \end_layout
4770 \begin_layout Enumerate
4771 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4772  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4773 \end_layout
4775 \begin_layout Enumerate
4776 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4777 \end_layout
4779 \begin_layout Enumerate
4780 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4781  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4782 \end_layout
4784 \begin_layout Enumerate
4785 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4786  Now final.mkv contains quick'n'dirty encode.
4787 \end_layout
4789 \begin_layout Section
4790 Axis configurations for some gamepad types:
4791 \end_layout
4793 \begin_layout Subsection
4794 XBox360 controller:
4795 \end_layout
4797 \begin_layout Standard
4798 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4799 \end_layout
4801 \begin_layout LyX-Code
4802 set-axis joystick0axis2 pressure-+
4803 \end_layout
4805 \begin_layout LyX-Code
4806 set-axis joystick0axis5 pressure-+
4807 \end_layout
4809 \begin_layout Itemize
4810 This is needed for SDL only.
4811  EVDEV sets those types correctly.
4812 \end_layout
4814 \begin_layout Subsection
4815 PS3 
4816 \begin_inset Quotes eld
4817 \end_inset
4819 sixaxis
4820 \begin_inset Quotes erd
4821 \end_inset
4823  controller:
4824 \end_layout
4826 \begin_layout Standard
4827 Axes 8-19 should be disabled.
4828 \end_layout
4830 \begin_layout LyX-Code
4831 set-axis joystick0axis8 disabled
4832 \end_layout
4834 \begin_layout LyX-Code
4835 set-axis joystick0axis9 disabled
4836 \end_layout
4838 \begin_layout LyX-Code
4839 set-axis joystick0axis10 disabled
4840 \end_layout
4842 \begin_layout LyX-Code
4843 set-axis joystick0axis11 disabled
4844 \end_layout
4846 \begin_layout LyX-Code
4847 set-axis joystick0axis12 disabled
4848 \end_layout
4850 \begin_layout LyX-Code
4851 set-axis joystick0axis13 disabled
4852 \end_layout
4854 \begin_layout LyX-Code
4855 set-axis joystick0axis14 disabled
4856 \end_layout
4858 \begin_layout LyX-Code
4859 set-axis joystick0axis15 disabled
4860 \end_layout
4862 \begin_layout LyX-Code
4863 set-axis joystick0axis16 disabled
4864 \end_layout
4866 \begin_layout LyX-Code
4867 set-axis joystick0axis17 disabled
4868 \end_layout
4870 \begin_layout LyX-Code
4871 set-axis joystick0axis18 disabled
4872 \end_layout
4874 \begin_layout LyX-Code
4875 set-axis joystick0axis19 disabled
4876 \end_layout
4878 \begin_layout Section
4879 Errata:
4880 \end_layout
4882 \begin_layout Subsection
4883 Problems from BSNES core:
4884 \end_layout
4886 \begin_layout Itemize
4887 The whole pending save stuff.
4888 \end_layout
4890 \begin_layout Itemize
4891 Lack of layer hiding.
4892 \end_layout
4894 \begin_layout Itemize
4895 It is slow (especially accuracy).
4896 \end_layout
4898 \begin_layout Itemize
4899 Firmwares can't be loaded from ZIP archives.
4900 \end_layout
4902 \begin_layout Subsection
4903 Other problems:
4904 \end_layout
4906 \begin_layout Itemize
4907 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4908 \end_layout
4910 \begin_layout Itemize
4911 Audio for last dumped frame is not itself dumped.
4912 \end_layout
4914 \begin_layout Itemize
4915 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4916 \end_layout
4918 \begin_layout Itemize
4919 No menus, command based interface (SDL).
4920 \end_layout
4922 \begin_layout Itemize
4923 Long commands don't scroll.
4924 \end_layout
4926 \begin_layout Section
4927 Changelog:
4928 \end_layout
4930 \begin_layout Subsection
4931 rr0-beta1
4932 \end_layout
4934 \begin_layout Itemize
4935 Fix -Wall warnings
4936 \end_layout
4938 \begin_layout Itemize
4939 Fix dumper video corruption with levels 10-18.
4940 \end_layout
4942 \begin_layout Subsection
4943 rr0-beta2
4944 \end_layout
4946 \begin_layout Itemize
4947 Autofire
4948 \end_layout
4950 \begin_layout Itemize
4951 Lots of code cleanups
4952 \end_layout
4954 \begin_layout Itemize
4955 Lua interface to settings
4956 \end_layout
4958 \begin_layout Itemize
4959 Allow specifying AVI borders without Lua
4960 \end_layout
4962 \begin_layout Itemize
4963 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4964 \end_layout
4966 \begin_layout Itemize
4967 on_snoop lua callback
4968 \end_layout
4970 \begin_layout Itemize
4971 Faster movie loading and saving.
4972 \end_layout
4974 \begin_layout Subsection
4975 rr0-beta3
4976 \end_layout
4978 \begin_layout Itemize
4979 Joystick support
4980 \end_layout
4982 \begin_layout Subsection
4983 rr0-beta4
4984 \end_layout
4986 \begin_layout Itemize
4987 Fix multi-buttons
4988 \end_layout
4990 \begin_layout Itemize
4991 Save jukebox functionality.
4992 \end_layout
4994 \begin_layout Subsection
4995 rr0-beta5
4996 \end_layout
4998 \begin_layout Itemize
4999 Try to fix some nasty failing movie load edge cases
5000 \end_layout
5002 \begin_layout Itemize
5003 Allow specifying scripts to run on command line.
5004 \end_layout
5006 \begin_layout Subsection
5007 rr0-beta6
5008 \end_layout
5010 \begin_layout Itemize
5011 Major source code reorganization.
5012 \end_layout
5014 \begin_layout Itemize
5015 Backup savestates before overwriting.
5016 \end_layout
5018 \begin_layout Itemize
5019 Don't crash if loading initial state fails.
5020 \end_layout
5022 \begin_layout Subsection
5023 rr0-beta7
5024 \end_layout
5026 \begin_layout Itemize
5027 Fix firmware lookup
5028 \end_layout
5030 \begin_layout Itemize
5031 Fix author name parsing
5032 \end_layout
5034 \begin_layout Itemize
5035 Fix rerecord counting
5036 \end_layout
5038 \begin_layout Itemize
5039 (SDL) Print messages to console if SDL is uninitialized
5040 \end_layout
5042 \begin_layout Itemize
5043 Add movieinfo program
5044 \end_layout
5046 \begin_layout Itemize
5047 Fix loading movies starting from SRAM.
5048 \end_layout
5050 \begin_layout Subsection
5051 rr0-beta8
5052 \end_layout
5054 \begin_layout Itemize
5055 Add support for unattended dumping
5056 \end_layout
5058 \begin_layout Itemize
5059 Fix compiling for Win32
5060 \end_layout
5062 \begin_layout Itemize
5063 Don't lock up if sound can't be initialized
5064 \end_layout
5066 \begin_layout Itemize
5067 Strip trailing CR from commands
5068 \end_layout
5070 \begin_layout Itemize
5071 Don't try to do dubious things in global ctors (fix crash on startup)
5072 \end_layout
5074 \begin_layout Subsection
5075 rr0-beta9
5076 \end_layout
5078 \begin_layout Itemize
5079 Small documentation tweaking
5080 \end_layout
5082 \begin_layout Itemize
5083 Fix make clean
5084 \end_layout
5086 \begin_layout Itemize
5087 Fix major bug in modifier matching
5088 \end_layout
5090 \begin_layout Subsection
5091 rr0-beta10
5092 \end_layout
5094 \begin_layout Itemize
5095 Lots of documentation fixes
5096 \end_layout
5098 \begin_layout Itemize
5099 Use dedicated callbacks for event backcomm., not commands.
5100 \end_layout
5102 \begin_layout Itemize
5103 Ensure that the watchdog is not hit when executing delayed reset.
5104 \end_layout
5106 \begin_layout Itemize
5107 Remove errant tab from joystick message.
5108 \end_layout
5110 \begin_layout Subsection
5111 rr0-beta11
5112 \end_layout
5114 \begin_layout Itemize
5115 Make autofire operate in absolute time, not linear time
5116 \end_layout
5118 \begin_layout Itemize
5119 Reinitialize controls when resuming from loadstate
5120 \end_layout
5122 \begin_layout Itemize
5123 Some more code cleanups
5124 \end_layout
5126 \begin_layout Itemize
5127 If Lua allocator fails, call OOM_panic()
5128 \end_layout
5130 \begin_layout Itemize
5131 Byte/word/dword/qword sized host memory write/read functions.
5132 \end_layout
5134 \begin_layout Itemize
5135 Dump at correct framerate if dumping interlaced NTSC (height=448).
5136 \end_layout
5138 \begin_layout Subsection
5139 rr0-beta12
5140 \end_layout
5142 \begin_layout Itemize
5143 Actually include the complete source code
5144 \end_layout
5146 \begin_layout Itemize
5147 Keep track of RTC
5148 \end_layout
5150 \begin_layout Subsection
5151 rr0-beta13
5152 \end_layout
5154 \begin_layout Itemize
5155 Document {save,start}time.{,sub}second.
5156 \end_layout
5158 \begin_layout Itemize
5159 Intercept time() from bsnes core.
5160 \end_layout
5162 \begin_layout Subsection
5163 rr0-beta14
5164 \end_layout
5166 \begin_layout Itemize
5167 Allow disabling time() interception (allow build on Mac OS X)
5168 \end_layout
5170 \begin_layout Itemize
5171 Use SDLMain on Mac OS X (make SDL not crash)
5172 \end_layout
5174 \begin_layout Itemize
5175 Disable delayed resets (just plain too buggy for now).
5176 \end_layout
5178 \begin_layout Itemize
5179 Code cleanups
5180 \end_layout
5182 \begin_layout Itemize
5183 Use 16-bit for graphics/video instead of 32-bit.
5184 \end_layout
5186 \begin_layout Itemize
5187 gui.rectangle/gui.pixel
5188 \end_layout
5190 \begin_layout Itemize
5191 gui.crosshair
5192 \end_layout
5194 \begin_layout Itemize
5195 New CSCD writer implementation.
5196 \end_layout
5198 \begin_layout Subsection
5199 rr0-beta15
5200 \end_layout
5202 \begin_layout Itemize
5203 Fix interaction of * and +.
5204 \end_layout
5206 \begin_layout Itemize
5207 Manual improvements
5208 \end_layout
5210 \begin_layout Itemize
5211 Use gettimeofday()/usleep(), these seem portable enough.
5212 \end_layout
5214 \begin_layout Itemize
5215 Move joystick axis manipulation to keymapper code.
5216 \end_layout
5218 \begin_layout Itemize
5219 Changes to how read-only works.
5220 \end_layout
5222 \begin_layout Itemize
5223 Refactor controller input code.
5224 \end_layout
5226 \begin_layout Subsection
5227 rr0-beta16
5228 \end_layout
5230 \begin_layout Itemize
5231 Fix mouseclick scale compensation.
5232 \end_layout
5234 \begin_layout Itemize
5235 Draw area boundaries correctly in SDL code.
5236 \end_layout
5238 \begin_layout Itemize
5239 gui.screenshot.
5240 \end_layout
5242 \begin_layout Itemize
5243 Fix CSCD output (buffer overrun and race condition).
5244 \end_layout
5246 \begin_layout Subsection
5247 rr0-beta17
5248 \end_layout
5250 \begin_layout Itemize
5251 JMD dumping support.
5252 \end_layout
5254 \begin_layout Itemize
5255 Allow unattended dumping to JMD.
5256 \end_layout
5258 \begin_layout Itemize
5259 Move to BSNES v083.
5260 \end_layout
5262 \begin_layout Itemize
5263 Switch back to 32-bit colors.
5264 \end_layout
5266 \begin_layout Itemize
5267 Add Lua function gui.color.
5268 \end_layout
5270 \begin_layout Itemize
5271 Use some new C++11 features in GCC 4.6.
5272 \end_layout
5274 \begin_layout Itemize
5275 Be prepared for core frequency changes.
5276 \end_layout
5278 \begin_layout Itemize
5279 Pass colors in one chunk from Lua.
5280 \end_layout
5282 \begin_layout Subsection
5283 rr0-beta18
5284 \end_layout
5286 \begin_layout Itemize
5287 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5288  memory.read_vma() and memory.find_vma().
5289 \end_layout
5291 \begin_layout Itemize
5292 Numerious documentation fixups
5293 \end_layout
5295 \begin_layout Itemize
5296 RTC time format changed
5297 \end_layout
5299 \begin_layout Itemize
5300 Reformat flags display
5301 \end_layout
5303 \begin_layout Itemize
5304 Allow lua package name to be overridden
5305 \end_layout
5307 \begin_layout Itemize
5308 SDUMP (high-quality dumping).
5309 \end_layout
5311 \begin_layout Itemize
5312 Split platform support to plugins.
5313 \end_layout
5315 \begin_layout Itemize
5316 Make all sound plugins support basic sound commands
5317 \end_layout
5319 \begin_layout Itemize
5320 Support portaudio for sound.
5321 \end_layout
5323 \begin_layout Itemize
5324 Allow disable Lua/SDL searching.
5325 \end_layout
5327 \begin_layout Itemize
5328 Upconvert colors when copying lcscreen to screen.
5329 \end_layout
5331 \begin_layout Itemize
5332 Reorganize source tree.
5333 \end_layout
5335 \begin_layout Itemize
5336 Evdev joystick support.
5337 \end_layout
5339 \begin_layout Itemize
5340 Refactor more code into generic window code.
5341 \end_layout
5343 \begin_layout Subsection
5344 rr0-beta19
5345 \end_layout
5347 \begin_layout Itemize
5348 Refactor message handling.
5349 \end_layout
5351 \begin_layout Itemize
5352 Rework makefile
5353 \end_layout
5355 \begin_layout Itemize
5356 Documentation fixes
5357 \end_layout
5359 \begin_layout Itemize
5360 Finish pending saves before load/quit.
5361 \end_layout
5363 \begin_layout Itemize
5364 Wxwidgets graphics plugin.
5365 \end_layout
5367 \begin_layout Subsection
5368 rr0-beta20
5369 \end_layout
5371 \begin_layout Itemize
5372 Get rid of win32-crap.[ch]pp.
5373 \end_layout
5375 \begin_layout Itemize
5376 Move files around a lot.
5377 \end_layout
5379 \begin_layout Itemize
5380 Get rid of need for host C++ compiler.
5381 \end_layout
5383 \begin_layout Itemize
5384 Bsnes v084 core.
5385 \end_layout
5387 \begin_layout Itemize
5388 Refactor inter-component communication.
5389 \end_layout
5391 \begin_layout Itemize
5392 Fix zero luma.
5393 \end_layout
5395 \begin_layout Itemize
5396 Fix crash on multiline aliases.
5397 \end_layout
5399 \begin_layout Itemize
5400 Load/Save settings in wxwidgets gui.
5401 \end_layout
5403 \begin_layout Subsection
5404 rr0-beta21
5405 \end_layout
5407 \begin_layout Itemize
5408 Patch problems in bsnes core
5409 \end_layout
5411 \begin_layout Itemize
5412 SNES is little-endian, not big-endian!
5413 \end_layout
5415 \begin_layout Itemize
5416 Fix memory corruption in lcscreen::load()
5417 \end_layout
5419 \begin_layout Subsection
5420 rr0-beta22
5421 \end_layout
5423 \begin_layout Itemize
5424 Fix interpretting repeat counts in rrdata loading.
5425 \end_layout
5427 \begin_layout Itemize
5428 New lua callback: on_frame()
5429 \end_layout
5431 \begin_layout Itemize
5432 Remove calls to runtosave() that aren't supposed to be there
5433 \end_layout
5435 \begin_layout Itemize
5436 Lua function: movie.read_rtc()
5437 \end_layout
5439 \begin_layout Itemize
5440 Ignore src/fonts/font.cpp
5441 \end_layout
5443 \begin_layout Itemize
5444 Fix more bsnes core problems
5445 \end_layout
5447 \begin_layout Itemize
5448 Control bsnes random seeding
5449 \end_layout
5451 \begin_layout Itemize
5452 Pause-on-end
5453 \end_layout
5455 \begin_layout Itemize
5456 Some bsnes core debugging features (state dump and state hash)
5457 \end_layout
5459 \begin_layout Itemize
5460 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5461  it was 'lsnes rr0-beta21').
5462 \end_layout
5464 \begin_layout Subsection
5465 rr0-beta23
5466 \end_layout
5468 \begin_layout Itemize
5469 Fix memory corruption due to macro/field mixup
5470 \end_layout
5472 \begin_layout Itemize
5473 search-memory update
5474 \end_layout
5476 \begin_layout Itemize
5477 Allow direct-mapped framebuffer
5478 \end_layout
5480 \begin_layout Itemize
5481 SDL: Use SDL_ANYFORMAT if possible
5482 \end_layout
5484 \begin_layout Itemize
5485 SDMP2SOX: 2s delay modes.
5486 \end_layout
5488 \begin_layout Itemize
5489 Wxwidgets: Cleanups
5490 \end_layout
5492 \begin_layout Itemize
5493 Use sed -E, not sed -r.
5494  Fixes building on Mac OS X.
5495 \end_layout
5497 \begin_layout Itemize
5498 Wxwidgets: Save jukebox on exit
5499 \end_layout
5501 \begin_layout Itemize
5502 Fix RTC if using load-movie on savestate.
5503 \end_layout
5505 \begin_layout Itemize
5506 Fix crash related to full console mode.
5507 \end_layout
5509 \begin_layout Subsection
5510 rr0-beta24
5511 \end_layout
5513 \begin_layout Itemize
5514 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5515 \end_layout
5517 \begin_layout Itemize
5518 Wxwidgets: Allow compiling on Mac OS X.
5519 \end_layout
5521 \begin_layout Itemize
5522 Use movie compare instead of movie hashing (faster save/load).
5523 \end_layout
5525 \begin_layout Itemize
5526 Lua: _SYSTEM table.
5527 \end_layout
5529 \begin_layout Subsection
5530 rr0-beta25
5531 \end_layout
5533 \begin_layout Itemize
5534 sdmp2sox: Pad soundtrack if using -l or -L.
5535 \end_layout
5537 \begin_layout Itemize
5538 sdmp2sox: Fix NTSC overscan.
5539 \end_layout
5541 \begin_layout Itemize
5542 sdmp2sox: Add AR correction mode.
5543 \end_layout
5545 \begin_layout Itemize
5546 call lua_close() when exiting.
5547 \end_layout
5549 \begin_layout Itemize
5550 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5551 \end_layout
5553 \begin_layout Subsection
5554 rr0-beta26
5555 \end_layout
5557 \begin_layout Itemize
5558 Fix IPS patching code (use bsnes core IPS patcher).
5559 \end_layout
5561 \begin_layout Itemize
5562 Implement BPS patching (using bsnes core IPS patcher).
5563 \end_layout
5565 \begin_layout Itemize
5566 Add feature to load headered ROMs.
5567 \end_layout
5569 \begin_layout Subsection
5570 rr0-beta27
5571 \end_layout
5573 \begin_layout Itemize
5574 Show command names when showing keybindings
5575 \end_layout
5577 \begin_layout Subsection
5579 \end_layout
5581 \begin_layout Itemize
5582 Fix pause-on-end to be actually controllable
5583 \end_layout
5585 \begin_layout Itemize
5586 SDL: Poll all events in queue, not just first one (fixes slowness in command
5587  typing)
5588 \end_layout
5590 \begin_layout Itemize
5591 Wxwidgets: Fix ROM loading.
5592 \end_layout
5594 \begin_layout Subsection
5595 rr1-beta0
5596 \end_layout
5598 \begin_layout Itemize
5599 Lua: Add gui.textH, gui.textV, gui.textHV
5600 \end_layout
5602 \begin_layout Itemize
5603 Fix text colors on SDL on Mac OS X
5604 \end_layout
5606 \begin_layout Itemize
5607 Mode 'F' for finished in readonly mode.
5608 \end_layout
5610 \begin_layout Itemize
5611 Fix some WS errors.
5612 \end_layout
5614 \begin_layout Itemize
5615 Reliably pause after skip poll
5616 \end_layout
5618 \begin_layout Itemize
5619 Split UI and core into their own threads
5620 \end_layout
5622 \begin_layout Subsection
5623 rr1-beta1
5624 \end_layout
5626 \begin_layout Itemize
5627 Remove leftover dummy SRAM slot
5628 \end_layout
5630 \begin_layout Itemize
5631 Fix controller numbers.
5632 \end_layout
5634 \begin_layout Subsection
5635 rr1-beta2
5636 \end_layout
5638 \begin_layout Itemize
5639 Fix lsnes-dumpavi after interface change.
5640 \end_layout
5642 \begin_layout Itemize
5643 Also give BSNES patches for v085.
5644 \end_layout
5646 \begin_layout Itemize
5647 Pack movie data in memory.
5648 \end_layout
5650 \begin_layout Subsection
5651 rr1-beta3
5652 \end_layout
5654 \begin_layout Itemize
5655 Fix framecount/length given when loading movies.
5656 \end_layout
5658 \begin_layout Itemize
5659 Controller command memory leak fixes.
5660 \end_layout
5662 \begin_layout Itemize
5663 Don't leak palette if freeing screen object.
5664 \end_layout
5666 \begin_layout Subsection
5667 rr1-beta4
5668 \end_layout
5670 \begin_layout Itemize
5671 Detect revisions.
5672 \end_layout
5674 \begin_layout Itemize
5675 Wxwidgets: Allow controlling dumper from the menu.
5676 \end_layout
5678 \begin_layout Subsection
5679 rr1-beta5
5680 \end_layout
5682 \begin_layout Itemize
5683 Rewrite parts of manual
5684 \end_layout
5686 \begin_layout Itemize
5687 Lua: Make it work with Lua 5.2.
5688 \end_layout
5690 \begin_layout Subsection
5691 rr1-beta6
5692 \end_layout
5694 \begin_layout Itemize
5695 Win32: Fix compile errors.
5696 \end_layout
5698 \begin_layout Subsection
5699 rr1-beta7
5700 \end_layout
5702 \begin_layout Itemize
5703 Refactor controller input code.
5704 \end_layout
5706 \begin_layout Itemize
5707 Fix crash when using command line on SDL / Mac OS X.
5708 \end_layout
5710 \begin_layout Subsection
5711 rr1-beta8
5712 \end_layout
5714 \begin_layout Itemize
5715 Delete core/coroutine (obsolete)
5716 \end_layout
5718 \begin_layout Itemize
5719 Lag input display by one frame.
5720 \end_layout
5722 \begin_layout Itemize
5723 Rewind movie to beginning function.
5724 \end_layout
5726 \begin_layout Itemize
5727 Fix wrong frame number reported to Lua when repainting after loadstate
5728 \end_layout
5730 \begin_layout Itemize
5731 Support UI editing of jukebox
5732 \end_layout
5734 \begin_layout Itemize
5735 Wxwidgets: Save settings on exit.
5736 \end_layout
5738 \begin_layout Itemize
5739 Support ${project} for filenames
5740 \end_layout
5742 \begin_layout Itemize
5743 SDL: Fix command history
5744 \end_layout
5746 \begin_layout Subsection
5747 rr1-beta9
5748 \end_layout
5750 \begin_layout Itemize
5751 Fix some order-of-global-ctor bugs.
5752 \end_layout
5754 \begin_layout Subsection
5755 rr1-beta10
5756 \end_layout
5758 \begin_layout Itemize
5759 Fix crashes when quitting on Win32.
5760 \end_layout
5762 \begin_layout Subsection
5763 rr1-beta11
5764 \end_layout
5766 \begin_layout Itemize
5767 EVDEV: Queue keypresses from joystick, don't send directly
5768 \end_layout
5770 \begin_layout Itemize
5771 Wxwidgets: Load-Preserve that actually works.
5772 \end_layout
5774 \begin_layout Subsection
5775 rr1-beta12
5776 \end_layout
5778 \begin_layout Itemize
5779 Wxwidgets: GUI for memory search.
5780 \end_layout
5782 \begin_layout Itemize
5783 Warn about using synchronous queue in UI callback.
5784 \end_layout
5786 \begin_layout Subsection
5787 rr1-beta13
5788 \end_layout
5790 \begin_layout Itemize
5791 Remember last saved file for each ROM
5792 \end_layout
5794 \begin_layout Itemize
5795 Support MT dumping via boost.
5796 \end_layout
5798 \begin_layout Itemize
5799 Lua: input.raw
5800 \end_layout
5802 \begin_layout Itemize
5803 Lua: input.keyhook
5804 \end_layout
5806 \begin_layout Itemize
5807 Make mouse be ordinary input instead of special-casing
5808 \end_layout
5810 \begin_layout Itemize
5811 SDL: Don't screw up commands with NUL codepoints.
5812 \end_layout
5814 \begin_layout Subsection
5815 rr1-beta14
5816 \end_layout
5818 \begin_layout Itemize
5819 Merge status panel and main window
5820 \end_layout
5822 \begin_layout Itemize
5823 True movie slot support (the rest of it)
5824 \end_layout
5826 \begin_layout Itemize
5827 SDL: Fix compilation error
5828 \end_layout
5830 \begin_layout Itemize
5831 Elminate cross calls in dump menu code.
5832 \end_layout
5834 \begin_layout Subsection
5835 rr1-beta15
5836 \end_layout
5838 \begin_layout Itemize
5839 Cancel pending saves command
5840 \end_layout
5842 \begin_layout Itemize
5843 Wxwidgets: Code refactoring
5844 \end_layout
5846 \begin_layout Itemize
5847 Wxwidgets: Fix system -> reset
5848 \end_layout
5850 \begin_layout Itemize
5851 Wxwidgets: Read watch expressions in the right thread
5852 \end_layout
5854 \begin_layout Subsection
5855 rr1-beta16
5856 \end_layout
5858 \begin_layout Itemize
5859 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5860  support that).
5861 \end_layout
5863 \begin_layout Itemize
5864 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5865 \end_layout
5867 \begin_layout Itemize
5868 Don't append trailing '-' to prefix when saving movie.
5869 \end_layout
5871 \begin_layout Itemize
5872 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5873 \end_layout
5875 \begin_layout Subsection
5877 \end_layout
5879 \begin_layout Itemize
5880 Document memory watch syntax.
5881 \end_layout
5883 \begin_layout Subsection
5884 rr1-delta1
5885 \end_layout
5887 \begin_layout Itemize
5888 Fix unattended dumping (lsnes-dumpavi)
5889 \end_layout
5891 \begin_layout Itemize
5892 Support RAW dumping
5893 \end_layout
5895 \begin_layout Itemize
5896 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5897 \end_layout
5899 \begin_layout Itemize
5900 Add option to control sample rate preturbation in AVI dumper
5901 \end_layout
5903 \begin_layout Subsection
5904 rr1-delta2
5905 \end_layout
5907 \begin_layout Itemize
5908 Wxwidgets: Fix dumper submodes
5909 \end_layout
5911 \begin_layout Itemize
5912 Set core controller types before loadstate
5913 \end_layout
5915 \begin_layout Subsection
5916 rr1-delta2epsilon1
5917 \end_layout
5919 \begin_layout Itemize
5920 Fix compiling with bsnes v086.
5921 \end_layout
5923 \begin_layout Subsection
5924 rr1-delta3
5925 \end_layout
5927 \begin_layout Itemize
5928 Don't prompt before quitting
5929 \end_layout
5931 \begin_layout Itemize
5932 Start unpaused, preserve pause/unpause over load.
5933 \end_layout
5935 \begin_layout Itemize
5936 Try to autodetect if ROM is headered.
5937 \end_layout
5939 \begin_layout Itemize
5940 Wxwidgets: Only bring up ROM patching screen if specifically requested.
5941 \end_layout
5943 \begin_layout Itemize
5944 Allow configuring some hotkeys.
5945 \end_layout
5947 \begin_layout Subsection
5948 rr1-delta4
5949 \end_layout
5951 \begin_layout Itemize
5952 Lots of code cleanups
5953 \end_layout
5955 \begin_layout Itemize
5956 Fix JMD compression (JMD dumping was broken)
5957 \end_layout
5959 \begin_layout Itemize
5960 Don't crash if Lua C function throws an exception.
5961 \end_layout
5963 \begin_layout Itemize
5964 Support bitmap drawing in Lua.
5965 \end_layout
5967 \begin_layout Itemize
5968 Fix bsnes v085/v086 patches.
5969 \end_layout
5971 \begin_layout Itemize
5972 Improve stability on win32.
5973 \end_layout
5975 \begin_layout Subsection
5976 rr1-delta4epsilon1
5977 \end_layout
5979 \begin_layout Itemize
5980 Don't corrupt movie if movie length is integer multiple of frames per page.
5981 \end_layout
5983 \begin_layout Subsection
5984 rr1-delta5
5985 \end_layout
5987 \begin_layout Itemize
5988 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
5989 \end_layout
5991 \begin_layout Itemize
5992 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
5993 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
5995 \end_layout
5997 \begin_layout Itemize
5998 Wxwidgets: Fix internal focus lost (hotkeys stop working)
5999 \end_layout
6001 \begin_layout Itemize
6002 Wxwidgets: Fix broken modifiers
6003 \end_layout
6005 \begin_layout Itemize
6006 on_paint has parameter now.
6007 \end_layout
6009 \begin_layout Itemize
6010 Optional initital fill for bitmaps
6011 \end_layout
6013 \begin_layout Itemize
6014 Fix palette changing.
6015 \end_layout
6017 \begin_layout Itemize
6018 Optimize rendering a bit.
6019 \end_layout
6021 \begin_layout Itemize
6022 Bsnes v087 support.
6023 \end_layout
6025 \begin_layout Subsection
6026 rr1-delta5epsilon1
6027 \end_layout
6029 \begin_layout Itemize
6030 Movieinfo: Fix display of port #2 type.
6031 \end_layout
6033 \begin_layout Itemize
6034 Call on_input() after loadstate.
6035 \end_layout
6037 \begin_layout Subsection
6038 rr1-delta5epsilon2
6039 \end_layout
6041 \begin_layout Itemize
6042 Fix writing port2 data to movie.
6043 \end_layout
6045 \begin_layout Itemize
6046 Fix SRAM handling with Bsnes v087.
6047 \end_layout
6049 \begin_layout Subsection
6050 rr1-delta6
6051 \end_layout
6053 \begin_layout Itemize
6054 Library loading support
6055 \end_layout
6057 \begin_layout Itemize
6058 Built-in TSCC encoder
6059 \end_layout
6061 \begin_layout Itemize
6062 Hi-color (256T colors) dumping.
6063 \end_layout
6065 \begin_layout Itemize
6066 Dump over TCP/IP(v6)
6067 \end_layout
6069 \begin_layout Itemize
6070 Hidable status panel
6071 \end_layout
6073 \begin_layout Itemize
6074 Turbo toggle/hold
6075 \end_layout
6077 \begin_layout Itemize
6078 Adjustable sound volume
6079 \end_layout
6081 \begin_layout Itemize
6082 Screen scaling
6083 \end_layout
6085 \begin_layout Itemize
6086 Allow DnD into filename boxes
6087 \end_layout
6089 \begin_layout Itemize
6090 Configurable paths
6091 \end_layout
6093 \begin_layout Itemize
6094 Portaudio: Fix speaker popping at start
6095 \end_layout
6097 \begin_layout Itemize
6098 Lots of UI changes
6099 \end_layout
6101 \begin_layout Itemize
6102 Speed adjustment menu
6103 \end_layout
6105 \begin_layout Itemize
6106 Win32 joystick support
6107 \end_layout
6109 \begin_layout Itemize
6110 Lua: gui.rainbow and gui.box
6111 \end_layout
6113 \begin_layout Itemize
6114 Split key lists into classes (the key list was large!)
6115 \end_layout
6117 \begin_layout Itemize
6118 More save slots support
6119 \end_layout
6121 \begin_layout Itemize
6122 Wxwidgets (wxJoystick) joystick support
6123 \end_layout
6125 \begin_layout Subsection
6126 rr1-delta7
6127 \end_layout
6129 \begin_layout Itemize
6130 Lots of internal joystick refactoring
6131 \end_layout
6133 \begin_layout Itemize
6134 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6135 \end_layout
6137 \begin_layout Itemize
6138 Wxwidgets: Settings mode (open settings without ROM)
6139 \end_layout
6141 \begin_layout Itemize
6142 Wxwidgets: Prompt key to use option
6143 \end_layout
6145 \begin_layout Itemize
6146 Wxwidgets: Fix crash if key goes away underneath
6147 \end_layout
6149 \begin_layout Itemize
6150 Wxwidgets: Fix mouse position in presence of scaling
6151 \end_layout
6153 \begin_layout Itemize
6154 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6155 \end_layout
6157 \begin_layout Itemize
6158 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6159  seem to work well on WinXP)
6160 \end_layout
6162 \begin_layout Itemize
6163 Start paused option.
6164 \end_layout
6166 \begin_layout Subsection
6167 rr1-delta7epsilon1
6168 \end_layout
6170 \begin_layout Itemize
6171 AVI: ZMBV support
6172 \end_layout
6174 \begin_layout Itemize
6175 lsnes-dumpavi: Start Lua before starting dumper
6176 \end_layout
6178 \begin_layout Itemize
6179 AVI: Fix secondary audio in mode 4.
6180 \end_layout
6182 \begin_layout Subsection
6183 rr1-delta7epsilon2
6184 \end_layout
6186 \begin_layout Itemize
6187 AVI: Refactor ZMBV a bit.
6188 \end_layout
6190 \begin_layout Itemize
6191 Fix error reading analog values from movie file
6192 \end_layout
6194 \begin_layout Subsection
6195 rr1-delta8
6196 \end_layout
6198 \begin_layout Itemize
6199 Delayed reset support
6200 \end_layout
6202 \begin_layout Itemize
6203 Lua: memory.hash_region
6204 \end_layout
6206 \begin_layout Subsection
6207 rr1-delta8epsilon1
6208 \end_layout
6210 \begin_layout Itemize
6211 Rework the build system
6212 \end_layout
6214 \begin_layout Itemize
6215 Typing input support
6216 \end_layout
6218 \begin_layout Itemize
6219 Fix building with bsnes v086 and v087.
6220 \end_layout
6222 \begin_layout Itemize
6223 SDL: Save settings on exit
6224 \end_layout
6226 \begin_layout Itemize
6227 SDL: Command to enter command line mode with given command.
6228 \end_layout
6230 \begin_layout Itemize
6231 SDL: More advanced command editing.
6232 \end_layout
6234 \begin_layout Subsection
6235 rr1-delta9
6236 \end_layout
6238 \begin_layout Itemize
6239 wxMSW: Fix the 
6240 \begin_inset Quotes eld
6241 \end_inset
6243 arrow keys and enter don't work
6244 \begin_inset Quotes erd
6245 \end_inset
6247  problem
6248 \end_layout
6250 \begin_layout Itemize
6251 MSU-1 support
6252 \end_layout
6254 \begin_layout Itemize
6255 Show mode changes due to rewinding.
6256 \end_layout
6258 \begin_layout Itemize
6259 Unsafe rewind support
6260 \end_layout
6262 \begin_layout Itemize
6263 Fix directory transversal.
6264 \end_layout
6266 \begin_layout Subsection
6267 rr1-delta10
6268 \end_layout
6270 \begin_layout Itemize
6271 AVI: Sound mode 5 (48kHz high-quality)
6272 \end_layout
6274 \begin_layout Itemize
6275 Lua: Reset Lua VM
6276 \end_layout
6278 \begin_layout Itemize
6279 Map the SNES bus into address space
6280 \end_layout
6282 \begin_layout Itemize
6283 Fix loading memory watch files with CRLF line endings
6284 \end_layout
6286 \begin_layout Subsection
6287 rr1-delta10epsilon1
6288 \end_layout
6290 \begin_layout Itemize
6291 Map bsnes internal state into memory space
6292 \end_layout
6294 \begin_layout Itemize
6295 Fix the 
6296 \begin_inset Quotes eld
6297 \end_inset
6299 click on panel wedges the emulator
6300 \begin_inset Quotes erd
6301 \end_inset
6303  for real.
6304 \end_layout
6306 \begin_layout Itemize
6307 DnD movies/saves on the main window.
6308 \end_layout
6310 \begin_layout Subsection
6311 rr1-delta11
6312 \end_layout
6314 \begin_layout Itemize
6315 Split core bindings into own module.
6316 \end_layout
6318 \begin_layout Itemize
6319 Remember invalid settings
6320 \end_layout
6322 \begin_layout Itemize
6323 Support for modified Gambatte core for GB/GBC emulation.
6324 \end_layout
6326 \begin_layout Itemize
6327 Reload/swap ROM function
6328 \end_layout
6330 \begin_layout Subsection
6331 rr1-delta11epsilon1
6332 \end_layout
6334 \begin_layout Itemize
6335 Fix step poll function
6336 \end_layout
6338 \begin_layout Subsection
6339 rr1-delta12
6340 \end_layout
6342 \begin_layout Itemize
6343 Non-insane savestate anchoring
6344 \end_layout
6346 \begin_layout Subsection
6347 rr1-delta13
6348 \end_layout
6350 \begin_layout Itemize
6351 More Memory search methods
6352 \end_layout
6354 \begin_layout Itemize
6355 Preserve movie if loading in RO mode.
6356 \end_layout
6358 \begin_layout Itemize
6359 Fix a obscure case in timeline check
6360 \end_layout
6362 \begin_layout Itemize
6363 Revamp the entiere ROM loading code
6364 \end_layout
6366 \begin_layout Itemize
6367 Support DnD on ROMs
6368 \end_layout
6370 \begin_layout Itemize
6371 Revamp menu layout
6372 \end_layout
6374 \begin_layout Itemize
6375 Standalone hotkey config dialog
6376 \end_layout
6378 \begin_layout Itemize
6379 Show bindings in more user-friendly format
6380 \end_layout
6382 \end_body
6383 \end_document