Warn about nonexistent controller keys more aggressively
[lsnes.git] / manual.lyx
blob89183b89b6b6fa56f5df6e44c73f775bc3ded70e
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options true
7 \maintain_unincluded_children false
8 \language finnish
9 \language_package default
10 \inputencoding auto
11 \fontencoding global
12 \font_roman default
13 \font_sans default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
17 \font_sc false
18 \font_osf false
19 \font_sf_scale 100
20 \font_tt_scale 100
22 \graphics default
23 \default_output_format default
24 \output_sync 0
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
28 \use_hyperref false
29 \papersize default
30 \use_geometry false
31 \use_amsmath 1
32 \use_esint 1
33 \use_mhchem 1
34 \use_mathdots 1
35 \cite_engine basic
36 \use_bibtopic false
37 \use_indices false
38 \paperorientation portrait
39 \suppress_date false
40 \use_refstyle 1
41 \index Hakusana
42 \shortcut idx
43 \color #008000
44 \end_index
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle default
53 \tracking_changes false
54 \output_changes false
55 \html_math_output 0
56 \html_css_as_file 0
57 \html_be_strict false
58 \end_header
60 \begin_body
62 \begin_layout Section
63 Introduction
64 \end_layout
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
68 \end_layout
70 \begin_layout Section
71 Dependencies
72 \end_layout
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
94 \end_layout
96 \begin_deeper
97 \begin_layout Enumerate
98 SVN r320, r358 or r364
99 \end_layout
101 \begin_layout Enumerate
102 Patched with included patches
103 \end_layout
105 \end_deeper
106 \begin_layout Enumerate
107 Zlib
108 \end_layout
110 \begin_layout Enumerate
111 boost_iostreams
112 \end_layout
114 \begin_layout Enumerate
115 boost_filesystem
116 \end_layout
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
120 \end_layout
122 \begin_layout Enumerate
123 libsdl (SDL only)
124 \end_layout
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
128 \end_layout
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
132 \end_layout
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
136 \end_layout
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
140 \end_layout
142 \begin_layout Enumerate
143 libao (libao sound only)
144 \end_layout
146 \begin_layout Enumerate
147 Lua version 5.1.X or 5.2.X
148 \end_layout
150 \begin_layout Enumerate
151 G++ 4.6 or 4.7
152 \end_layout
154 \begin_layout Enumerate
155 libopus (optional, for commentary track tool)
156 \end_layout
158 \begin_layout Section
159 Building
160 \end_layout
162 \begin_layout Itemize
163 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
164  bsnes core).
165 \end_layout
167 \begin_layout Itemize
168 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
169 \end_layout
171 \begin_layout Itemize
172 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
173 >', bsnes core)
174 \end_layout
176 \begin_layout Itemize
177 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
178 ersion>', gambatte core)
179 \end_layout
181 \begin_layout Itemize
182 Edit options.build (or copy of that file)
183 \end_layout
185 \begin_layout Itemize
186 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
188 \end_layout
190 \begin_layout Section
191 Command line options
192 \end_layout
194 \begin_layout Subsection
195 Wxwidgets options
196 \end_layout
198 \begin_layout Subsubsection
199 --rom=<file>
200 \end_layout
202 \begin_layout Standard
203 Load <file> as ROM.
204 \end_layout
206 \begin_layout Subsubsection
207 <file>
208 \end_layout
210 \begin_layout Standard
211 Load <file> as ROM.
212 \end_layout
214 \begin_layout Subsubsection
215 --load=<file>
216 \end_layout
218 \begin_layout Standard
219 Load <file> as movie or savestate file on startup.
220 \end_layout
222 \begin_layout Subsubsection
223 --settings
224 \end_layout
226 \begin_layout Standard
227 Instead of starting the emulator, only display the settings.
228 \end_layout
230 \begin_layout Subsubsection
231 --lua=<file>
232 \end_layout
234 \begin_layout Standard
235 Run this Lua file on startup
236 \end_layout
238 \begin_layout Subsection
239 dump options (lsnes-dumpavi only)
240 \end_layout
242 \begin_layout Subsubsection
243 --rom=<file>
244 \end_layout
246 \begin_layout Standard
247 Load <file> as ROM.
248  Required.
249 \end_layout
251 \begin_layout Subsubsection
252 <filename>
253 \end_layout
255 \begin_layout Standard
256 Load <filename> as movie or savestate file on startup.
257  Required.
258 \end_layout
260 \begin_layout Subsubsection
261 --dumper=<dumper>
262 \end_layout
264 \begin_layout Standard
265 Set the dumper to use (required).
266  Use 'list' for listing of known dumpers.
267 \end_layout
269 \begin_layout Subsubsection
270 --firmware-path=<path>
271 \end_layout
273 \begin_layout Standard
274 Set path to look for firmware.
275 \end_layout
277 \begin_layout Subsubsection
278 --mode=<mode>
279 \end_layout
281 \begin_layout Standard
282 Set the mode to use (required for dumpers with multiple modes, forbidden
283  otherwise).
284  Use 'list' for known modes.
285 \end_layout
287 \begin_layout Subsubsection
288 --prefix=<prefix>
289 \end_layout
291 \begin_layout Standard
292 Set dump prefix.
293  Default is 
294 \begin_inset Quotes eld
295 \end_inset
297 avidump
298 \begin_inset Quotes erd
299 \end_inset
302 \end_layout
304 \begin_layout Subsubsection
305 --option=<name>=<value>
306 \end_layout
308 \begin_layout Standard
309 Set option <name> to value <value>.
310 \end_layout
312 \begin_layout Subsubsection
313 --length=<length>
314 \end_layout
316 \begin_layout Standard
317 Set number of frames to dump.
318  Mandatory.
319 \end_layout
321 \begin_layout Subsubsection
322 --lua=<script>
323 \end_layout
325 \begin_layout Standard
326 Run specified lua script (lsnes-dumpavi does not have initialization files).
327 \end_layout
329 \begin_layout Subsubsection
330 --load-library=<library>
331 \end_layout
333 \begin_layout Standard
334 Load the specified shared object / dynamic library / dynamic link library.
335 \end_layout
337 \begin_layout Subsection
338 lsnes settings directory
339 \end_layout
341 \begin_layout Standard
342 The lsnes settings directory is (in order of decreasing perference):
343 \end_layout
345 \begin_layout Itemize
346 Windows: %APPDATA%
347 \backslash
348 lsnes (if %APPDATA% exists)
349 \end_layout
351 \begin_layout Itemize
352 Unix: $XDG_CONFIG_HOME/lsnes (if $XDG_CONFIG_HOME exists)
353 \end_layout
355 \begin_layout Itemize
356 Unix: $HOME/.config/lsnes (if $HOME exists)
357 \end_layout
359 \begin_layout Itemize
360 All: .
361  (fallback default).
362 \end_layout
364 \begin_layout Standard
365 If leading directories do not exist, attempt to create them is made.
366 \end_layout
368 \begin_layout Section
369 Internal commands
370 \end_layout
372 \begin_layout Itemize
373 Commands beginning with '*' invoke the corresponding command without alias
374  expansion.
375 \end_layout
377 \begin_layout Itemize
378 If command starts with '+' (after possible '*'), the command is executed
379  as-is when button is pressed, and when button is released, it is executed
380  with '+' replaced by '-'.
381 \end_layout
383 \begin_layout Itemize
384 Commands without '+' execute only on negative edge (release).
385 \end_layout
387 \begin_layout Subsection
388 run-script <script>
389 \end_layout
391 \begin_layout Standard
392 Run <script> as if commands were entered on the command line.
393 \end_layout
395 \begin_layout Subsection
396 Memory manipulation
397 \end_layout
399 \begin_layout Standard
400 <address> may be decimal or hexadecimal (prefixed with '0x').
401  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
402  with '-') decimal.
403 \end_layout
405 \begin_layout Standard
406 The available element <sizes> are:
407 \end_layout
409 \begin_layout Itemize
410 byte: 1 byte
411 \end_layout
413 \begin_layout Itemize
414 word: 2 bytes
415 \end_layout
417 \begin_layout Itemize
418 dword: 4 bytes
419 \end_layout
421 \begin_layout Itemize
422 qword: 8 bytes
423 \end_layout
425 \begin_layout Standard
426 When reading RAM and ROM, multi-byte reads/writes are big-endian.
427  When dealing with DSP memory, multi-byte reads/writes are native-endian
428  (do not use operand sizes exceeding DSP bitness, except dword is OK for
429  24-bit memory).
430 \end_layout
432 \begin_layout Subsubsection
433 read-<size> <address>
434 \end_layout
436 \begin_layout Standard
437 Read the value of byte in <address>.
438 \end_layout
440 \begin_layout Subsubsection
441 read-s<size> <address>
442 \end_layout
444 \begin_layout Standard
445 Read the value of signed byte in <address>.
446 \end_layout
448 \begin_layout Subsubsection
449 write-<size> <address> <value>
450 \end_layout
452 \begin_layout Standard
453 Write <value> to byte in address <address>.
454 \end_layout
456 \begin_layout Subsection
457 Main commands
458 \end_layout
460 \begin_layout Standard
461 These commands are not available in lsnesrc, but are available after ROM
462  has been loaded.
463 \end_layout
465 \begin_layout Subsubsection
466 quit-emulator
467 \end_layout
469 \begin_layout Standard
470 Quits the emulator.
471 \end_layout
473 \begin_layout Subsubsection
474 pause-emulator
475 \end_layout
477 \begin_layout Standard
478 Toggle paused/unpaused
479 \end_layout
481 \begin_layout Subsubsection
482 +advance-frame 
483 \end_layout
485 \begin_layout Standard
486 Advance frame.
487  If the button is still held after configurable timeout expires, game unpauses
488  for the duration frame advance is held.
489 \end_layout
491 \begin_layout Subsubsection
492 +advance-poll 
493 \end_layout
495 \begin_layout Standard
496 Advance subframe.
497  If the button is still held after configurable timeout expires, game unpauses
498  for the duration frame advance is held.
499 \end_layout
501 \begin_layout Subsubsection
502 advance-skiplag 
503 \end_layout
505 \begin_layout Standard
506 Skip to first poll in frame after current.
507 \end_layout
509 \begin_layout Subsubsection
510 reset 
511 \end_layout
513 \begin_layout Standard
514 Reset the SNES after this frame.
515 \end_layout
517 \begin_layout Subsubsection
518 load <filename> 
519 \end_layout
521 \begin_layout Standard
522 Load savestate <filename> in current mode.
523 \end_layout
525 \begin_layout Subsubsection
526 load-state <filename> 
527 \end_layout
529 \begin_layout Standard
530 Load savestate <filename> in readwrite mode.
531 \end_layout
533 \begin_layout Subsubsection
534 load-readonly <filename> 
535 \end_layout
537 \begin_layout Standard
538 Load savestate <filename> in readonly mode.
539 \end_layout
541 \begin_layout Subsubsection
542 load-preserve <filename> 
543 \end_layout
545 \begin_layout Standard
546 Load savestate <filename> in readonly mode, preserving current events.
547 \end_layout
549 \begin_layout Subsubsection
550 load-movie <filename> 
551 \end_layout
553 \begin_layout Standard
554 Load savestate <filename>, ignoring save part in readonly mode.
555 \end_layout
557 \begin_layout Subsubsection
558 save-state <filename> 
559 \end_layout
561 \begin_layout Standard
562 Save system state to <filename> as soon as possible.
563 \end_layout
565 \begin_layout Subsubsection
566 save-movie <filename> 
567 \end_layout
569 \begin_layout Standard
570 Save movie to <filename>.
571 \end_layout
573 \begin_layout Subsubsection
574 set-rwmode 
575 \end_layout
577 \begin_layout Standard
578 Set read-write mode.
579 \end_layout
581 \begin_layout Subsubsection
582 set-romode 
583 \end_layout
585 \begin_layout Standard
586 Set read-only mode
587 \end_layout
589 \begin_layout Subsubsection
590 toggle-rwmode 
591 \end_layout
593 \begin_layout Standard
594 Toggle between read-only and read-write modes.
595 \end_layout
597 \begin_layout Subsubsection
598 test-1, test-2, test-3
599 \end_layout
601 \begin_layout Standard
602 Internal test commands.
603  Don't use.
604 \end_layout
606 \begin_layout Subsubsection
607 take-screenshot <filename> 
608 \end_layout
610 \begin_layout Standard
611 Save screenshot to <filename>.
612 \end_layout
614 \begin_layout Subsubsection
615 +controller <class>-<#>-<button>
616 \end_layout
618 \begin_layout Standard
619 Press button <button> on controller <num> of class <class>.
620 \end_layout
622 \begin_layout Itemize
623 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
624  ext0, ext1, ext2, ext3
625 \end_layout
627 \begin_layout Itemize
628 Class 'mouse': L, R
629 \end_layout
631 \begin_layout Itemize
632 Class 'superscope': trigger, cursor, turbo, pause
633 \end_layout
635 \begin_layout Itemize
636 Class 'justifier': trigger, start
637 \end_layout
639 \begin_layout Itemize
640 Class 'gb': A, B, select, start, up, down, left, right
641 \end_layout
643 \begin_layout Subsubsection
644 hold-controller <class>-<#>-<button>
645 \end_layout
647 \begin_layout Standard
648 Hold/unhold button <button> on controller <num> of class <class>.
649 \end_layout
651 \begin_layout Subsubsection
652 type-controller <class>-<#>-<button>
653 \end_layout
655 \begin_layout Standard
656 Hold/unhold button <button> on controller <num> of class <class> for the
657  next frame.
658  See +controller for button names.
659 \end_layout
661 \begin_layout Standard
662 Cauntion: Does not work properly if outside frame advance.
663 \end_layout
665 \begin_layout Subsubsection
666 +autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
667 \end_layout
669 \begin_layout Standard
670 Start autofire.
671  If duty is not specified, defaults to 1.
672  If <cyclelen> is not specified, defaults to 2.
673 \end_layout
675 \begin_layout Subsubsection
676 -autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
677 \end_layout
679 \begin_layout Standard
680 End autofire.
681 \end_layout
683 \begin_layout Subsubsection
684 autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
685 \end_layout
687 \begin_layout Standard
688 Toggle autofire.
689  If autofire is turned on, specified cycle is used.
690 \end_layout
692 \begin_layout Subsubsection
693 designate-position <class>-<#>-analog<n>
694 \end_layout
696 \begin_layout Standard
697 Designate position for analog pair.
698  <n> is only there if there are multiple axis pairs.
699 \end_layout
701 \begin_layout Subsubsection
702 repaint
703 \end_layout
705 \begin_layout Standard
706 Force a repaint.
707 \end_layout
709 \begin_layout Subsubsection
710 toggle-pause-on-end
711 \end_layout
713 \begin_layout Standard
714 Toggle pause on end flag.
715 \end_layout
717 \begin_layout Subsubsection
718 set-pause-on-end
719 \end_layout
721 \begin_layout Standard
722 Set pause on end flag.
723 \end_layout
725 \begin_layout Subsubsection
726 clear-pause-on-end
727 \end_layout
729 \begin_layout Standard
730 Clear pause on end flag.
731 \end_layout
733 \begin_layout Subsection
734 Save jukebox 
735 \end_layout
737 \begin_layout Subsubsection
738 cycle-jukebox-backward
739 \end_layout
741 \begin_layout Standard
742 Cycle save jukebox backwards.
743 \end_layout
745 \begin_layout Subsubsection
746 cycle-jukebox-forward
747 \end_layout
749 \begin_layout Standard
750 Cycle save jukebox forwards
751 \end_layout
753 \begin_layout Subsubsection
754 load-jukebox
755 \end_layout
757 \begin_layout Standard
758 Do load from jukebox (current mode).
759 \end_layout
761 \begin_layout Subsubsection
762 save-jukebox
763 \end_layout
765 \begin_layout Standard
766 Do state save to jukebox.
767 \end_layout
769 \begin_layout Subsection
770 Lua 
771 \end_layout
773 \begin_layout Standard
774 Only available if lua support is compiled in.
775 \end_layout
777 \begin_layout Subsubsection
778 evaluate-lua <luacode>
779 \end_layout
781 \begin_layout Standard
782 Run Lua code <luacode> using built-in Lua interpretter.
783 \end_layout
785 \begin_layout Subsubsection
786 run-lua <script>
787 \end_layout
789 \begin_layout Standard
790 Run specified lua file using built-in Lua interpretter.
791 \end_layout
793 \begin_layout Subsubsection
794 reset-lua
795 \end_layout
797 \begin_layout Standard
798 Clear the Lua VM state and restore to factory defaults.
799 \end_layout
801 \begin_layout Subsection
802 Memory watch
803 \end_layout
805 \begin_layout Subsubsection
806 add-watch <name> <expression>
807 \end_layout
809 \begin_layout Standard
810 Adds new watch (or modifies old one).
811 \end_layout
813 \begin_layout Subsubsection
814 remove-watch <name>
815 \end_layout
817 \begin_layout Standard
818 Remove a watch.
819 \end_layout
821 \begin_layout Subsection
822 Sound 
823 \end_layout
825 \begin_layout Subsubsection
826 enable-sound <on/off> 
827 \end_layout
829 \begin_layout Standard
830 Enable/Disable sound.
831 \end_layout
833 \begin_layout Subsection
834 Misc.
835 \end_layout
837 \begin_layout Subsubsection
838 reload-rom [<file>]
839 \end_layout
841 \begin_layout Standard
842 Reloads the main ROM image from <file>.
843 \end_layout
845 \begin_layout Subsubsection
846 +tangent
847 \end_layout
849 \begin_layout Standard
850 Tangent for recording voice for commentary track.
851  While pressed, record a stream.
852 \end_layout
854 \begin_layout Section
855 Settings
856 \end_layout
858 \begin_layout Subsection
859 Core settings
860 \end_layout
862 \begin_layout Subsection
863 AVI dumper settings
864 \end_layout
866 \begin_layout Subsubsection
867 avi-large
868 \end_layout
870 \begin_layout Standard
871 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
872  outputs.
873 \end_layout
875 \begin_layout Subsubsection
876 avi-left-border
877 \end_layout
879 \begin_layout Standard
880 AVI dumper: Set the default left border thickness (unless lua overrides)
881  for dumps.
882  Range 0-8191.
883  Default is 0.
884 \end_layout
886 \begin_layout Subsubsection
887 avi-right-border
888 \end_layout
890 \begin_layout Standard
891 AVI dumper: Set the default right border thickness (unless lua overrides)
892  for dumps.
893  Range 0-8191.
894  Default is 0.
895 \end_layout
897 \begin_layout Subsubsection
898 avi-top-border
899 \end_layout
901 \begin_layout Standard
902 AVI dumper: Set the default top border thickness (unless lua overrides)
903  for dumps.
904  Range 0-8191.
905  Default is 0.
906 \end_layout
908 \begin_layout Subsubsection
909 avi-bottom-border
910 \end_layout
912 \begin_layout Standard
913 AVI dumper: Set the default bottom border thickness (unless lua overrides)
914  for dumps.
915  Range 0-8191.
916  Default is 0.
917 \end_layout
919 \begin_layout Subsubsection
920 avi-maxframes
921 \end_layout
923 \begin_layout Standard
924 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
925  Range 0-999999999.
926  Default is 0.
927 \end_layout
929 \begin_layout Subsubsection
930 avi-compresison
931 \end_layout
933 \begin_layout Standard
934 AVI dumper: Compression level (0-18).
935 \end_layout
937 \begin_layout Itemize
938 Compression levels 10 and above are not compatible with stock CSCD codec.
939 \end_layout
941 \begin_layout Itemize
942 Recomended level is 7.
943 \end_layout
945 \begin_layout Subsubsection
946 avi-soundrate
947 \end_layout
949 \begin_layout Standard
950 AVI dumper: Set method of determining the sound rate.
951 \end_layout
953 \begin_layout Itemize
954 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
955  128, 176.4 and 192 kHz.
956 \end_layout
958 \begin_layout Itemize
959 1: Round down to nearest integer.
960 \end_layout
962 \begin_layout Itemize
963 2: Round up to nearest ingeter.
964 \end_layout
966 \begin_layout Itemize
967 3: Multiply by denominator.
968 \end_layout
970 \begin_layout Itemize
971 4: High quality 44.1kHz (SRC needed).
972 \end_layout
974 \begin_layout Itemize
975 5: High quality 48kHz (SRC needed).
976 \end_layout
978 \begin_layout Subsection
979 JMD options
980 \end_layout
982 \begin_layout Subsubsection
983 jmd-compression
984 \end_layout
986 \begin_layout Standard
987 JMD dumper: Compression level (0-9).
988 \end_layout
990 \begin_layout Section
991 Lua functions
992 \end_layout
994 \begin_layout Subsection
995 Core (in main table)
996 \end_layout
998 \begin_layout Subsubsection
999 print
1000 \end_layout
1002 \begin_layout Standard
1003 Print line to message console.
1004 \end_layout
1006 \begin_layout Subsubsection
1007 exec(string command)
1008 \end_layout
1010 \begin_layout Standard
1011 Run command as it was entered on the command line
1012 \end_layout
1014 \begin_layout Subsubsection
1015 utime()
1016 \end_layout
1018 \begin_layout Standard
1019 Returns two values.
1020  First is time since some epoch in seconds, the second is microseconds mod
1021  10^6 since that epoch.
1022 \end_layout
1024 \begin_layout Subsubsection
1025 emulator_ready()
1026 \end_layout
1028 \begin_layout Standard
1029 Returns true if emulator has finished booting, false if not (on_startup()
1030  will be issued later).
1031 \end_layout
1033 \begin_layout Subsubsection
1034 set_idle_timeout(number timeout)
1035 \end_layout
1037 \begin_layout Standard
1038 Set number of microseconds to block idle for.
1039  After this timeout has expired, on_idle() will be called once.
1040 \end_layout
1042 \begin_layout Subsubsection
1043 set_timer_timeout(number timeout)
1044 \end_layout
1046 \begin_layout Standard
1047 Set number of microseconds to block timer for.
1048  After this timeout has expired, on_timer() will be called once.
1049 \end_layout
1051 \begin_layout Subsubsection
1052 bus_address(number snesaddr)
1053 \end_layout
1055 \begin_layout Standard
1056 Returns virtual address corresponding to specified address on SNES bus.
1057 \end_layout
1059 \begin_layout Subsubsection
1060 loopwrapper(function fun, ...)
1061 \end_layout
1063 \begin_layout Standard
1064 Calls function fun with function and specified arguments.
1065  The function passed suspends execution until the function returned is called.
1066  Handy for linear flow control among multiple invocations of a hook.
1067  Example code:
1068 \end_layout
1070 \begin_layout LyX-Code
1071 on_paint = loopwrapper(function(wait)
1072 \end_layout
1074 \begin_deeper
1075 \begin_layout LyX-Code
1076 while true do
1077 \end_layout
1079 \begin_deeper
1080 \begin_layout LyX-Code
1081 gui.text(0, 0, 
1082 \begin_inset Quotes eld
1083 \end_inset
1085 Test!
1086 \begin_inset Quotes erd
1087 \end_inset
1090 \end_layout
1092 \begin_layout LyX-Code
1093 wait();
1094 \end_layout
1096 \end_deeper
1097 \begin_layout LyX-Code
1099 \end_layout
1101 \end_deeper
1102 \begin_layout LyX-Code
1103 end);
1104 \end_layout
1106 \begin_layout Subsubsection
1107 list_bindings([string cmd])
1108 \end_layout
1110 \begin_layout Standard
1111 Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
1112  If command is specified, the table is limited to that command.
1113  Also searches for controller keys.
1114 \end_layout
1116 \begin_layout Subsubsection
1117 get_alias(string aname)
1118 \end_layout
1120 \begin_layout Standard
1121 Get expansion of given alias.
1122 \end_layout
1124 \begin_layout Subsubsection
1125 set_alias(string aname, string value)
1126 \end_layout
1128 \begin_layout Standard
1129 Set expansion of given alias.
1130 \end_layout
1132 \begin_layout Subsubsection
1133 create_ibind(string name, string cmd)
1134 \end_layout
1136 \begin_layout Standard
1137 Return object representing inverse binding with specified name and specified
1138  command.
1139 \end_layout
1141 \begin_layout Itemize
1142 To create press/release commands, use aliases +foo and -foo .
1143 \end_layout
1145 \begin_layout Itemize
1146 Keep the returned object around.
1147 \end_layout
1149 \begin_layout Subsection
1150 Table bit:
1151 \end_layout
1153 \begin_layout Standard
1154 Bitwise logical functions and related.
1155 \end_layout
1157 \begin_layout Subsubsection
1158 bit.none(number...) / bit.bnot(number...)
1159 \end_layout
1161 \begin_layout Standard
1162 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1163  arguments).
1164 \end_layout
1166 \begin_layout Subsubsection
1167 bit.any(number...) / bit.bor(number...)
1168 \end_layout
1170 \begin_layout Standard
1171 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1172 \end_layout
1174 \begin_layout Subsubsection
1175 bit.all(number...) / bit.band(number...)
1176 \end_layout
1178 \begin_layout Standard
1179 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1181 \end_layout
1183 \begin_layout Subsubsection
1184 bit.parity(number...) / bit.bxor(number...)
1185 \end_layout
1187 \begin_layout Standard
1188 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1189  of the arguments).
1190 \end_layout
1192 \begin_layout Subsubsection
1193 bit.lrotate(number base[, number amount[, number bits]])
1194 \end_layout
1196 \begin_layout Standard
1197 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1198 \end_layout
1200 \begin_layout Subsubsection
1201 bit.rrotate(number base[, number amount[, number bits]])
1202 \end_layout
1204 \begin_layout Standard
1205 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1206  places.
1207 \end_layout
1209 \begin_layout Subsubsection
1210 bit.lshift(number base[, number amount[, number bits]])
1211 \end_layout
1213 \begin_layout Standard
1214 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1215  The new bits are filled with zeroes.
1216 \end_layout
1218 \begin_layout Subsubsection
1219 bit.lrshift(number base[, number amount[, number bits]])
1220 \end_layout
1222 \begin_layout Standard
1223 Shift bits-bit (max 48, default 48) number logically right by amount (default
1224  1) places.
1225  The new bits are filled with zeroes.
1226 \end_layout
1228 \begin_layout Subsubsection
1229 bit.arshift(number base[, number amount[, number bits]])
1230 \end_layout
1232 \begin_layout Standard
1233 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1234  (default 1) places.
1235  The new bits are shifted in with copy of the high bit.
1236 \end_layout
1238 \begin_layout Subsubsection
1239 bit.extract(number base[, number bit0[, number bit1,...]])
1240 \end_layout
1242 \begin_layout Standard
1243 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1244 \end_layout
1246 \begin_layout Standard
1247 Notes: 
1248 \end_layout
1250 \begin_layout Itemize
1251 Bit numbers up to 51 should work reliably (then things start falling apart
1252  due to double precision issues).
1253 \end_layout
1255 \begin_layout Itemize
1256 There are two special bit positions, true and false, standing for always
1257  set bit and always clear bit.
1258 \end_layout
1260 \begin_layout Subsubsection
1261 bit.value([number bit1[, number bit2,...]])
1262 \end_layout
1264 \begin_layout Standard
1265 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1266  places and so on.
1267  As special value, nil argument is no-op.
1268 \end_layout
1270 \begin_layout Subsubsection
1271 bit.test_any(number a, number b)
1272 \end_layout
1274 \begin_layout Standard
1275 Returns true if bitwise and of a and b is nonzero, otherwise false.
1276 \end_layout
1278 \begin_layout Subsubsection
1279 bit.test_all(number a, number b)
1280 \end_layout
1282 \begin_layout Standard
1283 Returns true if bitwise and of a and b is equals b, otherwise false.
1284 \end_layout
1286 \begin_layout Subsubsection
1287 bit.popcount(number a)
1288 \end_layout
1290 \begin_layout Standard
1291 Returns number of set bits in a.
1292 \end_layout
1294 \begin_layout Subsubsection
1295 bit.clshift(number a, number b, [number amount,[number bits]])
1296 \end_layout
1298 \begin_layout Standard
1299 Does chained left shift on a, b by amount positions, assuming numbers to
1300  be of specified number of bits.
1301 \end_layout
1303 \begin_layout Subsubsection
1304 bit.crshift(number a, number b, [number amount,[number bits]])
1305 \end_layout
1307 \begin_layout Standard
1308 Does chained right shift on a, b by amount positions, assuming numbers to
1309  be of specified number of bits.
1310 \end_layout
1312 \begin_layout Subsubsection
1313 bit.flagdecode(number a, number bits, [string on, [string off]])
1314 \end_layout
1316 \begin_layout Standard
1317 Return string of length bits where ith character is ith character of on
1318  if bit i is on, otherwise ith character of off.
1319  Out of range reads give last character, or '*'/'-' if empty.
1320 \end_layout
1322 \begin_layout Subsubsection
1323 bit.rflagdecode(number a, number bits, [string on, [string off]])
1324 \end_layout
1326 \begin_layout Standard
1327 Like bit.flagdecode, but outputs the string in the opposite order (most significa
1328 nt bit first).
1329 \end_layout
1331 \begin_layout Subsection
1332 Table gui:
1333 \end_layout
1335 \begin_layout Standard
1336 Most of these functions can only be called in on_paint and on_video callbacks.
1337  Exceptions are noted.
1338 \end_layout
1340 \begin_layout Standard
1341 Colors are 32-bit.
1342  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1343  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1344  opaque, 255 is almost transparent).
1345  -1 is the fully transparent color.
1346  Alpha values greater than 127 do work.
1347 \end_layout
1349 \begin_layout Standard
1350 Origin of coordinates is at top left corner of game display area.
1351  Left and top gaps correspond to negative coordinates.
1352 \end_layout
1354 \begin_layout Subsubsection
1355 gui.resolution()
1356 \end_layout
1358 \begin_layout Standard
1359 Returns 2-tuple (hresolution, vresolution).
1360 \end_layout
1362 \begin_layout Subsubsection
1363 gui.<class>_gap(number gap)
1364 \end_layout
1366 \begin_layout Standard
1367 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1368  is 8191).
1369 \end_layout
1371 \begin_layout Subsubsection
1372 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1373 \end_layout
1375 \begin_layout Standard
1376 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1377  16 high).
1378  Parameters:
1379 \end_layout
1381 \begin_layout Itemize
1382 x: X-coordinate to start the drawing from (and x-coordinate at begining
1383  of the lines).
1384 \end_layout
1386 \begin_layout Itemize
1387 y: Y-coordinate to start the drawing from.
1388 \end_layout
1390 \begin_layout Itemize
1391 text: The text to draw.
1392 \end_layout
1394 \begin_layout Itemize
1395 fgc: Text color (default is 0xFFFFFF (white))
1396 \end_layout
1398 \begin_layout Itemize
1399 bgc: Background color (default is -1 (transparent))
1400 \end_layout
1402 \begin_layout Subsubsection
1403 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1404 \end_layout
1406 \begin_layout Standard
1407 Like gui.text, but draw using double-width.
1408 \end_layout
1410 \begin_layout Subsubsection
1411 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1412 \end_layout
1414 \begin_layout Standard
1415 Like gui.text, but draw using double-height.
1416 \end_layout
1418 \begin_layout Subsubsection
1419 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
1420 \end_layout
1422 \begin_layout Standard
1423 Like gui.text, but draw using double-width/double-height.
1424 \end_layout
1426 \begin_layout Subsubsection
1427 gui.rectangle(number x, number y, number width, number height[, number thickness[
1428 , number outline[, number fill]]])
1429 \end_layout
1431 \begin_layout Standard
1432 Draw rectangle on the GUI.
1433  Parameters:
1434 \end_layout
1436 \begin_layout Itemize
1437 x: X-coordinate of left edge.
1438 \end_layout
1440 \begin_layout Itemize
1441 y: Y-coordinate of upper edge.
1442 \end_layout
1444 \begin_layout Itemize
1445 width: Width of rectangle.
1446 \end_layout
1448 \begin_layout Itemize
1449 height: Height of rectangle.
1450 \end_layout
1452 \begin_layout Itemize
1453 thickness: Thickness of outline (default is 1).
1454 \end_layout
1456 \begin_layout Itemize
1457 outline: Color of outline (default is 0xFFFFFF (white))
1458 \end_layout
1460 \begin_layout Itemize
1461 fill: Color of fill (default is -1 (transparent))
1462 \end_layout
1464 \begin_layout Subsubsection
1465 gui.box(number x, number y, number width, number height[, number thickness[,
1466  number outline1[,number outline2[, number fill]]]])
1467 \end_layout
1469 \begin_layout Standard
1470 Draw rectangle with 3D effect on the GUI.
1471  Parameters:
1472 \end_layout
1474 \begin_layout Itemize
1475 x: X-coordinate of left edge.
1476 \end_layout
1478 \begin_layout Itemize
1479 y: Y-coordinate of upper edge.
1480 \end_layout
1482 \begin_layout Itemize
1483 width: Width of rectangle.
1484 \end_layout
1486 \begin_layout Itemize
1487 height: Height of rectangle.
1488 \end_layout
1490 \begin_layout Itemize
1491 thickness: Thickness of outline (default is 1).
1492 \end_layout
1494 \begin_layout Itemize
1495 outline1: First color of outline (default is 0xFFFFFF (white))
1496 \end_layout
1498 \begin_layout Itemize
1499 outline2: First color of outline (default is 0x808080 (dark gray))
1500 \end_layout
1502 \begin_layout Itemize
1503 fill: Color of fill (default is 0xC0C0C0 (light grayy))
1504 \end_layout
1506 \begin_layout Subsubsection
1507 gui.pixel(number x, number y[, number color])
1508 \end_layout
1510 \begin_layout Standard
1511 Draw one pixel on the GUI.
1512  Parameters:
1513 \end_layout
1515 \begin_layout Itemize
1516 x: X-coordinate of the pixel
1517 \end_layout
1519 \begin_layout Itemize
1520 y: Y-coordinate of the pixel
1521 \end_layout
1523 \begin_layout Itemize
1524 color: Color of the pixel (default is 0xFFFFFF (white))
1525 \end_layout
1527 \begin_layout Subsubsection
1528 gui.crosshair(number x, number y[, number length[, number color]])
1529 \end_layout
1531 \begin_layout Standard
1532 Draw a crosshair.
1533  Parameters:
1534 \end_layout
1536 \begin_layout Itemize
1537 x: X-coordinate of the crosshair
1538 \end_layout
1540 \begin_layout Itemize
1541 y: Y-coordinate of the crosshair
1542 \end_layout
1544 \begin_layout Itemize
1545 length: Length of the crosshair lines (default 10).
1546 \end_layout
1548 \begin_layout Itemize
1549 color: Color of the crosshair (default is 0xFFFFFF (white))
1550 \end_layout
1552 \begin_layout Subsubsection
1553 gui.line(number x1, number y1, number x2, number y2[, number color])
1554 \end_layout
1556 \begin_layout Standard
1557 Draw a thin line.
1558  Parameters:
1559 \end_layout
1561 \begin_layout Itemize
1562 x1: X-coordinate of one end.
1563 \end_layout
1565 \begin_layout Itemize
1566 y1: Y-coordinate of one end.
1567 \end_layout
1569 \begin_layout Itemize
1570 x2: X-coordinate of the other end.
1571 \end_layout
1573 \begin_layout Itemize
1574 y2: Y-coordinate of the other end.
1575 \end_layout
1577 \begin_layout Itemize
1578 color: Color of the line (default is 0xFFFFFF (white)).
1579 \end_layout
1581 \begin_layout Subsubsection
1582 gui.circle(number x, number y, number r[, number thick[, number border[,
1583  number fil]]])
1584 \end_layout
1586 \begin_layout Standard
1587 Draw a circle.
1588  Parameters.
1589 \end_layout
1591 \begin_layout Itemize
1592 x: X-coordinate of the center
1593 \end_layout
1595 \begin_layout Itemize
1596 y: Y-coordinate of the center
1597 \end_layout
1599 \begin_layout Itemize
1600 r: The radius of the circle
1601 \end_layout
1603 \begin_layout Itemize
1604 thick: Border thickness
1605 \end_layout
1607 \begin_layout Itemize
1608 border: Border color (default is 0xFFFFFF (white))
1609 \end_layout
1611 \begin_layout Itemize
1612 fill: Fill color (default is -1 (transparent)).
1613 \end_layout
1615 \begin_layout Subsubsection
1616 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
1617 \end_layout
1619 \begin_layout Standard
1620 Draw a bitmap on screen with specified palette.
1621  Parameters:
1622 \end_layout
1624 \begin_layout Itemize
1625 x: X-coordinate of left edge.
1626 \end_layout
1628 \begin_layout Itemize
1629 y: Y-coordinate of top edge.
1630 \end_layout
1632 \begin_layout Itemize
1633 bitmap: The bitmap to draw
1634 \end_layout
1636 \begin_layout Itemize
1637 palette: The palette to draw the bitmap using.
1638 \end_layout
1640 \begin_layout Subsubsection
1641 gui.bitmap_draw(number x, number y, dbitmap bitmap)
1642 \end_layout
1644 \begin_layout Standard
1645 Draw a bitmap on screen.
1646  Parameters:
1647 \end_layout
1649 \begin_layout Itemize
1650 x: X-coordinate of left edge.
1651 \end_layout
1653 \begin_layout Itemize
1654 y: Y-coordinate of top edge.
1655 \end_layout
1657 \begin_layout Itemize
1658 bitmap: The bitmap to draw
1659 \end_layout
1661 \begin_layout Subsubsection
1662 gui.palette_new()
1663 \end_layout
1665 \begin_layout Standard
1666 Returns a new palette (initially all transparent).
1667  Can be used anywhere.
1668 \end_layout
1670 \begin_layout Subsubsection
1671 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
1672 \end_layout
1674 \begin_layout Standard
1675 Returns a new bitmap/dbitmap.
1676  Can be used anywhere.
1677  Parameters:
1678 \end_layout
1680 \begin_layout Itemize
1681 w: The width of new bitmap
1682 \end_layout
1684 \begin_layout Itemize
1685 h: The height of new bitmap
1686 \end_layout
1688 \begin_layout Itemize
1689 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
1690 \end_layout
1692 \begin_layout Itemize
1693 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
1694 \end_layout
1696 \begin_layout Subsubsection
1697 gui.bitmap_load(string file)
1698 \end_layout
1700 \begin_layout Standard
1701 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
1702  for bitmap).
1703  Can be used anywhere.
1704  Parameters:
1705 \end_layout
1707 \begin_layout Itemize
1708 file: The name of file to load.
1709 \end_layout
1711 \begin_layout Subsubsection
1712 gui.palette_set(palette palette, number index, number color)
1713 \end_layout
1715 \begin_layout Standard
1716 Sets color in palette.
1717  Can be used anywhere.
1718  Parameters:
1719 \end_layout
1721 \begin_layout Itemize
1722 palette: The palette to manipulate
1723 \end_layout
1725 \begin_layout Itemize
1726 index: Index of color (0-65535).
1727 \end_layout
1729 \begin_layout Itemize
1730 color: The color value.
1731 \end_layout
1733 \begin_layout Subsubsection
1734 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
1735 \end_layout
1737 \begin_layout Standard
1738 Sets specified pixel in bitmap.
1739  Can be used anywhere.
1740  Parameters:
1741 \end_layout
1743 \begin_layout Itemize
1744 bitmap: The bitmap to manipulate
1745 \end_layout
1747 \begin_layout Itemize
1748 x: The x-coordinate of the pixel.
1749 \end_layout
1751 \begin_layout Itemize
1752 y: The y-coordinate of the pixel.
1753 \end_layout
1755 \begin_layout Itemize
1756 color: If bitmap is a bitmap, color index (0-65535).
1757  Otherwise color value.
1758 \end_layout
1760 \begin_layout Subsubsection
1761 gui.bitmap_size(bitmap/dbitmap bitmap)
1762 \end_layout
1764 \begin_layout Standard
1765 Get size of bitmap.
1766  Can be used anywhere.
1767  Parameters:
1768 \end_layout
1770 \begin_layout Itemize
1771 bitmap: The bitmap to query.
1772 \end_layout
1774 \begin_layout Standard
1775 The first return is the width, the second is the height.
1776 \end_layout
1778 \begin_layout Subsubsection
1779 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
1780  src, number sx, number sy, number w, number h[, number ck])
1781 \end_layout
1783 \begin_layout Standard
1784 Blit a part of bitmap to another.
1785  Can be used anywhere.
1786  Parameters:
1787 \end_layout
1789 \begin_layout Itemize
1790 dest: Destination to blit to.
1791 \end_layout
1793 \begin_layout Itemize
1794 dx: left edge of target
1795 \end_layout
1797 \begin_layout Itemize
1798 dy: Top edge of target
1799 \end_layout
1801 \begin_layout Itemize
1802 src: The source to blit from.
1803  Must be of the same type as destination.
1804 \end_layout
1806 \begin_layout Itemize
1807 sx: left edge of source
1808 \end_layout
1810 \begin_layout Itemize
1811 sy: Top edge of source
1812 \end_layout
1814 \begin_layout Itemize
1815 w: Width of region
1816 \end_layout
1818 \begin_layout Itemize
1819 h: Height of region.
1820 \end_layout
1822 \begin_layout Itemize
1823 ck: Color key.
1824  Pixels of this color are not blitted.
1825 \end_layout
1827 \begin_deeper
1828 \begin_layout Itemize
1829 If bitmaps are bitmaps, this is color index of colorkey.
1830  Values outside range 0-65535 cause no key to be used as colorkey.
1831 \end_layout
1833 \begin_layout Itemize
1834 If bitmaps are dbitmaps, this color value of colorkey.
1835 \end_layout
1837 \begin_layout Itemize
1838 May be absent or nil for no colorkey blit.
1839 \end_layout
1841 \end_deeper
1842 \begin_layout Subsubsection
1843 gui.repaint()
1844 \end_layout
1846 \begin_layout Standard
1847 Request on_repaint() to happen as soon as possible.
1848  Can be used anywhere.
1849 \end_layout
1851 \begin_layout Subsubsection
1852 gui.subframe_update(boolean on)
1853 \end_layout
1855 \begin_layout Standard
1856 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
1857  or not happen (on=false).
1858  Can be used anywhere.
1859 \end_layout
1861 \begin_layout Subsubsection
1862 gui.screenshot(string filename)
1863 \end_layout
1865 \begin_layout Standard
1866 Write PNG screenshot of the current frame (no drawings) to specified file.
1867  Can be used anywhere.
1868 \end_layout
1870 \begin_layout Subsubsection
1871 gui.color(number r, number g, number b[, number a])
1872 \end_layout
1874 \begin_layout Standard
1875 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
1876  each component in scale 0-255.
1877  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
1878  opaque).
1879  The default alpha is 256.
1880 \end_layout
1882 \begin_layout Subsubsection
1883 gui.status(string name, string value)
1884 \end_layout
1886 \begin_layout Standard
1887 Set status field 
1888 \begin_inset Quotes eld
1889 \end_inset
1891 L[<name>]
1892 \begin_inset Quotes erd
1893 \end_inset
1895  to <value> in status area.
1896  Can be used anywhere.
1897 \end_layout
1899 \begin_layout Subsubsection
1900 gui.rainbow(number step, number steps[, number color])
1901 \end_layout
1903 \begin_layout Standard
1904 Perform hue rotation of color <color> (default bright red), by <step> steps.
1905  The number of steps per full rotation is given by absolute value of <steps>.
1906 \end_layout
1908 \begin_layout Standard
1909 If <steps> is negative, the rotation will be counterclockwise.
1910 \end_layout
1912 \begin_layout Subsubsection
1913 gui.screenshot(string filename)
1914 \end_layout
1916 \begin_layout Standard
1917 Saves a screenshot into specified file.
1918 \end_layout
1920 \begin_layout Subsubsection
1921 gui.renderq_new(number width, number height)
1922 \end_layout
1924 \begin_layout Standard
1925 Create render queue with specified reported size and return it.
1926 \end_layout
1928 \begin_layout Subsubsection
1929 gui.renderq_clear(RENDERQUEUE queue)
1930 \end_layout
1932 \begin_layout Standard
1933 Clear specified render queue.
1934 \end_layout
1936 \begin_layout Subsubsection
1937 gui.renderq_set(RENDERQUEUE queue)
1938 \end_layout
1940 \begin_layout Standard
1941 Switch to specified render queue.
1942  Use nil as queue to switch to default queue.
1943 \end_layout
1945 \begin_layout Itemize
1946 When switched to another queue, all drawing functions work and draw there,
1947  even outside on_video/on_paint.
1948 \end_layout
1950 \begin_layout Subsubsection
1951 gui.renderq_run(RENDERQUEUE queue)
1952 \end_layout
1954 \begin_layout Standard
1955 Run specified render queue, copying the objects to current render queue.
1957 \end_layout
1959 \begin_layout Itemize
1960 Warning: Don't try to run the current render queue.
1961 \end_layout
1963 \begin_layout Subsubsection
1964 gui.loadfont(string filename)
1965 \end_layout
1967 \begin_layout Standard
1968 Loads font from specified file (CUSTOMFONT object).
1969 \end_layout
1971 \begin_layout Subsubsection
1972 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc]])
1973 \end_layout
1975 \begin_layout Standard
1976 Draw string with custom font to screen.
1977  The parameters are the same as in gui.text.
1978 \end_layout
1980 \begin_layout Subsection
1981 table input
1982 \end_layout
1984 \begin_layout Standard
1985 Input handling.
1986  Only available in on_input callback.
1987 \end_layout
1989 \begin_layout Subsubsection
1990 input.get(number controller, number index)
1991 \end_layout
1993 \begin_layout Standard
1994 Read the specified index (0-11) from specified controller (0-7).
1995  Notes:
1996 \end_layout
1998 \begin_layout Itemize
1999 Uses physical controller numbering.
2000  Gamepad in port 2 is controller 4, not 1!
2001 \end_layout
2003 \begin_layout Subsubsection
2004 input.set(number controller, number index, number value)
2005 \end_layout
2007 \begin_layout Standard
2008 Write the specified index (0-11) from specified controller (0-7), storing
2009  value.
2010  Notes:
2011 \end_layout
2013 \begin_layout Itemize
2014 Uses physical controller numbering.
2015  Gamepad in port 2 is controller 4, not 1!
2016 \end_layout
2018 \begin_layout Subsubsection
2019 input.get2(number port, number controller, number index)
2020 \end_layout
2022 \begin_layout Standard
2023 Read the specified input tuple.
2024 \end_layout
2026 \begin_layout Itemize
2027 Port 0 is system port.
2028 \end_layout
2030 \begin_layout Subsubsection
2031 input.set2(number port, number controller, number index, number value)
2032 \end_layout
2034 \begin_layout Standard
2035 Write the specified input tuple.
2036 \end_layout
2038 \begin_layout Itemize
2039 Port 0 is system port.
2040 \end_layout
2042 \begin_layout Subsubsection
2043 input.lcid_to_pcid2(number lcid)
2044 \end_layout
2046 \begin_layout Standard
2047 Look up physical pcid pair (port, controller) corresponding to specified
2048  logical controller (1-based).
2049  Returns nothing if controller does not exist.
2050 \end_layout
2052 \begin_layout Subsubsection
2053 input.port_type(number port)
2054 \end_layout
2056 \begin_layout Standard
2057 Return type of specified port.
2058 \end_layout
2060 \begin_layout Subsubsection
2061 input.controller_info(number port, number controller)
2062 \end_layout
2064 \begin_layout Standard
2065 Get controller info for specified controller.
2066  If controller does not exist, returns nil.
2067  Otherwise returns a table with following fields:
2068 \end_layout
2070 \begin_layout Itemize
2071 type (string): Type of the controller.
2072 \end_layout
2074 \begin_layout Itemize
2075 class (string): Class of the controller.
2076 \end_layout
2078 \begin_layout Itemize
2079 classnum (number): Number of the controller within its class (1-based)
2080 \end_layout
2082 \begin_layout Itemize
2083 lcid (number): Logical controller number of the controller.
2084 \end_layout
2086 \begin_layout Itemize
2087 button_count (number): Number of buttons on controller
2088 \end_layout
2090 \begin_layout Itemize
2091 buttons (array): Array of following info about each button:
2092 \end_layout
2094 \begin_deeper
2095 \begin_layout Itemize
2096 type (string): Type of button.
2097  Currently one of 
2098 \begin_inset Quotes eld
2099 \end_inset
2101 null
2102 \begin_inset Quotes erd
2103 \end_inset
2106 \begin_inset Quotes eld
2107 \end_inset
2109 button
2110 \begin_inset Quotes erd
2111 \end_inset
2114 \begin_inset Quotes eld
2115 \end_inset
2117 axis
2118 \begin_inset Quotes erd
2119 \end_inset
2122 \begin_inset Quotes eld
2123 \end_inset
2125 raxis
2126 \begin_inset Quotes erd
2127 \end_inset
2130 \end_layout
2132 \begin_layout Itemize
2133 name (string): Name of button.
2134 \end_layout
2136 \begin_layout Itemize
2137 symbol (string): Symbol of button.
2138  Only present for type 
2139 \begin_inset Quotes eld
2140 \end_inset
2142 button
2143 \begin_inset Quotes erd
2144 \end_inset
2147 \end_layout
2149 \begin_layout Itemize
2150 hidden (boolean): True if hidden button.
2152 \end_layout
2154 \end_deeper
2155 \begin_layout Subsubsection
2156 input.veto_button()
2157 \end_layout
2159 \begin_layout Standard
2160 Signals that the button event should be vetoed.
2161  Only valid in on_button callback.
2162 \end_layout
2164 \begin_layout Subsubsection
2165 input.geta(number controller)
2166 \end_layout
2168 \begin_layout Standard
2169 Get input state for entiere controller.
2170  Returns 13 return values.
2171 \end_layout
2173 \begin_layout Itemize
2174 1st return value: Bitmask: bit i is set if i:th index is nonzero
2175 \end_layout
2177 \begin_layout Itemize
2178 2nd-13th return value: value of i:th index.
2179 \end_layout
2181 \begin_layout Subsubsection
2182 input.seta(number controller, number bitmask, number args...)
2183 \end_layout
2185 \begin_layout Standard
2186 Set state for entiere controller.
2187  args is up to 12 values for indices (overriding values in bitmask if specified).
2188 \end_layout
2190 \begin_layout Subsubsection
2191 input.controllertype(number controller)
2192 \end_layout
2194 \begin_layout Standard
2195 Get the type of controller as string.
2196  Valid values are:
2197 \end_layout
2199 \begin_layout Itemize
2200 gamepad
2201 \end_layout
2203 \begin_layout Itemize
2204 mouse
2205 \end_layout
2207 \begin_layout Itemize
2208 justifier
2209 \end_layout
2211 \begin_layout Itemize
2212 superscope
2213 \end_layout
2215 \begin_layout Subsubsection
2216 input.reset([number cycles])
2217 \end_layout
2219 \begin_layout Standard
2220 Execute reset.
2221  If cycles is greater than zero, do delayed reset.
2222  0 (or no value) causes immediate reset.
2223 \end_layout
2225 \begin_layout Itemize
2226 Only available with subframe flag false.
2227 \end_layout
2229 \begin_layout Subsubsection
2230 input.raw()
2231 \end_layout
2233 \begin_layout Standard
2234 Returns table of tables of all available keys and axes.
2235  The first table is indexed by key name (platform-dependent!), and the inner
2236  table has the following fields:
2237 \end_layout
2239 \begin_layout Itemize
2240 value: Last reported value for control
2241 \end_layout
2243 \begin_deeper
2244 \begin_layout Itemize
2245 For keys: 1 for pressed, 0 for released.
2246 \end_layout
2248 \begin_layout Itemize
2249 For axes: -32767...32767.
2250 \end_layout
2252 \begin_layout Itemize
2253 For presure-sensitive buttons: 0...32767.
2254 \end_layout
2256 \begin_layout Itemize
2257 For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
2258 \end_layout
2260 \begin_layout Itemize
2261 For mouse: Coordinates relative to game area.
2262 \end_layout
2264 \end_deeper
2265 \begin_layout Itemize
2266 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2267  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2268 \end_layout
2270 \begin_layout Subsubsection
2271 input.keyhook(string key, boolean state)
2272 \end_layout
2274 \begin_layout Standard
2275 Requests that keyhook events to be sent for key (state=true) or not sent
2276  (state=false).
2277 \end_layout
2279 \begin_layout Subsubsection
2280 input.joyget(number controller)
2281 \end_layout
2283 \begin_layout Standard
2284 Returns table for current controls for specified controller.
2285  The names of fields vary by controller type.
2286 \end_layout
2288 \begin_layout Itemize
2289 The buttons have the same name as those are referred to in other contexts
2290  in the emulator
2291 \end_layout
2293 \begin_layout Itemize
2294 The analog axes are 
2295 \begin_inset Quotes eld
2296 \end_inset
2298 xaxis
2299 \begin_inset Quotes erd
2300 \end_inset
2302  and 
2303 \begin_inset Quotes eld
2304 \end_inset
2306 yaxis
2307 \begin_inset Quotes erd
2308 \end_inset
2311 \end_layout
2313 \begin_layout Subsubsection
2314 input.joyset(number controller, table controls)
2315 \end_layout
2317 \begin_layout Standard
2318 Set the the state of specified controller to values specified in specified
2319  table.
2320 \end_layout
2322 \begin_layout Subsubsection
2323 input.lcid_to_pcid(number controller)
2324 \end_layout
2326 \begin_layout Standard
2327 Return the physical index, physical port and controller number in port for
2328  specified (1-based) logical controller.
2329 \end_layout
2331 \begin_layout Subsection
2332 Table keyboard
2333 \end_layout
2335 \begin_layout Standard
2336 Various keybinding-related functions
2337 \end_layout
2339 \begin_layout Subsubsection
2340 keyboard.bind(string mod, string mask, string key, string cmd)
2341 \end_layout
2343 \begin_layout Standard
2344 Bind specified key with specified modifers to specified command.
2345 \end_layout
2347 \begin_layout Subsubsection
2348 keyboard.unbind(string mod, string mask, string key)
2349 \end_layout
2351 \begin_layout Standard
2352 Unbind specified key with specified modifers.
2353 \end_layout
2355 \begin_layout Subsubsection
2356 keyboard.alias(string alias, string expansion)
2357 \end_layout
2359 \begin_layout Standard
2360 Set expansion of given command.
2361 \end_layout
2363 \begin_layout Subsection
2364 Table subtitle
2365 \end_layout
2367 \begin_layout Standard
2368 Subtitle handling
2369 \end_layout
2371 \begin_layout Subsubsection
2372 subtitle.byindex(number i)
2373 \end_layout
2375 \begin_layout Standard
2376 Read the frame and length of ith subtitle.
2377  Returns nothing if not present.
2378 \end_layout
2380 \begin_layout Subsubsection
2381 subtitle.set(number f, number l, string txt)
2382 \end_layout
2384 \begin_layout Standard
2385 Set the text of subtitle.
2386 \end_layout
2388 \begin_layout Subsubsection
2389 subtitle.get(number f, number l)
2390 \end_layout
2392 \begin_layout Standard
2393 Get the text of subtitle.
2394 \end_layout
2396 \begin_layout Subsubsection
2397 subtitle.delete(number f, number l)
2398 \end_layout
2400 \begin_layout Standard
2401 Delete specified subtitle.
2402 \end_layout
2404 \begin_layout Subsection
2405 Table hostmemory
2406 \end_layout
2408 \begin_layout Standard
2409 Host memory handling (extra memory saved to savestates).
2410  Host memory starts empty.
2411 \end_layout
2413 \begin_layout Subsubsection
2414 hostmemory.read(number address)
2415 \end_layout
2417 \begin_layout Standard
2418 Reads hostmemory slot address.
2419  Slot numbers out of range return false instead of numeric.
2420 \end_layout
2422 \begin_layout Subsubsection
2423 hostmemory.write(number address, number value)
2424 \end_layout
2426 \begin_layout Standard
2427 Writes hostmemory slot with 0-255.
2428  Slot numbers out of range cause extension of host memory slot space.
2429 \end_layout
2431 \begin_layout Subsubsection
2432 hostmemory.readbyte(number address)
2433 \end_layout
2435 \begin_layout Standard
2436 Read unsigned byte (1 element) from given address.
2437  Slots out of range return false.
2438 \end_layout
2440 \begin_layout Subsubsection
2441 hostmemory.writebyte(number address, number value)
2442 \end_layout
2444 \begin_layout Standard
2445 Write unsigned byte (1 element) to given slot.
2446  Slot numbers out of range cause extension.
2447 \end_layout
2449 \begin_layout Subsubsection
2450 hostmemory.readsbyte(number address)
2451 \end_layout
2453 \begin_layout Standard
2454 Read signed byte (1 element) from given address.
2455  Slots out of range return false.
2456 \end_layout
2458 \begin_layout Subsubsection
2459 hostmemory.writesbyte(number address, number value)
2460 \end_layout
2462 \begin_layout Standard
2463 Write signed byte (1 element) to given slot.
2464  Slot numbers out of range cause extension.
2465 \end_layout
2467 \begin_layout Subsubsection
2468 hostmemory.readword(number address)
2469 \end_layout
2471 \begin_layout Standard
2472 Read unsigned word (2 elements) from given address.
2473  Slots out of range return false.
2474 \end_layout
2476 \begin_layout Subsubsection
2477 hostmemory.writeword(number address, number value)
2478 \end_layout
2480 \begin_layout Standard
2481 Write unsigned word (2 elements) to given slot.
2482  Slot numbers out of range cause extension.
2483 \end_layout
2485 \begin_layout Subsubsection
2486 hostmemory.readsword(number address)
2487 \end_layout
2489 \begin_layout Standard
2490 Read signed word (2 elements) from given address.
2491  Slots out of range return false.
2492 \end_layout
2494 \begin_layout Subsubsection
2495 hostmemory.writesword(number address, number value)
2496 \end_layout
2498 \begin_layout Standard
2499 Write signed word (2 elements) to given slot.
2500  Slot numbers out of range cause extension.
2501 \end_layout
2503 \begin_layout Subsubsection
2504 hostmemory.readdword(number address)
2505 \end_layout
2507 \begin_layout Standard
2508 Read unsigned doubleword (4 elements) from given address.
2509  Slots out of range return false.
2510 \end_layout
2512 \begin_layout Subsubsection
2513 hostmemory.writedword(number address, number value)
2514 \end_layout
2516 \begin_layout Standard
2517 Write unsigned doubleword (4 elements) to given slot.
2518  Slot numbers out of range cause extension.
2519 \end_layout
2521 \begin_layout Subsubsection
2522 hostmemory.readsdword(number address)
2523 \end_layout
2525 \begin_layout Standard
2526 Read signed doubleword (4 elements) from given address.
2527  Slots out of range return false.
2528 \end_layout
2530 \begin_layout Subsubsection
2531 hostmemory.writesdword(number address, number value)
2532 \end_layout
2534 \begin_layout Standard
2535 Write signed doubleword (4 elements) to given slot.
2536  Slot numbers out of range cause extension.
2537 \end_layout
2539 \begin_layout Subsubsection
2540 hostmemory.readqword(number address)
2541 \end_layout
2543 \begin_layout Standard
2544 Read unsigned quadword (8 elements) from given address.
2545  Slots out of range return false.
2546 \end_layout
2548 \begin_layout Subsubsection
2549 hostmemory.writeqword(number address, number value)
2550 \end_layout
2552 \begin_layout Standard
2553 Write unsigned quadword (4 elements) to given slot.
2554  Slot numbers out of range cause extension.
2555 \end_layout
2557 \begin_layout Subsubsection
2558 hostmemory.readsqword(number address)
2559 \end_layout
2561 \begin_layout Standard
2562 Read signed quadword (8 elements) from given address.
2563  Slots out of range return false.
2564 \end_layout
2566 \begin_layout Subsubsection
2567 hostmemory.writesqword(number address, number value)
2568 \end_layout
2570 \begin_layout Standard
2571 Write signed quadword (8 elements) to given slot.
2572  Slot numbers out of range cause extension.
2573 \end_layout
2575 \begin_layout Subsection
2576 Table movie
2577 \end_layout
2579 \begin_layout Standard
2580 Movie handling
2581 \end_layout
2583 \begin_layout Subsubsection
2584 movie.currentframe()
2585 \end_layout
2587 \begin_layout Standard
2588 Return number of current frame.
2589 \end_layout
2591 \begin_layout Subsubsection
2592 movie.framecount()
2593 \end_layout
2595 \begin_layout Standard
2596 Return number of frames in movie.
2597 \end_layout
2599 \begin_layout Subsubsection
2600 movie.readonly()
2601 \end_layout
2603 \begin_layout Standard
2604 Return true if in readonly mode, false if in readwrite.
2605 \end_layout
2607 \begin_layout Subsubsection
2608 movie.rerecords()
2609 \end_layout
2611 \begin_layout Standard
2612 Returns the current value of rerecord count.
2613 \end_layout
2615 \begin_layout Subsubsection
2616 movie.set_readwrite()
2617 \end_layout
2619 \begin_layout Standard
2620 Set readwrite mode (does not cause on_readwrite callback).
2621 \end_layout
2623 \begin_layout Subsubsection
2624 movie.frame_subframes(number frame)
2625 \end_layout
2627 \begin_layout Standard
2628 Count number of subframes in specified frame (frame numbers are 1-based)
2629  and return that.
2630 \end_layout
2632 \begin_layout Subsubsection
2633 movie.read_subframe(number frame, number subframe)
2634 \end_layout
2636 \begin_layout Standard
2637 Read specifed subframe in specified frame and return data as array (100
2638  elements, numbered 0-99 currently).
2639 \end_layout
2641 \begin_layout Subsubsection
2642 movie.read_rtc()
2643 \end_layout
2645 \begin_layout Standard
2646 Returns the current value of the RTC as a pair (second, subsecond).
2647 \end_layout
2649 \begin_layout Subsubsection
2650 movie.unsafe_rewind([UNSAFEREWIND state])
2651 \end_layout
2653 \begin_layout Standard
2654 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2655 \end_layout
2657 \begin_layout Itemize
2658 If called without argument, causes emulator to start process of setting
2659  unsafe rewind point.
2660  When this has finished, callback on_set_rewind occurs, passing the rewind
2661  state to lua script.
2662 \end_layout
2664 \begin_layout Itemize
2665 If called with argument, causes emulator rewind to passed rewind point as
2666  soon as possible.
2667  Readwrite mode is implicitly activated.
2668 \end_layout
2670 \begin_layout Standard
2671 The following warnings apply to unsafe rewinding:
2672 \end_layout
2674 \begin_layout Itemize
2675 There are no safety checks against misuse (that's what 
2676 \begin_inset Quotes eld
2677 \end_inset
2679 unsafe
2680 \begin_inset Quotes erd
2681 \end_inset
2683  comes from)!
2684 \end_layout
2686 \begin_layout Itemize
2687 Only call rewind from timeline rewind point was set from.
2688 \end_layout
2690 \begin_layout Itemize
2691 Only call rewind from after the rewind point was set.
2692 \end_layout
2694 \begin_layout Subsection
2695 Table settings
2696 \end_layout
2698 \begin_layout Standard
2699 Routines for settings manipulation
2700 \end_layout
2702 \begin_layout Subsubsection
2703 settings.get(string name)
2704 \end_layout
2706 \begin_layout Standard
2707 Get value of setting.
2708  If setting is blank, returns false.
2709  If setting value can't be obtained, returns (nil, error message).
2710 \end_layout
2712 \begin_layout Subsubsection
2713 settings.set(string name, string value)
2714 \end_layout
2716 \begin_layout Standard
2717 Set value of setting.
2718  If setting can't be set, returns (nil, error message).
2719 \end_layout
2721 \begin_layout Subsubsection
2722 settings.is_set(string name)
2723 \end_layout
2725 \begin_layout Standard
2726 Returns if setting is set.
2727  If setting does not exist, returns (nil, error message).
2728 \end_layout
2730 \begin_layout Subsubsection
2731 settings.blank(string name)
2732 \end_layout
2734 \begin_layout Standard
2735 Blanks a setting and returns true.
2736  If setting can't be blanked, returns (nil, error message).
2737 \end_layout
2739 \begin_layout Subsection
2740 Table memory
2741 \end_layout
2743 \begin_layout Standard
2744 Contains various functions for managing memory
2745 \end_layout
2747 \begin_layout Subsubsection
2748 memory.vma_count()
2749 \end_layout
2751 \begin_layout Standard
2752 Returns the number of VMAs
2753 \end_layout
2755 \begin_layout Subsubsection
2756 memory.read_vma(number index)
2757 \end_layout
2759 \begin_layout Standard
2760 Reads the specified VMA (indices start from zero).
2761  Trying to read invalid VMA gives nil.
2762  The read VMA is table with the following fields:
2763 \end_layout
2765 \begin_layout Itemize
2766 region_name (string): The readable name of the VMA
2767 \end_layout
2769 \begin_layout Itemize
2770 baseaddr (number): Base address of the VMA
2771 \end_layout
2773 \begin_layout Itemize
2774 lastaddr (number): Last address in the VMA.
2775 \end_layout
2777 \begin_layout Itemize
2778 size (number): The size of VMA in bytes.
2779 \end_layout
2781 \begin_layout Itemize
2782 readonly (boolean): True of the VMA corresponds to ROM.
2783 \end_layout
2785 \begin_layout Itemize
2786 iospace (boolean): True if the VMA is I/O space.
2787 \end_layout
2789 \begin_layout Itemize
2790 native_endian (boolean): True if the VMA has native endian as opposed to
2791  little endian.
2792 \end_layout
2794 \begin_layout Subsubsection
2795 memory.find_vma(number address)
2796 \end_layout
2798 \begin_layout Standard
2799 Finds the VMA containing specified address.
2800  Returns table in the same format as read_vma or nil if not found.
2801 \end_layout
2803 \begin_layout Subsubsection
2804 memory.readbyte(number address)
2805 \end_layout
2807 \begin_layout Standard
2808 Reads the specified address as unsigned byte and returns the result.
2809 \end_layout
2811 \begin_layout Subsubsection
2812 memory.readsbyte(number address)
2813 \end_layout
2815 \begin_layout Standard
2816 Reads the specified address as signed byte and returns the result.
2817 \end_layout
2819 \begin_layout Subsubsection
2820 memory.writebyte(number address, number value)
2821 \end_layout
2823 \begin_layout Standard
2824 Writes the specified value (negative values undergo 2's complement) to specified
2825  address (as a byte).
2826 \end_layout
2828 \begin_layout Subsubsection
2829 memory.readword(number address)
2830 \end_layout
2832 \begin_layout Standard
2833 Reads the specified address as unsigned word and returns the result.
2834 \end_layout
2836 \begin_layout Subsubsection
2837 memory.readsword(number address)
2838 \end_layout
2840 \begin_layout Standard
2841 Reads the specified address as signed word and returns the result.
2842 \end_layout
2844 \begin_layout Subsubsection
2845 memory.writeword(number address, number value)
2846 \end_layout
2848 \begin_layout Standard
2849 Writes the specified value (negative values undergo 2's complement) to specified
2850  address (as a word).
2851 \end_layout
2853 \begin_layout Subsubsection
2854 memory.readdword(number address)
2855 \end_layout
2857 \begin_layout Standard
2858 Reads the specified address as unsigned doubleword and returns the result.
2859 \end_layout
2861 \begin_layout Subsubsection
2862 memory.readsdword(number address)
2863 \end_layout
2865 \begin_layout Standard
2866 Reads the specified address as signed doubleword and returns the result.
2867 \end_layout
2869 \begin_layout Subsubsection
2870 memory.writedword(number address, number value)
2871 \end_layout
2873 \begin_layout Standard
2874 Writes the specified value (negative values undergo 2's complement) to specified
2875  address (as a doubleword).
2876 \end_layout
2878 \begin_layout Subsubsection
2879 memory.readqword(number address)
2880 \end_layout
2882 \begin_layout Standard
2883 Reads the specified address as unsigned quadword and returns the result.
2884 \end_layout
2886 \begin_layout Subsubsection
2887 memory.readsqword(number address)
2888 \end_layout
2890 \begin_layout Standard
2891 Reads the specified address as signed quadword and returns the result.
2892 \end_layout
2894 \begin_layout Subsubsection
2895 memory.writeqword(number address, number value)
2896 \end_layout
2898 \begin_layout Standard
2899 Writes the specified value (negative values undergo 2's complement) to specified
2900  address (as a quadword).
2901 \end_layout
2903 \begin_layout Subsubsection
2904 memory.hash_region(number base, number size)
2905 \end_layout
2907 \begin_layout Standard
2908 Hash specified number of bytes starting from specified address and return
2909  the SHA-256.
2910 \end_layout
2912 \begin_layout Subsubsection
2913 memory.hash_state()
2914 \end_layout
2916 \begin_layout Standard
2917 Hash the current system state.
2918  Mainly useful for debugging savestates.
2919 \end_layout
2921 \begin_layout Subsubsection
2922 memory.readregion(number base, number size)
2923 \end_layout
2925 \begin_layout Standard
2926 Read a region of memory.
2927 \end_layout
2929 \begin_layout Itemize
2930 Warning: If the region crosses VMA boundary, the results are undefined.
2931 \end_layout
2933 \begin_layout Subsubsection
2934 memory.map<type>([number base, number size])
2935 \end_layout
2937 \begin_layout Standard
2938 Returns a table mapping specified memory aperture for read/write.
2939  If parameters are omitted, entiere map space is the aperture.
2940 \end_layout
2942 \begin_layout Itemize
2943 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2944 \end_layout
2946 \begin_layout Subsubsection
2947 memory.writeregion(number base, number size, table data)
2948 \end_layout
2950 \begin_layout Standard
2951 Write a region of memory.
2952 \end_layout
2954 \begin_layout Itemize
2955 Warning: If the region crosses VMA boundary, the results are undefined.
2956 \end_layout
2958 \begin_layout Subsubsection
2959 memory.map_structure()
2960 \end_layout
2962 \begin_layout Standard
2963 Returns a new mapping structure (MMAP_STRUCT)
2964 \end_layout
2966 \begin_layout Subsubsection
2967 MMAP_STRUCT(string key, number address, string type)
2968 \end_layout
2970 \begin_layout Standard
2971 Bind key in mmap structure to specified address with specified type.
2972 \end_layout
2974 \begin_layout Itemize
2975 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2976 \end_layout
2978 \begin_layout Subsubsection
2979 memory.read_expr(string expr)
2980 \end_layout
2982 \begin_layout Standard
2983 Evaluate specified watch expression and return result
2984 \end_layout
2986 \begin_layout Subsection
2987 Table subtitle
2988 \end_layout
2990 \begin_layout Standard
2991 Contains functions for manipulating subtitles.
2992 \end_layout
2994 \begin_layout Subsubsection
2995 subtitle.byindex(number index)
2996 \end_layout
2998 \begin_layout Standard
2999 Get (basetime, length) pair of specified subtitle index or nothing if index
3000  isn't valid.
3001 \end_layout
3003 \begin_layout Subsubsection
3004 subtitle.get(number basetime, number length)
3005 \end_layout
3007 \begin_layout Standard
3008 Read the specified subtitle.
3009  Returns 
3010 \begin_inset Quotes eld
3011 \end_inset
3014 \begin_inset Quotes erd
3015 \end_inset
3017  if the subtitle does not exist.
3018 \end_layout
3020 \begin_layout Subsubsection
3021 subtitle.set(number basetime, number length, string content)
3022 \end_layout
3024 \begin_layout Standard
3025 Set the specified subtitle.
3026 \end_layout
3028 \begin_layout Subsubsection
3029 subtitle.deltete(number basetime, number length)
3030 \end_layout
3032 \begin_layout Standard
3033 Delete the specified subtitle.
3034 \end_layout
3036 \begin_layout Subsection
3037 Table _SYSTEM
3038 \end_layout
3040 \begin_layout Standard
3041 Contains copy of global variables from time of Lua initialization.
3042  Non-writeable.
3043 \end_layout
3045 \begin_layout Subsection
3046 Callbacks
3047 \end_layout
3049 \begin_layout Standard
3050 Various callbacks to Lua that can occur.
3051 \end_layout
3053 \begin_layout Subsubsection
3054 Callback: on_paint(bool not_synth)
3055 \end_layout
3057 \begin_layout Standard
3058 Called when screen is being painted.
3059  Any gui.* calls requiring graphic context draw on the screen.
3060 \end_layout
3062 \begin_layout Standard
3063 not_synth is true if this hook is being called in response to received frame,
3064  false otherwise.
3065 \end_layout
3067 \begin_layout Subsubsection
3068 Callback: on_video()
3069 \end_layout
3071 \begin_layout Standard
3072 Called when video dump frame is being painted.
3073  Any gui.* calls requiring graphic context draw on the video.
3074 \end_layout
3076 \begin_layout Subsubsection
3077 Callback: on_frame_emulated()
3078 \end_layout
3080 \begin_layout Standard
3081 Called when emulating frame has completed and on_paint()/on_video() calls
3082  are about to be issued.
3083 \end_layout
3085 \begin_layout Subsubsection
3086 Callback: on_frame()
3087 \end_layout
3089 \begin_layout Standard
3090 Called on each starting whole frame.
3091 \end_layout
3093 \begin_layout Subsubsection
3094 Callback: on_startup()
3095 \end_layout
3097 \begin_layout Standard
3098 Called when the emulator is starting (lsnes.rc and --run files has been run).
3099 \end_layout
3101 \begin_layout Subsubsection
3102 Callback: on_rewind()
3103 \end_layout
3105 \begin_layout Standard
3106 Called when rewind movie to beginning has completed.
3107 \end_layout
3109 \begin_layout Subsubsection
3110 Callback: on_pre_load(string name)
3111 \end_layout
3113 \begin_layout Standard
3114 Called just before savestate/movie load occurs (note: loads are always delayed,
3115  so this occurs even when load was initiated by lua).
3116 \end_layout
3118 \begin_layout Subsubsection
3119 Callback: on_err_load(string name)
3120 \end_layout
3122 \begin_layout Standard
3123 Called if loadstate goes wrong.
3124 \end_layout
3126 \begin_layout Subsubsection
3127 Callback: on_post_load(string name, boolean was_savestate)
3128 \end_layout
3130 \begin_layout Standard
3131 Called on successful loadstate.
3132  was_savestate gives if this was a savestate or a movie.
3133 \end_layout
3135 \begin_layout Subsubsection
3136 Callback: on_pre_save(string name, boolean is_savestate)
3137 \end_layout
3139 \begin_layout Standard
3140 Called just before savestate save occurs (note: movie saves are synchronous
3141  and won't trigger these callbacks if called from Lua).
3142 \end_layout
3144 \begin_layout Subsubsection
3145 Callback: on_err_save(string name)
3146 \end_layout
3148 \begin_layout Standard
3149 Called if savestate goes wrong.
3150 \end_layout
3152 \begin_layout Subsubsection
3153 Callback: on_post_save(string name, boolean is_savestate)
3154 \end_layout
3156 \begin_layout Standard
3157 Called on successful savaestate.
3158  is_savestate gives if this was a savestate or a movie.
3159 \end_layout
3161 \begin_layout Subsubsection
3162 Callback: on_quit()
3163 \end_layout
3165 \begin_layout Standard
3166 Called when emulator is shutting down.
3167 \end_layout
3169 \begin_layout Subsubsection
3170 Callback: on_input(boolean subframe)
3171 \end_layout
3173 \begin_layout Standard
3174 Called when emulator is just sending input to bsnes core.
3175  Warning: This is called even in readonly mode, but the results are ignored.
3176 \end_layout
3178 \begin_layout Subsubsection
3179 Callback: on_reset()
3180 \end_layout
3182 \begin_layout Standard
3183 Called when SNES is reset.
3184 \end_layout
3186 \begin_layout Subsubsection
3187 Callback: on_readwrite()
3188 \end_layout
3190 \begin_layout Standard
3191 Called when moving into readwrite mode as result of 
3192 \begin_inset Quotes eld
3193 \end_inset
3195 set-rwmode
3196 \begin_inset Quotes erd
3197 \end_inset
3199  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3200  entry protection).
3201 \end_layout
3203 \begin_layout Subsubsection
3204 Callback: on_snoop(number port, number controller, number index, number
3205  value)
3206 \end_layout
3208 \begin_layout Standard
3209 Called each time bsnes asks for input.
3210  The value is the final value to be sent to bsnes core (readonly mode, autohold
3211  and autofire have been taken into account).
3212  Might be useful when translating movies to format suitable for console
3213  verification.
3214  Note: There is no way to modify the value to be sent.
3215 \end_layout
3217 \begin_layout Itemize
3218 Not called if callback on_snoop2 is defined.
3219 \end_layout
3221 \begin_layout Subsubsection
3222 Callback: on_snoop2(number port, number controller, number index, number
3223  value)
3224 \end_layout
3226 \begin_layout Standard
3227 Like on_snoop, but reserves port 0 for system, having first user port be
3228  port 1.
3229 \end_layout
3231 \begin_layout Subsubsection
3232 Callback: on_keyhook(string keyname, table state)
3233 \end_layout
3235 \begin_layout Standard
3236 Sent when key that has keyhook events requested changes state.
3237  Keyname is name of the key (group) and state is the state (same kind as
3238  table values in input.raw).
3239 \end_layout
3241 \begin_layout Subsubsection
3242 Callback: on_idle()
3243 \end_layout
3245 \begin_layout Standard
3246 Called when requested by set_idle_timeout(), the timeout has expired and
3247  emulator is waiting.
3248 \end_layout
3250 \begin_layout Subsubsection
3251 Callback: on_timer()
3252 \end_layout
3254 \begin_layout Standard
3255 Called when requested by set_idle_timeout() and the timeout has expired
3256  (regardless if emulator is waiting).
3257 \end_layout
3259 \begin_layout Subsubsection
3260 Callback: on_set_rewind(UNSAFEREWIND r)
3261 \end_layout
3263 \begin_layout Standard
3264 Called when unsafe rewind object has been constructed.
3265 \end_layout
3267 \begin_layout Subsubsection
3268 Callback: on_pre_rewind() 
3269 \end_layout
3271 \begin_layout Standard
3272 Called just before unsafe rewind is about to occur.
3273 \end_layout
3275 \begin_layout Subsubsection
3276 Callback: on_post_rewind() 
3277 \end_layout
3279 \begin_layout Standard
3280 Called just after unsafe rewind has occured.
3281 \end_layout
3283 \begin_layout Subsubsection
3284 Callback: on_button(number port, number controller, number index, string
3285  type)
3286 \end_layout
3288 \begin_layout Standard
3289 Called on controller button press, with following parameters:
3290 \end_layout
3292 \begin_layout Itemize
3293 port: Port number (0 is system)
3294 \end_layout
3296 \begin_layout Itemize
3297 controller: Controller within port
3298 \end_layout
3300 \begin_layout Itemize
3301 index: Index of button.
3302 \end_layout
3304 \begin_layout Itemize
3305 type: Type of event, one of:
3306 \end_layout
3308 \begin_deeper
3309 \begin_layout Itemize
3310 \begin_inset Quotes eld
3311 \end_inset
3313 pressed
3314 \begin_inset Quotes erd
3315 \end_inset
3317 : Button was pressed.
3318 \end_layout
3320 \begin_layout Itemize
3321 \begin_inset Quotes eld
3322 \end_inset
3324 released
3325 \begin_inset Quotes erd
3326 \end_inset
3328 : Button was released.
3329 \end_layout
3331 \begin_layout Itemize
3332 \begin_inset Quotes eld
3333 \end_inset
3335 hold
3336 \begin_inset Quotes erd
3337 \end_inset
3339 : Held.
3340 \end_layout
3342 \begin_layout Itemize
3343 \begin_inset Quotes eld
3344 \end_inset
3346 unhold
3347 \begin_inset Quotes erd
3348 \end_inset
3350 : Released from hold.
3351 \end_layout
3353 \begin_layout Itemize
3354 \begin_inset Quotes eld
3355 \end_inset
3357 type
3358 \begin_inset Quotes erd
3359 \end_inset
3361 : Typing input on button.
3362 \end_layout
3364 \begin_layout Itemize
3365 \begin_inset Quotes eld
3366 \end_inset
3368 untype
3369 \begin_inset Quotes erd
3370 \end_inset
3372 : Typing input undone.
3373 \end_layout
3375 \begin_layout Itemize
3376 \begin_inset Quotes eld
3377 \end_inset
3379 autofire <duty> <cycle>
3380 \begin_inset Quotes erd
3381 \end_inset
3383 : Autofire with specifie duty and cycle.
3384 \end_layout
3386 \begin_layout Itemize
3387 \begin_inset Quotes eld
3388 \end_inset
3390 autofire
3391 \begin_inset Quotes erd
3392 \end_inset
3394 : Stop autofire.
3395 \end_layout
3397 \begin_layout Itemize
3398 \begin_inset Quotes eld
3399 \end_inset
3401 analog
3402 \begin_inset Quotes erd
3403 \end_inset
3405 : Analog action on axis.
3406 \end_layout
3408 \end_deeper
3409 \begin_layout Section
3410 Movie editor
3411 \end_layout
3413 \begin_layout Itemize
3414 The editor edits in-memory movie.
3415 \end_layout
3417 \begin_layout Itemize
3418 Because past can't be edited and readwrite mode doesn't allow future, editing
3419  only works in 
3420 \emph on
3421 read only
3422 \emph default
3423  mode.
3424 \end_layout
3426 \begin_layout Itemize
3427 Keyboard triggers the normal hotkeys and bindings.
3428 \end_layout
3430 \begin_layout Subsection
3431 Left button actions
3432 \end_layout
3434 \begin_layout Itemize
3435 Clicking on cell in future (indicated by lack of redish background) toggles
3436  it (if it is a button) or prompts for a value (if it is an axis)
3437 \end_layout
3439 \begin_layout Itemize
3440 Dragging vertically toggles sequence of buttons or changes a sequence of
3441  axis values.
3442 \end_layout
3444 \begin_layout Subsection
3445 Right button actions
3446 \end_layout
3448 \begin_layout Standard
3449 The right mouse button pops up a context-sensitive menu:
3450 \end_layout
3452 \begin_layout Itemize
3453 Toggle <something>: Toggle this button
3454 \end_layout
3456 \begin_layout Itemize
3457 Change <something>: Change this axis value
3458 \end_layout
3460 \begin_layout Itemize
3461 Insert frame after: Insert a frame after this frame
3462 \end_layout
3464 \begin_layout Itemize
3465 Append frame: Append a frame to movie
3466 \end_layout
3468 \begin_layout Itemize
3469 Append frames: Append specified number of frames to movie
3470 \end_layout
3472 \begin_layout Itemize
3473 Delete frame: Delete this frame
3474 \end_layout
3476 \begin_layout Itemize
3477 Delete subframe: Delete this subframe
3478 \end_layout
3480 \begin_layout Itemize
3481 Truncate movie: Delete this subframe and everything after it.
3482 \end_layout
3484 \begin_layout Itemize
3485 Scroll to frame: Prompt for a frame and scroll the display to that frame.
3486 \end_layout
3488 \begin_layout Itemize
3489 Scroll to current frame: Scroll the display to current position
3490 \end_layout
3492 \begin_layout Itemize
3493 Run to frame: Prompts for frame and runs the emulation to that frame.
3494 \end_layout
3496 \begin_layout Itemize
3497 Change number of lines visible: Change the height of the movie display (1
3498  to 255).
3499 \end_layout
3501 \begin_layout Itemize
3502 Lock scroll to playback: While playing back or rewinding movies, the display
3503  will follow if enabled.
3504 \end_layout
3506 \begin_layout Section
3507 Memory watch expression syntax
3508 \end_layout
3510 \begin_layout Standard
3511 Memory watch expressions are in RPN (Reverse Polish Notation).
3512  At the end of expression, the top entry on stack is taken as the final
3513  result.
3514 \end_layout
3516 \begin_layout Standard
3517 Notations:
3518 \end_layout
3520 \begin_layout Itemize
3521 Evaluation order is strictly left to right.
3522 \end_layout
3524 \begin_layout Itemize
3525 a is the entry on top of stack
3526 \end_layout
3528 \begin_layout Itemize
3529 b is the entry immediately below top of stack
3530 \end_layout
3532 \begin_layout Itemize
3533 ; separates values to be pushed (no intermediate pop).
3534 \end_layout
3536 \begin_layout Itemize
3537 After end of element, all used stack slots are popped and all results are
3538  pushed.
3539 \end_layout
3541 \begin_layout Itemize
3542 When pushing multiple values, the pushes occur in order shown.
3543 \end_layout
3545 \begin_layout Standard
3546 The following operators are available:
3547 \end_layout
3549 \begin_layout Itemize
3550 + : a + b
3551 \end_layout
3553 \begin_layout Itemize
3554 - : a - b
3555 \end_layout
3557 \begin_layout Itemize
3558 * : a * b
3559 \end_layout
3561 \begin_layout Itemize
3562 / : a / b
3563 \end_layout
3565 \begin_layout Itemize
3566 % : a % b
3567 \end_layout
3569 \begin_layout Itemize
3570 a : atan(a)
3571 \end_layout
3573 \begin_layout Itemize
3574 b : read_signed_byte(a)
3575 \end_layout
3577 \begin_layout Itemize
3578 c : cos(a)
3579 \end_layout
3581 \begin_layout Itemize
3582 d : read_signed_dword(a)
3583 \end_layout
3585 \begin_layout Itemize
3586 i : quotent(a / b)
3587 \end_layout
3589 \begin_layout Itemize
3590 p :
3591 \begin_inset Formula $\pi$
3592 \end_inset
3595 \end_layout
3597 \begin_layout Itemize
3598 q : read_signed_qword(a)
3599 \end_layout
3601 \begin_layout Itemize
3602 r : sqrt(a)
3603 \end_layout
3605 \begin_layout Itemize
3606 s : sin(a)
3607 \end_layout
3609 \begin_layout Itemize
3610 t : tan(a)
3611 \end_layout
3613 \begin_layout Itemize
3614 u : a; a
3615 \end_layout
3617 \begin_layout Itemize
3618 w : read_signed_word(a)
3619 \end_layout
3621 \begin_layout Itemize
3622 A : atan2(a, b)
3623 \end_layout
3625 \begin_layout Itemize
3626 B : read_unsigned_byte(a)
3627 \end_layout
3629 \begin_layout Itemize
3630 C<number>z : Push number <number> to stack.
3631 \end_layout
3633 \begin_layout Itemize
3634 D : read_unsigned_dword(a)
3635 \end_layout
3637 \begin_layout Itemize
3638 C0x<number>z : Push number <number> (hexadecimal) to stack.
3639 \end_layout
3641 \begin_layout Itemize
3642 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
3643  for 10-16 digits).
3644 \end_layout
3646 \begin_layout Itemize
3647 Q : read_unsigned_qword(a)
3648 \end_layout
3650 \begin_layout Itemize
3651 R<digit> : round a to <digit> digits.
3652 \end_layout
3654 \begin_layout Itemize
3655 W : read_unsigned_word(a)
3656 \end_layout
3658 \begin_layout Subsection
3659 Example:
3660 \end_layout
3662 \begin_layout Standard
3663 C0x007e0878zWC0x007e002czW-
3664 \end_layout
3666 \begin_layout Enumerate
3667 Push value 0x7e0878 on top of stack (C0x007e0878z).
3668 \end_layout
3670 \begin_layout Enumerate
3671 Pop the value on top of stack (0x7e0878), read word value at that address
3672  and push the result,call it x1 (W).
3673 \end_layout
3675 \begin_layout Enumerate
3676 Push value 0x7e002c on top of stack (C0x007e002cz).
3677 \end_layout
3679 \begin_layout Enumerate
3680 Pop the value on top of stack (0x7e002c), read word value at that address
3681  and push the result,call it x2 (W).
3682 \end_layout
3684 \begin_layout Enumerate
3685 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3686  x2 - x1 (-).
3687 \end_layout
3689 \begin_layout Enumerate
3690 Since the expression ends, the final memory watch result is the top one
3691  on stack, which is x2 - x1.
3692 \end_layout
3694 \begin_layout Section
3695 Modifier and key names:
3696 \end_layout
3698 \begin_layout Subsection
3699 wxWidgets platform
3700 \end_layout
3702 \begin_layout Subsubsection
3703 Modifier names:
3704 \end_layout
3706 \begin_layout Standard
3707 Following modifier names are known:
3708 \end_layout
3710 \begin_layout Itemize
3712 \end_layout
3714 \begin_layout Itemize
3715 ctrl
3716 \end_layout
3718 \begin_layout Itemize
3719 shift 
3720 \end_layout
3722 \begin_layout Itemize
3723 meta
3724 \end_layout
3726 \begin_layout Itemize
3727 cmd (Mac OS X only)
3728 \end_layout
3730 \begin_layout Subsubsection
3731 Key names:
3732 \end_layout
3734 \begin_layout Standard
3735 Following key names are known:
3736 \end_layout
3738 \begin_layout Itemize
3739 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3740  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3741  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3742  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3743  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3744  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3745  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3746  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3747  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3748  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3749  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3750  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3751  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3752  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3753  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3754  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3755  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3756  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3757  windows_right, windows_menu, command, special1, special2, special3, special4,
3758  special5, special6, special7, special8, special9, special10, special11,
3759  special12, special13, special14, special15, special16, special17, special18,
3760  special19, special20
3761 \end_layout
3763 \begin_layout Section
3764 Movie file format
3765 \end_layout
3767 \begin_layout Standard
3768 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3769  (note: If you recompress it, do not use compression methods other than
3770  store and deflate and especially do not use encryption of any kind).
3771 \end_layout
3773 \begin_layout Subsection
3774 Detecting clean start/SRAM/Savestate
3775 \end_layout
3777 \begin_layout Itemize
3778 If file has member 
3779 \begin_inset Quotes eld
3780 \end_inset
3782 savestate
3783 \begin_inset Quotes erd
3784 \end_inset
3786  it is savestate, otherwise:
3787 \end_layout
3789 \begin_layout Itemize
3790 If file has members with names starting 
3791 \begin_inset Quotes eld
3792 \end_inset
3794 moviesram.
3795 \begin_inset Quotes erd
3796 \end_inset
3798  it is movie starting from SRAM, otherwise:
3799 \end_layout
3801 \begin_layout Itemize
3802 It is movie starting from clear state.
3803 \end_layout
3805 \begin_layout Subsection
3806 Member: gametype
3807 \end_layout
3809 \begin_layout Standard
3810 Type of game ROM and region (as one line).
3811  Valid values are:
3812 \end_layout
3814 \begin_layout Standard
3815 \begin_inset Tabular
3816 <lyxtabular version="3" rows="8" columns="3">
3817 <features tabularvalignment="middle">
3818 <column alignment="center" valignment="top" width="0">
3819 <column alignment="center" valignment="top" width="0">
3820 <column alignment="center" valignment="top" width="0">
3821 <row>
3822 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3823 \begin_inset Text
3825 \begin_layout Plain Layout
3826 Value
3827 \end_layout
3829 \end_inset
3830 </cell>
3831 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3832 \begin_inset Text
3834 \begin_layout Plain Layout
3835 System
3836 \end_layout
3838 \end_inset
3839 </cell>
3840 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3841 \begin_inset Text
3843 \begin_layout Plain Layout
3844 Region
3845 \end_layout
3847 \end_inset
3848 </cell>
3849 </row>
3850 <row>
3851 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3852 \begin_inset Text
3854 \begin_layout Plain Layout
3855 snes_pal
3856 \end_layout
3858 \end_inset
3859 </cell>
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3861 \begin_inset Text
3863 \begin_layout Plain Layout
3864 Super NES
3865 \end_layout
3867 \end_inset
3868 </cell>
3869 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3870 \begin_inset Text
3872 \begin_layout Plain Layout
3874 \end_layout
3876 \end_inset
3877 </cell>
3878 </row>
3879 <row>
3880 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3881 \begin_inset Text
3883 \begin_layout Plain Layout
3884 sgb_pal
3885 \end_layout
3887 \end_inset
3888 </cell>
3889 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3890 \begin_inset Text
3892 \begin_layout Plain Layout
3893 Super Game Boy
3894 \end_layout
3896 \end_inset
3897 </cell>
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3899 \begin_inset Text
3901 \begin_layout Plain Layout
3903 \end_layout
3905 \end_inset
3906 </cell>
3907 </row>
3908 <row>
3909 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3910 \begin_inset Text
3912 \begin_layout Plain Layout
3913 snes_ntsc
3914 \end_layout
3916 \end_inset
3917 </cell>
3918 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3919 \begin_inset Text
3921 \begin_layout Plain Layout
3922 Super NES
3923 \end_layout
3925 \end_inset
3926 </cell>
3927 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3928 \begin_inset Text
3930 \begin_layout Plain Layout
3931 NTSC
3932 \end_layout
3934 \end_inset
3935 </cell>
3936 </row>
3937 <row>
3938 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3939 \begin_inset Text
3941 \begin_layout Plain Layout
3942 sgb_ntsc
3943 \end_layout
3945 \end_inset
3946 </cell>
3947 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3948 \begin_inset Text
3950 \begin_layout Plain Layout
3951 Super Game Boy
3952 \end_layout
3954 \end_inset
3955 </cell>
3956 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3957 \begin_inset Text
3959 \begin_layout Plain Layout
3960 NTSC
3961 \end_layout
3963 \end_inset
3964 </cell>
3965 </row>
3966 <row>
3967 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3968 \begin_inset Text
3970 \begin_layout Plain Layout
3972 \end_layout
3974 \end_inset
3975 </cell>
3976 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3977 \begin_inset Text
3979 \begin_layout Plain Layout
3980 BS-X (non-slotted)
3981 \end_layout
3983 \end_inset
3984 </cell>
3985 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3986 \begin_inset Text
3988 \begin_layout Plain Layout
3989 NTSC
3990 \end_layout
3992 \end_inset
3993 </cell>
3994 </row>
3995 <row>
3996 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3997 \begin_inset Text
3999 \begin_layout Plain Layout
4000 bsxslotted
4001 \end_layout
4003 \end_inset
4004 </cell>
4005 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4006 \begin_inset Text
4008 \begin_layout Plain Layout
4009 BS-X (slotted)
4010 \end_layout
4012 \end_inset
4013 </cell>
4014 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4015 \begin_inset Text
4017 \begin_layout Plain Layout
4018 NTSC
4019 \end_layout
4021 \end_inset
4022 </cell>
4023 </row>
4024 <row>
4025 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4026 \begin_inset Text
4028 \begin_layout Plain Layout
4029 sufamiturbo
4030 \end_layout
4032 \end_inset
4033 </cell>
4034 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4035 \begin_inset Text
4037 \begin_layout Plain Layout
4038 Sufami Turbo
4039 \end_layout
4041 \end_inset
4042 </cell>
4043 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4044 \begin_inset Text
4046 \begin_layout Plain Layout
4047 NTSC
4048 \end_layout
4050 \end_inset
4051 </cell>
4052 </row>
4053 </lyxtabular>
4055 \end_inset
4058 \end_layout
4060 \begin_layout Standard
4061 Frame rates are:
4062 \end_layout
4064 \begin_layout Standard
4065 \begin_inset Tabular
4066 <lyxtabular version="3" rows="3" columns="2">
4067 <features tabularvalignment="middle">
4068 <column alignment="center" valignment="top" width="0">
4069 <column alignment="center" valignment="top" width="0">
4070 <row>
4071 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4072 \begin_inset Text
4074 \begin_layout Plain Layout
4075 Region
4076 \end_layout
4078 \end_inset
4079 </cell>
4080 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4081 \begin_inset Text
4083 \begin_layout Plain Layout
4084 Framerate (fps)
4085 \end_layout
4087 \end_inset
4088 </cell>
4089 </row>
4090 <row>
4091 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4092 \begin_inset Text
4094 \begin_layout Plain Layout
4096 \end_layout
4098 \end_inset
4099 </cell>
4100 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4101 \begin_inset Text
4103 \begin_layout Plain Layout
4104 322445/6448
4105 \end_layout
4107 \end_inset
4108 </cell>
4109 </row>
4110 <row>
4111 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4112 \begin_inset Text
4114 \begin_layout Plain Layout
4115 NTSC
4116 \end_layout
4118 \end_inset
4119 </cell>
4120 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4121 \begin_inset Text
4123 \begin_layout Plain Layout
4124 10738636/178683
4125 \end_layout
4127 \end_inset
4128 </cell>
4129 </row>
4130 </lyxtabular>
4132 \end_inset
4135 \end_layout
4137 \begin_layout Subsection
4138 Member: port1
4139 \end_layout
4141 \begin_layout Standard
4142 Contains type of port #1 (as one line).
4143  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4144  If not present, defaults to 'gamepad'.
4145 \end_layout
4147 \begin_layout Subsection
4148 Member: port2
4149 \end_layout
4151 \begin_layout Standard
4152 Contains type of port #2 (as one line).
4153  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4154  'justifier' and 'justifiers'.
4155  If not present, defaults to 'none'.
4156 \end_layout
4158 \begin_layout Subsection
4159 Member: gamename
4160 \end_layout
4162 \begin_layout Standard
4163 Contains name of the game (as one line).
4164 \end_layout
4166 \begin_layout Subsection
4167 Member: authors
4168 \end_layout
4170 \begin_layout Standard
4171 Contains authors, one per line.
4172  Part before '|' is the full name, part after is the nickname.
4173 \end_layout
4175 \begin_layout Subsection
4176 Member: systemid
4177 \end_layout
4179 \begin_layout Standard
4180 Always 
4181 \begin_inset Quotes eld
4182 \end_inset
4184 lsnes-rr1
4185 \begin_inset Quotes erd
4186 \end_inset
4188  (one line).
4189  Used to reject other saves.
4190 \end_layout
4192 \begin_layout Subsection
4193 Member: controlsversion
4194 \end_layout
4196 \begin_layout Standard
4197 Always 
4198 \begin_inset Quotes eld
4199 \end_inset
4202 \begin_inset Quotes erd
4203 \end_inset
4205  (one line).
4206  Used to identify what controls are there.
4207 \end_layout
4209 \begin_layout Subsection
4210 Member: 
4211 \begin_inset Quotes eld
4212 \end_inset
4214 coreversion
4215 \begin_inset Quotes erd
4216 \end_inset
4219 \end_layout
4221 \begin_layout Standard
4222 Contains bsnes core version number (as one line).
4223 \end_layout
4225 \begin_layout Subsection
4226 Member: projectid
4227 \end_layout
4229 \begin_layout Standard
4230 Contains project ID (as one line).
4231  Used to identify if two movies are part of the same project.
4232 \end_layout
4234 \begin_layout Subsection
4235 Member: {rom,slota,slotb}{,xml}.sha256
4236 \end_layout
4238 \begin_layout Standard
4239 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4240  Absent if corresponding file is absent.
4241 \end_layout
4243 \begin_layout Subsection
4244 Member: moviesram.<name>
4245 \end_layout
4247 \begin_layout Standard
4248 Raw binary startup SRAM of kind <name>.
4249  Only present in savestates and movies starting from SRAM.
4250 \end_layout
4252 \begin_layout Subsection
4253 Member: saveframe
4254 \end_layout
4256 \begin_layout Standard
4257 Contains frame number (as one line) of frame movie was saved on.
4258  Only present in savestates.
4259 \end_layout
4261 \begin_layout Subsection
4262 Member: lagcounter
4263 \end_layout
4265 \begin_layout Standard
4266 Current value of lag counter (as one line).
4267  Only present in savestates.
4268 \end_layout
4270 \begin_layout Subsection
4271 Member: pollcounters
4272 \end_layout
4274 \begin_layout Standard
4275 Contains poll counters (currently 100 of them), one per line.
4276  Each line is raw poll count if DRDY is set for it.
4277  Otherwise it is negative poll count minus one.
4278  Only present in savestates.
4279 \end_layout
4281 \begin_layout Subsection
4282 Member: hostmemory
4283 \end_layout
4285 \begin_layout Standard
4286 Raw binary dump of host memory.
4287  Only present in savestates.
4288 \end_layout
4290 \begin_layout Subsection
4291 Member: savestate
4292 \end_layout
4294 \begin_layout Standard
4295 The raw binary savestate itself.
4296  Savestate detection uses this file, only present in savestates.
4297 \end_layout
4299 \begin_layout Subsection
4300 Member: screenshot
4301 \end_layout
4303 \begin_layout Standard
4304 Screenshot of current frame.
4305  Only present in savestates.
4306  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4307  data.
4308  Height of image is inferred from the width and size of data.
4309 \end_layout
4311 \begin_layout Subsection
4312 Member: sram.<name>
4313 \end_layout
4315 \begin_layout Standard
4316 Raw binary SRAM of kind <name> at time of savestate.
4317  Only present in savestates.
4318 \end_layout
4320 \begin_layout Subsection
4321 Member: input
4322 \end_layout
4324 \begin_layout Standard
4325 The actual input track, one line per subframe (blank lines are skipped).
4326 \end_layout
4328 \begin_layout Itemize
4329 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4330  part of same frame as previous, otherwise it starts a new frame.
4331 \end_layout
4333 \begin_layout Itemize
4334 First subframe must start a new frame.
4335 \end_layout
4337 \begin_layout Standard
4338 Length of movie in frames is number of lines in input file that start a
4339  new frame.
4340 \end_layout
4342 \begin_layout Subsection
4343 Member: subtitles
4344 \end_layout
4346 \begin_layout Standard
4347 Subtitle track.
4348  Optional.
4349 \end_layout
4351 \begin_layout Itemize
4352 Each line is in form <firstframe> <numframes> <text>.
4353 \end_layout
4355 \begin_layout Itemize
4356 Linefeed is encoded as 
4357 \backslash
4358 n, backslash is encoded as 
4359 \backslash
4361 \backslash
4363 \end_layout
4365 \begin_layout Subsection
4366 Member: rerecords
4367 \end_layout
4369 \begin_layout Standard
4370 Contains textual base-10 rerecord count (as one line; emulator just writes
4371  this, it doesn't read it) + 1.
4372 \end_layout
4374 \begin_layout Subsection
4375 Member: rrdata
4376 \end_layout
4378 \begin_layout Standard
4379 This member stores set of load IDs.
4380  There is one load ID per rerecord (plus one corresponding to start of project).
4381 \end_layout
4383 \begin_layout Itemize
4384 This member constists of concatenation of records
4385 \end_layout
4387 \begin_layout Itemize
4388 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4389  IDs.
4390 \end_layout
4392 \begin_layout Itemize
4393 IDs are interpretted as 256-bit big-endian integers with warparound.
4394 \end_layout
4396 \begin_layout Itemize
4397 Initial predicted ID is all zeroes.
4398 \end_layout
4400 \begin_layout Standard
4401 Format of each record is:
4402 \end_layout
4404 \begin_layout Itemize
4405 1 byte: Opcode byte.
4406  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4407  Bit 7 is unused.
4408 \end_layout
4410 \begin_layout Itemize
4411 32-prefixlen bytes of ID.
4412 \end_layout
4414 \begin_layout Itemize
4415 countlen bytes of big-endian count (count).
4416 \end_layout
4418 \begin_layout Standard
4419 Records are processed as follows:
4420 \end_layout
4422 \begin_layout Itemize
4423 To form the first ID encoded by record, take the first prefixlen bytes predicted
4424  ID and append the read ID value to it.
4425  The result is the first ID encoded.
4426 \end_layout
4428 \begin_layout Itemize
4429 If countlen is 0, record encodes 1 ID.
4430 \end_layout
4432 \begin_layout Itemize
4433 If countlen is 1, record encodes 2+count IDs.
4434 \end_layout
4436 \begin_layout Itemize
4437 If countlen is 2, record encodes 258+count IDs.
4438 \end_layout
4440 \begin_layout Itemize
4441 If countlen is 3, record encodes 65794+count IDs.
4442 \end_layout
4444 \begin_layout Itemize
4445 The new predicted ID is the next ID after last one encoded by the record.
4446 \end_layout
4448 \begin_layout Standard
4449 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4450  by all records.
4451 \end_layout
4453 \begin_layout Subsection
4454 Member: starttime.second
4455 \end_layout
4457 \begin_layout Standard
4458 Movie starting time, second part.
4459  Epoch is Unix epoch.
4460  Default is 1,000,000,000.
4461 \end_layout
4463 \begin_layout Subsection
4464 Member: starttime.subsecond
4465 \end_layout
4467 \begin_layout Standard
4468 Movie starting time, subsecond part.
4469  Unit is CPU clocks.
4470  Default is 0.
4471 \end_layout
4473 \begin_layout Subsection
4474 Member: savetime.second
4475 \end_layout
4477 \begin_layout Standard
4478 Movie saving time, second part.
4479  Default is starttime.second.
4480  Only present in savestates.
4481 \end_layout
4483 \begin_layout Subsection
4484 Member: savetime.subsecond
4485 \end_layout
4487 \begin_layout Standard
4488 Movie saving time, subsecond part.
4489  Default is starttime.subsecond.
4490  Only present in savestates.
4491 \end_layout
4493 \begin_layout Section
4494 lsvs file format (commentary tracks)
4495 \end_layout
4497 \begin_layout Subsection
4498 Clusters
4499 \end_layout
4501 \begin_layout Itemize
4502 Each cluster is 8kB (8192 bytes) in size.
4503 \end_layout
4505 \begin_layout Itemize
4506 Cluster n starts at offset 8192*n in file.
4507 \end_layout
4509 \begin_layout Itemize
4510 The following clusters are system special:
4511 \end_layout
4513 \begin_deeper
4514 \begin_layout Itemize
4515 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4516 \end_layout
4518 \begin_layout Itemize
4519 Cluster 1 (superblock)
4520 \end_layout
4522 \end_deeper
4523 \begin_layout Subsection
4524 Cluster tables
4525 \end_layout
4527 \begin_layout Itemize
4528 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4529  last 11 bits of n).
4530 \end_layout
4532 \begin_layout Itemize
4533 This cluster table consists of 2048 4-byte big-endian integers.
4534 \end_layout
4536 \begin_layout Itemize
4537 Each entry describes a cluster in 16MB supercluster, in order.
4538 \end_layout
4540 \begin_layout Itemize
4541 The valid values for entries are:
4542 \end_layout
4544 \begin_deeper
4545 \begin_layout Itemize
4546 0x00000000: Free cluster
4547 \end_layout
4549 \begin_layout Itemize
4550 0x00000001: Last cluster in chain.
4551 \end_layout
4553 \begin_layout Itemize
4554 0xFFFFFFFF: System cluster (cluster tables and superblock)
4555 \end_layout
4557 \begin_layout Itemize
4558 (anything else): Number of next cluster in chain.
4559  Must not be multiple of 2048.
4560 \end_layout
4562 \end_deeper
4563 \begin_layout Itemize
4564 Due to limitations of the format, there can be at most 2097052 superclusters,
4565  giving maximum file size of 16TB.
4566 \end_layout
4568 \begin_layout Subsection
4569 Stream table
4570 \end_layout
4572 \begin_layout Itemize
4573 The stream table chain always starts in cluster 2.
4574 \end_layout
4576 \begin_layout Itemize
4577 Otherwise, it follows normal chaining.
4578 \end_layout
4580 \begin_layout Itemize
4581 The stream table consists of 16-byte entries:
4582 \end_layout
4584 \begin_deeper
4585 \begin_layout Itemize
4586 The first 8 bytes of entry give big-endian beginning position of stream
4587  in units of 1/48000 s.
4588 \end_layout
4590 \begin_layout Itemize
4591 The next 4 bytes of entry give big-endian beginning cluster for control
4592  data.
4593  0 here marks the entry as not present.
4594 \end_layout
4596 \begin_layout Itemize
4597 The last 4 bytes of entry give big-endian beginning cluster for codec data.
4598 \end_layout
4600 \end_deeper
4601 \begin_layout Itemize
4602 Stream table clusters are normal clusters, following normal chaining.
4603 \end_layout
4605 \begin_layout Itemize
4606 The stream begnning position is not guarenteed unique.
4607  There can be multiple streams with the same starting position in the file.
4608 \end_layout
4610 \begin_layout Subsection
4611 Stream control data
4612 \end_layout
4614 \begin_layout Itemize
4615 The stream control data consists of entries 4 bytes each:
4616 \end_layout
4618 \begin_deeper
4619 \begin_layout Itemize
4620 The first 2 bytes of entry gives big-endian length of packet
4621 \end_layout
4623 \begin_layout Itemize
4624 The next byte of entry gives audio length of packet in units of 1/400 s.
4625 \end_layout
4627 \begin_layout Itemize
4628 The last byte is control byte.
4629 \end_layout
4631 \begin_deeper
4632 \begin_layout Itemize
4633 0 means this entry is not present and the control data ends.
4634 \end_layout
4636 \begin_layout Itemize
4637 1 is valid control entry.
4638 \end_layout
4640 \end_deeper
4641 \end_deeper
4642 \begin_layout Itemize
4643 The stream control data can also end by running into end of the readable
4644  chain.
4645 \end_layout
4647 \begin_deeper
4648 \begin_layout Itemize
4649 This happens if there happens to be exact multiple of 2048 packets in stream
4650  and number of packets is nonzero.
4651 \end_layout
4653 \end_deeper
4654 \begin_layout Itemize
4655 These clusters follow normal chaining.
4656 \end_layout
4658 \begin_layout Subsection
4659 Stream codec data
4660 \end_layout
4662 \begin_layout Itemize
4663 Stream codec data consists of raw Opus data packets packed back to back
4664  with nothing in between.
4665 \end_layout
4667 \begin_layout Itemize
4668 Warning: Due to internal limitations, this data must reside in the first
4669  65536 superclusters (that is, the first 1TB of the file).
4670 \end_layout
4672 \begin_layout Subsection
4673 Superblock
4674 \end_layout
4676 \begin_layout Itemize
4677 The superblock is stored in cluster 1.
4679 \end_layout
4681 \begin_layout Itemize
4682 The first 11 bytes are 
4683 \begin_inset Quotes eld
4684 \end_inset
4686 sefs-magic
4687 \begin_inset Quotes erd
4688 \end_inset
4690 <NUL>.
4691 \end_layout
4693 \begin_layout Itemize
4694 The rest are unused.
4695 \end_layout
4697 \begin_layout Itemize
4698 This cluster 1 is marked as system special.
4699 \end_layout
4701 \begin_layout Section
4702 Known ROM extensions
4703 \end_layout
4705 \begin_layout Itemize
4706 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4707 \end_layout
4709 \begin_layout Itemize
4710 DMG cartridge ROMs: dmg, gb.
4711 \end_layout
4713 \begin_layout Itemize
4714 GBC cartridge ROMs: cgb, gbc.
4715 \end_layout
4717 \begin_layout Section
4718 Gamepack files
4719 \end_layout
4721 \begin_layout Itemize
4722 The first line must be: 
4723 \begin_inset Quotes eld
4724 \end_inset
4726 [GAMEPACK FILE]
4727 \begin_inset Quotes erd
4728 \end_inset
4731 \end_layout
4733 \begin_layout Itemize
4734 There is one needed line: 
4735 \begin_inset Quotes eld
4736 \end_inset
4738 type <systype>
4739 \begin_inset Quotes erd
4740 \end_inset
4743  This sets system type to <systype>.
4744  The following system types are valid:
4745 \end_layout
4747 \begin_deeper
4748 \begin_layout Itemize
4749 snes (SNES)
4750 \end_layout
4752 \begin_layout Itemize
4753 bsx (BS-X non-slotted)
4754 \end_layout
4756 \begin_layout Itemize
4757 bsxslotted (BS-X slotted)
4758 \end_layout
4760 \begin_layout Itemize
4761 sufamiturbo (Sufami Turbo)
4762 \end_layout
4764 \begin_layout Itemize
4765 sgb (Super Game Boy)
4766 \end_layout
4768 \begin_layout Itemize
4769 dmg (Game Boy)
4770 \end_layout
4772 \begin_layout Itemize
4773 gbc (Game Boy Color)
4774 \end_layout
4776 \begin_layout Itemize
4777 gbc_gba (Game Boy Color with GBA initial register values)
4778 \end_layout
4780 \end_deeper
4781 \begin_layout Itemize
4782 Optionally a region can be specified: 
4783 \begin_inset Quotes eld
4784 \end_inset
4786 region <region>
4787 \begin_inset Quotes erd
4788 \end_inset
4791  The following values are valid:
4792 \end_layout
4794 \begin_deeper
4795 \begin_layout Itemize
4796 autodetect (Autodetect region: snes and sgb only)
4797 \end_layout
4799 \begin_layout Itemize
4800 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4801 \end_layout
4803 \begin_layout Itemize
4804 pal (PAL: snes, sgb)
4805 \end_layout
4807 \begin_layout Itemize
4808 world (World: dmg, gbc, gbc_gba)
4809 \end_layout
4811 \end_deeper
4812 \begin_layout Itemize
4813 ROM images are loaded as: 
4814 \begin_inset Quotes eld
4815 \end_inset
4817 rom <type> <file>
4818 \begin_inset Quotes erd
4819 \end_inset
4822  The following types are valid:
4823 \end_layout
4825 \begin_deeper
4826 \begin_layout Itemize
4827 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4828  BIOS in bsx, bsxslotted, sufamiturbo)
4829 \end_layout
4831 \begin_layout Itemize
4832 bsx (Cartridge ROM in bsx, bsxslotted)
4833 \end_layout
4835 \begin_layout Itemize
4836 slot-a (Cartridge ROM in sufamiturbo)
4837 \end_layout
4839 \begin_layout Itemize
4840 slot-b (Cartridge ROM in sufamiturbo)
4841 \end_layout
4843 \end_deeper
4844 \begin_layout Itemize
4845 ROM markup can be loaded as: 
4846 \begin_inset Quotes eld
4847 \end_inset
4849 xml <type> <file>
4850 \begin_inset Quotes erd
4851 \end_inset
4854  The types valid are the same as for ROMs.
4855 \end_layout
4857 \begin_layout Itemize
4858 Patches can be loaded as 
4859 \begin_inset Quotes eld
4860 \end_inset
4862 patch[<offset>] <type> <file>
4863 \begin_inset Quotes erd
4864 \end_inset
4867  The types are the same as for ROMs.
4868 \end_layout
4870 \begin_deeper
4871 \begin_layout Itemize
4872 Offset is given in form [+-]<number>.
4873  Usually offset is either +0 or -512.
4874 \end_layout
4876 \begin_layout Itemize
4877 Default offset is +0.
4878 \end_layout
4880 \end_deeper
4881 \begin_layout Subsection
4882 Example:
4883 \end_layout
4885 \begin_layout LyX-Code
4886 [GAMEPACK FILE]
4887 \end_layout
4889 \begin_layout LyX-Code
4890 type snes
4891 \end_layout
4893 \begin_layout LyX-Code
4894 rom rom speedygonzales.sfc
4895 \end_layout
4897 \begin_layout LyX-Code
4898 patch-512 rom sonicthehedgehog.ips
4899 \end_layout
4901 \begin_layout Subsection
4902 Example 2:
4903 \end_layout
4905 \begin_layout LyX-Code
4906 [GAMEPACK FILE]
4907 \end_layout
4909 \begin_layout LyX-Code
4910 type sgb
4911 \end_layout
4913 \begin_layout LyX-Code
4914 rom rom supergameboy.sfc
4915 \end_layout
4917 \begin_layout LyX-Code
4918 rom dmg megamanV.dmg
4919 \end_layout
4921 \begin_layout Section
4922 Quick'n'dirty encode guide
4923 \end_layout
4925 \begin_layout Enumerate
4926 Start the emulator and load the ROM and movie file.
4927 \end_layout
4929 \begin_layout Enumerate
4930 Set large AVI option 'set-setting avi-large on'
4931 \end_layout
4933 \begin_layout Enumerate
4934 Enable dumping 'dump-avi tmpdump' 
4935 \end_layout
4937 \begin_layout Enumerate
4938 Unpause and let it run until you want to end dumping.
4939 \end_layout
4941 \begin_layout Enumerate
4942 Close the emulator (closing the window is the easiest way).
4943  Or use 'end-avi'.
4944 \end_layout
4946 \begin_layout Enumerate
4947 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4948  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4949 \end_layout
4951 \begin_layout Enumerate
4952 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4953 \end_layout
4955 \begin_layout Enumerate
4956 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4957  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4958 \end_layout
4960 \begin_layout Enumerate
4961 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4962  Now final.mkv contains quick'n'dirty encode.
4963 \end_layout
4965 \begin_layout Section
4966 Axis configurations for some gamepad types:
4967 \end_layout
4969 \begin_layout Subsection
4970 XBox360 controller:
4971 \end_layout
4973 \begin_layout Standard
4974 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4975 \end_layout
4977 \begin_layout LyX-Code
4978 set-axis joystick0axis2 pressure-+
4979 \end_layout
4981 \begin_layout LyX-Code
4982 set-axis joystick0axis5 pressure-+
4983 \end_layout
4985 \begin_layout Itemize
4986 This is needed for SDL only.
4987  EVDEV sets those types correctly.
4988 \end_layout
4990 \begin_layout Subsection
4991 PS3 
4992 \begin_inset Quotes eld
4993 \end_inset
4995 sixaxis
4996 \begin_inset Quotes erd
4997 \end_inset
4999  controller:
5000 \end_layout
5002 \begin_layout Standard
5003 Axes 8-19 should be disabled.
5004 \end_layout
5006 \begin_layout LyX-Code
5007 set-axis joystick0axis8 disabled
5008 \end_layout
5010 \begin_layout LyX-Code
5011 set-axis joystick0axis9 disabled
5012 \end_layout
5014 \begin_layout LyX-Code
5015 set-axis joystick0axis10 disabled
5016 \end_layout
5018 \begin_layout LyX-Code
5019 set-axis joystick0axis11 disabled
5020 \end_layout
5022 \begin_layout LyX-Code
5023 set-axis joystick0axis12 disabled
5024 \end_layout
5026 \begin_layout LyX-Code
5027 set-axis joystick0axis13 disabled
5028 \end_layout
5030 \begin_layout LyX-Code
5031 set-axis joystick0axis14 disabled
5032 \end_layout
5034 \begin_layout LyX-Code
5035 set-axis joystick0axis15 disabled
5036 \end_layout
5038 \begin_layout LyX-Code
5039 set-axis joystick0axis16 disabled
5040 \end_layout
5042 \begin_layout LyX-Code
5043 set-axis joystick0axis17 disabled
5044 \end_layout
5046 \begin_layout LyX-Code
5047 set-axis joystick0axis18 disabled
5048 \end_layout
5050 \begin_layout LyX-Code
5051 set-axis joystick0axis19 disabled
5052 \end_layout
5054 \begin_layout Section
5055 Errata:
5056 \end_layout
5058 \begin_layout Subsection
5059 Problems from BSNES core:
5060 \end_layout
5062 \begin_layout Itemize
5063 The whole pending save stuff.
5064 \end_layout
5066 \begin_layout Itemize
5067 Lack of layer hiding.
5068 \end_layout
5070 \begin_layout Itemize
5071 It is slow (especially accuracy).
5072 \end_layout
5074 \begin_layout Itemize
5075 Firmwares can't be loaded from ZIP archives.
5076 \end_layout
5078 \begin_layout Subsection
5079 Other problems:
5080 \end_layout
5082 \begin_layout Itemize
5083 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5084 \end_layout
5086 \begin_layout Itemize
5087 Audio for last dumped frame is not itself dumped.
5088 \end_layout
5090 \begin_layout Itemize
5091 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5092 \end_layout
5094 \begin_layout Itemize
5095 No menus, command based interface (SDL).
5096 \end_layout
5098 \begin_layout Itemize
5099 Long commands don't scroll.
5100 \end_layout
5102 \begin_layout Section
5103 Changelog:
5104 \end_layout
5106 \begin_layout Subsection
5107 rr0-beta1
5108 \end_layout
5110 \begin_layout Itemize
5111 Fix -Wall warnings
5112 \end_layout
5114 \begin_layout Itemize
5115 Fix dumper video corruption with levels 10-18.
5116 \end_layout
5118 \begin_layout Subsection
5119 rr0-beta2
5120 \end_layout
5122 \begin_layout Itemize
5123 Autofire
5124 \end_layout
5126 \begin_layout Itemize
5127 Lots of code cleanups
5128 \end_layout
5130 \begin_layout Itemize
5131 Lua interface to settings
5132 \end_layout
5134 \begin_layout Itemize
5135 Allow specifying AVI borders without Lua
5136 \end_layout
5138 \begin_layout Itemize
5139 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5140 \end_layout
5142 \begin_layout Itemize
5143 on_snoop lua callback
5144 \end_layout
5146 \begin_layout Itemize
5147 Faster movie loading and saving.
5148 \end_layout
5150 \begin_layout Subsection
5151 rr0-beta3
5152 \end_layout
5154 \begin_layout Itemize
5155 Joystick support
5156 \end_layout
5158 \begin_layout Subsection
5159 rr0-beta4
5160 \end_layout
5162 \begin_layout Itemize
5163 Fix multi-buttons
5164 \end_layout
5166 \begin_layout Itemize
5167 Save jukebox functionality.
5168 \end_layout
5170 \begin_layout Subsection
5171 rr0-beta5
5172 \end_layout
5174 \begin_layout Itemize
5175 Try to fix some nasty failing movie load edge cases
5176 \end_layout
5178 \begin_layout Itemize
5179 Allow specifying scripts to run on command line.
5180 \end_layout
5182 \begin_layout Subsection
5183 rr0-beta6
5184 \end_layout
5186 \begin_layout Itemize
5187 Major source code reorganization.
5188 \end_layout
5190 \begin_layout Itemize
5191 Backup savestates before overwriting.
5192 \end_layout
5194 \begin_layout Itemize
5195 Don't crash if loading initial state fails.
5196 \end_layout
5198 \begin_layout Subsection
5199 rr0-beta7
5200 \end_layout
5202 \begin_layout Itemize
5203 Fix firmware lookup
5204 \end_layout
5206 \begin_layout Itemize
5207 Fix author name parsing
5208 \end_layout
5210 \begin_layout Itemize
5211 Fix rerecord counting
5212 \end_layout
5214 \begin_layout Itemize
5215 (SDL) Print messages to console if SDL is uninitialized
5216 \end_layout
5218 \begin_layout Itemize
5219 Add movieinfo program
5220 \end_layout
5222 \begin_layout Itemize
5223 Fix loading movies starting from SRAM.
5224 \end_layout
5226 \begin_layout Subsection
5227 rr0-beta8
5228 \end_layout
5230 \begin_layout Itemize
5231 Add support for unattended dumping
5232 \end_layout
5234 \begin_layout Itemize
5235 Fix compiling for Win32
5236 \end_layout
5238 \begin_layout Itemize
5239 Don't lock up if sound can't be initialized
5240 \end_layout
5242 \begin_layout Itemize
5243 Strip trailing CR from commands
5244 \end_layout
5246 \begin_layout Itemize
5247 Don't try to do dubious things in global ctors (fix crash on startup)
5248 \end_layout
5250 \begin_layout Subsection
5251 rr0-beta9
5252 \end_layout
5254 \begin_layout Itemize
5255 Small documentation tweaking
5256 \end_layout
5258 \begin_layout Itemize
5259 Fix make clean
5260 \end_layout
5262 \begin_layout Itemize
5263 Fix major bug in modifier matching
5264 \end_layout
5266 \begin_layout Subsection
5267 rr0-beta10
5268 \end_layout
5270 \begin_layout Itemize
5271 Lots of documentation fixes
5272 \end_layout
5274 \begin_layout Itemize
5275 Use dedicated callbacks for event backcomm., not commands.
5276 \end_layout
5278 \begin_layout Itemize
5279 Ensure that the watchdog is not hit when executing delayed reset.
5280 \end_layout
5282 \begin_layout Itemize
5283 Remove errant tab from joystick message.
5284 \end_layout
5286 \begin_layout Subsection
5287 rr0-beta11
5288 \end_layout
5290 \begin_layout Itemize
5291 Make autofire operate in absolute time, not linear time
5292 \end_layout
5294 \begin_layout Itemize
5295 Reinitialize controls when resuming from loadstate
5296 \end_layout
5298 \begin_layout Itemize
5299 Some more code cleanups
5300 \end_layout
5302 \begin_layout Itemize
5303 If Lua allocator fails, call OOM_panic()
5304 \end_layout
5306 \begin_layout Itemize
5307 Byte/word/dword/qword sized host memory write/read functions.
5308 \end_layout
5310 \begin_layout Itemize
5311 Dump at correct framerate if dumping interlaced NTSC (height=448).
5312 \end_layout
5314 \begin_layout Subsection
5315 rr0-beta12
5316 \end_layout
5318 \begin_layout Itemize
5319 Actually include the complete source code
5320 \end_layout
5322 \begin_layout Itemize
5323 Keep track of RTC
5324 \end_layout
5326 \begin_layout Subsection
5327 rr0-beta13
5328 \end_layout
5330 \begin_layout Itemize
5331 Document {save,start}time.{,sub}second.
5332 \end_layout
5334 \begin_layout Itemize
5335 Intercept time() from bsnes core.
5336 \end_layout
5338 \begin_layout Subsection
5339 rr0-beta14
5340 \end_layout
5342 \begin_layout Itemize
5343 Allow disabling time() interception (allow build on Mac OS X)
5344 \end_layout
5346 \begin_layout Itemize
5347 Use SDLMain on Mac OS X (make SDL not crash)
5348 \end_layout
5350 \begin_layout Itemize
5351 Disable delayed resets (just plain too buggy for now).
5352 \end_layout
5354 \begin_layout Itemize
5355 Code cleanups
5356 \end_layout
5358 \begin_layout Itemize
5359 Use 16-bit for graphics/video instead of 32-bit.
5360 \end_layout
5362 \begin_layout Itemize
5363 gui.rectangle/gui.pixel
5364 \end_layout
5366 \begin_layout Itemize
5367 gui.crosshair
5368 \end_layout
5370 \begin_layout Itemize
5371 New CSCD writer implementation.
5372 \end_layout
5374 \begin_layout Subsection
5375 rr0-beta15
5376 \end_layout
5378 \begin_layout Itemize
5379 Fix interaction of * and +.
5380 \end_layout
5382 \begin_layout Itemize
5383 Manual improvements
5384 \end_layout
5386 \begin_layout Itemize
5387 Use gettimeofday()/usleep(), these seem portable enough.
5388 \end_layout
5390 \begin_layout Itemize
5391 Move joystick axis manipulation to keymapper code.
5392 \end_layout
5394 \begin_layout Itemize
5395 Changes to how read-only works.
5396 \end_layout
5398 \begin_layout Itemize
5399 Refactor controller input code.
5400 \end_layout
5402 \begin_layout Subsection
5403 rr0-beta16
5404 \end_layout
5406 \begin_layout Itemize
5407 Fix mouseclick scale compensation.
5408 \end_layout
5410 \begin_layout Itemize
5411 Draw area boundaries correctly in SDL code.
5412 \end_layout
5414 \begin_layout Itemize
5415 gui.screenshot.
5416 \end_layout
5418 \begin_layout Itemize
5419 Fix CSCD output (buffer overrun and race condition).
5420 \end_layout
5422 \begin_layout Subsection
5423 rr0-beta17
5424 \end_layout
5426 \begin_layout Itemize
5427 JMD dumping support.
5428 \end_layout
5430 \begin_layout Itemize
5431 Allow unattended dumping to JMD.
5432 \end_layout
5434 \begin_layout Itemize
5435 Move to BSNES v083.
5436 \end_layout
5438 \begin_layout Itemize
5439 Switch back to 32-bit colors.
5440 \end_layout
5442 \begin_layout Itemize
5443 Add Lua function gui.color.
5444 \end_layout
5446 \begin_layout Itemize
5447 Use some new C++11 features in GCC 4.6.
5448 \end_layout
5450 \begin_layout Itemize
5451 Be prepared for core frequency changes.
5452 \end_layout
5454 \begin_layout Itemize
5455 Pass colors in one chunk from Lua.
5456 \end_layout
5458 \begin_layout Subsection
5459 rr0-beta18
5460 \end_layout
5462 \begin_layout Itemize
5463 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5464  memory.read_vma() and memory.find_vma().
5465 \end_layout
5467 \begin_layout Itemize
5468 Numerious documentation fixups
5469 \end_layout
5471 \begin_layout Itemize
5472 RTC time format changed
5473 \end_layout
5475 \begin_layout Itemize
5476 Reformat flags display
5477 \end_layout
5479 \begin_layout Itemize
5480 Allow lua package name to be overridden
5481 \end_layout
5483 \begin_layout Itemize
5484 SDUMP (high-quality dumping).
5485 \end_layout
5487 \begin_layout Itemize
5488 Split platform support to plugins.
5489 \end_layout
5491 \begin_layout Itemize
5492 Make all sound plugins support basic sound commands
5493 \end_layout
5495 \begin_layout Itemize
5496 Support portaudio for sound.
5497 \end_layout
5499 \begin_layout Itemize
5500 Allow disable Lua/SDL searching.
5501 \end_layout
5503 \begin_layout Itemize
5504 Upconvert colors when copying lcscreen to screen.
5505 \end_layout
5507 \begin_layout Itemize
5508 Reorganize source tree.
5509 \end_layout
5511 \begin_layout Itemize
5512 Evdev joystick support.
5513 \end_layout
5515 \begin_layout Itemize
5516 Refactor more code into generic window code.
5517 \end_layout
5519 \begin_layout Subsection
5520 rr0-beta19
5521 \end_layout
5523 \begin_layout Itemize
5524 Refactor message handling.
5525 \end_layout
5527 \begin_layout Itemize
5528 Rework makefile
5529 \end_layout
5531 \begin_layout Itemize
5532 Documentation fixes
5533 \end_layout
5535 \begin_layout Itemize
5536 Finish pending saves before load/quit.
5537 \end_layout
5539 \begin_layout Itemize
5540 Wxwidgets graphics plugin.
5541 \end_layout
5543 \begin_layout Subsection
5544 rr0-beta20
5545 \end_layout
5547 \begin_layout Itemize
5548 Get rid of win32-crap.[ch]pp.
5549 \end_layout
5551 \begin_layout Itemize
5552 Move files around a lot.
5553 \end_layout
5555 \begin_layout Itemize
5556 Get rid of need for host C++ compiler.
5557 \end_layout
5559 \begin_layout Itemize
5560 Bsnes v084 core.
5561 \end_layout
5563 \begin_layout Itemize
5564 Refactor inter-component communication.
5565 \end_layout
5567 \begin_layout Itemize
5568 Fix zero luma.
5569 \end_layout
5571 \begin_layout Itemize
5572 Fix crash on multiline aliases.
5573 \end_layout
5575 \begin_layout Itemize
5576 Load/Save settings in wxwidgets gui.
5577 \end_layout
5579 \begin_layout Subsection
5580 rr0-beta21
5581 \end_layout
5583 \begin_layout Itemize
5584 Patch problems in bsnes core
5585 \end_layout
5587 \begin_layout Itemize
5588 SNES is little-endian, not big-endian!
5589 \end_layout
5591 \begin_layout Itemize
5592 Fix memory corruption in lcscreen::load()
5593 \end_layout
5595 \begin_layout Subsection
5596 rr0-beta22
5597 \end_layout
5599 \begin_layout Itemize
5600 Fix interpretting repeat counts in rrdata loading.
5601 \end_layout
5603 \begin_layout Itemize
5604 New lua callback: on_frame()
5605 \end_layout
5607 \begin_layout Itemize
5608 Remove calls to runtosave() that aren't supposed to be there
5609 \end_layout
5611 \begin_layout Itemize
5612 Lua function: movie.read_rtc()
5613 \end_layout
5615 \begin_layout Itemize
5616 Ignore src/fonts/font.cpp
5617 \end_layout
5619 \begin_layout Itemize
5620 Fix more bsnes core problems
5621 \end_layout
5623 \begin_layout Itemize
5624 Control bsnes random seeding
5625 \end_layout
5627 \begin_layout Itemize
5628 Pause-on-end
5629 \end_layout
5631 \begin_layout Itemize
5632 Some bsnes core debugging features (state dump and state hash)
5633 \end_layout
5635 \begin_layout Itemize
5636 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5637  it was 'lsnes rr0-beta21').
5638 \end_layout
5640 \begin_layout Subsection
5641 rr0-beta23
5642 \end_layout
5644 \begin_layout Itemize
5645 Fix memory corruption due to macro/field mixup
5646 \end_layout
5648 \begin_layout Itemize
5649 search-memory update
5650 \end_layout
5652 \begin_layout Itemize
5653 Allow direct-mapped framebuffer
5654 \end_layout
5656 \begin_layout Itemize
5657 SDL: Use SDL_ANYFORMAT if possible
5658 \end_layout
5660 \begin_layout Itemize
5661 SDMP2SOX: 2s delay modes.
5662 \end_layout
5664 \begin_layout Itemize
5665 Wxwidgets: Cleanups
5666 \end_layout
5668 \begin_layout Itemize
5669 Use sed -E, not sed -r.
5670  Fixes building on Mac OS X.
5671 \end_layout
5673 \begin_layout Itemize
5674 Wxwidgets: Save jukebox on exit
5675 \end_layout
5677 \begin_layout Itemize
5678 Fix RTC if using load-movie on savestate.
5679 \end_layout
5681 \begin_layout Itemize
5682 Fix crash related to full console mode.
5683 \end_layout
5685 \begin_layout Subsection
5686 rr0-beta24
5687 \end_layout
5689 \begin_layout Itemize
5690 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5691 \end_layout
5693 \begin_layout Itemize
5694 Wxwidgets: Allow compiling on Mac OS X.
5695 \end_layout
5697 \begin_layout Itemize
5698 Use movie compare instead of movie hashing (faster save/load).
5699 \end_layout
5701 \begin_layout Itemize
5702 Lua: _SYSTEM table.
5703 \end_layout
5705 \begin_layout Subsection
5706 rr0-beta25
5707 \end_layout
5709 \begin_layout Itemize
5710 sdmp2sox: Pad soundtrack if using -l or -L.
5711 \end_layout
5713 \begin_layout Itemize
5714 sdmp2sox: Fix NTSC overscan.
5715 \end_layout
5717 \begin_layout Itemize
5718 sdmp2sox: Add AR correction mode.
5719 \end_layout
5721 \begin_layout Itemize
5722 call lua_close() when exiting.
5723 \end_layout
5725 \begin_layout Itemize
5726 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5727 \end_layout
5729 \begin_layout Subsection
5730 rr0-beta26
5731 \end_layout
5733 \begin_layout Itemize
5734 Fix IPS patching code (use bsnes core IPS patcher).
5735 \end_layout
5737 \begin_layout Itemize
5738 Implement BPS patching (using bsnes core IPS patcher).
5739 \end_layout
5741 \begin_layout Itemize
5742 Add feature to load headered ROMs.
5743 \end_layout
5745 \begin_layout Subsection
5746 rr0-beta27
5747 \end_layout
5749 \begin_layout Itemize
5750 Show command names when showing keybindings
5751 \end_layout
5753 \begin_layout Subsection
5755 \end_layout
5757 \begin_layout Itemize
5758 Fix pause-on-end to be actually controllable
5759 \end_layout
5761 \begin_layout Itemize
5762 SDL: Poll all events in queue, not just first one (fixes slowness in command
5763  typing)
5764 \end_layout
5766 \begin_layout Itemize
5767 Wxwidgets: Fix ROM loading.
5768 \end_layout
5770 \begin_layout Subsection
5771 rr1-beta0
5772 \end_layout
5774 \begin_layout Itemize
5775 Lua: Add gui.textH, gui.textV, gui.textHV
5776 \end_layout
5778 \begin_layout Itemize
5779 Fix text colors on SDL on Mac OS X
5780 \end_layout
5782 \begin_layout Itemize
5783 Mode 'F' for finished in readonly mode.
5784 \end_layout
5786 \begin_layout Itemize
5787 Fix some WS errors.
5788 \end_layout
5790 \begin_layout Itemize
5791 Reliably pause after skip poll
5792 \end_layout
5794 \begin_layout Itemize
5795 Split UI and core into their own threads
5796 \end_layout
5798 \begin_layout Subsection
5799 rr1-beta1
5800 \end_layout
5802 \begin_layout Itemize
5803 Remove leftover dummy SRAM slot
5804 \end_layout
5806 \begin_layout Itemize
5807 Fix controller numbers.
5808 \end_layout
5810 \begin_layout Subsection
5811 rr1-beta2
5812 \end_layout
5814 \begin_layout Itemize
5815 Fix lsnes-dumpavi after interface change.
5816 \end_layout
5818 \begin_layout Itemize
5819 Also give BSNES patches for v085.
5820 \end_layout
5822 \begin_layout Itemize
5823 Pack movie data in memory.
5824 \end_layout
5826 \begin_layout Subsection
5827 rr1-beta3
5828 \end_layout
5830 \begin_layout Itemize
5831 Fix framecount/length given when loading movies.
5832 \end_layout
5834 \begin_layout Itemize
5835 Controller command memory leak fixes.
5836 \end_layout
5838 \begin_layout Itemize
5839 Don't leak palette if freeing screen object.
5840 \end_layout
5842 \begin_layout Subsection
5843 rr1-beta4
5844 \end_layout
5846 \begin_layout Itemize
5847 Detect revisions.
5848 \end_layout
5850 \begin_layout Itemize
5851 Wxwidgets: Allow controlling dumper from the menu.
5852 \end_layout
5854 \begin_layout Subsection
5855 rr1-beta5
5856 \end_layout
5858 \begin_layout Itemize
5859 Rewrite parts of manual
5860 \end_layout
5862 \begin_layout Itemize
5863 Lua: Make it work with Lua 5.2.
5864 \end_layout
5866 \begin_layout Subsection
5867 rr1-beta6
5868 \end_layout
5870 \begin_layout Itemize
5871 Win32: Fix compile errors.
5872 \end_layout
5874 \begin_layout Subsection
5875 rr1-beta7
5876 \end_layout
5878 \begin_layout Itemize
5879 Refactor controller input code.
5880 \end_layout
5882 \begin_layout Itemize
5883 Fix crash when using command line on SDL / Mac OS X.
5884 \end_layout
5886 \begin_layout Subsection
5887 rr1-beta8
5888 \end_layout
5890 \begin_layout Itemize
5891 Delete core/coroutine (obsolete)
5892 \end_layout
5894 \begin_layout Itemize
5895 Lag input display by one frame.
5896 \end_layout
5898 \begin_layout Itemize
5899 Rewind movie to beginning function.
5900 \end_layout
5902 \begin_layout Itemize
5903 Fix wrong frame number reported to Lua when repainting after loadstate
5904 \end_layout
5906 \begin_layout Itemize
5907 Support UI editing of jukebox
5908 \end_layout
5910 \begin_layout Itemize
5911 Wxwidgets: Save settings on exit.
5912 \end_layout
5914 \begin_layout Itemize
5915 Support ${project} for filenames
5916 \end_layout
5918 \begin_layout Itemize
5919 SDL: Fix command history
5920 \end_layout
5922 \begin_layout Subsection
5923 rr1-beta9
5924 \end_layout
5926 \begin_layout Itemize
5927 Fix some order-of-global-ctor bugs.
5928 \end_layout
5930 \begin_layout Subsection
5931 rr1-beta10
5932 \end_layout
5934 \begin_layout Itemize
5935 Fix crashes when quitting on Win32.
5936 \end_layout
5938 \begin_layout Subsection
5939 rr1-beta11
5940 \end_layout
5942 \begin_layout Itemize
5943 EVDEV: Queue keypresses from joystick, don't send directly
5944 \end_layout
5946 \begin_layout Itemize
5947 Wxwidgets: Load-Preserve that actually works.
5948 \end_layout
5950 \begin_layout Subsection
5951 rr1-beta12
5952 \end_layout
5954 \begin_layout Itemize
5955 Wxwidgets: GUI for memory search.
5956 \end_layout
5958 \begin_layout Itemize
5959 Warn about using synchronous queue in UI callback.
5960 \end_layout
5962 \begin_layout Subsection
5963 rr1-beta13
5964 \end_layout
5966 \begin_layout Itemize
5967 Remember last saved file for each ROM
5968 \end_layout
5970 \begin_layout Itemize
5971 Support MT dumping via boost.
5972 \end_layout
5974 \begin_layout Itemize
5975 Lua: input.raw
5976 \end_layout
5978 \begin_layout Itemize
5979 Lua: input.keyhook
5980 \end_layout
5982 \begin_layout Itemize
5983 Make mouse be ordinary input instead of special-casing
5984 \end_layout
5986 \begin_layout Itemize
5987 SDL: Don't screw up commands with NUL codepoints.
5988 \end_layout
5990 \begin_layout Subsection
5991 rr1-beta14
5992 \end_layout
5994 \begin_layout Itemize
5995 Merge status panel and main window
5996 \end_layout
5998 \begin_layout Itemize
5999 True movie slot support (the rest of it)
6000 \end_layout
6002 \begin_layout Itemize
6003 SDL: Fix compilation error
6004 \end_layout
6006 \begin_layout Itemize
6007 Elminate cross calls in dump menu code.
6008 \end_layout
6010 \begin_layout Subsection
6011 rr1-beta15
6012 \end_layout
6014 \begin_layout Itemize
6015 Cancel pending saves command
6016 \end_layout
6018 \begin_layout Itemize
6019 Wxwidgets: Code refactoring
6020 \end_layout
6022 \begin_layout Itemize
6023 Wxwidgets: Fix system -> reset
6024 \end_layout
6026 \begin_layout Itemize
6027 Wxwidgets: Read watch expressions in the right thread
6028 \end_layout
6030 \begin_layout Subsection
6031 rr1-beta16
6032 \end_layout
6034 \begin_layout Itemize
6035 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6036  support that).
6037 \end_layout
6039 \begin_layout Itemize
6040 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6041 \end_layout
6043 \begin_layout Itemize
6044 Don't append trailing '-' to prefix when saving movie.
6045 \end_layout
6047 \begin_layout Itemize
6048 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6049 \end_layout
6051 \begin_layout Subsection
6053 \end_layout
6055 \begin_layout Itemize
6056 Document memory watch syntax.
6057 \end_layout
6059 \begin_layout Subsection
6060 rr1-delta1
6061 \end_layout
6063 \begin_layout Itemize
6064 Fix unattended dumping (lsnes-dumpavi)
6065 \end_layout
6067 \begin_layout Itemize
6068 Support RAW dumping
6069 \end_layout
6071 \begin_layout Itemize
6072 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6073 \end_layout
6075 \begin_layout Itemize
6076 Add option to control sample rate preturbation in AVI dumper
6077 \end_layout
6079 \begin_layout Subsection
6080 rr1-delta2
6081 \end_layout
6083 \begin_layout Itemize
6084 Wxwidgets: Fix dumper submodes
6085 \end_layout
6087 \begin_layout Itemize
6088 Set core controller types before loadstate
6089 \end_layout
6091 \begin_layout Subsection
6092 rr1-delta2epsilon1
6093 \end_layout
6095 \begin_layout Itemize
6096 Fix compiling with bsnes v086.
6097 \end_layout
6099 \begin_layout Subsection
6100 rr1-delta3
6101 \end_layout
6103 \begin_layout Itemize
6104 Don't prompt before quitting
6105 \end_layout
6107 \begin_layout Itemize
6108 Start unpaused, preserve pause/unpause over load.
6109 \end_layout
6111 \begin_layout Itemize
6112 Try to autodetect if ROM is headered.
6113 \end_layout
6115 \begin_layout Itemize
6116 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6117 \end_layout
6119 \begin_layout Itemize
6120 Allow configuring some hotkeys.
6121 \end_layout
6123 \begin_layout Subsection
6124 rr1-delta4
6125 \end_layout
6127 \begin_layout Itemize
6128 Lots of code cleanups
6129 \end_layout
6131 \begin_layout Itemize
6132 Fix JMD compression (JMD dumping was broken)
6133 \end_layout
6135 \begin_layout Itemize
6136 Don't crash if Lua C function throws an exception.
6137 \end_layout
6139 \begin_layout Itemize
6140 Support bitmap drawing in Lua.
6141 \end_layout
6143 \begin_layout Itemize
6144 Fix bsnes v085/v086 patches.
6145 \end_layout
6147 \begin_layout Itemize
6148 Improve stability on win32.
6149 \end_layout
6151 \begin_layout Subsection
6152 rr1-delta4epsilon1
6153 \end_layout
6155 \begin_layout Itemize
6156 Don't corrupt movie if movie length is integer multiple of frames per page.
6157 \end_layout
6159 \begin_layout Subsection
6160 rr1-delta5
6161 \end_layout
6163 \begin_layout Itemize
6164 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6165 \end_layout
6167 \begin_layout Itemize
6168 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6169 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6171 \end_layout
6173 \begin_layout Itemize
6174 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6175 \end_layout
6177 \begin_layout Itemize
6178 Wxwidgets: Fix broken modifiers
6179 \end_layout
6181 \begin_layout Itemize
6182 on_paint has parameter now.
6183 \end_layout
6185 \begin_layout Itemize
6186 Optional initital fill for bitmaps
6187 \end_layout
6189 \begin_layout Itemize
6190 Fix palette changing.
6191 \end_layout
6193 \begin_layout Itemize
6194 Optimize rendering a bit.
6195 \end_layout
6197 \begin_layout Itemize
6198 Bsnes v087 support.
6199 \end_layout
6201 \begin_layout Subsection
6202 rr1-delta5epsilon1
6203 \end_layout
6205 \begin_layout Itemize
6206 Movieinfo: Fix display of port #2 type.
6207 \end_layout
6209 \begin_layout Itemize
6210 Call on_input() after loadstate.
6211 \end_layout
6213 \begin_layout Subsection
6214 rr1-delta5epsilon2
6215 \end_layout
6217 \begin_layout Itemize
6218 Fix writing port2 data to movie.
6219 \end_layout
6221 \begin_layout Itemize
6222 Fix SRAM handling with Bsnes v087.
6223 \end_layout
6225 \begin_layout Subsection
6226 rr1-delta6
6227 \end_layout
6229 \begin_layout Itemize
6230 Library loading support
6231 \end_layout
6233 \begin_layout Itemize
6234 Built-in TSCC encoder
6235 \end_layout
6237 \begin_layout Itemize
6238 Hi-color (256T colors) dumping.
6239 \end_layout
6241 \begin_layout Itemize
6242 Dump over TCP/IP(v6)
6243 \end_layout
6245 \begin_layout Itemize
6246 Hidable status panel
6247 \end_layout
6249 \begin_layout Itemize
6250 Turbo toggle/hold
6251 \end_layout
6253 \begin_layout Itemize
6254 Adjustable sound volume
6255 \end_layout
6257 \begin_layout Itemize
6258 Screen scaling
6259 \end_layout
6261 \begin_layout Itemize
6262 Allow DnD into filename boxes
6263 \end_layout
6265 \begin_layout Itemize
6266 Configurable paths
6267 \end_layout
6269 \begin_layout Itemize
6270 Portaudio: Fix speaker popping at start
6271 \end_layout
6273 \begin_layout Itemize
6274 Lots of UI changes
6275 \end_layout
6277 \begin_layout Itemize
6278 Speed adjustment menu
6279 \end_layout
6281 \begin_layout Itemize
6282 Win32 joystick support
6283 \end_layout
6285 \begin_layout Itemize
6286 Lua: gui.rainbow and gui.box
6287 \end_layout
6289 \begin_layout Itemize
6290 Split key lists into classes (the key list was large!)
6291 \end_layout
6293 \begin_layout Itemize
6294 More save slots support
6295 \end_layout
6297 \begin_layout Itemize
6298 Wxwidgets (wxJoystick) joystick support
6299 \end_layout
6301 \begin_layout Subsection
6302 rr1-delta7
6303 \end_layout
6305 \begin_layout Itemize
6306 Lots of internal joystick refactoring
6307 \end_layout
6309 \begin_layout Itemize
6310 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6311 \end_layout
6313 \begin_layout Itemize
6314 Wxwidgets: Settings mode (open settings without ROM)
6315 \end_layout
6317 \begin_layout Itemize
6318 Wxwidgets: Prompt key to use option
6319 \end_layout
6321 \begin_layout Itemize
6322 Wxwidgets: Fix crash if key goes away underneath
6323 \end_layout
6325 \begin_layout Itemize
6326 Wxwidgets: Fix mouse position in presence of scaling
6327 \end_layout
6329 \begin_layout Itemize
6330 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6331 \end_layout
6333 \begin_layout Itemize
6334 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6335  seem to work well on WinXP)
6336 \end_layout
6338 \begin_layout Itemize
6339 Start paused option.
6340 \end_layout
6342 \begin_layout Subsection
6343 rr1-delta7epsilon1
6344 \end_layout
6346 \begin_layout Itemize
6347 AVI: ZMBV support
6348 \end_layout
6350 \begin_layout Itemize
6351 lsnes-dumpavi: Start Lua before starting dumper
6352 \end_layout
6354 \begin_layout Itemize
6355 AVI: Fix secondary audio in mode 4.
6356 \end_layout
6358 \begin_layout Subsection
6359 rr1-delta7epsilon2
6360 \end_layout
6362 \begin_layout Itemize
6363 AVI: Refactor ZMBV a bit.
6364 \end_layout
6366 \begin_layout Itemize
6367 Fix error reading analog values from movie file
6368 \end_layout
6370 \begin_layout Subsection
6371 rr1-delta8
6372 \end_layout
6374 \begin_layout Itemize
6375 Delayed reset support
6376 \end_layout
6378 \begin_layout Itemize
6379 Lua: memory.hash_region
6380 \end_layout
6382 \begin_layout Subsection
6383 rr1-delta8epsilon1
6384 \end_layout
6386 \begin_layout Itemize
6387 Rework the build system
6388 \end_layout
6390 \begin_layout Itemize
6391 Typing input support
6392 \end_layout
6394 \begin_layout Itemize
6395 Fix building with bsnes v086 and v087.
6396 \end_layout
6398 \begin_layout Itemize
6399 SDL: Save settings on exit
6400 \end_layout
6402 \begin_layout Itemize
6403 SDL: Command to enter command line mode with given command.
6404 \end_layout
6406 \begin_layout Itemize
6407 SDL: More advanced command editing.
6408 \end_layout
6410 \begin_layout Subsection
6411 rr1-delta9
6412 \end_layout
6414 \begin_layout Itemize
6415 wxMSW: Fix the 
6416 \begin_inset Quotes eld
6417 \end_inset
6419 arrow keys and enter don't work
6420 \begin_inset Quotes erd
6421 \end_inset
6423  problem
6424 \end_layout
6426 \begin_layout Itemize
6427 MSU-1 support
6428 \end_layout
6430 \begin_layout Itemize
6431 Show mode changes due to rewinding.
6432 \end_layout
6434 \begin_layout Itemize
6435 Unsafe rewind support
6436 \end_layout
6438 \begin_layout Itemize
6439 Fix directory transversal.
6440 \end_layout
6442 \begin_layout Subsection
6443 rr1-delta10
6444 \end_layout
6446 \begin_layout Itemize
6447 AVI: Sound mode 5 (48kHz high-quality)
6448 \end_layout
6450 \begin_layout Itemize
6451 Lua: Reset Lua VM
6452 \end_layout
6454 \begin_layout Itemize
6455 Map the SNES bus into address space
6456 \end_layout
6458 \begin_layout Itemize
6459 Fix loading memory watch files with CRLF line endings
6460 \end_layout
6462 \begin_layout Subsection
6463 rr1-delta10epsilon1
6464 \end_layout
6466 \begin_layout Itemize
6467 Map bsnes internal state into memory space
6468 \end_layout
6470 \begin_layout Itemize
6471 Fix the 
6472 \begin_inset Quotes eld
6473 \end_inset
6475 click on panel wedges the emulator
6476 \begin_inset Quotes erd
6477 \end_inset
6479  for real.
6480 \end_layout
6482 \begin_layout Itemize
6483 DnD movies/saves on the main window.
6484 \end_layout
6486 \begin_layout Subsection
6487 rr1-delta11
6488 \end_layout
6490 \begin_layout Itemize
6491 Split core bindings into own module.
6492 \end_layout
6494 \begin_layout Itemize
6495 Remember invalid settings
6496 \end_layout
6498 \begin_layout Itemize
6499 Support for modified Gambatte core for GB/GBC emulation.
6500 \end_layout
6502 \begin_layout Itemize
6503 Reload/swap ROM function
6504 \end_layout
6506 \begin_layout Subsection
6507 rr1-delta11epsilon1
6508 \end_layout
6510 \begin_layout Itemize
6511 Fix step poll function
6512 \end_layout
6514 \begin_layout Subsection
6515 rr1-delta12
6516 \end_layout
6518 \begin_layout Itemize
6519 Non-insane savestate anchoring
6520 \end_layout
6522 \begin_layout Subsection
6523 rr1-delta13
6524 \end_layout
6526 \begin_layout Itemize
6527 More Memory search methods
6528 \end_layout
6530 \begin_layout Itemize
6531 Preserve movie if loading in RO mode.
6532 \end_layout
6534 \begin_layout Itemize
6535 Fix a obscure case in timeline check
6536 \end_layout
6538 \begin_layout Itemize
6539 Revamp the entiere ROM loading code
6540 \end_layout
6542 \begin_layout Itemize
6543 Support DnD on ROMs
6544 \end_layout
6546 \begin_layout Itemize
6547 Revamp menu layout
6548 \end_layout
6550 \begin_layout Itemize
6551 Standalone hotkey config dialog
6552 \end_layout
6554 \begin_layout Itemize
6555 Show bindings in more user-friendly format
6556 \end_layout
6558 \begin_layout Subsection
6559 rr1-delta13epsilon1
6560 \end_layout
6562 \begin_layout Itemize
6563 Pipedec support
6564 \end_layout
6566 \begin_layout Itemize
6567 Fix uninitialized variables in bsnes v085
6568 \end_layout
6570 \begin_layout Subsection
6571 rr1-delta14
6572 \end_layout
6574 \begin_layout Itemize
6575 Merge gambatte core into mainline (from its own branch)
6576 \end_layout
6578 \begin_layout Itemize
6579 Wxwidgets: Show expected dump file formats
6580 \end_layout
6582 \begin_layout Itemize
6583 Memory watch: Data typing
6584 \end_layout
6586 \begin_layout Itemize
6587 lsnes internal MMIO area.
6588 \end_layout
6590 \begin_layout Itemize
6591 Wxwidgets: New memory watch editor
6592 \end_layout
6594 \begin_layout Itemize
6595 Hexadecimal memory watches
6596 \end_layout
6598 \begin_layout Itemize
6599 Wxwidgets: Monospaced panel
6600 \end_layout
6602 \begin_layout Itemize
6603 Wxwidgets: Split memory watches in panel
6604 \end_layout
6606 \begin_layout Itemize
6607 Wxwidgets: Disable VMAs in memory search
6608 \end_layout
6610 \begin_layout Itemize
6611 lsnes-dumpavi: Fix speed bug
6612 \end_layout
6614 \begin_layout Itemize
6615 Movie subtitle support
6616 \end_layout
6618 \begin_layout Itemize
6619 Fix rerecord count reporting
6620 \end_layout
6622 \begin_layout Itemize
6623 Don't trash movie when loading in readonly mode.
6624 \end_layout
6626 \begin_layout Subsection
6627 rr1-delta14epsilon1
6628 \end_layout
6630 \begin_layout Itemize
6631 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
6632 \end_layout
6634 \begin_layout Itemize
6635 Fix build on Mac OS X.
6636 \end_layout
6638 \begin_layout Itemize
6639 Lua: loopwrapper
6640 \end_layout
6642 \begin_layout Itemize
6643 Wxwidgets: Hidable messages window
6644 \end_layout
6646 \begin_layout Itemize
6647 Lua: input.joyset
6648 \end_layout
6650 \begin_layout Itemize
6651 Bsnes: Support inconsistent saves
6652 \end_layout
6654 \begin_layout Itemize
6655 Bsnes: Allow simulating saving every frame
6656 \end_layout
6658 \begin_layout Itemize
6659 Fix desync if savestate is loaded in readonly mode in certain conditions.
6660 \end_layout
6662 \begin_layout Itemize
6663 Wxwidgets: Fix save dialogs on Mac OS X.
6664 \end_layout
6666 \begin_layout Itemize
6667 Wxwidgets: Fix insane status width on Win32.
6668 \end_layout
6670 \begin_layout Itemize
6671 Wxwidgets: Fix autohold processing to be faster.
6672 \end_layout
6674 \begin_layout Itemize
6675 Wxwidgets: Allow loading ROMs and movies from commandline.
6676 \end_layout
6678 \begin_layout Subsection
6679 rr1-delta15
6680 \end_layout
6682 \begin_layout Itemize
6683 Be a bit smarter with --load
6684 \end_layout
6686 \begin_layout Itemize
6687 Rewrote higher-level parts of audio system
6688 \end_layout
6690 \begin_layout Itemize
6691 Tool to build commentary tracks
6692 \end_layout
6694 \begin_layout Itemize
6695 Lua: input.joyget
6696 \end_layout
6698 \begin_layout Itemize
6699 Gambatte: Add support for SVN358
6700 \end_layout
6702 \begin_layout Itemize
6703 Use builtin font when rendering status panel.
6704 \end_layout
6706 \begin_layout Itemize
6707 Option to detach memory watch to its own window.
6708 \end_layout
6710 \begin_layout Itemize
6711 Recent ROMs/Movies menu
6712 \end_layout
6714 \begin_layout Itemize
6715 Libao support
6716 \end_layout
6718 \begin_layout Itemize
6719 Useful lag counter for SNES games that autopoll
6720 \end_layout
6722 \begin_layout Itemize
6723 Fix buffer overflow in gambatte sound output
6724 \end_layout
6726 \begin_layout Subsection
6727 rr1-delta15epsilon1
6728 \end_layout
6730 \begin_layout Itemize
6731 Don't blow up on wxGTK if the window is hidden somehow
6732 \end_layout
6734 \begin_layout Itemize
6735 Support simultaneous drop of ROM and movie.
6736 \end_layout
6738 \begin_layout Itemize
6739 Gambatte: Don't save spurious SRAMs.
6740 \end_layout
6742 \begin_layout Itemize
6743 Make SGB ROMs actually usable.
6744 \end_layout
6746 \begin_layout Itemize
6747 Fix so that saved movies appear in recent movies.
6748 \end_layout
6750 \begin_layout Itemize
6751 Don't open multiple commentary editors at once.
6752 \end_layout
6754 \begin_layout Subsection
6755 rr1-delta15epsilon2
6756 \end_layout
6758 \begin_layout Itemize
6759 Lua: memory.readregion/memory.writeregion
6760 \end_layout
6762 \begin_layout Itemize
6763 Lua: memory.map{,s}{byte,word,dword,qword}
6764 \end_layout
6766 \begin_layout Itemize
6767 Lua: memory.map_structure
6768 \end_layout
6770 \begin_layout Itemize
6771 Lua: Fix bus_address for gambatte
6772 \end_layout
6774 \begin_layout Itemize
6775 Fix features dependent of bsnes debugger
6776 \end_layout
6778 \begin_layout Itemize
6779 Cleanup bsnes debugger logic
6780 \end_layout
6782 \begin_layout Itemize
6783 Fix resets in presence of save every frame
6784 \end_layout
6786 \begin_layout Subsection
6787 rr1-delta15epsilon3
6788 \end_layout
6790 \begin_layout Itemize
6791 Lua: input.lcid_to_pcid
6792 \end_layout
6794 \begin_layout Itemize
6795 Fix off-by-one bug with slot hashes
6796 \end_layout
6798 \begin_layout Itemize
6799 Fix crashes on certain memory watch expressions
6800 \end_layout
6802 \begin_layout Itemize
6803 Lua: memory.read_expr
6804 \end_layout
6806 \begin_layout Itemize
6807 Lua: Fix memory.read_expr on nil argument
6808 \end_layout
6810 \begin_layout Itemize
6811 Fix the code to compile on G++ 4.7
6812 \end_layout
6814 \begin_layout Itemize
6815 Change button_id to be a function pointer field, not a virtual method
6816 \end_layout
6818 \begin_layout Itemize
6819 Add bsnes patches to fix libsnes to compile on GCC 4.7
6820 \end_layout
6822 \begin_layout Itemize
6823 Gambatte: Always use legacy lag counting
6824 \end_layout
6826 \begin_layout Itemize
6827 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
6828 \end_layout
6830 \begin_layout Itemize
6831 Fix analog controllers
6832 \end_layout
6834 \begin_layout Itemize
6835 Fix autohold menus
6836 \end_layout
6838 \begin_layout Itemize
6839 Fix button symbols in input display
6840 \end_layout
6842 \begin_layout Itemize
6843 Compensate for nuts bsnes superscope/justifier handling
6844 \end_layout
6846 \begin_layout Itemize
6847 Lua: Fix bit.extract boolean handling
6848 \end_layout
6850 \begin_layout Subsection
6851 rr2-beta0
6852 \end_layout
6854 \begin_layout Itemize
6855 Split emulation cores more from the rest
6856 \end_layout
6858 \begin_layout Itemize
6859 Support having multiple emulation cores compiled at once
6860 \end_layout
6862 \begin_layout Itemize
6863 Support arbitrary number of ports (well, up to 31 anyway).
6864 \end_layout
6866 \begin_layout Itemize
6867 SNES debugger support
6868 \end_layout
6870 \begin_layout Itemize
6871 Support 16-button controllers
6872 \end_layout
6874 \begin_layout Itemize
6875 Remove old SDL front end
6876 \end_layout
6878 \begin_layout Itemize
6879 Data-driven controller buttons
6880 \end_layout
6882 \begin_layout Itemize
6883 Generate the port code from defines
6884 \end_layout
6886 \begin_layout Subsection
6887 rr2-beta1
6888 \end_layout
6890 \begin_layout Itemize
6891 Update libgambatte to SVN364
6892 \end_layout
6894 \begin_layout Itemize
6895 Get rid of partial linking (building with MXE works)
6896 \end_layout
6898 \begin_layout Itemize
6899 Load XML even without gamepack files
6900 \end_layout
6902 \begin_layout Itemize
6903 Support screen rotate & flip
6904 \end_layout
6906 \begin_layout Itemize
6907 Fix bug when changing controller key to another subkey of the same key
6908 \end_layout
6910 \begin_layout Subsection
6911 rr1-delta16
6912 \end_layout
6914 \begin_layout Itemize
6915 Stop at movie end: Don't off-by-one
6916 \end_layout
6918 \begin_layout Itemize
6919 Fix crash closing lsnes with voice playback active.
6920 \end_layout
6922 \begin_layout Itemize
6923 Import/Export OggOpus for commentary tracks
6924 \end_layout
6926 \begin_layout Itemize
6927 16-button controllers.
6928 \end_layout
6930 \begin_layout Itemize
6931 Don't show nonexistent controllers in input display
6932 \end_layout
6934 \begin_layout Itemize
6935 Set voice record/playback volume from UI
6936 \end_layout
6938 \begin_layout Itemize
6939 Patches for gambatte SVN364.
6940 \end_layout
6942 \begin_layout Itemize
6943 Load markup (if exists) even without gamepack file.
6944 \end_layout
6946 \begin_layout Itemize
6947 Screen rotation & flipping
6948 \end_layout
6950 \begin_layout Itemize
6951 Lua: Some new bit functions
6952 \end_layout
6954 \begin_layout Itemize
6955 Auto-refresh voice streams on change.
6956 \end_layout
6958 \begin_layout Itemize
6959 Auto-refresh subtitles on change & new subtitle editor.
6960 \end_layout
6962 \begin_layout Itemize
6963 Fix music volume adjustment.
6964 \end_layout
6966 \begin_layout Subsection
6967 rr2-beta2
6968 \end_layout
6970 \begin_layout Itemize
6971 Use system threads instead of platform threads
6972 \end_layout
6974 \begin_layout Itemize
6975 Cleanup build by allowing dummy and real drivers to link together.
6976 \end_layout
6978 \begin_layout Itemize
6979 Split duplex support
6980 \end_layout
6982 \begin_layout Subsection
6983 rr1-delta16epsilon1
6984 \end_layout
6986 \begin_layout Itemize
6987 Wxwidgets: Fix memory watch rendering.
6988 \end_layout
6990 \begin_layout Itemize
6991 Wxwidgets: Allow setting voice stream gain.
6992 \end_layout
6994 \begin_layout Itemize
6995 Wxwidgets: VU meters and volume adjustment.
6996 \end_layout
6998 \begin_layout Itemize
6999 Lua: Custom fonts support.
7000 \end_layout
7002 \begin_layout Itemize
7003 Lua: Fix methods stopping working when resetting Lua.
7004 \end_layout
7006 \begin_layout Itemize
7007 Fix loading standard-format movies in preserve (readonly) mode.
7008 \end_layout
7010 \begin_layout Subsection
7011 rr1-delta17
7012 \end_layout
7014 \begin_layout Itemize
7015 Primitive movie editor
7016 \end_layout
7018 \begin_layout Itemize
7019 Fix VU meter with no sound device.
7020 \end_layout
7022 \begin_layout Itemize
7023 Fix various undefined return values.
7024 \end_layout
7026 \begin_layout Itemize
7027 Show rates in VU meter window.
7028 \end_layout
7030 \begin_layout Subsection
7031 rr2-beta3
7032 \end_layout
7034 \begin_layout Itemize
7035 Lua: Render queues as objects
7036 \end_layout
7038 \begin_layout Itemize
7039 Bsnes: support hard resets
7040 \end_layout
7042 \begin_layout Itemize
7043 Dedicated sound devices dialog
7044 \end_layout
7046 \begin_layout Itemize
7047 Change the default AVI sound mode to 2 or 5.
7048 \end_layout
7050 \begin_layout Itemize
7051 Fix totally borked movie saving.
7052 \end_layout
7054 \begin_layout Itemize
7055 Portaudio: Use split duplex with different devices.
7056 \end_layout
7058 \begin_layout Itemize
7059 Fix controls with gambatte core.
7060 \end_layout
7062 \begin_layout Itemize
7063 Modify save slot set handling.
7064 \end_layout
7066 \begin_layout Itemize
7067 lsnes-dumpavi: --firmware-path.
7068 \end_layout
7070 \begin_layout Itemize
7071 Fix lots of compiler warnings.
7072 \end_layout
7074 \begin_layout Subsection
7075 rr1-delta17epsilon1
7076 \end_layout
7078 \begin_layout Itemize
7079 Commentary tool: Set nominal bit rate and limit max bit rate.
7080 \end_layout
7082 \begin_layout Itemize
7083 Lua: Unconditionally reload host memory on loadstate
7084 \end_layout
7086 \begin_layout Itemize
7087 Lua: Query bindings, manipulate aliases, create inverse bindings
7088 \end_layout
7090 \begin_layout Itemize
7091 Lua: Fix crashes with resetting VM while some types of paint requests are
7092  in flight.
7093 \end_layout
7095 \begin_layout Itemize
7096 Lua: gui.text: Clip the text properly instead of corrupting memory in some
7097  cases.
7098 \end_layout
7100 \begin_layout Itemize
7101 Save screenshot header reliably
7102 \end_layout
7104 \begin_layout Itemize
7105 Lua: Backport input.get2 and input.set2
7106 \end_layout
7108 \begin_layout Itemize
7109 Lua: New controller info functions.
7110 \end_layout
7112 \begin_layout Itemize
7113 Movie editor: Fix reset delay counters to be the right way around.
7114 \end_layout
7116 \begin_layout Itemize
7117 Lua: on_snoop2
7118 \end_layout
7120 \begin_layout Itemize
7121 Lua: on_button and input.veto_button.
7122 \end_layout
7124 \begin_layout Subsection
7125 rr2-beta4
7126 \end_layout
7128 \begin_layout Itemize
7129 Revert memory leak fix breaking input
7130 \end_layout
7132 \begin_layout Itemize
7133 Refactor Opus handling
7134 \end_layout
7136 \begin_layout Itemize
7137 Restrict member picking only to .zip files
7138 \end_layout
7140 \begin_layout Itemize
7141 Fix reading of host-endian VMAs.
7142 \end_layout
7144 \begin_layout Itemize
7145 Fix rlow and rhigh to be the right way around.
7146 \end_layout
7148 \begin_layout Itemize
7149 Lua: Don't wedge VM if callback fails with an exception
7150 \end_layout
7152 \begin_layout Itemize
7153 Refactor Ogg handling.
7154 \end_layout
7156 \end_body
7157 \end_document