Split platform sound and graphics parts
[lsnes.git] / manual.lyx
blob006134bdba794789d7c8022fcd6856d6f67233bf
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 Command line options
72 \end_layout
74 \begin_layout Itemize
75 Syntax: lsnes.exe <rom-options> <misc-options> (<new-session-options>|<filename>)
76 \end_layout
78 \begin_layout Itemize
79 Syntax: lsnes-avidump <dump-options> <misc-options> <rom-options> <filename>
80 \end_layout
82 \begin_layout Itemize
83 Syntax: movieinfo.exe <filename>
84 \end_layout
86 \begin_layout Subsection
87 ROM options
88 \end_layout
90 \begin_layout Standard
91 These options control loading the ROM.
92 \end_layout
94 \begin_layout Subsubsection
95 --rom=<file>
96 \end_layout
98 \begin_layout Standard
99 Load <file> (SFC file format) as main SNES cartridge ROM.
100  This is the game ROM for SNES and cartridge BIOS for other types.
101  Required option.
102 \end_layout
104 \begin_layout Subsubsection
105 --rom-xml=<file>
106 \end_layout
108 \begin_layout Standard
109 Set the mapping XML file for main cartridge ROM.
110  If not specified, defaults are used.
111 \end_layout
113 \begin_layout Subsubsection
114 --bsx=<file>
115 \end_layout
117 \begin_layout Standard
118 Load <file> (BS file format) as BS-X non-slotted flash memory.
119  Also sets system type to BS-X non-slotted (not compatible with --bsxslotted=<fi
120 le>, --dmg=<file>, --slot-a=<file> nor --slot-b=<file>).
121 \end_layout
123 \begin_layout Subsubsection
124 --bsx-xml=<file>
125 \end_layout
127 \begin_layout Standard
128 Set mapping XML file for BS-X non-slotted flash memory.
129  If not specified, defaults are used.
130  Only can be used together with --bsx=<file>.
131 \end_layout
133 \begin_layout Subsubsection
134 --bsxslotted=<file>
135 \end_layout
137 \begin_layout Standard
138 Load <file> (BS file format) as BS-X slotted flash memory.
139  Also sets system type to BS-X slotted (not compatible with --bsx=<file>,
140  --dmg=<file>, --slot-a=<file> nor --slot-b=<file>).
141 \end_layout
143 \begin_layout Subsubsection
144 --bsxslotted-xml=<file>
145 \end_layout
147 \begin_layout Standard
148 Set mapping XML file for BS-X slotted flash memory.
149  If not specified, defaults are used.
150  Only can be used together with --bsxslotted=<file>.
151 \end_layout
153 \begin_layout Subsubsection
154 --dmg=<file>
155 \end_layout
157 \begin_layout Standard
158 Load <file> (GB file format) as Game Boy ROM.
159  Also sets system type to SGB (not compatible with --bsx=<file>, --bsxslotted=<f
160 ile>, --slot-a=<file> nor --slot-b=<file>).
161 \end_layout
163 \begin_layout Subsubsection
164 --dmg-xml=<file>
165 \end_layout
167 \begin_layout Standard
168 Set mapping XML file for Game Boy ROM.
169  If not specified, defaults are used.
170  Only can be used together with --dmg=<file>.
171 \end_layout
173 \begin_layout Subsubsection
174 --slot-a=<file>
175 \end_layout
177 \begin_layout Standard
178 Load <file> (ST file format) as Sufami turbo cartridge A ROM.
179  Also sets system type to Sufami Turbo (not compatible with --bsx=<file>,
180  --bsxslotted=<file> nor --dmg=<file>).
181 \end_layout
183 \begin_layout Subsubsection
184 --slot-a-xml=<file>
185 \end_layout
187 \begin_layout Standard
188 Set mapping XML file for Sufami turbo cartridge A ROM.
189  If not specified, defaults are used.
190  Only can be used together with --slot-a=<file>.
191 \end_layout
193 \begin_layout Subsubsection
194 --slot-b=<file>
195 \end_layout
197 \begin_layout Standard
198 Load <file> (ST file format) as Sufami turbo cartridge B ROM.
199  Also sets system type to Sufami Turbo (not compatible with --bsx=<file>,
200  --bsxslotted=<file> nor --dmg=<file>).
201 \end_layout
203 \begin_layout Subsubsection
204 --slot-b-xml=<file>
205 \end_layout
207 \begin_layout Standard
208 Set mapping XML file for Sufami turbo cartridge B ROM.
209  If not specified, defaults are used.
210  Only can be used together with --slot-b=<file>.
211 \end_layout
213 \begin_layout Subsubsection
214 --ips-rom=<file>
215 \end_layout
217 \begin_layout Standard
218 Apply IPS patch <file> to main cartridge ROM.
219  Requires --rom=<file>.
220 \end_layout
222 \begin_layout Subsubsection
223 --ips-rom-xml=<file>
224 \end_layout
226 \begin_layout Standard
227 Apply IPS patch <file> to main cartridge ROM mapping XML.
228  Requires --rom-xml=<file>.
229 \end_layout
231 \begin_layout Subsubsection
232 --ips-bsx=<file>
233 \end_layout
235 \begin_layout Standard
236 Apply IPS patch <file> to BS-X non-slotted flash.
237  Requires --bsx=<file>.
238 \end_layout
240 \begin_layout Subsubsection
241 --ips-bsx-xml=<file>
242 \end_layout
244 \begin_layout Standard
245 Apply IPS patch <file> to BS-X non-slotted flash mapping XML.
246  Requires --bsx-xml=<file>.
247 \end_layout
249 \begin_layout Subsubsection
250 --ips-bsxslotted=<file>
251 \end_layout
253 \begin_layout Standard
254 Apply IPS patch <file> to BS-X slotted flash.
255  Requires --bsxslotted=<file>.
256 \end_layout
258 \begin_layout Subsubsection
259 --ips-bsxslotted-xml=<file>
260 \end_layout
262 \begin_layout Standard
263 Apply IPS patch <file> to BS-X slotted flash mapping XML.
264  Requires --bsxslotted-xml=<file>.
265 \end_layout
267 \begin_layout Subsubsection
268 --ips-dmg=<file>
269 \end_layout
271 \begin_layout Standard
272 Apply IPS patch <file> to Game Boy ROM.
273  Requires --dmg=<file>.
274 \end_layout
276 \begin_layout Subsubsection
277 --ips-dmg-xml=<file>
278 \end_layout
280 \begin_layout Standard
281 Apply IPS patch <file> to Game Boy ROM mapping XML.
282  Requires --dmg-xml=<file>.
283 \end_layout
285 \begin_layout Subsubsection
286 --ips-slot-a=<file>
287 \end_layout
289 \begin_layout Standard
290 Apply IPS patch <file> to Sufami turbo cartridge A ROM.
291  Requires --slot-a=<file>.
292 \end_layout
294 \begin_layout Subsubsection
295 --ips-slot-a-xml=<file>
296 \end_layout
298 \begin_layout Standard
299 Apply IPS patch <file> to Sufami turbo cartridge A ROM mapping XML.
300  Requires --slot-a-xml=<file>.
301 \end_layout
303 \begin_layout Subsubsection
304 --ips-slot-b=<file>
305 \end_layout
307 \begin_layout Standard
308 Apply IPS patch <file> to Sufami turbo cartridge B ROM.
309  Requires --slot-b=<file>.
310 \end_layout
312 \begin_layout Subsubsection
313 --ips-slot-b-xml=<file>
314 \end_layout
316 \begin_layout Standard
317 Apply IPS patch <file> to Sufami turbo cartridge B ROM mapping XML.
318  Requires --slot-b-xml=<file>.
319 \end_layout
321 \begin_layout Subsubsection
322 --ips-offset=<offset>
323 \end_layout
325 \begin_layout Standard
326 Set IPS apply offset to <offset> (can be negative).
327  IPS apply offset is added to all addresses inside IPS file before applying.
328  If the resulting address is negative, write is ignored (with a warning).
329  If resulting address exceeds ROM size, the ROM is extended.
330 \end_layout
332 \begin_layout Subsubsection
333 --pal
334 \end_layout
336 \begin_layout Standard
337 Force ROM to be considered PAL-only (warning: Will cause error if used on
338  anything except SNES and SGB).
339 \end_layout
341 \begin_layout Subsubsection
342 --ntsc
343 \end_layout
345 \begin_layout Standard
346 Force ROM to be considered NTSC-only (default for everything except SNES
347  and SGB).
348 \end_layout
350 \begin_layout Subsection
351 New session options (lsnes.exe only)
352 \end_layout
354 \begin_layout Standard
355 If filename is not specified, new session is started.
356  These options control the properties of new session:
357 \end_layout
359 \begin_layout Subsubsection
360 --port1=<type>
361 \end_layout
363 \begin_layout Standard
364 Set type of port1.
365  Valid values are:
366 \end_layout
368 \begin_layout Itemize
369 none: No device connected
370 \end_layout
372 \begin_layout Itemize
373 gamepad: One gamepad (the default)
374 \end_layout
376 \begin_layout Itemize
377 multitap: Four gamepads (warning: makes most games refuse to start)
378 \end_layout
380 \begin_layout Itemize
381 mouse: Mouse.
382 \end_layout
384 \begin_layout Subsubsection
385 --port2=<type>
386 \end_layout
388 \begin_layout Standard
389 Set type of port2.
390  Valid values are:
391 \end_layout
393 \begin_layout Itemize
394 none: No device connected (the default)
395 \end_layout
397 \begin_layout Itemize
398 gamepad: One gamepad
399 \end_layout
401 \begin_layout Itemize
402 multitap: Four gamepads.
403 \end_layout
405 \begin_layout Itemize
406 mouse: Mouse
407 \end_layout
409 \begin_layout Itemize
410 superscope: Super Scope
411 \end_layout
413 \begin_layout Itemize
414 justifier: One justifier
415 \end_layout
417 \begin_layout Itemize
418 justifiers: Two justifiers
419 \end_layout
421 \begin_layout Subsubsection
422 --gamename=<name>
423 \end_layout
425 \begin_layout Standard
426 Set the name of game to <name>
427 \end_layout
429 \begin_layout Subsubsection
430 --author=<name>
431 \end_layout
433 \begin_layout Standard
434 Add author with full name of <name> (no nickname).
435 \end_layout
437 \begin_layout Subsubsection
438 --author=|<name>
439 \end_layout
441 \begin_layout Standard
442 Add author with nickname of <name> (no full name).
443 \end_layout
445 \begin_layout Subsubsection
446 --author=<fullname>|<nickname>
447 \end_layout
449 \begin_layout Standard
450 Add author with full name of <fullname> and nickname of <nickname>.
451 \end_layout
453 \begin_layout Subsubsection
454 --rtc-second=<value>
455 \end_layout
457 \begin_layout Standard
458 Set RTC second (0 is 1st January 1970 00:00:00Z).
459 \end_layout
461 \begin_layout Subsubsection
462 --rtc-subsecond=<value>
463 \end_layout
465 \begin_layout Standard
466 Set RTC subsecond.
467  Range is 0-3,462,619,485,019.
468 \end_layout
470 \begin_layout Subsection
471 <filename>
472 \end_layout
474 \begin_layout Standard
475 If filename is specified on command line, it is loaded as initial state
476  (instead of constructing one).
477  Mandatory for lsnes-avidump.exe and movieinfo.exe.
478 \end_layout
480 \begin_layout Subsection
481 Misc.
482  options
483 \end_layout
485 \begin_layout Subsubsection
486 --run=<file> (lsnes.exe only)
487 \end_layout
489 \begin_layout Standard
490 After running main RC file, run this file.
491  If multiple are specified, these execute in order specified.
492 \end_layout
494 \begin_layout Subsection
495 dump options (lsnes-avidump.exe only)
496 \end_layout
498 \begin_layout Subsubsection
499 --prefix=<prefix>
500 \end_layout
502 \begin_layout Standard
503 Set dump prefix.
504  Default is 
505 \begin_inset Quotes eld
506 \end_inset
508 avidump
509 \begin_inset Quotes erd
510 \end_inset
513 \end_layout
515 \begin_layout Subsubsection
516 --level=<level>
517 \end_layout
519 \begin_layout Standard
520 Set compression level (0-18).
521  Default is 7.
522 \end_layout
524 \begin_layout Subsubsection
525 --length=<length>
526 \end_layout
528 \begin_layout Standard
529 Set number of frames to dump.
530  Mandatory.
531 \end_layout
533 \begin_layout Subsubsection
534 --lua=<script>
535 \end_layout
537 \begin_layout Standard
538 Run specified lua script (lsnes-avidump.exe does not have initialization
539  files).
540 \end_layout
542 \begin_layout Subsubsection
543 --jmd
544 \end_layout
546 \begin_layout Standard
547 Use JMD dumping instead of AVI dumping.
548 \end_layout
550 \begin_layout Section
551 Startup file lsnes.rc
552 \end_layout
554 \begin_layout Standard
555 Upon startup, lsnes (lsnes.exe only) executes file lsnes.rc as commands.
556  This file is located in:
557 \end_layout
559 \begin_layout Itemize
560 Windows: %APPDATA%
561 \backslash
562 lsnes
563 \backslash
564 lsnes.rc (if %APPDATA% exists)
565 \end_layout
567 \begin_layout Itemize
568 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
569 \end_layout
571 \begin_layout Itemize
572 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
573 \end_layout
575 \begin_layout Itemize
576 All: ./lsnes.rc (fallback default).
577 \end_layout
579 \begin_layout Standard
580 If leading directories do not exist, attempt to create them is made.
581 \end_layout
583 \begin_layout Section
584 Game internal commands
585 \end_layout
587 \begin_layout Itemize
588 Commands beginning with '*' invoke the corresponding command without alias
589  expansion.
590 \end_layout
592 \begin_layout Itemize
593 If command starts with '+' (after possible '*'), the command is executed
594  as-is when button is pressed, and when button is released, it is executed
595  with '+' replaced by '-'.
596 \end_layout
598 \begin_layout Subsection
599 Settings:
600 \end_layout
602 \begin_layout Standard
603 Settings control various aspects of emulator behaviour.
604 \end_layout
606 \begin_layout Subsubsection
607 set-setting <setting> <value>
608 \end_layout
610 \begin_layout Standard
611 Sets setting <setting> to value <value> (may be empty).
612 \end_layout
614 \begin_layout Subsubsection
615 unset-setting <setting>
616 \end_layout
618 \begin_layout Standard
619 Try to unset setting <setting> (not all settings can be unset).
620 \end_layout
622 \begin_layout Subsubsection
623 get-setting <setting>
624 \end_layout
626 \begin_layout Standard
627 Read value of setting <setting>
628 \end_layout
630 \begin_layout Subsubsection
631 show-settings
632 \end_layout
634 \begin_layout Standard
635 Print names and values of all settings.
636 \end_layout
638 \begin_layout Subsection
639 Keybindings
640 \end_layout
642 \begin_layout Standard
643 Keybindings bind commands or aliases to keys (or pseudo-keys).
645 \end_layout
647 \begin_layout Standard
648 Notes:
649 \end_layout
651 \begin_layout Itemize
652 Do not bind edge active (+/-) commands to keys with modifiers, that won't
653  work right!
654 \end_layout
656 \begin_layout Itemize
657 Names of keys and modifiers are platform-dependent.
658 \end_layout
660 \begin_layout Itemize
661 Be careful before binding pseudo-keys (such as joystick axes, buttons or
662  hats) with modifiers.
663  That may or may not work right.
664 \end_layout
666 \begin_layout Subsubsection
667 bind-key [<mod>/<modmask>] <key> <command>
668 \end_layout
670 \begin_layout Standard
671 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
672 ed list) are set as <mod> (comma-seperated list).
673 \end_layout
675 \begin_layout Standard
676 The names of keys and modifiers are platform-dependent.
677 \end_layout
679 \begin_layout Subsubsection
680 unbind-key [<mod>/<modmask>] <key>
681 \end_layout
683 \begin_layout Standard
684 Unbind command from <key> (with specified <mod> and <modmask>).
685 \end_layout
687 \begin_layout Subsection
688 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
689  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
690  [plus=<val>] [tolerance=<val>]
691 \end_layout
693 \begin_layout Standard
694 Set axis parameters for axis <axis>.
695 \end_layout
697 \begin_layout Itemize
698 disabled: Disable axis
699 \end_layout
701 \begin_layout Itemize
702 axis: Normal axis
703 \end_layout
705 \begin_layout Itemize
706 axis-inverse: Inverse axis
707 \end_layout
709 \begin_layout Itemize
710 pressure0-: Pressure sensitive.
711  Released at 0, pressed at -.
712 \end_layout
714 \begin_layout Itemize
715 pressure0+: Pressure sensitive.
716  Released at 0, pressed at +.
717 \end_layout
719 \begin_layout Itemize
720 pressure-0: Pressure sensitive.
721  Released at -, pressed at 0.
722 \end_layout
724 \begin_layout Itemize
725 pressure-+: Pressure sensitive.
726  Released at -, pressed at +.
727 \end_layout
729 \begin_layout Itemize
730 pressure+0: Pressure sensitive.
731  Released at +, pressed at 0.
732 \end_layout
734 \begin_layout Itemize
735 pressure+-: Pressure sensitive.
736  Released at +, pressed at -.
737 \end_layout
739 \begin_layout Itemize
740 minus=<val>: Calibration at extreme minus position (-32768-32767)
741 \end_layout
743 \begin_layout Itemize
744 zero=<val>: Calibration at neutral position (-32768-32767)
745 \end_layout
747 \begin_layout Itemize
748 plus=<val>: Calibration at extreme plus position (-32768-32767)
749 \end_layout
751 \begin_layout Itemize
752 tolerance=<value>: Center band tolerance (0<x<1).
753  The smaller the value, the more sensitive the control is.
754 \end_layout
756 \begin_layout Subsubsection
757 show-bindings
758 \end_layout
760 \begin_layout Standard
761 Print all key bindings in effect.
762 \end_layout
764 \begin_layout Subsection
765 Aliases
766 \end_layout
768 \begin_layout Standard
769 Aliases bind command to sequence of commands.
770  After alias has been defined, it replaces the command it shadows.
771 \end_layout
773 \begin_layout Standard
774 Notes:
775 \end_layout
777 \begin_layout Itemize
778 You can't alias command to itself.
779 \end_layout
781 \begin_layout Itemize
782 Aliases starting with +/- are edge active just like ordinary commands starting
783  with +/-.
784 \end_layout
786 \begin_layout Itemize
787 One command can be aliased to multiple commands.
788 \end_layout
790 \begin_layout Subsubsection
791 alias-command <command> <expansion>
792 \end_layout
794 \begin_layout Standard
795 Append <expansion> to alias <command>.
796  If alias does not already exist, it is created.
797 \end_layout
799 \begin_layout Subsubsection
800 unalias-command <command>
801 \end_layout
803 \begin_layout Standard
804 Clear alias expansion for <command>.
805 \end_layout
807 \begin_layout Subsubsection
808 show-aliases
809 \end_layout
811 \begin_layout Standard
812 Print all aliases and their expansions in effect.
813 \end_layout
815 \begin_layout Subsection
816 run-script <script>
817 \end_layout
819 \begin_layout Standard
820 Run <script> as if commands were entered on the command line.
821 \end_layout
823 \begin_layout Subsection
824 AVI Video dumping
825 \end_layout
827 \begin_layout Standard
828 Following commands control AVI video dumping:
829 \end_layout
831 \begin_layout Subsubsection
832 dump-avi <level> <prefix>
833 \end_layout
835 \begin_layout Standard
836 Dump AVI video to prefix <prefix> at level <level> (0-18).
837  Notes:
838 \end_layout
840 \begin_layout Itemize
841 The codec is Camstudio Codec in gzip mode.
842 \end_layout
844 \begin_layout Itemize
845 Encoder and muxer are internal, available on all platforms.
846 \end_layout
848 \begin_layout Itemize
849 Audio enable/disable and framerate has no effect.
850 \end_layout
852 \begin_layout Itemize
853 Levels 10-18 are not compatible with AVISource.
854 \end_layout
856 \begin_layout Itemize
857 Recomended level is 7 if decoded by AVISource.
858 \end_layout
860 \begin_layout Itemize
861 Recomended level is 16 if decoded by ffmpeg, mencoder or FFMpegSource.
862 \end_layout
864 \begin_layout Itemize
865 Dumps of low-res PAL games are 256x239 (with all the consequences odd height
866  carries).
867 \end_layout
869 \begin_layout Itemize
870 The audio dumped to .avi is low-quality version.
871  The high-quality version is dumped to .sox file.
872 \end_layout
874 \begin_layout Subsubsection
875 end-avi
876 \end_layout
878 \begin_layout Standard
879 End current AVI video dump (closing the emulator also closes the dump).
880 \end_layout
882 \begin_layout Subsection
883 JMD video dumping
884 \end_layout
886 \begin_layout Standard
887 Following commands control JMD video dumping:
888 \end_layout
890 \begin_layout Subsubsection
891 dump-jmd <level> <file>
892 \end_layout
894 \begin_layout Standard
895 Dump JMD video to file <file> at level <level> (0-9).
896 \end_layout
898 \begin_layout Subsubsection
899 end-jmd
900 \end_layout
902 \begin_layout Standard
903 End the current JMD dump in progress.
904 \end_layout
906 \begin_layout Subsection
907 Memory manipulation
908 \end_layout
910 \begin_layout Standard
911 <address> may be decimal or hexadecimal (prefixed with '0x').
912  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
913  with '-') decimal.
914 \end_layout
916 \begin_layout Standard
917 The available element <sizes> are:
918 \end_layout
920 \begin_layout Itemize
921 byte: 1 byte
922 \end_layout
924 \begin_layout Itemize
925 word: 2 bytes
926 \end_layout
928 \begin_layout Itemize
929 dword: 4 bytes
930 \end_layout
932 \begin_layout Itemize
933 qword: 8 bytes
934 \end_layout
936 \begin_layout Standard
937 When reading RAM and ROM, multi-byte reads/writes are big-endian.
938  When dealing with DSP memory, multi-byte reads/writes are native-endian
939  (do not use operand sizes exceeding DSP bitness, except dword is OK for
940  24-bit memory).
941 \end_layout
943 \begin_layout Subsubsection
944 read-<size> <address>
945 \end_layout
947 \begin_layout Standard
948 Read the value of byte in <address>.
949 \end_layout
951 \begin_layout Subsubsection
952 read-s<size> <address>
953 \end_layout
955 \begin_layout Standard
956 Read the value of signed byte in <address>.
957 \end_layout
959 \begin_layout Subsubsection
960 write-<size> <address> <value>
961 \end_layout
963 \begin_layout Standard
964 Write <value> to byte in address <address>.
965 \end_layout
967 \begin_layout Subsubsection
968 search-memory reset
969 \end_layout
971 \begin_layout Standard
972 Reset the memory search
973 \end_layout
975 \begin_layout Subsubsection
976 search-memory count
977 \end_layout
979 \begin_layout Standard
980 Print number of candidates remaining
981 \end_layout
983 \begin_layout Subsubsection
984 search-memory print
985 \end_layout
987 \begin_layout Standard
988 Print all candidates remaining
989 \end_layout
991 \begin_layout Subsubsection
992 search-memory <usflag><sizeflag><op>
993 \end_layout
995 \begin_layout Standard
996 Searches memory for addresses satisfying criteria.
997 \end_layout
999 \begin_layout Standard
1000 <usflag> can be:
1001 \end_layout
1003 \begin_layout Itemize
1004 u: unsigned
1005 \end_layout
1007 \begin_layout Itemize
1008 s: signed
1009 \end_layout
1011 \begin_layout Standard
1012 <sizeflag> can be:
1013 \end_layout
1015 \begin_layout Itemize
1016 b: byte
1017 \end_layout
1019 \begin_layout Itemize
1020 w: word
1021 \end_layout
1023 \begin_layout Itemize
1024 d: dword
1025 \end_layout
1027 \begin_layout Itemize
1028 q: qword
1029 \end_layout
1031 \begin_layout Standard
1032 <op> can be:
1033 \end_layout
1035 \begin_layout Itemize
1036 lt: < previous value.
1037 \end_layout
1039 \begin_layout Itemize
1040 le: <= previous value.
1041 \end_layout
1043 \begin_layout Itemize
1044 eq: = previous value.
1045 \end_layout
1047 \begin_layout Itemize
1048 ne: != previous value.
1049 \end_layout
1051 \begin_layout Itemize
1052 ge: >= previous value.
1053 \end_layout
1055 \begin_layout Itemize
1056 gt: > previous value.
1057 \end_layout
1059 \begin_layout Subsubsection
1060 search-memory <sizeflag> <value>
1061 \end_layout
1063 \begin_layout Standard
1064 Searches for addresses that currently have value <value>.
1065  <sizeflag> is as in previous command.
1066 \end_layout
1068 \begin_layout Subsection
1069 Main commands
1070 \end_layout
1072 \begin_layout Standard
1073 These commands are not available in lsnesrc, but are available after ROM
1074  has been loaded.
1075 \end_layout
1077 \begin_layout Subsubsection
1078 quit-emulator [/y]
1079 \end_layout
1081 \begin_layout Standard
1082 Quits the emulator (asking for confirmation).
1083  If /y is given, no confirmation is asked.
1084 \end_layout
1086 \begin_layout Subsubsection
1087 pause-emulator
1088 \end_layout
1090 \begin_layout Standard
1091 Toggle paused/unpaused
1092 \end_layout
1094 \begin_layout Subsubsection
1095 +advance-frame
1096 \end_layout
1098 \begin_layout Standard
1099 Advance frame.
1100  If the button is still held after configurable timeout expires, game unpauses
1101  for the duration frame advance is held.
1102 \end_layout
1104 \begin_layout Subsubsection
1105 +advance-poll
1106 \end_layout
1108 \begin_layout Standard
1109 Advance subframe.
1110  If the button is still held after configurable timeout expires, game unpauses
1111  for the duration frame advance is held.
1112 \end_layout
1114 \begin_layout Subsubsection
1115 advance-skiplag
1116 \end_layout
1118 \begin_layout Standard
1119 Skip to first poll in frame after current.
1120 \end_layout
1122 \begin_layout Subsubsection
1123 reset
1124 \end_layout
1126 \begin_layout Standard
1127 Reset the SNES after this frame.
1128 \end_layout
1130 \begin_layout Subsubsection
1131 load <filename>
1132 \end_layout
1134 \begin_layout Standard
1135 Load savestate <filename> in current mode.
1136 \end_layout
1138 \begin_layout Subsubsection
1139 load-state <filename>
1140 \end_layout
1142 \begin_layout Standard
1143 Load savestate <filename> in readwrite mode.
1144 \end_layout
1146 \begin_layout Subsubsection
1147 load-readonly <filename>
1148 \end_layout
1150 \begin_layout Standard
1151 Load savestate <filename> in readonly mode.
1152 \end_layout
1154 \begin_layout Subsubsection
1155 load-preserve <filename>
1156 \end_layout
1158 \begin_layout Standard
1159 Load savestate <filename> in readonly mode, preserving current events.
1160 \end_layout
1162 \begin_layout Subsubsection
1163 load-movie <filename>
1164 \end_layout
1166 \begin_layout Standard
1167 Load savestate <filename>, ignoring save part in readonly mode.
1168 \end_layout
1170 \begin_layout Subsubsection
1171 save-state <filename>
1172 \end_layout
1174 \begin_layout Standard
1175 Save system state to <filename> as soon as possible.
1176 \end_layout
1178 \begin_layout Subsubsection
1179 save-movie <filename>
1180 \end_layout
1182 \begin_layout Standard
1183 Save movie to <filename>.
1184 \end_layout
1186 \begin_layout Subsubsection
1187 set-rwmode
1188 \end_layout
1190 \begin_layout Standard
1191 Set read-write mode.
1192 \end_layout
1194 \begin_layout Subsubsection
1195 set-romode
1196 \end_layout
1198 \begin_layout Standard
1199 Set read-only mode
1200 \end_layout
1202 \begin_layout Subsubsection
1203 toggle-rwmode
1204 \end_layout
1206 \begin_layout Standard
1207 Toggle between read-only and read-write modes.
1208 \end_layout
1210 \begin_layout Subsubsection
1211 set-gamename <name>
1212 \end_layout
1214 \begin_layout Standard
1215 Set name of the game to <name>
1216 \end_layout
1218 \begin_layout Subsubsection
1219 get-gamename
1220 \end_layout
1222 \begin_layout Standard
1223 Print the name of the game.
1224 \end_layout
1226 \begin_layout Subsubsection
1227 add-author <author>
1228 \end_layout
1230 \begin_layout Standard
1231 Adds new author <author>.
1232  If <author> does not contain '|' it is full name.
1233  If it contains '|', '|' splits the full name and nickname.
1234 \end_layout
1236 \begin_layout Subsubsection
1237 edit-author <num> <author>
1238 \end_layout
1240 \begin_layout Standard
1241 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1242  format)
1243 \end_layout
1245 \begin_layout Subsubsection
1246 remove-author <num>
1247 \end_layout
1249 \begin_layout Standard
1250 Remove author in slot <num>
1251 \end_layout
1253 \begin_layout Subsubsection
1254 print-authors
1255 \end_layout
1257 \begin_layout Standard
1258 Print authors.
1259 \end_layout
1261 \begin_layout Subsubsection
1262 test-1, test-2, test-3
1263 \end_layout
1265 \begin_layout Standard
1266 Internal test commands.
1267  Don't use.
1268 \end_layout
1270 \begin_layout Subsubsection
1271 take-screenshot <filename>
1272 \end_layout
1274 \begin_layout Standard
1275 Save screenshot to <filename>.
1276 \end_layout
1278 \begin_layout Subsubsection
1279 +controller<num><button>
1280 \end_layout
1282 \begin_layout Standard
1283 Press button <button> on controller <num> (1-8).
1284  The following button names are known:
1285 \end_layout
1287 \begin_layout Itemize
1288 left
1289 \end_layout
1291 \begin_layout Itemize
1292 right
1293 \end_layout
1295 \begin_layout Itemize
1297 \end_layout
1299 \begin_layout Itemize
1300 down
1301 \end_layout
1303 \begin_layout Itemize
1305 \end_layout
1307 \begin_layout Itemize
1309 \end_layout
1311 \begin_layout Itemize
1313 \end_layout
1315 \begin_layout Itemize
1317 \end_layout
1319 \begin_layout Itemize
1321 \end_layout
1323 \begin_layout Itemize
1325 \end_layout
1327 \begin_layout Itemize
1328 select
1329 \end_layout
1331 \begin_layout Itemize
1332 start
1333 \end_layout
1335 \begin_layout Itemize
1336 trigger
1337 \end_layout
1339 \begin_layout Itemize
1340 cursor
1341 \end_layout
1343 \begin_layout Itemize
1344 pause
1345 \end_layout
1347 \begin_layout Itemize
1348 turbo
1349 \end_layout
1351 \begin_layout Subsubsection
1352 controllerh<num><button>
1353 \end_layout
1355 \begin_layout Standard
1356 Hold/unhold button <button> on controller <num> (1-8).
1357  See +controller for button names.
1358 \end_layout
1360 \begin_layout Subsubsection
1361 autofire (<pattern>|-)...
1362 \end_layout
1364 \begin_layout Standard
1365 Set autofire pattern.
1366  Each parameter is comma-separated list of button names (in form of 1start,
1367  1A, 2B, etc..) to hold on that frame.
1368  After reaching the end of pattern, the pattern restarts from the beginning.
1369 \end_layout
1371 \begin_layout Subsubsection
1372 repaint
1373 \end_layout
1375 \begin_layout Standard
1376 Force a repaint.
1377 \end_layout
1379 \begin_layout Subsection
1380 Save jukebox
1381 \end_layout
1383 \begin_layout Subsubsection
1384 cycle-jukebox-backward
1385 \end_layout
1387 \begin_layout Standard
1388 Cycle save jukebox backwards.
1389 \end_layout
1391 \begin_layout Subsubsection
1392 cycle-jukebox-forward
1393 \end_layout
1395 \begin_layout Standard
1396 Cycle save jukebox forwards
1397 \end_layout
1399 \begin_layout Subsubsection
1400 add-jukebox-save <filename>
1401 \end_layout
1403 \begin_layout Standard
1404 Add <filename> to jukebox saves.
1405 \end_layout
1407 \begin_layout Subsubsection
1408 load-jukebox
1409 \end_layout
1411 \begin_layout Standard
1412 Do load from jukebox (current mode).
1413 \end_layout
1415 \begin_layout Subsubsection
1416 save-jukebox
1417 \end_layout
1419 \begin_layout Standard
1420 Do state save to jukebox.
1421 \end_layout
1423 \begin_layout Subsection
1425 \end_layout
1427 \begin_layout Standard
1428 Only available if lua support is compiled in.
1429 \end_layout
1431 \begin_layout Subsubsection
1432 eval-lua <luacode>
1433 \end_layout
1435 \begin_layout Standard
1436 Run Lua code <luacode> using built-in Lua interpretter.
1437 \end_layout
1439 \begin_layout Subsubsection
1440 run-lua <script>
1441 \end_layout
1443 \begin_layout Standard
1444 Run specified lua file using built-in Lua interpretter.
1445 \end_layout
1447 \begin_layout Subsection
1448 Memory watch
1449 \end_layout
1451 \begin_layout Subsubsection
1452 add-watch <name> <expression>
1453 \end_layout
1455 \begin_layout Standard
1456 Adds new watch (or modifies old one).
1457 \end_layout
1459 \begin_layout Subsubsection
1460 remove-watch <name>
1461 \end_layout
1463 \begin_layout Standard
1464 Remove a watch.
1465 \end_layout
1467 \begin_layout Subsection
1468 SDL Platform commands
1469 \end_layout
1471 \begin_layout Standard
1472 The following are valid on SDL platform.
1473 \end_layout
1475 \begin_layout Subsubsection
1476 enable-sound on
1477 \end_layout
1479 \begin_layout Standard
1480 Enable sounds in GUI (has no effect on video dumping).
1481 \end_layout
1483 \begin_layout Subsubsection
1484 enable-sound off
1485 \end_layout
1487 \begin_layout Standard
1488 Disable sounds in GUI (has no effect on video dumping).
1489 \end_layout
1491 \begin_layout Subsubsection
1492 identify-key
1493 \end_layout
1495 \begin_layout Standard
1496 Asks to press a key and then identifies that (pseudo-)key.
1497 \end_layout
1499 \begin_layout Subsubsection
1500 toggle-console
1501 \end_layout
1503 \begin_layout Standard
1504 Toggle between windowed/fullscreen console.
1505 \end_layout
1507 \begin_layout Subsubsection
1508 scroll-fullup
1509 \end_layout
1511 \begin_layout Standard
1512 Scroll messages window as far back as it goes.
1513 \end_layout
1515 \begin_layout Subsubsection
1516 scroll-fulldown
1517 \end_layout
1519 \begin_layout Standard
1520 Scroll messages window as far forward as it goes.
1521 \end_layout
1523 \begin_layout Subsubsection
1524 scroll-up
1525 \end_layout
1527 \begin_layout Standard
1528 Scroll messages window back one screenful.
1529 \end_layout
1531 \begin_layout Subsubsection
1532 scroll-down
1533 \end_layout
1535 \begin_layout Standard
1536 Scroll messages window forward one screenful.
1537 \end_layout
1539 \begin_layout Section
1540 Settings
1541 \end_layout
1543 \begin_layout Subsection
1544 Core settings
1545 \end_layout
1547 \begin_layout Subsubsection
1548 firmwarepath
1549 \end_layout
1551 \begin_layout Standard
1552 Set where bsnes looks for firmware files.
1553  Default is 
1554 \begin_inset Quotes eld
1555 \end_inset
1558 \begin_inset Quotes erd
1559 \end_inset
1562 \end_layout
1564 \begin_layout Subsubsection
1565 targetfps
1566 \end_layout
1568 \begin_layout Standard
1569 Set the target fps.
1570  Numeric, range is 0.001 to 
1571 \begin_inset Quotes eld
1572 \end_inset
1574 infinite
1575 \begin_inset Quotes erd
1576 \end_inset
1579  Default is native framerate.
1580 \end_layout
1582 \begin_layout Subsubsection
1583 savecompression
1584 \end_layout
1586 \begin_layout Standard
1587 Set save compression level (integer 0-9).
1588  Default is 7 (0 is no compression).
1589 \end_layout
1591 \begin_layout Subsubsection
1592 advance-timeout
1593 \end_layout
1595 \begin_layout Standard
1596 Set the frame advance timeout in milliseconds.
1597  Numeric integer, range is 0-999999999.
1598  Default is 500.
1599 \end_layout
1601 \begin_layout Subsection
1602 AVI dumper settings
1603 \end_layout
1605 \begin_layout Subsubsection
1606 avi-large
1607 \end_layout
1609 \begin_layout Standard
1610 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1611  outputs.
1612 \end_layout
1614 \begin_layout Subsubsection
1615 avi-left-border
1616 \end_layout
1618 \begin_layout Standard
1619 AVI dumper: Set the default left border thickness (unless lua overrides)
1620  for dumps.
1621  Range 0-8191.
1622  Default is 0.
1623 \end_layout
1625 \begin_layout Subsubsection
1626 avi-right-border
1627 \end_layout
1629 \begin_layout Standard
1630 AVI dumper: Set the default right border thickness (unless lua overrides)
1631  for dumps.
1632  Range 0-8191.
1633  Default is 0.
1634 \end_layout
1636 \begin_layout Subsubsection
1637 avi-top-border
1638 \end_layout
1640 \begin_layout Standard
1641 AVI dumper: Set the default top border thickness (unless lua overrides)
1642  for dumps.
1643  Range 0-8191.
1644  Default is 0.
1645 \end_layout
1647 \begin_layout Subsubsection
1648 avi-bottom-border
1649 \end_layout
1651 \begin_layout Standard
1652 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1653  for dumps.
1654  Range 0-8191.
1655  Default is 0.
1656 \end_layout
1658 \begin_layout Subsubsection
1659 avi-maxframes
1660 \end_layout
1662 \begin_layout Standard
1663 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1664  Range 0-999999999.
1665  Default is 0.
1666 \end_layout
1668 \begin_layout Subsection
1669 SDL platform settings
1670 \end_layout
1672 \begin_layout Subsubsection
1673 autorepeat-first-delay
1674 \end_layout
1676 \begin_layout Standard
1677 Sets the delay for first character in typematic autorepeat.
1678 \end_layout
1680 \begin_layout Subsubsection
1681 autorepeat-subsequent-delay
1682 \end_layout
1684 \begin_layout Standard
1685 Sets the delay for subsequent characters in typematic autorepeat.
1686 \end_layout
1688 \begin_layout Section
1689 Lua functions
1690 \end_layout
1692 \begin_layout Subsection
1693 Core (in main table)
1694 \end_layout
1696 \begin_layout Subsubsection
1697 print
1698 \end_layout
1700 \begin_layout Standard
1701 Print line to message console.
1702 \end_layout
1704 \begin_layout Subsubsection
1705 exec(string command)
1706 \end_layout
1708 \begin_layout Standard
1709 Run command as it was entered on the command line
1710 \end_layout
1712 \begin_layout Subsection
1713 Table bit:
1714 \end_layout
1716 \begin_layout Standard
1717 Bitwise logical functions and related.
1718 \end_layout
1720 \begin_layout Subsubsection
1721 none(number...) / bnot(number...)
1722 \end_layout
1724 \begin_layout Standard
1725 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1726  arguments).
1727 \end_layout
1729 \begin_layout Subsubsection
1730 any(number...) / bor(number...)
1731 \end_layout
1733 \begin_layout Standard
1734 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1735 \end_layout
1737 \begin_layout Subsubsection
1738 all(number...) / band(number...)
1739 \end_layout
1741 \begin_layout Standard
1742 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1744 \end_layout
1746 \begin_layout Subsubsection
1747 parity(number...) / bxor(number...)
1748 \end_layout
1750 \begin_layout Standard
1751 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1752  of the arguments).
1753 \end_layout
1755 \begin_layout Subsubsection
1756 lrotate(number base[, number amount[, number bits]])
1757 \end_layout
1759 \begin_layout Standard
1760 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1761 \end_layout
1763 \begin_layout Subsubsection
1764 rrotate(number base[, number amount[, number bits]])
1765 \end_layout
1767 \begin_layout Standard
1768 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1769  places.
1770 \end_layout
1772 \begin_layout Subsubsection
1773 lshift(number base[, number amount[, number bits]])
1774 \end_layout
1776 \begin_layout Standard
1777 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1778  The new bits are filled with zeroes.
1779 \end_layout
1781 \begin_layout Subsubsection
1782 lrshift(number base[, number amount[, number bits]])
1783 \end_layout
1785 \begin_layout Standard
1786 Shift bits-bit (max 48, default 48) number logically right by amount (default
1787  1) places.
1788  The new bits are filled with zeroes.
1789 \end_layout
1791 \begin_layout Subsubsection
1792 arshift(number base[, number amount[, number bits]])
1793 \end_layout
1795 \begin_layout Standard
1796 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1797  (default 1) places.
1798  The new bits are shifted in with copy of the high bit.
1799 \end_layout
1801 \begin_layout Subsection
1802 Table gui:
1803 \end_layout
1805 \begin_layout Standard
1806 Most of these functions can only be called in on_paint and on_video callbacks.
1807  Exceptions are noted.
1808 \end_layout
1810 \begin_layout Standard
1811 Colors are 32-bit.
1812  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1813  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1814  opaque, 255 is almost transparent).
1815  -1 is the fully transparent color.
1816  Alpha values greater than 127 do work.
1817 \end_layout
1819 \begin_layout Standard
1820 Origin of coordinates is at top left corner of game display area.
1821  Left and top gaps correspond to negative coordinates.
1822 \end_layout
1824 \begin_layout Subsubsection
1825 gui.resolution()
1826 \end_layout
1828 \begin_layout Standard
1829 Returns 2-tuple (hresolution, vresolution).
1830 \end_layout
1832 \begin_layout Subsubsection
1833 gui.<class>_gap(number gap)
1834 \end_layout
1836 \begin_layout Standard
1837 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1838  is 8191).
1839 \end_layout
1841 \begin_layout Subsubsection
1842 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1843 \end_layout
1845 \begin_layout Standard
1846 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1847  16 high).
1848  Parameters:
1849 \end_layout
1851 \begin_layout Itemize
1852 x: X-coordinate to start the drawing from (and x-coordinate at begining
1853  of the lines).
1854 \end_layout
1856 \begin_layout Itemize
1857 y: Y-coordinate to start the drawing from.
1858 \end_layout
1860 \begin_layout Itemize
1861 text: The text to draw.
1862 \end_layout
1864 \begin_layout Itemize
1865 fgc: Text color (default is 0xFFFFFF (white))
1866 \end_layout
1868 \begin_layout Itemize
1869 bgc: Background color (default is -1 (transparent))
1870 \end_layout
1872 \begin_layout Subsubsection
1873 gui.rectangle(number x, number y, number width, number height[, number thickness[
1874 , number outline[, number fill]]])
1875 \end_layout
1877 \begin_layout Standard
1878 Draw rectangle on the GUI.
1879  Parameters:
1880 \end_layout
1882 \begin_layout Itemize
1883 x: X-coordinate of left edge.
1884 \end_layout
1886 \begin_layout Itemize
1887 y: Y-coordinate of upper edge.
1888 \end_layout
1890 \begin_layout Itemize
1891 width: Width of rectangle.
1892 \end_layout
1894 \begin_layout Itemize
1895 height: Height of rectangle.
1896 \end_layout
1898 \begin_layout Itemize
1899 thickness: Thickness of outline (default is 1).
1900 \end_layout
1902 \begin_layout Itemize
1903 outline: Color of outline (default is 0xFFFFFF (white))
1904 \end_layout
1906 \begin_layout Itemize
1907 fill: Color of fil (default is -1 (transparent))
1908 \end_layout
1910 \begin_layout Subsubsection
1911 gui.pixel(number x, number y[, number color])
1912 \end_layout
1914 \begin_layout Standard
1915 Draw one pixel on the GUI.
1916  Parameters:
1917 \end_layout
1919 \begin_layout Itemize
1920 x: X-coordinate of the pixel
1921 \end_layout
1923 \begin_layout Itemize
1924 y: Y-coordinate of the pixel
1925 \end_layout
1927 \begin_layout Itemize
1928 color: Color of the pixel (default is 0xFFFFFF (white))
1929 \end_layout
1931 \begin_layout Subsubsection
1932 gui.crosshair(number x, number y[, number length[, number color]])
1933 \end_layout
1935 \begin_layout Standard
1936 Draw a crosshair.
1937  Parameters:
1938 \end_layout
1940 \begin_layout Itemize
1941 x: X-coordinate of the crosshair
1942 \end_layout
1944 \begin_layout Itemize
1945 y: Y-coordinate of the crosshair
1946 \end_layout
1948 \begin_layout Itemize
1949 length: Length of the crosshair lines (default 10).
1950 \end_layout
1952 \begin_layout Itemize
1953 color: Color of the crosshair (default is 0xFFFFFF (white))
1954 \end_layout
1956 \begin_layout Subsubsection
1957 gui.line(number x1, number y1, number x2, number y2[, number color])
1958 \end_layout
1960 \begin_layout Standard
1961 Draw a thin line.
1962  Parameters:
1963 \end_layout
1965 \begin_layout Itemize
1966 x1: X-coordinate of one end.
1967 \end_layout
1969 \begin_layout Itemize
1970 y1: Y-coordinate of one end.
1971 \end_layout
1973 \begin_layout Itemize
1974 x2: X-coordinate of the other end.
1975 \end_layout
1977 \begin_layout Itemize
1978 y2: Y-coordinate of the other end.
1979 \end_layout
1981 \begin_layout Itemize
1982 color: Color of the line (default is 0xFFFFFF (white)).
1983 \end_layout
1985 \begin_layout Subsubsection
1986 gui.circle(number x, number y, number r[, number thick[, number border[,
1987  number fil]]])
1988 \end_layout
1990 \begin_layout Standard
1991 Draw a circle.
1992  Parameters.
1993 \end_layout
1995 \begin_layout Itemize
1996 x: X-coordinate of the center
1997 \end_layout
1999 \begin_layout Itemize
2000 y: Y-coordinate of the center
2001 \end_layout
2003 \begin_layout Itemize
2004 r: The radius of the circle
2005 \end_layout
2007 \begin_layout Itemize
2008 thick: Border thickness
2009 \end_layout
2011 \begin_layout Itemize
2012 border: Border color (default is 0xFFFFFF (white))
2013 \end_layout
2015 \begin_layout Itemize
2016 fill: Fill color (default is -1 (transparent)).
2017 \end_layout
2019 \begin_layout Subsubsection
2020 gui.repaint()
2021 \end_layout
2023 \begin_layout Standard
2024 Request on_repaint() to happen as soon as possible.
2025  Can be used anywhere.
2026 \end_layout
2028 \begin_layout Subsubsection
2029 gui.subframe_update(boolean on)
2030 \end_layout
2032 \begin_layout Standard
2033 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2034  or not happen (on=false).
2035  Can be used anywhere.
2036 \end_layout
2038 \begin_layout Subsubsection
2039 gui.screenshot(string filename)
2040 \end_layout
2042 \begin_layout Standard
2043 Write PNG screenshot of the current frame (no drawings) to specified file.
2044  Can be used anywhere.
2045 \end_layout
2047 \begin_layout Subsubsection
2048 gui.color(number r, number g, number b[, number a])
2049 \end_layout
2051 \begin_layout Standard
2052 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2053  each component in scale 0-255.
2054  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2055  opaque).
2056  The default alpha is 256.
2057 \end_layout
2059 \begin_layout Subsubsection
2060 gui.status(string name, string value)
2061 \end_layout
2063 \begin_layout Standard
2064 Set status field 
2065 \begin_inset Quotes eld
2066 \end_inset
2068 L[<name>]
2069 \begin_inset Quotes erd
2070 \end_inset
2072  to <value> in status area.
2073  Can be used anywhere.
2074 \end_layout
2076 \begin_layout Subsection
2077 table input
2078 \end_layout
2080 \begin_layout Standard
2081 Input handling.
2082  Only available in on_input callback.
2083 \end_layout
2085 \begin_layout Subsection
2086 get(number controller, number index)
2087 \end_layout
2089 \begin_layout Standard
2090 Read the specified index (0-11) from specified controller (0-7).
2091  Notes:
2092 \end_layout
2094 \begin_layout Itemize
2095 Uses physical controller numbering.
2096  Gamepad in port 2 is controller 4, not 1!
2097 \end_layout
2099 \begin_layout Subsection
2100 set(number controller, number index, number value)
2101 \end_layout
2103 \begin_layout Standard
2104 Write the specified index (0-11) from specified controller (0-7), storing
2105  value.
2106  Notes:
2107 \end_layout
2109 \begin_layout Itemize
2110 Uses physical controller numbering.
2111  Gamepad in port 2 is controller 4, not 1!
2112 \end_layout
2114 \begin_layout Subsection
2115 reset([number cycles])
2116 \end_layout
2118 \begin_layout Standard
2119 Execute reset.
2120  If cycles is greater than zero, do delayed reset.
2121  0 (or no value) causes immediate reset.
2122 \end_layout
2124 \begin_layout Itemize
2125 Only available with subframe flag false.
2126 \end_layout
2128 \begin_layout Subsection
2129 Table hostmemory
2130 \end_layout
2132 \begin_layout Standard
2133 Host memory handling (extra memory saved to savestates).
2134  Host memory starts empty.
2135 \end_layout
2137 \begin_layout Subsubsection
2138 read(number address)
2139 \end_layout
2141 \begin_layout Standard
2142 Reads hostmemory slot address.
2143  Slot numbers out of range return false instead of numeric.
2144 \end_layout
2146 \begin_layout Subsubsection
2147 write(number address, number value)
2148 \end_layout
2150 \begin_layout Standard
2151 Writes hostmemory slot with 0-255.
2152  Slot numbers out of range cause extension of host memory slot space.
2153 \end_layout
2155 \begin_layout Subsubsection
2156 readbyte(number address)
2157 \end_layout
2159 \begin_layout Standard
2160 Read unsigned byte (1 element) from given address.
2161  Slots out of range return false.
2162 \end_layout
2164 \begin_layout Subsubsection
2165 writebyte(number address, number value)
2166 \end_layout
2168 \begin_layout Standard
2169 Write unsigned byte (1 element) to given slot.
2170  Slot numbers out of range cause extension.
2171 \end_layout
2173 \begin_layout Subsubsection
2174 readsbyte(number address)
2175 \end_layout
2177 \begin_layout Standard
2178 Read signed byte (1 element) from given address.
2179  Slots out of range return false.
2180 \end_layout
2182 \begin_layout Subsubsection
2183 writesbyte(number address, number value)
2184 \end_layout
2186 \begin_layout Standard
2187 Write signed byte (1 element) to given slot.
2188  Slot numbers out of range cause extension.
2189 \end_layout
2191 \begin_layout Subsubsection
2192 readword(number address)
2193 \end_layout
2195 \begin_layout Standard
2196 Read unsigned word (2 elements) from given address.
2197  Slots out of range return false.
2198 \end_layout
2200 \begin_layout Subsubsection
2201 writeword(number address, number value)
2202 \end_layout
2204 \begin_layout Standard
2205 Write unsigned word (2 elements) to given slot.
2206  Slot numbers out of range cause extension.
2207 \end_layout
2209 \begin_layout Subsubsection
2210 readsword(number address)
2211 \end_layout
2213 \begin_layout Standard
2214 Read signed word (2 elements) from given address.
2215  Slots out of range return false.
2216 \end_layout
2218 \begin_layout Subsubsection
2219 writesword(number address, number value)
2220 \end_layout
2222 \begin_layout Standard
2223 Write signed word (2 elements) to given slot.
2224  Slot numbers out of range cause extension.
2225 \end_layout
2227 \begin_layout Subsubsection
2228 readdword(number address)
2229 \end_layout
2231 \begin_layout Standard
2232 Read unsigned doubleword (4 elements) from given address.
2233  Slots out of range return false.
2234 \end_layout
2236 \begin_layout Subsubsection
2237 writedword(number address, number value)
2238 \end_layout
2240 \begin_layout Standard
2241 Write unsigned doubleword (4 elements) to given slot.
2242  Slot numbers out of range cause extension.
2243 \end_layout
2245 \begin_layout Subsubsection
2246 readsdword(number address)
2247 \end_layout
2249 \begin_layout Standard
2250 Read signed doubleword (4 elements) from given address.
2251  Slots out of range return false.
2252 \end_layout
2254 \begin_layout Subsubsection
2255 writesdword(number address, number value)
2256 \end_layout
2258 \begin_layout Standard
2259 Write signed doubleword (4 elements) to given slot.
2260  Slot numbers out of range cause extension.
2261 \end_layout
2263 \begin_layout Subsubsection
2264 readqword(number address)
2265 \end_layout
2267 \begin_layout Standard
2268 Read unsigned quadword (8 elements) from given address.
2269  Slots out of range return false.
2270 \end_layout
2272 \begin_layout Subsubsection
2273 writeqword(number address, number value)
2274 \end_layout
2276 \begin_layout Standard
2277 Write unsigned quadword (4 elements) to given slot.
2278  Slot numbers out of range cause extension.
2279 \end_layout
2281 \begin_layout Subsubsection
2282 readsqword(number address)
2283 \end_layout
2285 \begin_layout Standard
2286 Read signed quadword (8 elements) from given address.
2287  Slots out of range return false.
2288 \end_layout
2290 \begin_layout Subsubsection
2291 writesqword(number address, number value)
2292 \end_layout
2294 \begin_layout Standard
2295 Write signed quadword (8 elements) to given slot.
2296  Slot numbers out of range cause extension.
2297 \end_layout
2299 \begin_layout Subsection
2300 Table movie
2301 \end_layout
2303 \begin_layout Standard
2304 Movie handling
2305 \end_layout
2307 \begin_layout Subsubsection
2308 movie.currentframe()
2309 \end_layout
2311 \begin_layout Standard
2312 Return number of current frame.
2313 \end_layout
2315 \begin_layout Subsubsection
2316 movie.framecount()
2317 \end_layout
2319 \begin_layout Standard
2320 Return number of frames in movie.
2321 \end_layout
2323 \begin_layout Subsubsection
2324 movie.readonly()
2325 \end_layout
2327 \begin_layout Standard
2328 Return true if in readonly mode, false if in readwrite.
2329 \end_layout
2331 \begin_layout Subsubsection
2332 movie.set_readwrite()
2333 \end_layout
2335 \begin_layout Standard
2336 Set readwrite mode (does not cause on_readwrite callback).
2337 \end_layout
2339 \begin_layout Subsubsection
2340 movie.frame_subframes(number frame)
2341 \end_layout
2343 \begin_layout Standard
2344 Count number of subframes in specified frame (frame numbers are 1-based)
2345  and return that.
2346 \end_layout
2348 \begin_layout Subsubsection
2349 movie.read_subframe(number frame, number subframe)
2350 \end_layout
2352 \begin_layout Standard
2353 Read specifed subframe in specified frame and return data as array (100
2354  elements, numbered 0-99 currently).
2355 \end_layout
2357 \begin_layout Subsection
2358 Table settings
2359 \end_layout
2361 \begin_layout Standard
2362 Routines for settings manipulation
2363 \end_layout
2365 \begin_layout Subsubsection
2366 get(string name)
2367 \end_layout
2369 \begin_layout Standard
2370 Get value of setting.
2371  If setting is blank, returns false.
2372  If setting value can't be obtained, returns (nil, error message).
2373 \end_layout
2375 \begin_layout Subsubsection
2376 set(string name, string value)
2377 \end_layout
2379 \begin_layout Standard
2380 Set value of setting.
2381  If setting can't be set, returns (nil, error message).
2382 \end_layout
2384 \begin_layout Subsubsection
2385 is_set(string name)
2386 \end_layout
2388 \begin_layout Standard
2389 Returns if setting is set.
2390  If setting does not exist, returns (nil, error message).
2391 \end_layout
2393 \begin_layout Subsubsection
2394 blank(string name)
2395 \end_layout
2397 \begin_layout Standard
2398 Blanks a setting and returns true.
2399  If setting can't be blanked, returns (nil, error message).
2400 \end_layout
2402 \begin_layout Subsection
2403 Callbacks
2404 \end_layout
2406 \begin_layout Standard
2407 Various callbacks to Lua that can occur.
2408 \end_layout
2410 \begin_layout Subsubsection
2411 Callback: on_paint()
2412 \end_layout
2414 \begin_layout Standard
2415 Called when screen is being painted.
2416  Any gui.* calls requiring graphic context draw on the screen.
2417 \end_layout
2419 \begin_layout Subsubsection
2420 Callback: on_video()
2421 \end_layout
2423 \begin_layout Standard
2424 Called when video dump frame is being painted.
2425  Any gui.* calls requiring graphic context draw on the video.
2426 \end_layout
2428 \begin_layout Subsubsection
2429 Callback: on_startup()
2430 \end_layout
2432 \begin_layout Standard
2433 Called when the emulator is starting (lsnes.rc and --run files has been run).
2434 \end_layout
2436 \begin_layout Subsubsection
2437 Callback: on_pre_load(string name)
2438 \end_layout
2440 \begin_layout Standard
2441 Called just before savestate/movie load occurs (note: loads are always delayed,
2442  so this occurs even when load was initiated by lua).
2443 \end_layout
2445 \begin_layout Subsubsection
2446 Callback: on_err_load(string name)
2447 \end_layout
2449 \begin_layout Standard
2450 Called if loadstate goes wrong.
2451 \end_layout
2453 \begin_layout Subsubsection
2454 Callback: on_post_load(string name, boolean was_savestate)
2455 \end_layout
2457 \begin_layout Standard
2458 Called on successful loadstate.
2459  was_savestate gives if this was a savestate or a movie.
2460 \end_layout
2462 \begin_layout Subsubsection
2463 Callback: on_pre_save(string name, boolean is_savestate)
2464 \end_layout
2466 \begin_layout Standard
2467 Called just before savestate save occurs (note: movie saves are synchronous
2468  and won't trigger these callbacks if called from Lua).
2469 \end_layout
2471 \begin_layout Subsubsection
2472 Callback: on_err_save(string name)
2473 \end_layout
2475 \begin_layout Standard
2476 Called if savestate goes wrong.
2477 \end_layout
2479 \begin_layout Subsubsection
2480 Callback: on_post_save(string name, boolean is_savestate)
2481 \end_layout
2483 \begin_layout Standard
2484 Called on successful savaestate.
2485  is_savestate gives if this was a savestate or a movie.
2486 \end_layout
2488 \begin_layout Subsubsection
2489 Callback: on_quit()
2490 \end_layout
2492 \begin_layout Standard
2493 Called when emulator is shutting down.
2494 \end_layout
2496 \begin_layout Subsubsection
2497 Callback: on_input(boolean subframe)
2498 \end_layout
2500 \begin_layout Standard
2501 Called when emulator is just sending input to bsnes core.
2502  Warning: This is called even in readonly mode, but the results are ignored.
2503 \end_layout
2505 \begin_layout Subsubsection
2506 Callback: on_reset()
2507 \end_layout
2509 \begin_layout Standard
2510 Called when SNES is reset.
2511 \end_layout
2513 \begin_layout Subsubsection
2514 Callback: on_readwrite()
2515 \end_layout
2517 \begin_layout Standard
2518 Called when moving into readwrite mode as result of 
2519 \begin_inset Quotes eld
2520 \end_inset
2522 set-rwmode
2523 \begin_inset Quotes erd
2524 \end_inset
2526  command (note: moving to rwmode by Lua won't trigger this, as per recursive
2527  entry protection).
2528 \end_layout
2530 \begin_layout Subsubsection
2531 Callback: on_snoop(number port, number controller, number index, number
2532  value)
2533 \end_layout
2535 \begin_layout Standard
2536 Called each time bsnes asks for input.
2537  The value is the final value to be sent to bsnes core (readonly mode, autohold
2538  and autofire have been taken into account).
2539  Might be useful when translating movies to format suitable for console
2540  verification.
2541  Note: There is no way to modify the value to be sent.
2542 \end_layout
2544 \begin_layout Section
2545 Modifier and key names:
2546 \end_layout
2548 \begin_layout Subsection
2549 SDL Platform
2550 \end_layout
2552 \begin_layout Subsubsection
2553 Modifier names
2554 \end_layout
2556 \begin_layout Standard
2557 Following modifier names are known:
2558 \end_layout
2560 \begin_layout Itemize
2561 ctrl, lctrl, rctrl: Control keys
2562 \end_layout
2564 \begin_layout Itemize
2565 alt, lalt, ralt: ALT keys.
2566 \end_layout
2568 \begin_layout Itemize
2569 shift, lshift, rshift: Shift keys.
2570 \end_layout
2572 \begin_layout Itemize
2573 meta, lmeta, rmeta: Meta keys.
2574 \end_layout
2576 \begin_layout Itemize
2577 num, caps: Numlock/Capslock (these are sticky!)
2578 \end_layout
2580 \begin_layout Itemize
2581 mode: Mode select.
2582 \end_layout
2584 \begin_layout Subsubsection
2585 Key names
2586 \end_layout
2588 \begin_layout Standard
2589 Following key names are known:
2590 \end_layout
2592 \begin_layout Itemize
2593 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
2594  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
2595  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
2596  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
2597  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
2598  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
2599  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
2600  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
2601  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
2602  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
2603  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
2604  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
2605  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
2606  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
2607  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
2608  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
2609  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
2610  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
2611  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
2612  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
2613  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
2614  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
2615  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
2616  break, menu, power, euro, undo
2617 \end_layout
2619 \begin_layout Itemize
2620 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
2621  hardware-dependent scan code of <n> (useful to bind those keys that don't
2622  have symbolic names).
2623 \end_layout
2625 \begin_layout Standard
2626 In addition, following pseudo-keys are known (note: these do not work in
2627  conjunction with modifers):
2628 \end_layout
2630 \begin_layout Itemize
2631 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
2632 \end_layout
2634 \begin_layout Itemize
2635 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
2636 \end_layout
2638 \begin_layout Itemize
2639 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
2640 \end_layout
2642 \begin_layout Itemize
2643 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
2644 \end_layout
2646 \begin_layout Itemize
2647 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
2648 \end_layout
2650 \begin_layout Itemize
2651 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
2652  position (axis modes axis and axis_inverse).
2653 \end_layout
2655 \begin_layout Itemize
2656 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
2657  position (axis modes axis and axis_inverse).
2658 \end_layout
2660 \begin_layout Itemize
2661 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
2662  modes pressure_*).
2663 \end_layout
2665 \begin_layout Subsubsection
2666 Special buttons:
2667 \end_layout
2669 \begin_layout Itemize
2670 Escape: Enter/Exit Command mode, cancel modal dialogs.
2671 \end_layout
2673 \begin_layout Itemize
2674 Return (also KPEnter): Execute command, ok modal dialog.
2675 \end_layout
2677 \begin_layout Itemize
2678 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
2679  history
2680 \end_layout
2682 \begin_layout Itemize
2683 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
2684  history
2685 \end_layout
2687 \begin_layout Itemize
2688 Home (also KP7 if no num lock; command mode): Beginning of command.
2689 \end_layout
2691 \begin_layout Itemize
2692 End (also KP1 if no num lock; command mode): End of command.
2693 \end_layout
2695 \begin_layout Itemize
2696 Left (also KP4 if no num lock; command mode): Move cursor left.
2697 \end_layout
2699 \begin_layout Itemize
2700 Right (also KP6 if no num lock; command mode): Move cursor right.
2701 \end_layout
2703 \begin_layout Itemize
2704 Delete (also KP.
2705  if no num lock; command mode): Delete character to right of cursor.
2706 \end_layout
2708 \begin_layout Itemize
2709 Insert (also KP0 if no num lock; command mode): Toggle between insert /
2710  overwrite modes.
2711 \end_layout
2713 \begin_layout Itemize
2714 Backspace (command mode): Delete character to left of cursor.
2715 \end_layout
2717 \begin_layout Itemize
2718 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
2719 \end_layout
2721 \begin_layout Subsubsection
2722 Watchdog timer:
2723 \end_layout
2725 \begin_layout Standard
2726 If emulator does not reach internal polling loop in 15 seconds after leaving
2727  it or 15 seconds after starting, the emulator instantly bombs out.
2728 \end_layout
2730 \begin_layout Section
2731 Movie file format
2732 \end_layout
2734 \begin_layout Standard
2735 Movie file is .zip archive in itself, normal ZIP archive tools work on it
2736  (note: If you recompress it, do not use compression methods other than
2737  store and deflate and especially do not use encryption of any kind).
2738 \end_layout
2740 \begin_layout Subsection
2741 Detecting clean start/SRAM/Savestate
2742 \end_layout
2744 \begin_layout Itemize
2745 If file has member 
2746 \begin_inset Quotes eld
2747 \end_inset
2749 savestate
2750 \begin_inset Quotes erd
2751 \end_inset
2753  it is savestate, otherwise:
2754 \end_layout
2756 \begin_layout Itemize
2757 If file has members with names starting 
2758 \begin_inset Quotes eld
2759 \end_inset
2761 moviesram.
2762 \begin_inset Quotes erd
2763 \end_inset
2765  it is movie starting from SRAM, otherwise:
2766 \end_layout
2768 \begin_layout Itemize
2769 It is movie starting from clear state.
2770 \end_layout
2772 \begin_layout Subsection
2773 Member: gametype
2774 \end_layout
2776 \begin_layout Standard
2777 Type of game ROM and region (as one line).
2778  Valid values are:
2779 \end_layout
2781 \begin_layout Standard
2782 \begin_inset Tabular
2783 <lyxtabular version="3" rows="8" columns="3">
2784 <features tabularvalignment="middle">
2785 <column alignment="center" valignment="top" width="0">
2786 <column alignment="center" valignment="top" width="0">
2787 <column alignment="center" valignment="top" width="0">
2788 <row>
2789 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2790 \begin_inset Text
2792 \begin_layout Plain Layout
2793 Value
2794 \end_layout
2796 \end_inset
2797 </cell>
2798 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2799 \begin_inset Text
2801 \begin_layout Plain Layout
2802 System
2803 \end_layout
2805 \end_inset
2806 </cell>
2807 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2808 \begin_inset Text
2810 \begin_layout Plain Layout
2811 Region
2812 \end_layout
2814 \end_inset
2815 </cell>
2816 </row>
2817 <row>
2818 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2819 \begin_inset Text
2821 \begin_layout Plain Layout
2822 snes_pal
2823 \end_layout
2825 \end_inset
2826 </cell>
2827 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2828 \begin_inset Text
2830 \begin_layout Plain Layout
2831 Super NES
2832 \end_layout
2834 \end_inset
2835 </cell>
2836 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2837 \begin_inset Text
2839 \begin_layout Plain Layout
2841 \end_layout
2843 \end_inset
2844 </cell>
2845 </row>
2846 <row>
2847 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2848 \begin_inset Text
2850 \begin_layout Plain Layout
2851 sgb_pal
2852 \end_layout
2854 \end_inset
2855 </cell>
2856 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2857 \begin_inset Text
2859 \begin_layout Plain Layout
2860 Super Game Boy
2861 \end_layout
2863 \end_inset
2864 </cell>
2865 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2866 \begin_inset Text
2868 \begin_layout Plain Layout
2870 \end_layout
2872 \end_inset
2873 </cell>
2874 </row>
2875 <row>
2876 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2877 \begin_inset Text
2879 \begin_layout Plain Layout
2880 snes_ntsc
2881 \end_layout
2883 \end_inset
2884 </cell>
2885 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2886 \begin_inset Text
2888 \begin_layout Plain Layout
2889 Super NES
2890 \end_layout
2892 \end_inset
2893 </cell>
2894 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2895 \begin_inset Text
2897 \begin_layout Plain Layout
2898 NTSC
2899 \end_layout
2901 \end_inset
2902 </cell>
2903 </row>
2904 <row>
2905 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2906 \begin_inset Text
2908 \begin_layout Plain Layout
2909 sgb_ntsc
2910 \end_layout
2912 \end_inset
2913 </cell>
2914 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2915 \begin_inset Text
2917 \begin_layout Plain Layout
2918 Super Game Boy
2919 \end_layout
2921 \end_inset
2922 </cell>
2923 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2924 \begin_inset Text
2926 \begin_layout Plain Layout
2927 NTSC
2928 \end_layout
2930 \end_inset
2931 </cell>
2932 </row>
2933 <row>
2934 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2935 \begin_inset Text
2937 \begin_layout Plain Layout
2939 \end_layout
2941 \end_inset
2942 </cell>
2943 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2944 \begin_inset Text
2946 \begin_layout Plain Layout
2947 BS-X (non-slotted)
2948 \end_layout
2950 \end_inset
2951 </cell>
2952 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2953 \begin_inset Text
2955 \begin_layout Plain Layout
2956 NTSC
2957 \end_layout
2959 \end_inset
2960 </cell>
2961 </row>
2962 <row>
2963 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2964 \begin_inset Text
2966 \begin_layout Plain Layout
2967 bsxslotted
2968 \end_layout
2970 \end_inset
2971 </cell>
2972 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2973 \begin_inset Text
2975 \begin_layout Plain Layout
2976 BS-X (slotted)
2977 \end_layout
2979 \end_inset
2980 </cell>
2981 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2982 \begin_inset Text
2984 \begin_layout Plain Layout
2985 NTSC
2986 \end_layout
2988 \end_inset
2989 </cell>
2990 </row>
2991 <row>
2992 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2993 \begin_inset Text
2995 \begin_layout Plain Layout
2996 sufamiturbo
2997 \end_layout
2999 \end_inset
3000 </cell>
3001 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3002 \begin_inset Text
3004 \begin_layout Plain Layout
3005 Sufami Turbo
3006 \end_layout
3008 \end_inset
3009 </cell>
3010 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3011 \begin_inset Text
3013 \begin_layout Plain Layout
3014 NTSC
3015 \end_layout
3017 \end_inset
3018 </cell>
3019 </row>
3020 </lyxtabular>
3022 \end_inset
3025 \end_layout
3027 \begin_layout Standard
3028 Frame rates are:
3029 \end_layout
3031 \begin_layout Standard
3032 \begin_inset Tabular
3033 <lyxtabular version="3" rows="3" columns="2">
3034 <features tabularvalignment="middle">
3035 <column alignment="center" valignment="top" width="0">
3036 <column alignment="center" valignment="top" width="0">
3037 <row>
3038 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3039 \begin_inset Text
3041 \begin_layout Plain Layout
3042 Region
3043 \end_layout
3045 \end_inset
3046 </cell>
3047 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3048 \begin_inset Text
3050 \begin_layout Plain Layout
3051 Framerate (fps)
3052 \end_layout
3054 \end_inset
3055 </cell>
3056 </row>
3057 <row>
3058 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3059 \begin_inset Text
3061 \begin_layout Plain Layout
3063 \end_layout
3065 \end_inset
3066 </cell>
3067 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3068 \begin_inset Text
3070 \begin_layout Plain Layout
3071 322445/6448
3072 \end_layout
3074 \end_inset
3075 </cell>
3076 </row>
3077 <row>
3078 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3079 \begin_inset Text
3081 \begin_layout Plain Layout
3082 NTSC
3083 \end_layout
3085 \end_inset
3086 </cell>
3087 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3088 \begin_inset Text
3090 \begin_layout Plain Layout
3091 10738636/178683
3092 \end_layout
3094 \end_inset
3095 </cell>
3096 </row>
3097 </lyxtabular>
3099 \end_inset
3102 \end_layout
3104 \begin_layout Subsection
3105 Member: port1
3106 \end_layout
3108 \begin_layout Standard
3109 Contains type of port #1 (as one line).
3110  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3111  If not present, defaults to 'gamepad'.
3112 \end_layout
3114 \begin_layout Subsection
3115 Member: port2
3116 \end_layout
3118 \begin_layout Standard
3119 Contains type of port #2 (as one line).
3120  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3121  'justifier' and 'justifiers'.
3122  If not present, defaults to 'none'.
3123 \end_layout
3125 \begin_layout Subsection
3126 Member: gamename
3127 \end_layout
3129 \begin_layout Standard
3130 Contains name of the game (as one line).
3131 \end_layout
3133 \begin_layout Subsection
3134 Member: authors
3135 \end_layout
3137 \begin_layout Standard
3138 Contains authors, one per line.
3139  Part before '|' is the full name, part after is the nickname.
3140 \end_layout
3142 \begin_layout Subsection
3143 Member: systemid
3144 \end_layout
3146 \begin_layout Standard
3147 Always 
3148 \begin_inset Quotes eld
3149 \end_inset
3151 lsnes-rr1
3152 \begin_inset Quotes erd
3153 \end_inset
3155  (one line).
3156  Used to reject other saves.
3157 \end_layout
3159 \begin_layout Subsection
3160 Member: controlsversion
3161 \end_layout
3163 \begin_layout Standard
3164 Always 
3165 \begin_inset Quotes eld
3166 \end_inset
3169 \begin_inset Quotes erd
3170 \end_inset
3172  (one line).
3173  Used to identify what controls are there.
3174 \end_layout
3176 \begin_layout Subsection
3177 Member: 
3178 \begin_inset Quotes eld
3179 \end_inset
3181 coreversion
3182 \begin_inset Quotes erd
3183 \end_inset
3186 \end_layout
3188 \begin_layout Standard
3189 Contains bsnes core version number (as one line).
3190 \end_layout
3192 \begin_layout Subsection
3193 Member: projectid
3194 \end_layout
3196 \begin_layout Standard
3197 Contains project ID (as one line).
3198  Used to identify if two movies are part of the same project.
3199 \end_layout
3201 \begin_layout Subsection
3202 Member: {rom,slota,slotb}{,xml}.sha256
3203 \end_layout
3205 \begin_layout Standard
3206 Contains SHA-256 of said ROM or ROM mapping file (as one line).
3207  Absent if corresponding file is absent.
3208 \end_layout
3210 \begin_layout Subsection
3211 Member: moviesram.<name>
3212 \end_layout
3214 \begin_layout Standard
3215 Raw binary startup SRAM of kind <name>.
3216  Only present in savestates and movies starting from SRAM.
3217 \end_layout
3219 \begin_layout Subsection
3220 Member: moviestate
3221 \end_layout
3223 \begin_layout Standard
3224 Raw binary movie state data.
3225  Only present in savestates.
3226 \end_layout
3228 \begin_layout Standard
3229 for version 0:
3230 \end_layout
3232 \begin_layout Itemize
3233 32 bytes: SHA-256 of project ID.
3234 \end_layout
3236 \begin_layout Itemize
3237 8 bytes: Big-endian current frame.
3238 \end_layout
3240 \begin_layout Itemize
3241 100x4 bytes: Poll counters for each control (bit31 of each is 
3242 \begin_inset Quotes eld
3243 \end_inset
3245 data ready
3246 \begin_inset Quotes erd
3247 \end_inset
3249  bit), big-endian.
3250 \end_layout
3252 \begin_layout Itemize
3253 8 bytes: Big-endian lag frame count.
3254 \end_layout
3256 \begin_layout Itemize
3257 32 bytes: SHA-256 of past input
3258 \end_layout
3260 \begin_layout Itemize
3261 32 bytes: SHA-256 of previous.
3262 \end_layout
3264 \begin_layout Itemize
3265 (total of 512 bytes)
3266 \end_layout
3268 \begin_layout Subsection
3269 Member: hostmemory
3270 \end_layout
3272 \begin_layout Standard
3273 Raw binary dump of host memory.
3274  Only present in savestates.
3275 \end_layout
3277 \begin_layout Subsection
3278 Member: savestate
3279 \end_layout
3281 \begin_layout Standard
3282 The raw binary savestate itself.
3283  Savestate detection uses this file, only present in savestates.
3284 \end_layout
3286 \begin_layout Subsection
3287 Member: screenshot
3288 \end_layout
3290 \begin_layout Standard
3291 Screenshot of current frame.
3292  Only present in savestates.
3293  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
3294  data.
3295  Height of image is inferred from the width and size of data.
3296 \end_layout
3298 \begin_layout Subsection
3299 Member: sram.<name>
3300 \end_layout
3302 \begin_layout Standard
3303 Raw binary SRAM of kind <name> at time of savestate.
3304  Only present in savestates.
3305 \end_layout
3307 \begin_layout Subsection
3308 Member: input
3309 \end_layout
3311 \begin_layout Standard
3312 The actual input track, one line per subframe (blank lines are skipped).
3313 \end_layout
3315 \begin_layout Itemize
3316 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
3317  part of same frame as previous, otherwise it starts a new frame.
3318 \end_layout
3320 \begin_layout Itemize
3321 First subframe must start a new frame.
3322 \end_layout
3324 \begin_layout Standard
3325 Length of movie in frames is number of lines in input file that start a
3326  new frame.
3327 \end_layout
3329 \begin_layout Subsection
3330 Member: rerecords
3331 \end_layout
3333 \begin_layout Standard
3334 Contains textual base-10 rerecord count (as one line; emulator just writes
3335  this, it doesn't read it) + 1.
3336 \end_layout
3338 \begin_layout Subsection
3339 Member: rrdata
3340 \end_layout
3342 \begin_layout Standard
3343 This member stores set of load IDs.
3344  There is one load ID per rerecord (plus one corresponding to start of project).
3345 \end_layout
3347 \begin_layout Itemize
3348 This member constists of concatenation of records
3349 \end_layout
3351 \begin_layout Itemize
3352 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
3353  IDs.
3354 \end_layout
3356 \begin_layout Itemize
3357 IDs are interpretted as 256-bit big-endian integers with warparound.
3358 \end_layout
3360 \begin_layout Itemize
3361 Initial predicted ID is all zeroes.
3362 \end_layout
3364 \begin_layout Standard
3365 Format of each record is:
3366 \end_layout
3368 \begin_layout Itemize
3369 1 byte: Opcode byte.
3370  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
3371  Bit 7 is unused.
3372 \end_layout
3374 \begin_layout Itemize
3375 32-prefixlen bytes of ID.
3376 \end_layout
3378 \begin_layout Itemize
3379 countlen bytes of big-endian count (count).
3380 \end_layout
3382 \begin_layout Standard
3383 Records are processed as follows:
3384 \end_layout
3386 \begin_layout Itemize
3387 To form the first ID encoded by record, take the first prefixlen bytes predicted
3388  ID and append the read ID value to it.
3389  The result is the first ID encoded.
3390 \end_layout
3392 \begin_layout Itemize
3393 If countlen is 0, record encodes 1 ID.
3394 \end_layout
3396 \begin_layout Itemize
3397 If countlen is 1, record encodes 2+count IDs.
3398 \end_layout
3400 \begin_layout Itemize
3401 If countlen is 2, record encodes 258+count IDs.
3402 \end_layout
3404 \begin_layout Itemize
3405 If countlen is 3, record encodes 65794+count IDs.
3406 \end_layout
3408 \begin_layout Itemize
3409 The new predicted ID is the next ID after last one encoded by the record.
3410 \end_layout
3412 \begin_layout Standard
3413 The number of rerecords + 1 is equal to the sum of number of IDs encoded
3414  by all records.
3415 \end_layout
3417 \begin_layout Subsection
3418 Member: starttime.second
3419 \end_layout
3421 \begin_layout Standard
3422 Movie starting time, second part.
3423  Epoch is Unix epoch.
3424  Default is 1,000,000,000.
3425 \end_layout
3427 \begin_layout Subsection
3428 Member: starttime.subsecond
3429 \end_layout
3431 \begin_layout Standard
3432 Movie starting time, subsecond part.
3433  Unit is 1/3,462,619,485,020 s.
3434  Default is 0.
3435 \end_layout
3437 \begin_layout Subsection
3438 Member: savetime.second
3439 \end_layout
3441 \begin_layout Standard
3442 Movie saving time, second part.
3443  Default is starttime.second.
3444  Only present in savestates.
3445 \end_layout
3447 \begin_layout Subsection
3448 Member: savetime.subsecond
3449 \end_layout
3451 \begin_layout Standard
3452 Movie saving time, subsecond part.
3453  Default is starttime.subsecond.
3454  Only present in savestates.
3455 \end_layout
3457 \begin_layout Section
3458 Compiling:
3459 \end_layout
3461 \begin_layout Subsection
3462 Building BSNES
3463 \end_layout
3465 \begin_layout Standard
3466 make ui=ui-libsnes profile=accuracy
3467 \end_layout
3469 \begin_layout Subsection
3470 Prerequisite libraries:
3471 \end_layout
3473 \begin_layout Itemize
3474 zlib
3475 \end_layout
3477 \begin_layout Itemize
3478 SDL (SDL platform)
3479 \end_layout
3481 \begin_layout Itemize
3482 SDLmain (Windows/Mac OS X only; Note you may have to extract the object
3483  out of archive)
3484 \end_layout
3486 \begin_layout Itemize
3487 boost_iostreams
3488 \end_layout
3490 \begin_layout Itemize
3491 boost_filesystem
3492 \end_layout
3494 \begin_layout Itemize
3495 boost conversion (header only)
3496 \end_layout
3498 \begin_layout Subsection
3499 Compile options to make:
3500 \end_layout
3502 \begin_layout Subsubsection
3503 BSNES_PATH=<path>
3504 \end_layout
3506 \begin_layout Standard
3507 Set path to BSNES bsnes directory to <path>.
3508 \end_layout
3510 \begin_layout Subsubsection
3511 NO_THREADS=1
3512 \end_layout
3514 \begin_layout Standard
3515 Don't use threads on Linux.
3516 \end_layout
3518 \begin_layout Subsubsection
3519 USE_THREADS=1
3520 \end_layout
3522 \begin_layout Standard
3523 Try to use threads even on non-Linux systems.
3524 \end_layout
3526 \begin_layout Subsubsection
3527 CC=<compiler>
3528 \end_layout
3530 \begin_layout Standard
3531 Target C++ compiler to use.
3532  Defaults to g++-4.5.
3533 \end_layout
3535 \begin_layout Standard
3536 Note: If crosscompiling, this has to be crosscompiler.
3537 \end_layout
3539 \begin_layout Subsubsection
3540 HOSTCC=<compiler>
3541 \end_layout
3543 \begin_layout Standard
3544 Host C++ compiler to use.
3545  Defaults to the same as CC.
3546 \end_layout
3548 \begin_layout Standard
3549 Note: If crosscompiling, that has to be host compiler (the files produced
3550  will be run in the build process!)
3551 \end_layout
3553 \begin_layout Subsubsection
3554 BSNES_IS_COMPAT=1
3555 \end_layout
3557 \begin_layout Standard
3558 Assume BSNES uses compatiblity core instead of accuracy core.
3559 \end_layout
3561 \begin_layout Subsubsection
3562 NO_LUA=1
3563 \end_layout
3565 \begin_layout Standard
3566 Don't compile in Lua support.
3567 \end_layout
3569 \begin_layout Subsubsection
3570 NO_TIME_INTERCEPT=1
3571 \end_layout
3573 \begin_layout Standard
3574 Disable time() interception.
3575  Prevents recording games using RTC but allows building on some platforms,
3576  notably Mac OS X.
3577 \end_layout
3579 \begin_layout Section
3580 Quick'n'dirty encode guide
3581 \end_layout
3583 \begin_layout Enumerate
3584 Start the emulator and load the movie file.
3585 \end_layout
3587 \begin_layout Enumerate
3588 Set large AVI option 'set-setting avi-large on'
3589 \end_layout
3591 \begin_layout Enumerate
3592 If dumping PAL, set bottom border to 2 'set-setting avi-bottom-border 2'
3593 \end_layout
3595 \begin_layout Enumerate
3596 Enable dumping 'dump-avi 12 tmpdump' (note: Normally 10 and above are 
3597 \begin_inset Quotes eld
3598 \end_inset
3600 use only if you know what you are doing.
3601 \begin_inset Quotes erd
3602 \end_inset
3605  In this case, these can be safely used because of how x264 internally works.
3606 \end_layout
3608 \begin_layout Enumerate
3609 Unpause and let it run until you want to end dumping.
3610 \end_layout
3612 \begin_layout Enumerate
3613 Close the emulator (closing the window is the easiest way)
3614 \end_layout
3616 \begin_layout Enumerate
3617 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
3618  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
3619 \end_layout
3621 \begin_layout Enumerate
3622 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
3623 \end_layout
3625 \begin_layout Enumerate
3626 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
3627  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
3628 \end_layout
3630 \begin_layout Enumerate
3631 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
3632  Now final.mkv contains quick'n'dirty encode.
3633 \end_layout
3635 \begin_layout Section
3636 Axis configurations for some gamepad types:
3637 \end_layout
3639 \begin_layout Subsection
3640 XBox360 controller:
3641 \end_layout
3643 \begin_layout Standard
3644 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
3645 \end_layout
3647 \begin_layout LyX-Code
3648 set-axis joystick0axis2 pressure-+
3649 \end_layout
3651 \begin_layout LyX-Code
3652 set-axis joystick0axis5 pressure-+
3653 \end_layout
3655 \begin_layout Subsection
3656 PS3 
3657 \begin_inset Quotes eld
3658 \end_inset
3660 sixaxis
3661 \begin_inset Quotes erd
3662 \end_inset
3664  controller:
3665 \end_layout
3667 \begin_layout Standard
3668 Axes 8-19 should be disabled.
3669 \end_layout
3671 \begin_layout LyX-Code
3672 set-axis joystick0axis8 disabled
3673 \end_layout
3675 \begin_layout LyX-Code
3676 set-axis joystick0axis9 disabled
3677 \end_layout
3679 \begin_layout LyX-Code
3680 set-axis joystick0axis10 disabled
3681 \end_layout
3683 \begin_layout LyX-Code
3684 set-axis joystick0axis11 disabled
3685 \end_layout
3687 \begin_layout LyX-Code
3688 set-axis joystick0axis12 disabled
3689 \end_layout
3691 \begin_layout LyX-Code
3692 set-axis joystick0axis13 disabled
3693 \end_layout
3695 \begin_layout LyX-Code
3696 set-axis joystick0axis14 disabled
3697 \end_layout
3699 \begin_layout LyX-Code
3700 set-axis joystick0axis15 disabled
3701 \end_layout
3703 \begin_layout LyX-Code
3704 set-axis joystick0axis16 disabled
3705 \end_layout
3707 \begin_layout LyX-Code
3708 set-axis joystick0axis17 disabled
3709 \end_layout
3711 \begin_layout LyX-Code
3712 set-axis joystick0axis18 disabled
3713 \end_layout
3715 \begin_layout LyX-Code
3716 set-axis joystick0axis19 disabled
3717 \end_layout
3719 \begin_layout Section
3720 Errata:
3721 \end_layout
3723 \begin_layout Subsection
3724 Problems from BSNES core:
3725 \end_layout
3727 \begin_layout Itemize
3728 The whole pending save stuff.
3729 \end_layout
3731 \begin_layout Itemize
3732 Delay resets are slow.
3733 \end_layout
3735 \begin_layout Itemize
3736 RTC is not emulated in sync-stable manner.
3737 \end_layout
3739 \begin_layout Itemize
3740 Lack of layer hiding.
3741 \end_layout
3743 \begin_layout Itemize
3744 It is slow.
3745 \end_layout
3747 \begin_layout Itemize
3748 Firmwares can't be loaded from ZIP archives.
3749 \end_layout
3751 \begin_layout Itemize
3752 Manual polls can be corrupted if savestate occurs during those.
3753 \end_layout
3755 \begin_layout Subsection
3756 Other problems:
3757 \end_layout
3759 \begin_layout Itemize
3760 Modifiers don't work with pseudo-keys (SDL).
3761 \end_layout
3763 \begin_layout Itemize
3764 Audio for last dumped frame is not itself dumped.
3765 \end_layout
3767 \begin_layout Itemize
3768 Audio in UI is pretty bad in quality.
3769 \end_layout
3771 \begin_layout Itemize
3772 UI itself is 30fps max.
3773 \end_layout
3775 \begin_layout Itemize
3776 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
3777 \end_layout
3779 \begin_layout Itemize
3780 No menus, command based interface (SDL).
3781 \end_layout
3783 \begin_layout Itemize
3784 Long commands don't scroll.
3785 \end_layout
3787 \begin_layout Itemize
3788 The SDL screen drawing is slow.
3789 \end_layout
3791 \begin_layout Section
3792 Changelog:
3793 \end_layout
3795 \begin_layout Subsection
3796 rr0-beta1
3797 \end_layout
3799 \begin_layout Itemize
3800 Fix -Wall warnings
3801 \end_layout
3803 \begin_layout Itemize
3804 Fix dumper video corruption with levels 10-18.
3805 \end_layout
3807 \begin_layout Subsection
3808 rr0-beta2
3809 \end_layout
3811 \begin_layout Itemize
3812 Autofire
3813 \end_layout
3815 \begin_layout Itemize
3816 Lots of code cleanups
3817 \end_layout
3819 \begin_layout Itemize
3820 Lua interface to settings
3821 \end_layout
3823 \begin_layout Itemize
3824 Allow specifying AVI borders without Lua
3825 \end_layout
3827 \begin_layout Itemize
3828 Fix scaling if vscale > 1 and originx > 0 (left border exists)
3829 \end_layout
3831 \begin_layout Itemize
3832 on_snoop lua callback
3833 \end_layout
3835 \begin_layout Itemize
3836 Faster movie loading and saving.
3837 \end_layout
3839 \begin_layout Subsection
3840 rr0-beta3
3841 \end_layout
3843 \begin_layout Itemize
3844 Joystick support
3845 \end_layout
3847 \begin_layout Subsection
3848 rr0-beta4
3849 \end_layout
3851 \begin_layout Itemize
3852 Fix multi-buttons
3853 \end_layout
3855 \begin_layout Itemize
3856 Save jukebox functionality.
3857 \end_layout
3859 \begin_layout Subsection
3860 rr0-beta5
3861 \end_layout
3863 \begin_layout Itemize
3864 Try to fix some nasty failing movie load edge cases
3865 \end_layout
3867 \begin_layout Itemize
3868 Allow specifying scripts to run on command line.
3869 \end_layout
3871 \begin_layout Subsection
3872 rr0-beta6
3873 \end_layout
3875 \begin_layout Itemize
3876 Major source code reorganization.
3877 \end_layout
3879 \begin_layout Itemize
3880 Backup savestates before overwriting.
3881 \end_layout
3883 \begin_layout Itemize
3884 Don't crash if loading initial state fails.
3885 \end_layout
3887 \begin_layout Subsection
3888 rr0-beta7
3889 \end_layout
3891 \begin_layout Itemize
3892 Fix firmware lookup
3893 \end_layout
3895 \begin_layout Itemize
3896 Fix author name parsing
3897 \end_layout
3899 \begin_layout Itemize
3900 Fix rerecord counting
3901 \end_layout
3903 \begin_layout Itemize
3904 (SDL) Print messages to console if SDL is uninitialized
3905 \end_layout
3907 \begin_layout Itemize
3908 Add movieinfo program
3909 \end_layout
3911 \begin_layout Itemize
3912 Fix loading movies starting from SRAM.
3913 \end_layout
3915 \begin_layout Subsection
3916 rr0-beta8
3917 \end_layout
3919 \begin_layout Itemize
3920 Add support for unattended dumping
3921 \end_layout
3923 \begin_layout Itemize
3924 Fix compiling for Win32
3925 \end_layout
3927 \begin_layout Itemize
3928 Don't lock up if sound can't be initialized
3929 \end_layout
3931 \begin_layout Itemize
3932 Strip trailing CR from commands
3933 \end_layout
3935 \begin_layout Itemize
3936 Don't try to do dubious things in global ctors (fix crash on startup)
3937 \end_layout
3939 \begin_layout Subsection
3940 rr0-beta9
3941 \end_layout
3943 \begin_layout Itemize
3944 Small documentation tweaking
3945 \end_layout
3947 \begin_layout Itemize
3948 Fix make clean
3949 \end_layout
3951 \begin_layout Itemize
3952 Fix major bug in modifier matching
3953 \end_layout
3955 \begin_layout Subsection
3956 rr0-beta10
3957 \end_layout
3959 \begin_layout Itemize
3960 Lots of documentation fixes
3961 \end_layout
3963 \begin_layout Itemize
3964 Use dedicated callbacks for event backcomm., not commands.
3965 \end_layout
3967 \begin_layout Itemize
3968 Ensure that the watchdog is not hit when executing delayed reset.
3969 \end_layout
3971 \begin_layout Itemize
3972 Remove errant tab from joystick message.
3973 \end_layout
3975 \begin_layout Subsection
3976 rr0-beta11
3977 \end_layout
3979 \begin_layout Itemize
3980 Make autofire operate in absolute time, not linear time
3981 \end_layout
3983 \begin_layout Itemize
3984 Reinitialize controls when resuming from loadstate
3985 \end_layout
3987 \begin_layout Itemize
3988 Some more code cleanups
3989 \end_layout
3991 \begin_layout Itemize
3992 If Lua allocator fails, call OOM_panic()
3993 \end_layout
3995 \begin_layout Itemize
3996 Byte/word/dword/qword sized host memory write/read functions.
3997 \end_layout
3999 \begin_layout Itemize
4000 Dump at correct framerate if dumping interlaced NTSC (height=448).
4001 \end_layout
4003 \begin_layout Subsection
4004 rr0-beta12
4005 \end_layout
4007 \begin_layout Itemize
4008 Actually include the complete source code
4009 \end_layout
4011 \begin_layout Itemize
4012 Keep track of RTC
4013 \end_layout
4015 \begin_layout Subsection
4016 rr0-beta13
4017 \end_layout
4019 \begin_layout Itemize
4020 Document {save,start}time.{,sub}second.
4021 \end_layout
4023 \begin_layout Itemize
4024 Intercept time() from bsnes core.
4025 \end_layout
4027 \begin_layout Subsection
4028 rr0-beta14
4029 \end_layout
4031 \begin_layout Itemize
4032 Allow disabling time() interception (allow build on Mac OS X)
4033 \end_layout
4035 \begin_layout Itemize
4036 Use SDLMain on Mac OS X (make SDL not crash)
4037 \end_layout
4039 \begin_layout Itemize
4040 Disable delayed resets (just plain too buggy for now).
4041 \end_layout
4043 \begin_layout Itemize
4044 Code cleanups
4045 \end_layout
4047 \begin_layout Itemize
4048 Use 16-bit for graphics/video instead of 32-bit.
4049 \end_layout
4051 \begin_layout Itemize
4052 gui.rectangle/gui.pixel
4053 \end_layout
4055 \begin_layout Itemize
4056 gui.crosshair
4057 \end_layout
4059 \begin_layout Itemize
4060 New CSCD writer implementation.
4061 \end_layout
4063 \begin_layout Subsection
4064 rr0-beta15
4065 \end_layout
4067 \begin_layout Itemize
4068 Fix interaction of * and +.
4069 \end_layout
4071 \begin_layout Itemize
4072 Manual improvements
4073 \end_layout
4075 \begin_layout Itemize
4076 Use gettimeofday()/usleep(), these seem portable enough.
4077 \end_layout
4079 \begin_layout Itemize
4080 Move joystick axis manipulation to keymapper code.
4081 \end_layout
4083 \begin_layout Itemize
4084 Changes to how read-only works.
4085 \end_layout
4087 \begin_layout Itemize
4088 Refactor controller input code.
4089 \end_layout
4091 \begin_layout Subsection
4092 rr0-beta16
4093 \end_layout
4095 \begin_layout Itemize
4096 Fix mouseclick scale compensation.
4097 \end_layout
4099 \begin_layout Itemize
4100 Draw area boundaries correctly in SDL code.
4101 \end_layout
4103 \begin_layout Itemize
4104 gui.screenshot.
4105 \end_layout
4107 \begin_layout Itemize
4108 Fix CSCD output (buffer overrun and race condition).
4109 \end_layout
4111 \begin_layout Subsection
4112 rr0-beta17
4113 \end_layout
4115 \begin_layout Itemize
4116 JMD dumping support.
4117 \end_layout
4119 \begin_layout Itemize
4120 Allow unattended dumping to JMD.
4121 \end_layout
4123 \begin_layout Itemize
4124 Move to BSNES v083.
4125 \end_layout
4127 \begin_layout Itemize
4128 Switch back to 32-bit colors.
4129 \end_layout
4131 \begin_layout Itemize
4132 Add Lua function gui.color.
4133 \end_layout
4135 \begin_layout Itemize
4136 Use some new C++11 features in GCC 4.6.
4137 \end_layout
4139 \begin_layout Itemize
4140 Be prepared for core frequency changes.
4141 \end_layout
4143 \begin_layout Itemize
4144 Pass colors in one chunk from Lua.
4145 \end_layout
4147 \end_body
4148 \end_document