lsnes rr2-β4
[lsnes.git] / manual.lyx
blobe5a193babc02579063b5a2365f183cf15b75d52a
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 designate-position <class>-<#>-analog<n>
667 \end_layout
669 \begin_layout Standard
670 Designate position for analog pair.
671  <n> is only there if there are multiple axis pairs.
672 \end_layout
674 \begin_layout Subsubsection
675 autofire (<pattern>|-)...
676 \end_layout
678 \begin_layout Standard
679 Set autofire pattern.
680  Each parameter is comma-separated list of button names to hold on that
681  frame.
682  After reaching the end of pattern, the pattern restarts from the beginning.
683 \end_layout
685 \begin_layout Subsubsection
686 repaint
687 \end_layout
689 \begin_layout Standard
690 Force a repaint.
691 \end_layout
693 \begin_layout Subsubsection
694 toggle-pause-on-end
695 \end_layout
697 \begin_layout Standard
698 Toggle pause on end flag.
699 \end_layout
701 \begin_layout Subsubsection
702 set-pause-on-end
703 \end_layout
705 \begin_layout Standard
706 Set pause on end flag.
707 \end_layout
709 \begin_layout Subsubsection
710 clear-pause-on-end
711 \end_layout
713 \begin_layout Standard
714 Clear pause on end flag.
715 \end_layout
717 \begin_layout Subsection
718 Save jukebox 
719 \end_layout
721 \begin_layout Subsubsection
722 cycle-jukebox-backward
723 \end_layout
725 \begin_layout Standard
726 Cycle save jukebox backwards.
727 \end_layout
729 \begin_layout Subsubsection
730 cycle-jukebox-forward
731 \end_layout
733 \begin_layout Standard
734 Cycle save jukebox forwards
735 \end_layout
737 \begin_layout Subsubsection
738 load-jukebox
739 \end_layout
741 \begin_layout Standard
742 Do load from jukebox (current mode).
743 \end_layout
745 \begin_layout Subsubsection
746 save-jukebox
747 \end_layout
749 \begin_layout Standard
750 Do state save to jukebox.
751 \end_layout
753 \begin_layout Subsection
754 Lua 
755 \end_layout
757 \begin_layout Standard
758 Only available if lua support is compiled in.
759 \end_layout
761 \begin_layout Subsubsection
762 evaluate-lua <luacode>
763 \end_layout
765 \begin_layout Standard
766 Run Lua code <luacode> using built-in Lua interpretter.
767 \end_layout
769 \begin_layout Subsubsection
770 run-lua <script>
771 \end_layout
773 \begin_layout Standard
774 Run specified lua file using built-in Lua interpretter.
775 \end_layout
777 \begin_layout Subsubsection
778 reset-lua
779 \end_layout
781 \begin_layout Standard
782 Clear the Lua VM state and restore to factory defaults.
783 \end_layout
785 \begin_layout Subsection
786 Memory watch
787 \end_layout
789 \begin_layout Subsubsection
790 add-watch <name> <expression>
791 \end_layout
793 \begin_layout Standard
794 Adds new watch (or modifies old one).
795 \end_layout
797 \begin_layout Subsubsection
798 remove-watch <name>
799 \end_layout
801 \begin_layout Standard
802 Remove a watch.
803 \end_layout
805 \begin_layout Subsection
806 Sound 
807 \end_layout
809 \begin_layout Subsubsection
810 enable-sound <on/off> 
811 \end_layout
813 \begin_layout Standard
814 Enable/Disable sound.
815 \end_layout
817 \begin_layout Subsection
818 Misc.
819 \end_layout
821 \begin_layout Subsubsection
822 reload-rom [<file>]
823 \end_layout
825 \begin_layout Standard
826 Reloads the main ROM image from <file>.
827 \end_layout
829 \begin_layout Subsubsection
830 +tangent
831 \end_layout
833 \begin_layout Standard
834 Tangent for recording voice for commentary track.
835  While pressed, record a stream.
836 \end_layout
838 \begin_layout Section
839 Settings
840 \end_layout
842 \begin_layout Subsection
843 Core settings
844 \end_layout
846 \begin_layout Subsection
847 AVI dumper settings
848 \end_layout
850 \begin_layout Subsubsection
851 avi-large
852 \end_layout
854 \begin_layout Standard
855 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
856  outputs.
857 \end_layout
859 \begin_layout Subsubsection
860 avi-left-border
861 \end_layout
863 \begin_layout Standard
864 AVI dumper: Set the default left border thickness (unless lua overrides)
865  for dumps.
866  Range 0-8191.
867  Default is 0.
868 \end_layout
870 \begin_layout Subsubsection
871 avi-right-border
872 \end_layout
874 \begin_layout Standard
875 AVI dumper: Set the default right border thickness (unless lua overrides)
876  for dumps.
877  Range 0-8191.
878  Default is 0.
879 \end_layout
881 \begin_layout Subsubsection
882 avi-top-border
883 \end_layout
885 \begin_layout Standard
886 AVI dumper: Set the default top border thickness (unless lua overrides)
887  for dumps.
888  Range 0-8191.
889  Default is 0.
890 \end_layout
892 \begin_layout Subsubsection
893 avi-bottom-border
894 \end_layout
896 \begin_layout Standard
897 AVI dumper: Set the default bottom border thickness (unless lua overrides)
898  for dumps.
899  Range 0-8191.
900  Default is 0.
901 \end_layout
903 \begin_layout Subsubsection
904 avi-maxframes
905 \end_layout
907 \begin_layout Standard
908 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
909  Range 0-999999999.
910  Default is 0.
911 \end_layout
913 \begin_layout Subsubsection
914 avi-compresison
915 \end_layout
917 \begin_layout Standard
918 AVI dumper: Compression level (0-18).
919 \end_layout
921 \begin_layout Itemize
922 Compression levels 10 and above are not compatible with stock CSCD codec.
923 \end_layout
925 \begin_layout Itemize
926 Recomended level is 7.
927 \end_layout
929 \begin_layout Subsubsection
930 avi-soundrate
931 \end_layout
933 \begin_layout Standard
934 AVI dumper: Set method of determining the sound rate.
935 \end_layout
937 \begin_layout Itemize
938 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
939  128, 176.4 and 192 kHz.
940 \end_layout
942 \begin_layout Itemize
943 1: Round down to nearest integer.
944 \end_layout
946 \begin_layout Itemize
947 2: Round up to nearest ingeter.
948 \end_layout
950 \begin_layout Itemize
951 3: Multiply by denominator.
952 \end_layout
954 \begin_layout Itemize
955 4: High quality 44.1kHz (SRC needed).
956 \end_layout
958 \begin_layout Itemize
959 5: High quality 48kHz (SRC needed).
960 \end_layout
962 \begin_layout Subsection
963 JMD options
964 \end_layout
966 \begin_layout Subsubsection
967 jmd-compression
968 \end_layout
970 \begin_layout Standard
971 JMD dumper: Compression level (0-9).
972 \end_layout
974 \begin_layout Section
975 Lua functions
976 \end_layout
978 \begin_layout Subsection
979 Core (in main table)
980 \end_layout
982 \begin_layout Subsubsection
983 print
984 \end_layout
986 \begin_layout Standard
987 Print line to message console.
988 \end_layout
990 \begin_layout Subsubsection
991 exec(string command)
992 \end_layout
994 \begin_layout Standard
995 Run command as it was entered on the command line
996 \end_layout
998 \begin_layout Subsubsection
999 utime()
1000 \end_layout
1002 \begin_layout Standard
1003 Returns two values.
1004  First is time since some epoch in seconds, the second is microseconds mod
1005  10^6 since that epoch.
1006 \end_layout
1008 \begin_layout Subsubsection
1009 emulator_ready()
1010 \end_layout
1012 \begin_layout Standard
1013 Returns true if emulator has finished booting, false if not (on_startup()
1014  will be issued later).
1015 \end_layout
1017 \begin_layout Subsubsection
1018 set_idle_timeout(number timeout)
1019 \end_layout
1021 \begin_layout Standard
1022 Set number of microseconds to block idle for.
1023  After this timeout has expired, on_idle() will be called once.
1024 \end_layout
1026 \begin_layout Subsubsection
1027 set_timer_timeout(number timeout)
1028 \end_layout
1030 \begin_layout Standard
1031 Set number of microseconds to block timer for.
1032  After this timeout has expired, on_timer() will be called once.
1033 \end_layout
1035 \begin_layout Subsubsection
1036 bus_address(number snesaddr)
1037 \end_layout
1039 \begin_layout Standard
1040 Returns virtual address corresponding to specified address on SNES bus.
1041 \end_layout
1043 \begin_layout Subsubsection
1044 loopwrapper(function fun, ...)
1045 \end_layout
1047 \begin_layout Standard
1048 Calls function fun with function and specified arguments.
1049  The function passed suspends execution until the function returned is called.
1050  Handy for linear flow control among multiple invocations of a hook.
1051  Example code:
1052 \end_layout
1054 \begin_layout LyX-Code
1055 on_paint = loopwrapper(function(wait)
1056 \end_layout
1058 \begin_deeper
1059 \begin_layout LyX-Code
1060 while true do
1061 \end_layout
1063 \begin_deeper
1064 \begin_layout LyX-Code
1065 gui.text(0, 0, 
1066 \begin_inset Quotes eld
1067 \end_inset
1069 Test!
1070 \begin_inset Quotes erd
1071 \end_inset
1074 \end_layout
1076 \begin_layout LyX-Code
1077 wait();
1078 \end_layout
1080 \end_deeper
1081 \begin_layout LyX-Code
1083 \end_layout
1085 \end_deeper
1086 \begin_layout LyX-Code
1087 end);
1088 \end_layout
1090 \begin_layout Subsubsection
1091 list_bindings([string cmd])
1092 \end_layout
1094 \begin_layout Standard
1095 Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
1096  If command is specified, the table is limited to that command.
1097  Also searches for controller keys.
1098 \end_layout
1100 \begin_layout Subsubsection
1101 get_alias(string aname)
1102 \end_layout
1104 \begin_layout Standard
1105 Get expansion of given alias.
1106 \end_layout
1108 \begin_layout Subsubsection
1109 set_alias(string aname, string value)
1110 \end_layout
1112 \begin_layout Standard
1113 Set expansion of given alias.
1114 \end_layout
1116 \begin_layout Subsubsection
1117 create_ibind(string name, string cmd)
1118 \end_layout
1120 \begin_layout Standard
1121 Return object representing inverse binding with specified name and specified
1122  command.
1123 \end_layout
1125 \begin_layout Itemize
1126 To create press/release commands, use aliases +foo and -foo .
1127 \end_layout
1129 \begin_layout Itemize
1130 Keep the returned object around.
1131 \end_layout
1133 \begin_layout Subsection
1134 Table bit:
1135 \end_layout
1137 \begin_layout Standard
1138 Bitwise logical functions and related.
1139 \end_layout
1141 \begin_layout Subsubsection
1142 bit.none(number...) / bit.bnot(number...)
1143 \end_layout
1145 \begin_layout Standard
1146 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1147  arguments).
1148 \end_layout
1150 \begin_layout Subsubsection
1151 bit.any(number...) / bit.bor(number...)
1152 \end_layout
1154 \begin_layout Standard
1155 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1156 \end_layout
1158 \begin_layout Subsubsection
1159 bit.all(number...) / bit.band(number...)
1160 \end_layout
1162 \begin_layout Standard
1163 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1165 \end_layout
1167 \begin_layout Subsubsection
1168 bit.parity(number...) / bit.bxor(number...)
1169 \end_layout
1171 \begin_layout Standard
1172 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1173  of the arguments).
1174 \end_layout
1176 \begin_layout Subsubsection
1177 bit.lrotate(number base[, number amount[, number bits]])
1178 \end_layout
1180 \begin_layout Standard
1181 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1182 \end_layout
1184 \begin_layout Subsubsection
1185 bit.rrotate(number base[, number amount[, number bits]])
1186 \end_layout
1188 \begin_layout Standard
1189 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1190  places.
1191 \end_layout
1193 \begin_layout Subsubsection
1194 bit.lshift(number base[, number amount[, number bits]])
1195 \end_layout
1197 \begin_layout Standard
1198 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1199  The new bits are filled with zeroes.
1200 \end_layout
1202 \begin_layout Subsubsection
1203 bit.lrshift(number base[, number amount[, number bits]])
1204 \end_layout
1206 \begin_layout Standard
1207 Shift bits-bit (max 48, default 48) number logically right by amount (default
1208  1) places.
1209  The new bits are filled with zeroes.
1210 \end_layout
1212 \begin_layout Subsubsection
1213 bit.arshift(number base[, number amount[, number bits]])
1214 \end_layout
1216 \begin_layout Standard
1217 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1218  (default 1) places.
1219  The new bits are shifted in with copy of the high bit.
1220 \end_layout
1222 \begin_layout Subsubsection
1223 bit.extract(number base[, number bit0[, number bit1,...]])
1224 \end_layout
1226 \begin_layout Standard
1227 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1228 \end_layout
1230 \begin_layout Standard
1231 Notes: 
1232 \end_layout
1234 \begin_layout Itemize
1235 Bit numbers up to 51 should work reliably (then things start falling apart
1236  due to double precision issues).
1237 \end_layout
1239 \begin_layout Itemize
1240 There are two special bit positions, true and false, standing for always
1241  set bit and always clear bit.
1242 \end_layout
1244 \begin_layout Subsubsection
1245 bit.value([number bit1[, number bit2,...]])
1246 \end_layout
1248 \begin_layout Standard
1249 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1250  places and so on.
1251  As special value, nil argument is no-op.
1252 \end_layout
1254 \begin_layout Subsubsection
1255 bit.test_any(number a, number b)
1256 \end_layout
1258 \begin_layout Standard
1259 Returns true if bitwise and of a and b is nonzero, otherwise false.
1260 \end_layout
1262 \begin_layout Subsubsection
1263 bit.test_all(number a, number b)
1264 \end_layout
1266 \begin_layout Standard
1267 Returns true if bitwise and of a and b is equals b, otherwise false.
1268 \end_layout
1270 \begin_layout Subsubsection
1271 bit.popcount(number a)
1272 \end_layout
1274 \begin_layout Standard
1275 Returns number of set bits in a.
1276 \end_layout
1278 \begin_layout Subsubsection
1279 bit.clshift(number a, number b, [number amount,[number bits]])
1280 \end_layout
1282 \begin_layout Standard
1283 Does chained left shift on a, b by amount positions, assuming numbers to
1284  be of specified number of bits.
1285 \end_layout
1287 \begin_layout Subsubsection
1288 bit.crshift(number a, number b, [number amount,[number bits]])
1289 \end_layout
1291 \begin_layout Standard
1292 Does chained right shift on a, b by amount positions, assuming numbers to
1293  be of specified number of bits.
1294 \end_layout
1296 \begin_layout Subsubsection
1297 bit.flagdecode(number a, number bits, [string on, [string off]])
1298 \end_layout
1300 \begin_layout Standard
1301 Return string of length bits where ith character is ith character of on
1302  if bit i is on, otherwise ith character of off.
1303  Out of range reads give last character, or '*'/'-' if empty.
1304 \end_layout
1306 \begin_layout Subsubsection
1307 bit.rflagdecode(number a, number bits, [string on, [string off]])
1308 \end_layout
1310 \begin_layout Standard
1311 Like bit.flagdecode, but outputs the string in the opposite order (most significa
1312 nt bit first).
1313 \end_layout
1315 \begin_layout Subsection
1316 Table gui:
1317 \end_layout
1319 \begin_layout Standard
1320 Most of these functions can only be called in on_paint and on_video callbacks.
1321  Exceptions are noted.
1322 \end_layout
1324 \begin_layout Standard
1325 Colors are 32-bit.
1326  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1327  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1328  opaque, 255 is almost transparent).
1329  -1 is the fully transparent color.
1330  Alpha values greater than 127 do work.
1331 \end_layout
1333 \begin_layout Standard
1334 Origin of coordinates is at top left corner of game display area.
1335  Left and top gaps correspond to negative coordinates.
1336 \end_layout
1338 \begin_layout Subsubsection
1339 gui.resolution()
1340 \end_layout
1342 \begin_layout Standard
1343 Returns 2-tuple (hresolution, vresolution).
1344 \end_layout
1346 \begin_layout Subsubsection
1347 gui.<class>_gap(number gap)
1348 \end_layout
1350 \begin_layout Standard
1351 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1352  is 8191).
1353 \end_layout
1355 \begin_layout Subsubsection
1356 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1357 \end_layout
1359 \begin_layout Standard
1360 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1361  16 high).
1362  Parameters:
1363 \end_layout
1365 \begin_layout Itemize
1366 x: X-coordinate to start the drawing from (and x-coordinate at begining
1367  of the lines).
1368 \end_layout
1370 \begin_layout Itemize
1371 y: Y-coordinate to start the drawing from.
1372 \end_layout
1374 \begin_layout Itemize
1375 text: The text to draw.
1376 \end_layout
1378 \begin_layout Itemize
1379 fgc: Text color (default is 0xFFFFFF (white))
1380 \end_layout
1382 \begin_layout Itemize
1383 bgc: Background color (default is -1 (transparent))
1384 \end_layout
1386 \begin_layout Subsubsection
1387 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1388 \end_layout
1390 \begin_layout Standard
1391 Like gui.text, but draw using double-width.
1392 \end_layout
1394 \begin_layout Subsubsection
1395 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1396 \end_layout
1398 \begin_layout Standard
1399 Like gui.text, but draw using double-height.
1400 \end_layout
1402 \begin_layout Subsubsection
1403 gui.textHV(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/double-height.
1408 \end_layout
1410 \begin_layout Subsubsection
1411 gui.rectangle(number x, number y, number width, number height[, number thickness[
1412 , number outline[, number fill]]])
1413 \end_layout
1415 \begin_layout Standard
1416 Draw rectangle on the GUI.
1417  Parameters:
1418 \end_layout
1420 \begin_layout Itemize
1421 x: X-coordinate of left edge.
1422 \end_layout
1424 \begin_layout Itemize
1425 y: Y-coordinate of upper edge.
1426 \end_layout
1428 \begin_layout Itemize
1429 width: Width of rectangle.
1430 \end_layout
1432 \begin_layout Itemize
1433 height: Height of rectangle.
1434 \end_layout
1436 \begin_layout Itemize
1437 thickness: Thickness of outline (default is 1).
1438 \end_layout
1440 \begin_layout Itemize
1441 outline: Color of outline (default is 0xFFFFFF (white))
1442 \end_layout
1444 \begin_layout Itemize
1445 fill: Color of fill (default is -1 (transparent))
1446 \end_layout
1448 \begin_layout Subsubsection
1449 gui.box(number x, number y, number width, number height[, number thickness[,
1450  number outline1[,number outline2[, number fill]]]])
1451 \end_layout
1453 \begin_layout Standard
1454 Draw rectangle with 3D effect on the GUI.
1455  Parameters:
1456 \end_layout
1458 \begin_layout Itemize
1459 x: X-coordinate of left edge.
1460 \end_layout
1462 \begin_layout Itemize
1463 y: Y-coordinate of upper edge.
1464 \end_layout
1466 \begin_layout Itemize
1467 width: Width of rectangle.
1468 \end_layout
1470 \begin_layout Itemize
1471 height: Height of rectangle.
1472 \end_layout
1474 \begin_layout Itemize
1475 thickness: Thickness of outline (default is 1).
1476 \end_layout
1478 \begin_layout Itemize
1479 outline1: First color of outline (default is 0xFFFFFF (white))
1480 \end_layout
1482 \begin_layout Itemize
1483 outline2: First color of outline (default is 0x808080 (dark gray))
1484 \end_layout
1486 \begin_layout Itemize
1487 fill: Color of fill (default is 0xC0C0C0 (light grayy))
1488 \end_layout
1490 \begin_layout Subsubsection
1491 gui.pixel(number x, number y[, number color])
1492 \end_layout
1494 \begin_layout Standard
1495 Draw one pixel on the GUI.
1496  Parameters:
1497 \end_layout
1499 \begin_layout Itemize
1500 x: X-coordinate of the pixel
1501 \end_layout
1503 \begin_layout Itemize
1504 y: Y-coordinate of the pixel
1505 \end_layout
1507 \begin_layout Itemize
1508 color: Color of the pixel (default is 0xFFFFFF (white))
1509 \end_layout
1511 \begin_layout Subsubsection
1512 gui.crosshair(number x, number y[, number length[, number color]])
1513 \end_layout
1515 \begin_layout Standard
1516 Draw a crosshair.
1517  Parameters:
1518 \end_layout
1520 \begin_layout Itemize
1521 x: X-coordinate of the crosshair
1522 \end_layout
1524 \begin_layout Itemize
1525 y: Y-coordinate of the crosshair
1526 \end_layout
1528 \begin_layout Itemize
1529 length: Length of the crosshair lines (default 10).
1530 \end_layout
1532 \begin_layout Itemize
1533 color: Color of the crosshair (default is 0xFFFFFF (white))
1534 \end_layout
1536 \begin_layout Subsubsection
1537 gui.line(number x1, number y1, number x2, number y2[, number color])
1538 \end_layout
1540 \begin_layout Standard
1541 Draw a thin line.
1542  Parameters:
1543 \end_layout
1545 \begin_layout Itemize
1546 x1: X-coordinate of one end.
1547 \end_layout
1549 \begin_layout Itemize
1550 y1: Y-coordinate of one end.
1551 \end_layout
1553 \begin_layout Itemize
1554 x2: X-coordinate of the other end.
1555 \end_layout
1557 \begin_layout Itemize
1558 y2: Y-coordinate of the other end.
1559 \end_layout
1561 \begin_layout Itemize
1562 color: Color of the line (default is 0xFFFFFF (white)).
1563 \end_layout
1565 \begin_layout Subsubsection
1566 gui.circle(number x, number y, number r[, number thick[, number border[,
1567  number fil]]])
1568 \end_layout
1570 \begin_layout Standard
1571 Draw a circle.
1572  Parameters.
1573 \end_layout
1575 \begin_layout Itemize
1576 x: X-coordinate of the center
1577 \end_layout
1579 \begin_layout Itemize
1580 y: Y-coordinate of the center
1581 \end_layout
1583 \begin_layout Itemize
1584 r: The radius of the circle
1585 \end_layout
1587 \begin_layout Itemize
1588 thick: Border thickness
1589 \end_layout
1591 \begin_layout Itemize
1592 border: Border color (default is 0xFFFFFF (white))
1593 \end_layout
1595 \begin_layout Itemize
1596 fill: Fill color (default is -1 (transparent)).
1597 \end_layout
1599 \begin_layout Subsubsection
1600 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
1601 \end_layout
1603 \begin_layout Standard
1604 Draw a bitmap on screen with specified palette.
1605  Parameters:
1606 \end_layout
1608 \begin_layout Itemize
1609 x: X-coordinate of left edge.
1610 \end_layout
1612 \begin_layout Itemize
1613 y: Y-coordinate of top edge.
1614 \end_layout
1616 \begin_layout Itemize
1617 bitmap: The bitmap to draw
1618 \end_layout
1620 \begin_layout Itemize
1621 palette: The palette to draw the bitmap using.
1622 \end_layout
1624 \begin_layout Subsubsection
1625 gui.bitmap_draw(number x, number y, dbitmap bitmap)
1626 \end_layout
1628 \begin_layout Standard
1629 Draw a bitmap on screen.
1630  Parameters:
1631 \end_layout
1633 \begin_layout Itemize
1634 x: X-coordinate of left edge.
1635 \end_layout
1637 \begin_layout Itemize
1638 y: Y-coordinate of top edge.
1639 \end_layout
1641 \begin_layout Itemize
1642 bitmap: The bitmap to draw
1643 \end_layout
1645 \begin_layout Subsubsection
1646 gui.palette_new()
1647 \end_layout
1649 \begin_layout Standard
1650 Returns a new palette (initially all transparent).
1651  Can be used anywhere.
1652 \end_layout
1654 \begin_layout Subsubsection
1655 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
1656 \end_layout
1658 \begin_layout Standard
1659 Returns a new bitmap/dbitmap.
1660  Can be used anywhere.
1661  Parameters:
1662 \end_layout
1664 \begin_layout Itemize
1665 w: The width of new bitmap
1666 \end_layout
1668 \begin_layout Itemize
1669 h: The height of new bitmap
1670 \end_layout
1672 \begin_layout Itemize
1673 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
1674 \end_layout
1676 \begin_layout Itemize
1677 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
1678 \end_layout
1680 \begin_layout Subsubsection
1681 gui.bitmap_load(string file)
1682 \end_layout
1684 \begin_layout Standard
1685 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
1686  for bitmap).
1687  Can be used anywhere.
1688  Parameters:
1689 \end_layout
1691 \begin_layout Itemize
1692 file: The name of file to load.
1693 \end_layout
1695 \begin_layout Subsubsection
1696 gui.palette_set(palette palette, number index, number color)
1697 \end_layout
1699 \begin_layout Standard
1700 Sets color in palette.
1701  Can be used anywhere.
1702  Parameters:
1703 \end_layout
1705 \begin_layout Itemize
1706 palette: The palette to manipulate
1707 \end_layout
1709 \begin_layout Itemize
1710 index: Index of color (0-65535).
1711 \end_layout
1713 \begin_layout Itemize
1714 color: The color value.
1715 \end_layout
1717 \begin_layout Subsubsection
1718 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
1719 \end_layout
1721 \begin_layout Standard
1722 Sets specified pixel in bitmap.
1723  Can be used anywhere.
1724  Parameters:
1725 \end_layout
1727 \begin_layout Itemize
1728 bitmap: The bitmap to manipulate
1729 \end_layout
1731 \begin_layout Itemize
1732 x: The x-coordinate of the pixel.
1733 \end_layout
1735 \begin_layout Itemize
1736 y: The y-coordinate of the pixel.
1737 \end_layout
1739 \begin_layout Itemize
1740 color: If bitmap is a bitmap, color index (0-65535).
1741  Otherwise color value.
1742 \end_layout
1744 \begin_layout Subsubsection
1745 gui.bitmap_size(bitmap/dbitmap bitmap)
1746 \end_layout
1748 \begin_layout Standard
1749 Get size of bitmap.
1750  Can be used anywhere.
1751  Parameters:
1752 \end_layout
1754 \begin_layout Itemize
1755 bitmap: The bitmap to query.
1756 \end_layout
1758 \begin_layout Standard
1759 The first return is the width, the second is the height.
1760 \end_layout
1762 \begin_layout Subsubsection
1763 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
1764  src, number sx, number sy, number w, number h[, number ck])
1765 \end_layout
1767 \begin_layout Standard
1768 Blit a part of bitmap to another.
1769  Can be used anywhere.
1770  Parameters:
1771 \end_layout
1773 \begin_layout Itemize
1774 dest: Destination to blit to.
1775 \end_layout
1777 \begin_layout Itemize
1778 dx: left edge of target
1779 \end_layout
1781 \begin_layout Itemize
1782 dy: Top edge of target
1783 \end_layout
1785 \begin_layout Itemize
1786 src: The source to blit from.
1787  Must be of the same type as destination.
1788 \end_layout
1790 \begin_layout Itemize
1791 sx: left edge of source
1792 \end_layout
1794 \begin_layout Itemize
1795 sy: Top edge of source
1796 \end_layout
1798 \begin_layout Itemize
1799 w: Width of region
1800 \end_layout
1802 \begin_layout Itemize
1803 h: Height of region.
1804 \end_layout
1806 \begin_layout Itemize
1807 ck: Color key.
1808  Pixels of this color are not blitted.
1809 \end_layout
1811 \begin_deeper
1812 \begin_layout Itemize
1813 If bitmaps are bitmaps, this is color index of colorkey.
1814  Values outside range 0-65535 cause no key to be used as colorkey.
1815 \end_layout
1817 \begin_layout Itemize
1818 If bitmaps are dbitmaps, this color value of colorkey.
1819 \end_layout
1821 \begin_layout Itemize
1822 May be absent or nil for no colorkey blit.
1823 \end_layout
1825 \end_deeper
1826 \begin_layout Subsubsection
1827 gui.repaint()
1828 \end_layout
1830 \begin_layout Standard
1831 Request on_repaint() to happen as soon as possible.
1832  Can be used anywhere.
1833 \end_layout
1835 \begin_layout Subsubsection
1836 gui.subframe_update(boolean on)
1837 \end_layout
1839 \begin_layout Standard
1840 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
1841  or not happen (on=false).
1842  Can be used anywhere.
1843 \end_layout
1845 \begin_layout Subsubsection
1846 gui.screenshot(string filename)
1847 \end_layout
1849 \begin_layout Standard
1850 Write PNG screenshot of the current frame (no drawings) to specified file.
1851  Can be used anywhere.
1852 \end_layout
1854 \begin_layout Subsubsection
1855 gui.color(number r, number g, number b[, number a])
1856 \end_layout
1858 \begin_layout Standard
1859 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
1860  each component in scale 0-255.
1861  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
1862  opaque).
1863  The default alpha is 256.
1864 \end_layout
1866 \begin_layout Subsubsection
1867 gui.status(string name, string value)
1868 \end_layout
1870 \begin_layout Standard
1871 Set status field 
1872 \begin_inset Quotes eld
1873 \end_inset
1875 L[<name>]
1876 \begin_inset Quotes erd
1877 \end_inset
1879  to <value> in status area.
1880  Can be used anywhere.
1881 \end_layout
1883 \begin_layout Subsubsection
1884 gui.rainbow(number step, number steps[, number color])
1885 \end_layout
1887 \begin_layout Standard
1888 Perform hue rotation of color <color> (default bright red), by <step> steps.
1889  The number of steps per full rotation is given by absolute value of <steps>.
1890 \end_layout
1892 \begin_layout Standard
1893 If <steps> is negative, the rotation will be counterclockwise.
1894 \end_layout
1896 \begin_layout Subsubsection
1897 gui.screenshot(string filename)
1898 \end_layout
1900 \begin_layout Standard
1901 Saves a screenshot into specified file.
1902 \end_layout
1904 \begin_layout Subsubsection
1905 gui.renderq_new(number width, number height)
1906 \end_layout
1908 \begin_layout Standard
1909 Create render queue with specified reported size and return it.
1910 \end_layout
1912 \begin_layout Subsubsection
1913 gui.renderq_clear(RENDERQUEUE queue)
1914 \end_layout
1916 \begin_layout Standard
1917 Clear specified render queue.
1918 \end_layout
1920 \begin_layout Subsubsection
1921 gui.renderq_set(RENDERQUEUE queue)
1922 \end_layout
1924 \begin_layout Standard
1925 Switch to specified render queue.
1926  Use nil as queue to switch to default queue.
1927 \end_layout
1929 \begin_layout Itemize
1930 When switched to another queue, all drawing functions work and draw there,
1931  even outside on_video/on_paint.
1932 \end_layout
1934 \begin_layout Subsubsection
1935 gui.renderq_run(RENDERQUEUE queue)
1936 \end_layout
1938 \begin_layout Standard
1939 Run specified render queue, copying the objects to current render queue.
1941 \end_layout
1943 \begin_layout Itemize
1944 Warning: Don't try to run the current render queue.
1945 \end_layout
1947 \begin_layout Subsubsection
1948 gui.loadfont(string filename)
1949 \end_layout
1951 \begin_layout Standard
1952 Loads font from specified file (CUSTOMFONT object).
1953 \end_layout
1955 \begin_layout Subsubsection
1956 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc]])
1957 \end_layout
1959 \begin_layout Standard
1960 Draw string with custom font to screen.
1961  The parameters are the same as in gui.text.
1962 \end_layout
1964 \begin_layout Subsection
1965 table input
1966 \end_layout
1968 \begin_layout Standard
1969 Input handling.
1970  Only available in on_input callback.
1971 \end_layout
1973 \begin_layout Subsubsection
1974 input.get(number controller, number index)
1975 \end_layout
1977 \begin_layout Standard
1978 Read the specified index (0-11) from specified controller (0-7).
1979  Notes:
1980 \end_layout
1982 \begin_layout Itemize
1983 Uses physical controller numbering.
1984  Gamepad in port 2 is controller 4, not 1!
1985 \end_layout
1987 \begin_layout Subsubsection
1988 input.set(number controller, number index, number value)
1989 \end_layout
1991 \begin_layout Standard
1992 Write the specified index (0-11) from specified controller (0-7), storing
1993  value.
1994  Notes:
1995 \end_layout
1997 \begin_layout Itemize
1998 Uses physical controller numbering.
1999  Gamepad in port 2 is controller 4, not 1!
2000 \end_layout
2002 \begin_layout Subsubsection
2003 input.get2(number port, number controller, number index)
2004 \end_layout
2006 \begin_layout Standard
2007 Read the specified input tuple.
2008 \end_layout
2010 \begin_layout Itemize
2011 Port 0 is system port.
2012 \end_layout
2014 \begin_layout Subsubsection
2015 input.set2(number port, number controller, number index, number value)
2016 \end_layout
2018 \begin_layout Standard
2019 Write the specified input tuple.
2020 \end_layout
2022 \begin_layout Itemize
2023 Port 0 is system port.
2024 \end_layout
2026 \begin_layout Subsubsection
2027 input.lcid_to_pcid2(number lcid)
2028 \end_layout
2030 \begin_layout Standard
2031 Look up physical pcid pair (port, controller) corresponding to specified
2032  logical controller (1-based).
2033  Returns nothing if controller does not exist.
2034 \end_layout
2036 \begin_layout Subsubsection
2037 input.port_type(number port)
2038 \end_layout
2040 \begin_layout Standard
2041 Return type of specified port.
2042 \end_layout
2044 \begin_layout Subsubsection
2045 input.controller_info(number port, number controller)
2046 \end_layout
2048 \begin_layout Standard
2049 Get controller info for specified controller.
2050  If controller does not exist, returns nil.
2051  Otherwise returns a table with following fields:
2052 \end_layout
2054 \begin_layout Itemize
2055 type (string): Type of the controller.
2056 \end_layout
2058 \begin_layout Itemize
2059 class (string): Class of the controller.
2060 \end_layout
2062 \begin_layout Itemize
2063 classnum (number): Number of the controller within its class (1-based)
2064 \end_layout
2066 \begin_layout Itemize
2067 lcid (number): Logical controller number of the controller.
2068 \end_layout
2070 \begin_layout Itemize
2071 button_count (number): Number of buttons on controller
2072 \end_layout
2074 \begin_layout Itemize
2075 buttons (array): Array of following info about each button:
2076 \end_layout
2078 \begin_deeper
2079 \begin_layout Itemize
2080 type (string): Type of button.
2081  Currently one of 
2082 \begin_inset Quotes eld
2083 \end_inset
2085 null
2086 \begin_inset Quotes erd
2087 \end_inset
2090 \begin_inset Quotes eld
2091 \end_inset
2093 button
2094 \begin_inset Quotes erd
2095 \end_inset
2098 \begin_inset Quotes eld
2099 \end_inset
2101 axis
2102 \begin_inset Quotes erd
2103 \end_inset
2106 \begin_inset Quotes eld
2107 \end_inset
2109 raxis
2110 \begin_inset Quotes erd
2111 \end_inset
2114 \end_layout
2116 \begin_layout Itemize
2117 name (string): Name of button.
2118 \end_layout
2120 \begin_layout Itemize
2121 symbol (string): Symbol of button.
2122  Only present for type 
2123 \begin_inset Quotes eld
2124 \end_inset
2126 button
2127 \begin_inset Quotes erd
2128 \end_inset
2131 \end_layout
2133 \begin_layout Itemize
2134 hidden (boolean): True if hidden button.
2136 \end_layout
2138 \end_deeper
2139 \begin_layout Subsubsection
2140 input.veto_button()
2141 \end_layout
2143 \begin_layout Standard
2144 Signals that the button event should be vetoed.
2145  Only valid in on_button callback.
2146 \end_layout
2148 \begin_layout Subsubsection
2149 input.geta(number controller)
2150 \end_layout
2152 \begin_layout Standard
2153 Get input state for entiere controller.
2154  Returns 13 return values.
2155 \end_layout
2157 \begin_layout Itemize
2158 1st return value: Bitmask: bit i is set if i:th index is nonzero
2159 \end_layout
2161 \begin_layout Itemize
2162 2nd-13th return value: value of i:th index.
2163 \end_layout
2165 \begin_layout Subsubsection
2166 input.seta(number controller, number bitmask, number args...)
2167 \end_layout
2169 \begin_layout Standard
2170 Set state for entiere controller.
2171  args is up to 12 values for indices (overriding values in bitmask if specified).
2172 \end_layout
2174 \begin_layout Subsubsection
2175 input.controllertype(number controller)
2176 \end_layout
2178 \begin_layout Standard
2179 Get the type of controller as string.
2180  Valid values are:
2181 \end_layout
2183 \begin_layout Itemize
2184 gamepad
2185 \end_layout
2187 \begin_layout Itemize
2188 mouse
2189 \end_layout
2191 \begin_layout Itemize
2192 justifier
2193 \end_layout
2195 \begin_layout Itemize
2196 superscope
2197 \end_layout
2199 \begin_layout Subsubsection
2200 input.reset([number cycles])
2201 \end_layout
2203 \begin_layout Standard
2204 Execute reset.
2205  If cycles is greater than zero, do delayed reset.
2206  0 (or no value) causes immediate reset.
2207 \end_layout
2209 \begin_layout Itemize
2210 Only available with subframe flag false.
2211 \end_layout
2213 \begin_layout Subsubsection
2214 input.raw()
2215 \end_layout
2217 \begin_layout Standard
2218 Returns table of tables of all available keys and axes.
2219  The first table is indexed by key name (platform-dependent!), and the inner
2220  table has the following fields:
2221 \end_layout
2223 \begin_layout Itemize
2224 value: Last reported value for control
2225 \end_layout
2227 \begin_deeper
2228 \begin_layout Itemize
2229 For keys: 1 for pressed, 0 for released.
2230 \end_layout
2232 \begin_layout Itemize
2233 For axes: -32767...32767.
2234 \end_layout
2236 \begin_layout Itemize
2237 For presure-sensitive buttons: 0...32767.
2238 \end_layout
2240 \begin_layout Itemize
2241 For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
2242 \end_layout
2244 \begin_layout Itemize
2245 For mouse: Coordinates relative to game area.
2246 \end_layout
2248 \end_deeper
2249 \begin_layout Itemize
2250 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2251  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2252 \end_layout
2254 \begin_layout Subsubsection
2255 input.keyhook(string key, boolean state)
2256 \end_layout
2258 \begin_layout Standard
2259 Requests that keyhook events to be sent for key (state=true) or not sent
2260  (state=false).
2261 \end_layout
2263 \begin_layout Subsubsection
2264 input.joyget(number controller)
2265 \end_layout
2267 \begin_layout Standard
2268 Returns table for current controls for specified controller.
2269  The names of fields vary by controller type.
2270 \end_layout
2272 \begin_layout Itemize
2273 The buttons have the same name as those are referred to in other contexts
2274  in the emulator
2275 \end_layout
2277 \begin_layout Itemize
2278 The analog axes are 
2279 \begin_inset Quotes eld
2280 \end_inset
2282 xaxis
2283 \begin_inset Quotes erd
2284 \end_inset
2286  and 
2287 \begin_inset Quotes eld
2288 \end_inset
2290 yaxis
2291 \begin_inset Quotes erd
2292 \end_inset
2295 \end_layout
2297 \begin_layout Subsubsection
2298 input.joyset(number controller, table controls)
2299 \end_layout
2301 \begin_layout Standard
2302 Set the the state of specified controller to values specified in specified
2303  table.
2304 \end_layout
2306 \begin_layout Subsubsection
2307 input.lcid_to_pcid(number controller)
2308 \end_layout
2310 \begin_layout Standard
2311 Return the physical index, physical port and controller number in port for
2312  specified (1-based) logical controller.
2313 \end_layout
2315 \begin_layout Subsection
2316 Table keyboard
2317 \end_layout
2319 \begin_layout Standard
2320 Various keybinding-related functions
2321 \end_layout
2323 \begin_layout Subsubsection
2324 keyboard.bind(string mod, string mask, string key, string cmd)
2325 \end_layout
2327 \begin_layout Standard
2328 Bind specified key with specified modifers to specified command.
2329 \end_layout
2331 \begin_layout Subsubsection
2332 keyboard.unbind(string mod, string mask, string key)
2333 \end_layout
2335 \begin_layout Standard
2336 Unbind specified key with specified modifers.
2337 \end_layout
2339 \begin_layout Subsubsection
2340 keyboard.alias(string alias, string expansion)
2341 \end_layout
2343 \begin_layout Standard
2344 Set expansion of given command.
2345 \end_layout
2347 \begin_layout Subsection
2348 Table subtitle
2349 \end_layout
2351 \begin_layout Standard
2352 Subtitle handling
2353 \end_layout
2355 \begin_layout Subsubsection
2356 subtitle.byindex(number i)
2357 \end_layout
2359 \begin_layout Standard
2360 Read the frame and length of ith subtitle.
2361  Returns nothing if not present.
2362 \end_layout
2364 \begin_layout Subsubsection
2365 subtitle.set(number f, number l, string txt)
2366 \end_layout
2368 \begin_layout Standard
2369 Set the text of subtitle.
2370 \end_layout
2372 \begin_layout Subsubsection
2373 subtitle.get(number f, number l)
2374 \end_layout
2376 \begin_layout Standard
2377 Get the text of subtitle.
2378 \end_layout
2380 \begin_layout Subsubsection
2381 subtitle.delete(number f, number l)
2382 \end_layout
2384 \begin_layout Standard
2385 Delete specified subtitle.
2386 \end_layout
2388 \begin_layout Subsection
2389 Table hostmemory
2390 \end_layout
2392 \begin_layout Standard
2393 Host memory handling (extra memory saved to savestates).
2394  Host memory starts empty.
2395 \end_layout
2397 \begin_layout Subsubsection
2398 hostmemory.read(number address)
2399 \end_layout
2401 \begin_layout Standard
2402 Reads hostmemory slot address.
2403  Slot numbers out of range return false instead of numeric.
2404 \end_layout
2406 \begin_layout Subsubsection
2407 hostmemory.write(number address, number value)
2408 \end_layout
2410 \begin_layout Standard
2411 Writes hostmemory slot with 0-255.
2412  Slot numbers out of range cause extension of host memory slot space.
2413 \end_layout
2415 \begin_layout Subsubsection
2416 hostmemory.readbyte(number address)
2417 \end_layout
2419 \begin_layout Standard
2420 Read unsigned byte (1 element) from given address.
2421  Slots out of range return false.
2422 \end_layout
2424 \begin_layout Subsubsection
2425 hostmemory.writebyte(number address, number value)
2426 \end_layout
2428 \begin_layout Standard
2429 Write unsigned byte (1 element) to given slot.
2430  Slot numbers out of range cause extension.
2431 \end_layout
2433 \begin_layout Subsubsection
2434 hostmemory.readsbyte(number address)
2435 \end_layout
2437 \begin_layout Standard
2438 Read signed byte (1 element) from given address.
2439  Slots out of range return false.
2440 \end_layout
2442 \begin_layout Subsubsection
2443 hostmemory.writesbyte(number address, number value)
2444 \end_layout
2446 \begin_layout Standard
2447 Write signed byte (1 element) to given slot.
2448  Slot numbers out of range cause extension.
2449 \end_layout
2451 \begin_layout Subsubsection
2452 hostmemory.readword(number address)
2453 \end_layout
2455 \begin_layout Standard
2456 Read unsigned word (2 elements) from given address.
2457  Slots out of range return false.
2458 \end_layout
2460 \begin_layout Subsubsection
2461 hostmemory.writeword(number address, number value)
2462 \end_layout
2464 \begin_layout Standard
2465 Write unsigned word (2 elements) to given slot.
2466  Slot numbers out of range cause extension.
2467 \end_layout
2469 \begin_layout Subsubsection
2470 hostmemory.readsword(number address)
2471 \end_layout
2473 \begin_layout Standard
2474 Read signed word (2 elements) from given address.
2475  Slots out of range return false.
2476 \end_layout
2478 \begin_layout Subsubsection
2479 hostmemory.writesword(number address, number value)
2480 \end_layout
2482 \begin_layout Standard
2483 Write signed word (2 elements) to given slot.
2484  Slot numbers out of range cause extension.
2485 \end_layout
2487 \begin_layout Subsubsection
2488 hostmemory.readdword(number address)
2489 \end_layout
2491 \begin_layout Standard
2492 Read unsigned doubleword (4 elements) from given address.
2493  Slots out of range return false.
2494 \end_layout
2496 \begin_layout Subsubsection
2497 hostmemory.writedword(number address, number value)
2498 \end_layout
2500 \begin_layout Standard
2501 Write unsigned doubleword (4 elements) to given slot.
2502  Slot numbers out of range cause extension.
2503 \end_layout
2505 \begin_layout Subsubsection
2506 hostmemory.readsdword(number address)
2507 \end_layout
2509 \begin_layout Standard
2510 Read signed doubleword (4 elements) from given address.
2511  Slots out of range return false.
2512 \end_layout
2514 \begin_layout Subsubsection
2515 hostmemory.writesdword(number address, number value)
2516 \end_layout
2518 \begin_layout Standard
2519 Write signed doubleword (4 elements) to given slot.
2520  Slot numbers out of range cause extension.
2521 \end_layout
2523 \begin_layout Subsubsection
2524 hostmemory.readqword(number address)
2525 \end_layout
2527 \begin_layout Standard
2528 Read unsigned quadword (8 elements) from given address.
2529  Slots out of range return false.
2530 \end_layout
2532 \begin_layout Subsubsection
2533 hostmemory.writeqword(number address, number value)
2534 \end_layout
2536 \begin_layout Standard
2537 Write unsigned quadword (4 elements) to given slot.
2538  Slot numbers out of range cause extension.
2539 \end_layout
2541 \begin_layout Subsubsection
2542 hostmemory.readsqword(number address)
2543 \end_layout
2545 \begin_layout Standard
2546 Read signed quadword (8 elements) from given address.
2547  Slots out of range return false.
2548 \end_layout
2550 \begin_layout Subsubsection
2551 hostmemory.writesqword(number address, number value)
2552 \end_layout
2554 \begin_layout Standard
2555 Write signed quadword (8 elements) to given slot.
2556  Slot numbers out of range cause extension.
2557 \end_layout
2559 \begin_layout Subsection
2560 Table movie
2561 \end_layout
2563 \begin_layout Standard
2564 Movie handling
2565 \end_layout
2567 \begin_layout Subsubsection
2568 movie.currentframe()
2569 \end_layout
2571 \begin_layout Standard
2572 Return number of current frame.
2573 \end_layout
2575 \begin_layout Subsubsection
2576 movie.framecount()
2577 \end_layout
2579 \begin_layout Standard
2580 Return number of frames in movie.
2581 \end_layout
2583 \begin_layout Subsubsection
2584 movie.readonly()
2585 \end_layout
2587 \begin_layout Standard
2588 Return true if in readonly mode, false if in readwrite.
2589 \end_layout
2591 \begin_layout Subsubsection
2592 movie.rerecords()
2593 \end_layout
2595 \begin_layout Standard
2596 Returns the current value of rerecord count.
2597 \end_layout
2599 \begin_layout Subsubsection
2600 movie.set_readwrite()
2601 \end_layout
2603 \begin_layout Standard
2604 Set readwrite mode (does not cause on_readwrite callback).
2605 \end_layout
2607 \begin_layout Subsubsection
2608 movie.frame_subframes(number frame)
2609 \end_layout
2611 \begin_layout Standard
2612 Count number of subframes in specified frame (frame numbers are 1-based)
2613  and return that.
2614 \end_layout
2616 \begin_layout Subsubsection
2617 movie.read_subframe(number frame, number subframe)
2618 \end_layout
2620 \begin_layout Standard
2621 Read specifed subframe in specified frame and return data as array (100
2622  elements, numbered 0-99 currently).
2623 \end_layout
2625 \begin_layout Subsubsection
2626 movie.read_rtc()
2627 \end_layout
2629 \begin_layout Standard
2630 Returns the current value of the RTC as a pair (second, subsecond).
2631 \end_layout
2633 \begin_layout Subsubsection
2634 movie.unsafe_rewind([UNSAFEREWIND state])
2635 \end_layout
2637 \begin_layout Standard
2638 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2639 \end_layout
2641 \begin_layout Itemize
2642 If called without argument, causes emulator to start process of setting
2643  unsafe rewind point.
2644  When this has finished, callback on_set_rewind occurs, passing the rewind
2645  state to lua script.
2646 \end_layout
2648 \begin_layout Itemize
2649 If called with argument, causes emulator rewind to passed rewind point as
2650  soon as possible.
2651  Readwrite mode is implicitly activated.
2652 \end_layout
2654 \begin_layout Standard
2655 The following warnings apply to unsafe rewinding:
2656 \end_layout
2658 \begin_layout Itemize
2659 There are no safety checks against misuse (that's what 
2660 \begin_inset Quotes eld
2661 \end_inset
2663 unsafe
2664 \begin_inset Quotes erd
2665 \end_inset
2667  comes from)!
2668 \end_layout
2670 \begin_layout Itemize
2671 Only call rewind from timeline rewind point was set from.
2672 \end_layout
2674 \begin_layout Itemize
2675 Only call rewind from after the rewind point was set.
2676 \end_layout
2678 \begin_layout Subsection
2679 Table settings
2680 \end_layout
2682 \begin_layout Standard
2683 Routines for settings manipulation
2684 \end_layout
2686 \begin_layout Subsubsection
2687 settings.get(string name)
2688 \end_layout
2690 \begin_layout Standard
2691 Get value of setting.
2692  If setting is blank, returns false.
2693  If setting value can't be obtained, returns (nil, error message).
2694 \end_layout
2696 \begin_layout Subsubsection
2697 settings.set(string name, string value)
2698 \end_layout
2700 \begin_layout Standard
2701 Set value of setting.
2702  If setting can't be set, returns (nil, error message).
2703 \end_layout
2705 \begin_layout Subsubsection
2706 settings.is_set(string name)
2707 \end_layout
2709 \begin_layout Standard
2710 Returns if setting is set.
2711  If setting does not exist, returns (nil, error message).
2712 \end_layout
2714 \begin_layout Subsubsection
2715 settings.blank(string name)
2716 \end_layout
2718 \begin_layout Standard
2719 Blanks a setting and returns true.
2720  If setting can't be blanked, returns (nil, error message).
2721 \end_layout
2723 \begin_layout Subsection
2724 Table memory
2725 \end_layout
2727 \begin_layout Standard
2728 Contains various functions for managing memory
2729 \end_layout
2731 \begin_layout Subsubsection
2732 memory.vma_count()
2733 \end_layout
2735 \begin_layout Standard
2736 Returns the number of VMAs
2737 \end_layout
2739 \begin_layout Subsubsection
2740 memory.read_vma(number index)
2741 \end_layout
2743 \begin_layout Standard
2744 Reads the specified VMA (indices start from zero).
2745  Trying to read invalid VMA gives nil.
2746  The read VMA is table with the following fields:
2747 \end_layout
2749 \begin_layout Itemize
2750 region_name (string): The readable name of the VMA
2751 \end_layout
2753 \begin_layout Itemize
2754 baseaddr (number): Base address of the VMA
2755 \end_layout
2757 \begin_layout Itemize
2758 lastaddr (number): Last address in the VMA.
2759 \end_layout
2761 \begin_layout Itemize
2762 size (number): The size of VMA in bytes.
2763 \end_layout
2765 \begin_layout Itemize
2766 readonly (boolean): True of the VMA corresponds to ROM.
2767 \end_layout
2769 \begin_layout Itemize
2770 iospace (boolean): True if the VMA is I/O space.
2771 \end_layout
2773 \begin_layout Itemize
2774 native_endian (boolean): True if the VMA has native endian as opposed to
2775  little endian.
2776 \end_layout
2778 \begin_layout Subsubsection
2779 memory.find_vma(number address)
2780 \end_layout
2782 \begin_layout Standard
2783 Finds the VMA containing specified address.
2784  Returns table in the same format as read_vma or nil if not found.
2785 \end_layout
2787 \begin_layout Subsubsection
2788 memory.readbyte(number address)
2789 \end_layout
2791 \begin_layout Standard
2792 Reads the specified address as unsigned byte and returns the result.
2793 \end_layout
2795 \begin_layout Subsubsection
2796 memory.readsbyte(number address)
2797 \end_layout
2799 \begin_layout Standard
2800 Reads the specified address as signed byte and returns the result.
2801 \end_layout
2803 \begin_layout Subsubsection
2804 memory.writebyte(number address, number value)
2805 \end_layout
2807 \begin_layout Standard
2808 Writes the specified value (negative values undergo 2's complement) to specified
2809  address (as a byte).
2810 \end_layout
2812 \begin_layout Subsubsection
2813 memory.readword(number address)
2814 \end_layout
2816 \begin_layout Standard
2817 Reads the specified address as unsigned word and returns the result.
2818 \end_layout
2820 \begin_layout Subsubsection
2821 memory.readsword(number address)
2822 \end_layout
2824 \begin_layout Standard
2825 Reads the specified address as signed word and returns the result.
2826 \end_layout
2828 \begin_layout Subsubsection
2829 memory.writeword(number address, number value)
2830 \end_layout
2832 \begin_layout Standard
2833 Writes the specified value (negative values undergo 2's complement) to specified
2834  address (as a word).
2835 \end_layout
2837 \begin_layout Subsubsection
2838 memory.readdword(number address)
2839 \end_layout
2841 \begin_layout Standard
2842 Reads the specified address as unsigned doubleword and returns the result.
2843 \end_layout
2845 \begin_layout Subsubsection
2846 memory.readsdword(number address)
2847 \end_layout
2849 \begin_layout Standard
2850 Reads the specified address as signed doubleword and returns the result.
2851 \end_layout
2853 \begin_layout Subsubsection
2854 memory.writedword(number address, number value)
2855 \end_layout
2857 \begin_layout Standard
2858 Writes the specified value (negative values undergo 2's complement) to specified
2859  address (as a doubleword).
2860 \end_layout
2862 \begin_layout Subsubsection
2863 memory.readqword(number address)
2864 \end_layout
2866 \begin_layout Standard
2867 Reads the specified address as unsigned quadword and returns the result.
2868 \end_layout
2870 \begin_layout Subsubsection
2871 memory.readsqword(number address)
2872 \end_layout
2874 \begin_layout Standard
2875 Reads the specified address as signed quadword and returns the result.
2876 \end_layout
2878 \begin_layout Subsubsection
2879 memory.writeqword(number address, number value)
2880 \end_layout
2882 \begin_layout Standard
2883 Writes the specified value (negative values undergo 2's complement) to specified
2884  address (as a quadword).
2885 \end_layout
2887 \begin_layout Subsubsection
2888 memory.hash_region(number base, number size)
2889 \end_layout
2891 \begin_layout Standard
2892 Hash specified number of bytes starting from specified address and return
2893  the SHA-256.
2894 \end_layout
2896 \begin_layout Subsubsection
2897 memory.hash_state()
2898 \end_layout
2900 \begin_layout Standard
2901 Hash the current system state.
2902  Mainly useful for debugging savestates.
2903 \end_layout
2905 \begin_layout Subsubsection
2906 memory.readregion(number base, number size)
2907 \end_layout
2909 \begin_layout Standard
2910 Read a region of memory.
2911 \end_layout
2913 \begin_layout Itemize
2914 Warning: If the region crosses VMA boundary, the results are undefined.
2915 \end_layout
2917 \begin_layout Subsubsection
2918 memory.map<type>([number base, number size])
2919 \end_layout
2921 \begin_layout Standard
2922 Returns a table mapping specified memory aperture for read/write.
2923  If parameters are omitted, entiere map space is the aperture.
2924 \end_layout
2926 \begin_layout Itemize
2927 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2928 \end_layout
2930 \begin_layout Subsubsection
2931 memory.writeregion(number base, number size, table data)
2932 \end_layout
2934 \begin_layout Standard
2935 Write a region of memory.
2936 \end_layout
2938 \begin_layout Itemize
2939 Warning: If the region crosses VMA boundary, the results are undefined.
2940 \end_layout
2942 \begin_layout Subsubsection
2943 memory.map_structure()
2944 \end_layout
2946 \begin_layout Standard
2947 Returns a new mapping structure (MMAP_STRUCT)
2948 \end_layout
2950 \begin_layout Subsubsection
2951 MMAP_STRUCT(string key, number address, string type)
2952 \end_layout
2954 \begin_layout Standard
2955 Bind key in mmap structure to specified address with specified type.
2956 \end_layout
2958 \begin_layout Itemize
2959 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2960 \end_layout
2962 \begin_layout Subsubsection
2963 memory.read_expr(string expr)
2964 \end_layout
2966 \begin_layout Standard
2967 Evaluate specified watch expression and return result
2968 \end_layout
2970 \begin_layout Subsection
2971 Table subtitle
2972 \end_layout
2974 \begin_layout Standard
2975 Contains functions for manipulating subtitles.
2976 \end_layout
2978 \begin_layout Subsubsection
2979 subtitle.byindex(number index)
2980 \end_layout
2982 \begin_layout Standard
2983 Get (basetime, length) pair of specified subtitle index or nothing if index
2984  isn't valid.
2985 \end_layout
2987 \begin_layout Subsubsection
2988 subtitle.get(number basetime, number length)
2989 \end_layout
2991 \begin_layout Standard
2992 Read the specified subtitle.
2993  Returns 
2994 \begin_inset Quotes eld
2995 \end_inset
2998 \begin_inset Quotes erd
2999 \end_inset
3001  if the subtitle does not exist.
3002 \end_layout
3004 \begin_layout Subsubsection
3005 subtitle.set(number basetime, number length, string content)
3006 \end_layout
3008 \begin_layout Standard
3009 Set the specified subtitle.
3010 \end_layout
3012 \begin_layout Subsubsection
3013 subtitle.deltete(number basetime, number length)
3014 \end_layout
3016 \begin_layout Standard
3017 Delete the specified subtitle.
3018 \end_layout
3020 \begin_layout Subsection
3021 Table _SYSTEM
3022 \end_layout
3024 \begin_layout Standard
3025 Contains copy of global variables from time of Lua initialization.
3026  Non-writeable.
3027 \end_layout
3029 \begin_layout Subsection
3030 Callbacks
3031 \end_layout
3033 \begin_layout Standard
3034 Various callbacks to Lua that can occur.
3035 \end_layout
3037 \begin_layout Subsubsection
3038 Callback: on_paint(bool not_synth)
3039 \end_layout
3041 \begin_layout Standard
3042 Called when screen is being painted.
3043  Any gui.* calls requiring graphic context draw on the screen.
3044 \end_layout
3046 \begin_layout Standard
3047 not_synth is true if this hook is being called in response to received frame,
3048  false otherwise.
3049 \end_layout
3051 \begin_layout Subsubsection
3052 Callback: on_video()
3053 \end_layout
3055 \begin_layout Standard
3056 Called when video dump frame is being painted.
3057  Any gui.* calls requiring graphic context draw on the video.
3058 \end_layout
3060 \begin_layout Subsubsection
3061 Callback: on_frame_emulated()
3062 \end_layout
3064 \begin_layout Standard
3065 Called when emulating frame has completed and on_paint()/on_video() calls
3066  are about to be issued.
3067 \end_layout
3069 \begin_layout Subsubsection
3070 Callback: on_frame()
3071 \end_layout
3073 \begin_layout Standard
3074 Called on each starting whole frame.
3075 \end_layout
3077 \begin_layout Subsubsection
3078 Callback: on_startup()
3079 \end_layout
3081 \begin_layout Standard
3082 Called when the emulator is starting (lsnes.rc and --run files has been run).
3083 \end_layout
3085 \begin_layout Subsubsection
3086 Callback: on_rewind()
3087 \end_layout
3089 \begin_layout Standard
3090 Called when rewind movie to beginning has completed.
3091 \end_layout
3093 \begin_layout Subsubsection
3094 Callback: on_pre_load(string name)
3095 \end_layout
3097 \begin_layout Standard
3098 Called just before savestate/movie load occurs (note: loads are always delayed,
3099  so this occurs even when load was initiated by lua).
3100 \end_layout
3102 \begin_layout Subsubsection
3103 Callback: on_err_load(string name)
3104 \end_layout
3106 \begin_layout Standard
3107 Called if loadstate goes wrong.
3108 \end_layout
3110 \begin_layout Subsubsection
3111 Callback: on_post_load(string name, boolean was_savestate)
3112 \end_layout
3114 \begin_layout Standard
3115 Called on successful loadstate.
3116  was_savestate gives if this was a savestate or a movie.
3117 \end_layout
3119 \begin_layout Subsubsection
3120 Callback: on_pre_save(string name, boolean is_savestate)
3121 \end_layout
3123 \begin_layout Standard
3124 Called just before savestate save occurs (note: movie saves are synchronous
3125  and won't trigger these callbacks if called from Lua).
3126 \end_layout
3128 \begin_layout Subsubsection
3129 Callback: on_err_save(string name)
3130 \end_layout
3132 \begin_layout Standard
3133 Called if savestate goes wrong.
3134 \end_layout
3136 \begin_layout Subsubsection
3137 Callback: on_post_save(string name, boolean is_savestate)
3138 \end_layout
3140 \begin_layout Standard
3141 Called on successful savaestate.
3142  is_savestate gives if this was a savestate or a movie.
3143 \end_layout
3145 \begin_layout Subsubsection
3146 Callback: on_quit()
3147 \end_layout
3149 \begin_layout Standard
3150 Called when emulator is shutting down.
3151 \end_layout
3153 \begin_layout Subsubsection
3154 Callback: on_input(boolean subframe)
3155 \end_layout
3157 \begin_layout Standard
3158 Called when emulator is just sending input to bsnes core.
3159  Warning: This is called even in readonly mode, but the results are ignored.
3160 \end_layout
3162 \begin_layout Subsubsection
3163 Callback: on_reset()
3164 \end_layout
3166 \begin_layout Standard
3167 Called when SNES is reset.
3168 \end_layout
3170 \begin_layout Subsubsection
3171 Callback: on_readwrite()
3172 \end_layout
3174 \begin_layout Standard
3175 Called when moving into readwrite mode as result of 
3176 \begin_inset Quotes eld
3177 \end_inset
3179 set-rwmode
3180 \begin_inset Quotes erd
3181 \end_inset
3183  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3184  entry protection).
3185 \end_layout
3187 \begin_layout Subsubsection
3188 Callback: on_snoop(number port, number controller, number index, number
3189  value)
3190 \end_layout
3192 \begin_layout Standard
3193 Called each time bsnes asks for input.
3194  The value is the final value to be sent to bsnes core (readonly mode, autohold
3195  and autofire have been taken into account).
3196  Might be useful when translating movies to format suitable for console
3197  verification.
3198  Note: There is no way to modify the value to be sent.
3199 \end_layout
3201 \begin_layout Itemize
3202 Not called if callback on_snoop2 is defined.
3203 \end_layout
3205 \begin_layout Subsubsection
3206 Callback: on_snoop2(number port, number controller, number index, number
3207  value)
3208 \end_layout
3210 \begin_layout Standard
3211 Like on_snoop, but reserves port 0 for system, having first user port be
3212  port 1.
3213 \end_layout
3215 \begin_layout Subsubsection
3216 Callback: on_keyhook(string keyname, table state)
3217 \end_layout
3219 \begin_layout Standard
3220 Sent when key that has keyhook events requested changes state.
3221  Keyname is name of the key (group) and state is the state (same kind as
3222  table values in input.raw).
3223 \end_layout
3225 \begin_layout Subsubsection
3226 Callback: on_idle()
3227 \end_layout
3229 \begin_layout Standard
3230 Called when requested by set_idle_timeout(), the timeout has expired and
3231  emulator is waiting.
3232 \end_layout
3234 \begin_layout Subsubsection
3235 Callback: on_timer()
3236 \end_layout
3238 \begin_layout Standard
3239 Called when requested by set_idle_timeout() and the timeout has expired
3240  (regardless if emulator is waiting).
3241 \end_layout
3243 \begin_layout Subsubsection
3244 Callback: on_set_rewind(UNSAFEREWIND r)
3245 \end_layout
3247 \begin_layout Standard
3248 Called when unsafe rewind object has been constructed.
3249 \end_layout
3251 \begin_layout Subsubsection
3252 Callback: on_pre_rewind() 
3253 \end_layout
3255 \begin_layout Standard
3256 Called just before unsafe rewind is about to occur.
3257 \end_layout
3259 \begin_layout Subsubsection
3260 Callback: on_post_rewind() 
3261 \end_layout
3263 \begin_layout Standard
3264 Called just after unsafe rewind has occured.
3265 \end_layout
3267 \begin_layout Subsubsection
3268 Callback: on_button(number port, number controller, number index, string
3269  type)
3270 \end_layout
3272 \begin_layout Standard
3273 Called on controller button press, with following parameters:
3274 \end_layout
3276 \begin_layout Itemize
3277 port: Port number (0 is system)
3278 \end_layout
3280 \begin_layout Itemize
3281 controller: Controller within port
3282 \end_layout
3284 \begin_layout Itemize
3285 index: Index of button.
3286 \end_layout
3288 \begin_layout Itemize
3289 type: Type of event, one of:
3290 \end_layout
3292 \begin_deeper
3293 \begin_layout Itemize
3294 \begin_inset Quotes eld
3295 \end_inset
3297 pressed
3298 \begin_inset Quotes erd
3299 \end_inset
3301 : Button was pressed.
3302 \end_layout
3304 \begin_layout Itemize
3305 \begin_inset Quotes eld
3306 \end_inset
3308 released
3309 \begin_inset Quotes erd
3310 \end_inset
3312 : Button was released.
3313 \end_layout
3315 \begin_layout Itemize
3316 \begin_inset Quotes eld
3317 \end_inset
3319 hold
3320 \begin_inset Quotes erd
3321 \end_inset
3323 : Held.
3324 \end_layout
3326 \begin_layout Itemize
3327 \begin_inset Quotes eld
3328 \end_inset
3330 unhold
3331 \begin_inset Quotes erd
3332 \end_inset
3334 : Released from hold.
3335 \end_layout
3337 \begin_layout Itemize
3338 \begin_inset Quotes eld
3339 \end_inset
3341 type
3342 \begin_inset Quotes erd
3343 \end_inset
3345 : Typing input on button.
3346 \end_layout
3348 \begin_layout Itemize
3349 \begin_inset Quotes eld
3350 \end_inset
3352 untype
3353 \begin_inset Quotes erd
3354 \end_inset
3356 : Typing input undone.
3357 \end_layout
3359 \begin_layout Itemize
3360 \begin_inset Quotes eld
3361 \end_inset
3363 analog
3364 \begin_inset Quotes erd
3365 \end_inset
3367 : Analog action on axis.
3368 \end_layout
3370 \end_deeper
3371 \begin_layout Section
3372 Movie editor
3373 \end_layout
3375 \begin_layout Itemize
3376 The editor edits in-memory movie.
3377 \end_layout
3379 \begin_layout Itemize
3380 Because past can't be edited and readwrite mode doesn't allow future, editing
3381  only works in 
3382 \emph on
3383 read only
3384 \emph default
3385  mode.
3386 \end_layout
3388 \begin_layout Itemize
3389 Keyboard triggers the normal hotkeys and bindings.
3390 \end_layout
3392 \begin_layout Subsection
3393 Left button actions
3394 \end_layout
3396 \begin_layout Itemize
3397 Clicking on cell in future (indicated by lack of redish background) toggles
3398  it (if it is a button) or prompts for a value (if it is an axis)
3399 \end_layout
3401 \begin_layout Itemize
3402 Dragging vertically toggles sequence of buttons or changes a sequence of
3403  axis values.
3404 \end_layout
3406 \begin_layout Subsection
3407 Right button actions
3408 \end_layout
3410 \begin_layout Standard
3411 The right mouse button pops up a context-sensitive menu:
3412 \end_layout
3414 \begin_layout Itemize
3415 Toggle <something>: Toggle this button
3416 \end_layout
3418 \begin_layout Itemize
3419 Change <something>: Change this axis value
3420 \end_layout
3422 \begin_layout Itemize
3423 Insert frame after: Insert a frame after this frame
3424 \end_layout
3426 \begin_layout Itemize
3427 Append frame: Append a frame to movie
3428 \end_layout
3430 \begin_layout Itemize
3431 Append frames: Append specified number of frames to movie
3432 \end_layout
3434 \begin_layout Itemize
3435 Delete frame: Delete this frame
3436 \end_layout
3438 \begin_layout Itemize
3439 Delete subframe: Delete this subframe
3440 \end_layout
3442 \begin_layout Itemize
3443 Truncate movie: Delete this subframe and everything after it.
3444 \end_layout
3446 \begin_layout Itemize
3447 Scroll to frame: Prompt for a frame and scroll the display to that frame.
3448 \end_layout
3450 \begin_layout Itemize
3451 Scroll to current frame: Scroll the display to current position
3452 \end_layout
3454 \begin_layout Itemize
3455 Run to frame: Prompts for frame and runs the emulation to that frame.
3456 \end_layout
3458 \begin_layout Itemize
3459 Change number of lines visible: Change the height of the movie display (1
3460  to 255).
3461 \end_layout
3463 \begin_layout Itemize
3464 Lock scroll to playback: While playing back or rewinding movies, the display
3465  will follow if enabled.
3466 \end_layout
3468 \begin_layout Section
3469 Memory watch expression syntax
3470 \end_layout
3472 \begin_layout Standard
3473 Memory watch expressions are in RPN (Reverse Polish Notation).
3474  At the end of expression, the top entry on stack is taken as the final
3475  result.
3476 \end_layout
3478 \begin_layout Standard
3479 Notations:
3480 \end_layout
3482 \begin_layout Itemize
3483 Evaluation order is strictly left to right.
3484 \end_layout
3486 \begin_layout Itemize
3487 a is the entry on top of stack
3488 \end_layout
3490 \begin_layout Itemize
3491 b is the entry immediately below top of stack
3492 \end_layout
3494 \begin_layout Itemize
3495 ; separates values to be pushed (no intermediate pop).
3496 \end_layout
3498 \begin_layout Itemize
3499 After end of element, all used stack slots are popped and all results are
3500  pushed.
3501 \end_layout
3503 \begin_layout Itemize
3504 When pushing multiple values, the pushes occur in order shown.
3505 \end_layout
3507 \begin_layout Standard
3508 The following operators are available:
3509 \end_layout
3511 \begin_layout Itemize
3512 + : a + b
3513 \end_layout
3515 \begin_layout Itemize
3516 - : a - b
3517 \end_layout
3519 \begin_layout Itemize
3520 * : a * b
3521 \end_layout
3523 \begin_layout Itemize
3524 / : a / b
3525 \end_layout
3527 \begin_layout Itemize
3528 % : a % b
3529 \end_layout
3531 \begin_layout Itemize
3532 a : atan(a)
3533 \end_layout
3535 \begin_layout Itemize
3536 b : read_signed_byte(a)
3537 \end_layout
3539 \begin_layout Itemize
3540 c : cos(a)
3541 \end_layout
3543 \begin_layout Itemize
3544 d : read_signed_dword(a)
3545 \end_layout
3547 \begin_layout Itemize
3548 i : quotent(a / b)
3549 \end_layout
3551 \begin_layout Itemize
3552 p :
3553 \begin_inset Formula $\pi$
3554 \end_inset
3557 \end_layout
3559 \begin_layout Itemize
3560 q : read_signed_qword(a)
3561 \end_layout
3563 \begin_layout Itemize
3564 r : sqrt(a)
3565 \end_layout
3567 \begin_layout Itemize
3568 s : sin(a)
3569 \end_layout
3571 \begin_layout Itemize
3572 t : tan(a)
3573 \end_layout
3575 \begin_layout Itemize
3576 u : a; a
3577 \end_layout
3579 \begin_layout Itemize
3580 w : read_signed_word(a)
3581 \end_layout
3583 \begin_layout Itemize
3584 A : atan2(a, b)
3585 \end_layout
3587 \begin_layout Itemize
3588 B : read_unsigned_byte(a)
3589 \end_layout
3591 \begin_layout Itemize
3592 C<number>z : Push number <number> to stack.
3593 \end_layout
3595 \begin_layout Itemize
3596 D : read_unsigned_dword(a)
3597 \end_layout
3599 \begin_layout Itemize
3600 C0x<number>z : Push number <number> (hexadecimal) to stack.
3601 \end_layout
3603 \begin_layout Itemize
3604 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
3605  for 10-16 digits).
3606 \end_layout
3608 \begin_layout Itemize
3609 Q : read_unsigned_qword(a)
3610 \end_layout
3612 \begin_layout Itemize
3613 R<digit> : round a to <digit> digits.
3614 \end_layout
3616 \begin_layout Itemize
3617 W : read_unsigned_word(a)
3618 \end_layout
3620 \begin_layout Subsection
3621 Example:
3622 \end_layout
3624 \begin_layout Standard
3625 C0x007e0878zWC0x007e002czW-
3626 \end_layout
3628 \begin_layout Enumerate
3629 Push value 0x7e0878 on top of stack (C0x007e0878z).
3630 \end_layout
3632 \begin_layout Enumerate
3633 Pop the value on top of stack (0x7e0878), read word value at that address
3634  and push the result,call it x1 (W).
3635 \end_layout
3637 \begin_layout Enumerate
3638 Push value 0x7e002c on top of stack (C0x007e002cz).
3639 \end_layout
3641 \begin_layout Enumerate
3642 Pop the value on top of stack (0x7e002c), read word value at that address
3643  and push the result,call it x2 (W).
3644 \end_layout
3646 \begin_layout Enumerate
3647 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3648  x2 - x1 (-).
3649 \end_layout
3651 \begin_layout Enumerate
3652 Since the expression ends, the final memory watch result is the top one
3653  on stack, which is x2 - x1.
3654 \end_layout
3656 \begin_layout Section
3657 Modifier and key names:
3658 \end_layout
3660 \begin_layout Subsection
3661 wxWidgets platform
3662 \end_layout
3664 \begin_layout Subsubsection
3665 Modifier names:
3666 \end_layout
3668 \begin_layout Standard
3669 Following modifier names are known:
3670 \end_layout
3672 \begin_layout Itemize
3674 \end_layout
3676 \begin_layout Itemize
3677 ctrl
3678 \end_layout
3680 \begin_layout Itemize
3681 shift 
3682 \end_layout
3684 \begin_layout Itemize
3685 meta
3686 \end_layout
3688 \begin_layout Itemize
3689 cmd (Mac OS X only)
3690 \end_layout
3692 \begin_layout Subsubsection
3693 Key names:
3694 \end_layout
3696 \begin_layout Standard
3697 Following key names are known:
3698 \end_layout
3700 \begin_layout Itemize
3701 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3702  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3703  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3704  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3705  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3706  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3707  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3708  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3709  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3710  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3711  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3712  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3713  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3714  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3715  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3716  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3717  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3718  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3719  windows_right, windows_menu, command, special1, special2, special3, special4,
3720  special5, special6, special7, special8, special9, special10, special11,
3721  special12, special13, special14, special15, special16, special17, special18,
3722  special19, special20
3723 \end_layout
3725 \begin_layout Section
3726 Movie file format
3727 \end_layout
3729 \begin_layout Standard
3730 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3731  (note: If you recompress it, do not use compression methods other than
3732  store and deflate and especially do not use encryption of any kind).
3733 \end_layout
3735 \begin_layout Subsection
3736 Detecting clean start/SRAM/Savestate
3737 \end_layout
3739 \begin_layout Itemize
3740 If file has member 
3741 \begin_inset Quotes eld
3742 \end_inset
3744 savestate
3745 \begin_inset Quotes erd
3746 \end_inset
3748  it is savestate, otherwise:
3749 \end_layout
3751 \begin_layout Itemize
3752 If file has members with names starting 
3753 \begin_inset Quotes eld
3754 \end_inset
3756 moviesram.
3757 \begin_inset Quotes erd
3758 \end_inset
3760  it is movie starting from SRAM, otherwise:
3761 \end_layout
3763 \begin_layout Itemize
3764 It is movie starting from clear state.
3765 \end_layout
3767 \begin_layout Subsection
3768 Member: gametype
3769 \end_layout
3771 \begin_layout Standard
3772 Type of game ROM and region (as one line).
3773  Valid values are:
3774 \end_layout
3776 \begin_layout Standard
3777 \begin_inset Tabular
3778 <lyxtabular version="3" rows="8" columns="3">
3779 <features tabularvalignment="middle">
3780 <column alignment="center" valignment="top" width="0">
3781 <column alignment="center" valignment="top" width="0">
3782 <column alignment="center" valignment="top" width="0">
3783 <row>
3784 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3785 \begin_inset Text
3787 \begin_layout Plain Layout
3788 Value
3789 \end_layout
3791 \end_inset
3792 </cell>
3793 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3794 \begin_inset Text
3796 \begin_layout Plain Layout
3797 System
3798 \end_layout
3800 \end_inset
3801 </cell>
3802 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3803 \begin_inset Text
3805 \begin_layout Plain Layout
3806 Region
3807 \end_layout
3809 \end_inset
3810 </cell>
3811 </row>
3812 <row>
3813 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3814 \begin_inset Text
3816 \begin_layout Plain Layout
3817 snes_pal
3818 \end_layout
3820 \end_inset
3821 </cell>
3822 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3823 \begin_inset Text
3825 \begin_layout Plain Layout
3826 Super NES
3827 \end_layout
3829 \end_inset
3830 </cell>
3831 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3832 \begin_inset Text
3834 \begin_layout Plain Layout
3836 \end_layout
3838 \end_inset
3839 </cell>
3840 </row>
3841 <row>
3842 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3843 \begin_inset Text
3845 \begin_layout Plain Layout
3846 sgb_pal
3847 \end_layout
3849 \end_inset
3850 </cell>
3851 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3852 \begin_inset Text
3854 \begin_layout Plain Layout
3855 Super Game Boy
3856 \end_layout
3858 \end_inset
3859 </cell>
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3861 \begin_inset Text
3863 \begin_layout Plain Layout
3865 \end_layout
3867 \end_inset
3868 </cell>
3869 </row>
3870 <row>
3871 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3872 \begin_inset Text
3874 \begin_layout Plain Layout
3875 snes_ntsc
3876 \end_layout
3878 \end_inset
3879 </cell>
3880 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3881 \begin_inset Text
3883 \begin_layout Plain Layout
3884 Super NES
3885 \end_layout
3887 \end_inset
3888 </cell>
3889 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3890 \begin_inset Text
3892 \begin_layout Plain Layout
3893 NTSC
3894 \end_layout
3896 \end_inset
3897 </cell>
3898 </row>
3899 <row>
3900 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3901 \begin_inset Text
3903 \begin_layout Plain Layout
3904 sgb_ntsc
3905 \end_layout
3907 \end_inset
3908 </cell>
3909 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3910 \begin_inset Text
3912 \begin_layout Plain Layout
3913 Super Game Boy
3914 \end_layout
3916 \end_inset
3917 </cell>
3918 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3919 \begin_inset Text
3921 \begin_layout Plain Layout
3922 NTSC
3923 \end_layout
3925 \end_inset
3926 </cell>
3927 </row>
3928 <row>
3929 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3930 \begin_inset Text
3932 \begin_layout Plain Layout
3934 \end_layout
3936 \end_inset
3937 </cell>
3938 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3939 \begin_inset Text
3941 \begin_layout Plain Layout
3942 BS-X (non-slotted)
3943 \end_layout
3945 \end_inset
3946 </cell>
3947 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3948 \begin_inset Text
3950 \begin_layout Plain Layout
3951 NTSC
3952 \end_layout
3954 \end_inset
3955 </cell>
3956 </row>
3957 <row>
3958 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3959 \begin_inset Text
3961 \begin_layout Plain Layout
3962 bsxslotted
3963 \end_layout
3965 \end_inset
3966 </cell>
3967 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3968 \begin_inset Text
3970 \begin_layout Plain Layout
3971 BS-X (slotted)
3972 \end_layout
3974 \end_inset
3975 </cell>
3976 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3977 \begin_inset Text
3979 \begin_layout Plain Layout
3980 NTSC
3981 \end_layout
3983 \end_inset
3984 </cell>
3985 </row>
3986 <row>
3987 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3988 \begin_inset Text
3990 \begin_layout Plain Layout
3991 sufamiturbo
3992 \end_layout
3994 \end_inset
3995 </cell>
3996 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3997 \begin_inset Text
3999 \begin_layout Plain Layout
4000 Sufami Turbo
4001 \end_layout
4003 \end_inset
4004 </cell>
4005 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4006 \begin_inset Text
4008 \begin_layout Plain Layout
4009 NTSC
4010 \end_layout
4012 \end_inset
4013 </cell>
4014 </row>
4015 </lyxtabular>
4017 \end_inset
4020 \end_layout
4022 \begin_layout Standard
4023 Frame rates are:
4024 \end_layout
4026 \begin_layout Standard
4027 \begin_inset Tabular
4028 <lyxtabular version="3" rows="3" columns="2">
4029 <features tabularvalignment="middle">
4030 <column alignment="center" valignment="top" width="0">
4031 <column alignment="center" valignment="top" width="0">
4032 <row>
4033 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4034 \begin_inset Text
4036 \begin_layout Plain Layout
4037 Region
4038 \end_layout
4040 \end_inset
4041 </cell>
4042 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4043 \begin_inset Text
4045 \begin_layout Plain Layout
4046 Framerate (fps)
4047 \end_layout
4049 \end_inset
4050 </cell>
4051 </row>
4052 <row>
4053 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4054 \begin_inset Text
4056 \begin_layout Plain Layout
4058 \end_layout
4060 \end_inset
4061 </cell>
4062 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4063 \begin_inset Text
4065 \begin_layout Plain Layout
4066 322445/6448
4067 \end_layout
4069 \end_inset
4070 </cell>
4071 </row>
4072 <row>
4073 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4074 \begin_inset Text
4076 \begin_layout Plain Layout
4077 NTSC
4078 \end_layout
4080 \end_inset
4081 </cell>
4082 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4083 \begin_inset Text
4085 \begin_layout Plain Layout
4086 10738636/178683
4087 \end_layout
4089 \end_inset
4090 </cell>
4091 </row>
4092 </lyxtabular>
4094 \end_inset
4097 \end_layout
4099 \begin_layout Subsection
4100 Member: port1
4101 \end_layout
4103 \begin_layout Standard
4104 Contains type of port #1 (as one line).
4105  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4106  If not present, defaults to 'gamepad'.
4107 \end_layout
4109 \begin_layout Subsection
4110 Member: port2
4111 \end_layout
4113 \begin_layout Standard
4114 Contains type of port #2 (as one line).
4115  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4116  'justifier' and 'justifiers'.
4117  If not present, defaults to 'none'.
4118 \end_layout
4120 \begin_layout Subsection
4121 Member: gamename
4122 \end_layout
4124 \begin_layout Standard
4125 Contains name of the game (as one line).
4126 \end_layout
4128 \begin_layout Subsection
4129 Member: authors
4130 \end_layout
4132 \begin_layout Standard
4133 Contains authors, one per line.
4134  Part before '|' is the full name, part after is the nickname.
4135 \end_layout
4137 \begin_layout Subsection
4138 Member: systemid
4139 \end_layout
4141 \begin_layout Standard
4142 Always 
4143 \begin_inset Quotes eld
4144 \end_inset
4146 lsnes-rr1
4147 \begin_inset Quotes erd
4148 \end_inset
4150  (one line).
4151  Used to reject other saves.
4152 \end_layout
4154 \begin_layout Subsection
4155 Member: controlsversion
4156 \end_layout
4158 \begin_layout Standard
4159 Always 
4160 \begin_inset Quotes eld
4161 \end_inset
4164 \begin_inset Quotes erd
4165 \end_inset
4167  (one line).
4168  Used to identify what controls are there.
4169 \end_layout
4171 \begin_layout Subsection
4172 Member: 
4173 \begin_inset Quotes eld
4174 \end_inset
4176 coreversion
4177 \begin_inset Quotes erd
4178 \end_inset
4181 \end_layout
4183 \begin_layout Standard
4184 Contains bsnes core version number (as one line).
4185 \end_layout
4187 \begin_layout Subsection
4188 Member: projectid
4189 \end_layout
4191 \begin_layout Standard
4192 Contains project ID (as one line).
4193  Used to identify if two movies are part of the same project.
4194 \end_layout
4196 \begin_layout Subsection
4197 Member: {rom,slota,slotb}{,xml}.sha256
4198 \end_layout
4200 \begin_layout Standard
4201 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4202  Absent if corresponding file is absent.
4203 \end_layout
4205 \begin_layout Subsection
4206 Member: moviesram.<name>
4207 \end_layout
4209 \begin_layout Standard
4210 Raw binary startup SRAM of kind <name>.
4211  Only present in savestates and movies starting from SRAM.
4212 \end_layout
4214 \begin_layout Subsection
4215 Member: saveframe
4216 \end_layout
4218 \begin_layout Standard
4219 Contains frame number (as one line) of frame movie was saved on.
4220  Only present in savestates.
4221 \end_layout
4223 \begin_layout Subsection
4224 Member: lagcounter
4225 \end_layout
4227 \begin_layout Standard
4228 Current value of lag counter (as one line).
4229  Only present in savestates.
4230 \end_layout
4232 \begin_layout Subsection
4233 Member: pollcounters
4234 \end_layout
4236 \begin_layout Standard
4237 Contains poll counters (currently 100 of them), one per line.
4238  Each line is raw poll count if DRDY is set for it.
4239  Otherwise it is negative poll count minus one.
4240  Only present in savestates.
4241 \end_layout
4243 \begin_layout Subsection
4244 Member: hostmemory
4245 \end_layout
4247 \begin_layout Standard
4248 Raw binary dump of host memory.
4249  Only present in savestates.
4250 \end_layout
4252 \begin_layout Subsection
4253 Member: savestate
4254 \end_layout
4256 \begin_layout Standard
4257 The raw binary savestate itself.
4258  Savestate detection uses this file, only present in savestates.
4259 \end_layout
4261 \begin_layout Subsection
4262 Member: screenshot
4263 \end_layout
4265 \begin_layout Standard
4266 Screenshot of current frame.
4267  Only present in savestates.
4268  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4269  data.
4270  Height of image is inferred from the width and size of data.
4271 \end_layout
4273 \begin_layout Subsection
4274 Member: sram.<name>
4275 \end_layout
4277 \begin_layout Standard
4278 Raw binary SRAM of kind <name> at time of savestate.
4279  Only present in savestates.
4280 \end_layout
4282 \begin_layout Subsection
4283 Member: input
4284 \end_layout
4286 \begin_layout Standard
4287 The actual input track, one line per subframe (blank lines are skipped).
4288 \end_layout
4290 \begin_layout Itemize
4291 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4292  part of same frame as previous, otherwise it starts a new frame.
4293 \end_layout
4295 \begin_layout Itemize
4296 First subframe must start a new frame.
4297 \end_layout
4299 \begin_layout Standard
4300 Length of movie in frames is number of lines in input file that start a
4301  new frame.
4302 \end_layout
4304 \begin_layout Subsection
4305 Member: subtitles
4306 \end_layout
4308 \begin_layout Standard
4309 Subtitle track.
4310  Optional.
4311 \end_layout
4313 \begin_layout Itemize
4314 Each line is in form <firstframe> <numframes> <text>.
4315 \end_layout
4317 \begin_layout Itemize
4318 Linefeed is encoded as 
4319 \backslash
4320 n, backslash is encoded as 
4321 \backslash
4323 \backslash
4325 \end_layout
4327 \begin_layout Subsection
4328 Member: rerecords
4329 \end_layout
4331 \begin_layout Standard
4332 Contains textual base-10 rerecord count (as one line; emulator just writes
4333  this, it doesn't read it) + 1.
4334 \end_layout
4336 \begin_layout Subsection
4337 Member: rrdata
4338 \end_layout
4340 \begin_layout Standard
4341 This member stores set of load IDs.
4342  There is one load ID per rerecord (plus one corresponding to start of project).
4343 \end_layout
4345 \begin_layout Itemize
4346 This member constists of concatenation of records
4347 \end_layout
4349 \begin_layout Itemize
4350 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4351  IDs.
4352 \end_layout
4354 \begin_layout Itemize
4355 IDs are interpretted as 256-bit big-endian integers with warparound.
4356 \end_layout
4358 \begin_layout Itemize
4359 Initial predicted ID is all zeroes.
4360 \end_layout
4362 \begin_layout Standard
4363 Format of each record is:
4364 \end_layout
4366 \begin_layout Itemize
4367 1 byte: Opcode byte.
4368  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4369  Bit 7 is unused.
4370 \end_layout
4372 \begin_layout Itemize
4373 32-prefixlen bytes of ID.
4374 \end_layout
4376 \begin_layout Itemize
4377 countlen bytes of big-endian count (count).
4378 \end_layout
4380 \begin_layout Standard
4381 Records are processed as follows:
4382 \end_layout
4384 \begin_layout Itemize
4385 To form the first ID encoded by record, take the first prefixlen bytes predicted
4386  ID and append the read ID value to it.
4387  The result is the first ID encoded.
4388 \end_layout
4390 \begin_layout Itemize
4391 If countlen is 0, record encodes 1 ID.
4392 \end_layout
4394 \begin_layout Itemize
4395 If countlen is 1, record encodes 2+count IDs.
4396 \end_layout
4398 \begin_layout Itemize
4399 If countlen is 2, record encodes 258+count IDs.
4400 \end_layout
4402 \begin_layout Itemize
4403 If countlen is 3, record encodes 65794+count IDs.
4404 \end_layout
4406 \begin_layout Itemize
4407 The new predicted ID is the next ID after last one encoded by the record.
4408 \end_layout
4410 \begin_layout Standard
4411 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4412  by all records.
4413 \end_layout
4415 \begin_layout Subsection
4416 Member: starttime.second
4417 \end_layout
4419 \begin_layout Standard
4420 Movie starting time, second part.
4421  Epoch is Unix epoch.
4422  Default is 1,000,000,000.
4423 \end_layout
4425 \begin_layout Subsection
4426 Member: starttime.subsecond
4427 \end_layout
4429 \begin_layout Standard
4430 Movie starting time, subsecond part.
4431  Unit is CPU clocks.
4432  Default is 0.
4433 \end_layout
4435 \begin_layout Subsection
4436 Member: savetime.second
4437 \end_layout
4439 \begin_layout Standard
4440 Movie saving time, second part.
4441  Default is starttime.second.
4442  Only present in savestates.
4443 \end_layout
4445 \begin_layout Subsection
4446 Member: savetime.subsecond
4447 \end_layout
4449 \begin_layout Standard
4450 Movie saving time, subsecond part.
4451  Default is starttime.subsecond.
4452  Only present in savestates.
4453 \end_layout
4455 \begin_layout Section
4456 lsvs file format (commentary tracks)
4457 \end_layout
4459 \begin_layout Subsection
4460 Clusters
4461 \end_layout
4463 \begin_layout Itemize
4464 Each cluster is 8kB (8192 bytes) in size.
4465 \end_layout
4467 \begin_layout Itemize
4468 Cluster n starts at offset 8192*n in file.
4469 \end_layout
4471 \begin_layout Itemize
4472 The following clusters are system special:
4473 \end_layout
4475 \begin_deeper
4476 \begin_layout Itemize
4477 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4478 \end_layout
4480 \begin_layout Itemize
4481 Cluster 1 (superblock)
4482 \end_layout
4484 \end_deeper
4485 \begin_layout Subsection
4486 Cluster tables
4487 \end_layout
4489 \begin_layout Itemize
4490 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4491  last 11 bits of n).
4492 \end_layout
4494 \begin_layout Itemize
4495 This cluster table consists of 2048 4-byte big-endian integers.
4496 \end_layout
4498 \begin_layout Itemize
4499 Each entry describes a cluster in 16MB supercluster, in order.
4500 \end_layout
4502 \begin_layout Itemize
4503 The valid values for entries are:
4504 \end_layout
4506 \begin_deeper
4507 \begin_layout Itemize
4508 0x00000000: Free cluster
4509 \end_layout
4511 \begin_layout Itemize
4512 0x00000001: Last cluster in chain.
4513 \end_layout
4515 \begin_layout Itemize
4516 0xFFFFFFFF: System cluster (cluster tables and superblock)
4517 \end_layout
4519 \begin_layout Itemize
4520 (anything else): Number of next cluster in chain.
4521  Must not be multiple of 2048.
4522 \end_layout
4524 \end_deeper
4525 \begin_layout Itemize
4526 Due to limitations of the format, there can be at most 2097052 superclusters,
4527  giving maximum file size of 16TB.
4528 \end_layout
4530 \begin_layout Subsection
4531 Stream table
4532 \end_layout
4534 \begin_layout Itemize
4535 The stream table chain always starts in cluster 2.
4536 \end_layout
4538 \begin_layout Itemize
4539 Otherwise, it follows normal chaining.
4540 \end_layout
4542 \begin_layout Itemize
4543 The stream table consists of 16-byte entries:
4544 \end_layout
4546 \begin_deeper
4547 \begin_layout Itemize
4548 The first 8 bytes of entry give big-endian beginning position of stream
4549  in units of 1/48000 s.
4550 \end_layout
4552 \begin_layout Itemize
4553 The next 4 bytes of entry give big-endian beginning cluster for control
4554  data.
4555  0 here marks the entry as not present.
4556 \end_layout
4558 \begin_layout Itemize
4559 The last 4 bytes of entry give big-endian beginning cluster for codec data.
4560 \end_layout
4562 \end_deeper
4563 \begin_layout Itemize
4564 Stream table clusters are normal clusters, following normal chaining.
4565 \end_layout
4567 \begin_layout Itemize
4568 The stream begnning position is not guarenteed unique.
4569  There can be multiple streams with the same starting position in the file.
4570 \end_layout
4572 \begin_layout Subsection
4573 Stream control data
4574 \end_layout
4576 \begin_layout Itemize
4577 The stream control data consists of entries 4 bytes each:
4578 \end_layout
4580 \begin_deeper
4581 \begin_layout Itemize
4582 The first 2 bytes of entry gives big-endian length of packet
4583 \end_layout
4585 \begin_layout Itemize
4586 The next byte of entry gives audio length of packet in units of 1/400 s.
4587 \end_layout
4589 \begin_layout Itemize
4590 The last byte is control byte.
4591 \end_layout
4593 \begin_deeper
4594 \begin_layout Itemize
4595 0 means this entry is not present and the control data ends.
4596 \end_layout
4598 \begin_layout Itemize
4599 1 is valid control entry.
4600 \end_layout
4602 \end_deeper
4603 \end_deeper
4604 \begin_layout Itemize
4605 The stream control data can also end by running into end of the readable
4606  chain.
4607 \end_layout
4609 \begin_deeper
4610 \begin_layout Itemize
4611 This happens if there happens to be exact multiple of 2048 packets in stream
4612  and number of packets is nonzero.
4613 \end_layout
4615 \end_deeper
4616 \begin_layout Itemize
4617 These clusters follow normal chaining.
4618 \end_layout
4620 \begin_layout Subsection
4621 Stream codec data
4622 \end_layout
4624 \begin_layout Itemize
4625 Stream codec data consists of raw Opus data packets packed back to back
4626  with nothing in between.
4627 \end_layout
4629 \begin_layout Itemize
4630 Warning: Due to internal limitations, this data must reside in the first
4631  65536 superclusters (that is, the first 1TB of the file).
4632 \end_layout
4634 \begin_layout Subsection
4635 Superblock
4636 \end_layout
4638 \begin_layout Itemize
4639 The superblock is stored in cluster 1.
4641 \end_layout
4643 \begin_layout Itemize
4644 The first 11 bytes are 
4645 \begin_inset Quotes eld
4646 \end_inset
4648 sefs-magic
4649 \begin_inset Quotes erd
4650 \end_inset
4652 <NUL>.
4653 \end_layout
4655 \begin_layout Itemize
4656 The rest are unused.
4657 \end_layout
4659 \begin_layout Itemize
4660 This cluster 1 is marked as system special.
4661 \end_layout
4663 \begin_layout Section
4664 Known ROM extensions
4665 \end_layout
4667 \begin_layout Itemize
4668 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4669 \end_layout
4671 \begin_layout Itemize
4672 DMG cartridge ROMs: dmg, gb.
4673 \end_layout
4675 \begin_layout Itemize
4676 GBC cartridge ROMs: cgb, gbc.
4677 \end_layout
4679 \begin_layout Section
4680 Gamepack files
4681 \end_layout
4683 \begin_layout Itemize
4684 The first line must be: 
4685 \begin_inset Quotes eld
4686 \end_inset
4688 [GAMEPACK FILE]
4689 \begin_inset Quotes erd
4690 \end_inset
4693 \end_layout
4695 \begin_layout Itemize
4696 There is one needed line: 
4697 \begin_inset Quotes eld
4698 \end_inset
4700 type <systype>
4701 \begin_inset Quotes erd
4702 \end_inset
4705  This sets system type to <systype>.
4706  The following system types are valid:
4707 \end_layout
4709 \begin_deeper
4710 \begin_layout Itemize
4711 snes (SNES)
4712 \end_layout
4714 \begin_layout Itemize
4715 bsx (BS-X non-slotted)
4716 \end_layout
4718 \begin_layout Itemize
4719 bsxslotted (BS-X slotted)
4720 \end_layout
4722 \begin_layout Itemize
4723 sufamiturbo (Sufami Turbo)
4724 \end_layout
4726 \begin_layout Itemize
4727 sgb (Super Game Boy)
4728 \end_layout
4730 \begin_layout Itemize
4731 dmg (Game Boy)
4732 \end_layout
4734 \begin_layout Itemize
4735 gbc (Game Boy Color)
4736 \end_layout
4738 \begin_layout Itemize
4739 gbc_gba (Game Boy Color with GBA initial register values)
4740 \end_layout
4742 \end_deeper
4743 \begin_layout Itemize
4744 Optionally a region can be specified: 
4745 \begin_inset Quotes eld
4746 \end_inset
4748 region <region>
4749 \begin_inset Quotes erd
4750 \end_inset
4753  The following values are valid:
4754 \end_layout
4756 \begin_deeper
4757 \begin_layout Itemize
4758 autodetect (Autodetect region: snes and sgb only)
4759 \end_layout
4761 \begin_layout Itemize
4762 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4763 \end_layout
4765 \begin_layout Itemize
4766 pal (PAL: snes, sgb)
4767 \end_layout
4769 \begin_layout Itemize
4770 world (World: dmg, gbc, gbc_gba)
4771 \end_layout
4773 \end_deeper
4774 \begin_layout Itemize
4775 ROM images are loaded as: 
4776 \begin_inset Quotes eld
4777 \end_inset
4779 rom <type> <file>
4780 \begin_inset Quotes erd
4781 \end_inset
4784  The following types are valid:
4785 \end_layout
4787 \begin_deeper
4788 \begin_layout Itemize
4789 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4790  BIOS in bsx, bsxslotted, sufamiturbo)
4791 \end_layout
4793 \begin_layout Itemize
4794 bsx (Cartridge ROM in bsx, bsxslotted)
4795 \end_layout
4797 \begin_layout Itemize
4798 slot-a (Cartridge ROM in sufamiturbo)
4799 \end_layout
4801 \begin_layout Itemize
4802 slot-b (Cartridge ROM in sufamiturbo)
4803 \end_layout
4805 \end_deeper
4806 \begin_layout Itemize
4807 ROM markup can be loaded as: 
4808 \begin_inset Quotes eld
4809 \end_inset
4811 xml <type> <file>
4812 \begin_inset Quotes erd
4813 \end_inset
4816  The types valid are the same as for ROMs.
4817 \end_layout
4819 \begin_layout Itemize
4820 Patches can be loaded as 
4821 \begin_inset Quotes eld
4822 \end_inset
4824 patch[<offset>] <type> <file>
4825 \begin_inset Quotes erd
4826 \end_inset
4829  The types are the same as for ROMs.
4830 \end_layout
4832 \begin_deeper
4833 \begin_layout Itemize
4834 Offset is given in form [+-]<number>.
4835  Usually offset is either +0 or -512.
4836 \end_layout
4838 \begin_layout Itemize
4839 Default offset is +0.
4840 \end_layout
4842 \end_deeper
4843 \begin_layout Subsection
4844 Example:
4845 \end_layout
4847 \begin_layout LyX-Code
4848 [GAMEPACK FILE]
4849 \end_layout
4851 \begin_layout LyX-Code
4852 type snes
4853 \end_layout
4855 \begin_layout LyX-Code
4856 rom rom speedygonzales.sfc
4857 \end_layout
4859 \begin_layout LyX-Code
4860 patch-512 rom sonicthehedgehog.ips
4861 \end_layout
4863 \begin_layout Subsection
4864 Example 2:
4865 \end_layout
4867 \begin_layout LyX-Code
4868 [GAMEPACK FILE]
4869 \end_layout
4871 \begin_layout LyX-Code
4872 type sgb
4873 \end_layout
4875 \begin_layout LyX-Code
4876 rom rom supergameboy.sfc
4877 \end_layout
4879 \begin_layout LyX-Code
4880 rom dmg megamanV.dmg
4881 \end_layout
4883 \begin_layout Section
4884 Quick'n'dirty encode guide
4885 \end_layout
4887 \begin_layout Enumerate
4888 Start the emulator and load the ROM and movie file.
4889 \end_layout
4891 \begin_layout Enumerate
4892 Set large AVI option 'set-setting avi-large on'
4893 \end_layout
4895 \begin_layout Enumerate
4896 Enable dumping 'dump-avi tmpdump' 
4897 \end_layout
4899 \begin_layout Enumerate
4900 Unpause and let it run until you want to end dumping.
4901 \end_layout
4903 \begin_layout Enumerate
4904 Close the emulator (closing the window is the easiest way).
4905  Or use 'end-avi'.
4906 \end_layout
4908 \begin_layout Enumerate
4909 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4910  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4911 \end_layout
4913 \begin_layout Enumerate
4914 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4915 \end_layout
4917 \begin_layout Enumerate
4918 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4919  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4920 \end_layout
4922 \begin_layout Enumerate
4923 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4924  Now final.mkv contains quick'n'dirty encode.
4925 \end_layout
4927 \begin_layout Section
4928 Axis configurations for some gamepad types:
4929 \end_layout
4931 \begin_layout Subsection
4932 XBox360 controller:
4933 \end_layout
4935 \begin_layout Standard
4936 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4937 \end_layout
4939 \begin_layout LyX-Code
4940 set-axis joystick0axis2 pressure-+
4941 \end_layout
4943 \begin_layout LyX-Code
4944 set-axis joystick0axis5 pressure-+
4945 \end_layout
4947 \begin_layout Itemize
4948 This is needed for SDL only.
4949  EVDEV sets those types correctly.
4950 \end_layout
4952 \begin_layout Subsection
4953 PS3 
4954 \begin_inset Quotes eld
4955 \end_inset
4957 sixaxis
4958 \begin_inset Quotes erd
4959 \end_inset
4961  controller:
4962 \end_layout
4964 \begin_layout Standard
4965 Axes 8-19 should be disabled.
4966 \end_layout
4968 \begin_layout LyX-Code
4969 set-axis joystick0axis8 disabled
4970 \end_layout
4972 \begin_layout LyX-Code
4973 set-axis joystick0axis9 disabled
4974 \end_layout
4976 \begin_layout LyX-Code
4977 set-axis joystick0axis10 disabled
4978 \end_layout
4980 \begin_layout LyX-Code
4981 set-axis joystick0axis11 disabled
4982 \end_layout
4984 \begin_layout LyX-Code
4985 set-axis joystick0axis12 disabled
4986 \end_layout
4988 \begin_layout LyX-Code
4989 set-axis joystick0axis13 disabled
4990 \end_layout
4992 \begin_layout LyX-Code
4993 set-axis joystick0axis14 disabled
4994 \end_layout
4996 \begin_layout LyX-Code
4997 set-axis joystick0axis15 disabled
4998 \end_layout
5000 \begin_layout LyX-Code
5001 set-axis joystick0axis16 disabled
5002 \end_layout
5004 \begin_layout LyX-Code
5005 set-axis joystick0axis17 disabled
5006 \end_layout
5008 \begin_layout LyX-Code
5009 set-axis joystick0axis18 disabled
5010 \end_layout
5012 \begin_layout LyX-Code
5013 set-axis joystick0axis19 disabled
5014 \end_layout
5016 \begin_layout Section
5017 Errata:
5018 \end_layout
5020 \begin_layout Subsection
5021 Problems from BSNES core:
5022 \end_layout
5024 \begin_layout Itemize
5025 The whole pending save stuff.
5026 \end_layout
5028 \begin_layout Itemize
5029 Lack of layer hiding.
5030 \end_layout
5032 \begin_layout Itemize
5033 It is slow (especially accuracy).
5034 \end_layout
5036 \begin_layout Itemize
5037 Firmwares can't be loaded from ZIP archives.
5038 \end_layout
5040 \begin_layout Subsection
5041 Other problems:
5042 \end_layout
5044 \begin_layout Itemize
5045 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5046 \end_layout
5048 \begin_layout Itemize
5049 Audio for last dumped frame is not itself dumped.
5050 \end_layout
5052 \begin_layout Itemize
5053 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5054 \end_layout
5056 \begin_layout Itemize
5057 No menus, command based interface (SDL).
5058 \end_layout
5060 \begin_layout Itemize
5061 Long commands don't scroll.
5062 \end_layout
5064 \begin_layout Section
5065 Changelog:
5066 \end_layout
5068 \begin_layout Subsection
5069 rr0-beta1
5070 \end_layout
5072 \begin_layout Itemize
5073 Fix -Wall warnings
5074 \end_layout
5076 \begin_layout Itemize
5077 Fix dumper video corruption with levels 10-18.
5078 \end_layout
5080 \begin_layout Subsection
5081 rr0-beta2
5082 \end_layout
5084 \begin_layout Itemize
5085 Autofire
5086 \end_layout
5088 \begin_layout Itemize
5089 Lots of code cleanups
5090 \end_layout
5092 \begin_layout Itemize
5093 Lua interface to settings
5094 \end_layout
5096 \begin_layout Itemize
5097 Allow specifying AVI borders without Lua
5098 \end_layout
5100 \begin_layout Itemize
5101 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5102 \end_layout
5104 \begin_layout Itemize
5105 on_snoop lua callback
5106 \end_layout
5108 \begin_layout Itemize
5109 Faster movie loading and saving.
5110 \end_layout
5112 \begin_layout Subsection
5113 rr0-beta3
5114 \end_layout
5116 \begin_layout Itemize
5117 Joystick support
5118 \end_layout
5120 \begin_layout Subsection
5121 rr0-beta4
5122 \end_layout
5124 \begin_layout Itemize
5125 Fix multi-buttons
5126 \end_layout
5128 \begin_layout Itemize
5129 Save jukebox functionality.
5130 \end_layout
5132 \begin_layout Subsection
5133 rr0-beta5
5134 \end_layout
5136 \begin_layout Itemize
5137 Try to fix some nasty failing movie load edge cases
5138 \end_layout
5140 \begin_layout Itemize
5141 Allow specifying scripts to run on command line.
5142 \end_layout
5144 \begin_layout Subsection
5145 rr0-beta6
5146 \end_layout
5148 \begin_layout Itemize
5149 Major source code reorganization.
5150 \end_layout
5152 \begin_layout Itemize
5153 Backup savestates before overwriting.
5154 \end_layout
5156 \begin_layout Itemize
5157 Don't crash if loading initial state fails.
5158 \end_layout
5160 \begin_layout Subsection
5161 rr0-beta7
5162 \end_layout
5164 \begin_layout Itemize
5165 Fix firmware lookup
5166 \end_layout
5168 \begin_layout Itemize
5169 Fix author name parsing
5170 \end_layout
5172 \begin_layout Itemize
5173 Fix rerecord counting
5174 \end_layout
5176 \begin_layout Itemize
5177 (SDL) Print messages to console if SDL is uninitialized
5178 \end_layout
5180 \begin_layout Itemize
5181 Add movieinfo program
5182 \end_layout
5184 \begin_layout Itemize
5185 Fix loading movies starting from SRAM.
5186 \end_layout
5188 \begin_layout Subsection
5189 rr0-beta8
5190 \end_layout
5192 \begin_layout Itemize
5193 Add support for unattended dumping
5194 \end_layout
5196 \begin_layout Itemize
5197 Fix compiling for Win32
5198 \end_layout
5200 \begin_layout Itemize
5201 Don't lock up if sound can't be initialized
5202 \end_layout
5204 \begin_layout Itemize
5205 Strip trailing CR from commands
5206 \end_layout
5208 \begin_layout Itemize
5209 Don't try to do dubious things in global ctors (fix crash on startup)
5210 \end_layout
5212 \begin_layout Subsection
5213 rr0-beta9
5214 \end_layout
5216 \begin_layout Itemize
5217 Small documentation tweaking
5218 \end_layout
5220 \begin_layout Itemize
5221 Fix make clean
5222 \end_layout
5224 \begin_layout Itemize
5225 Fix major bug in modifier matching
5226 \end_layout
5228 \begin_layout Subsection
5229 rr0-beta10
5230 \end_layout
5232 \begin_layout Itemize
5233 Lots of documentation fixes
5234 \end_layout
5236 \begin_layout Itemize
5237 Use dedicated callbacks for event backcomm., not commands.
5238 \end_layout
5240 \begin_layout Itemize
5241 Ensure that the watchdog is not hit when executing delayed reset.
5242 \end_layout
5244 \begin_layout Itemize
5245 Remove errant tab from joystick message.
5246 \end_layout
5248 \begin_layout Subsection
5249 rr0-beta11
5250 \end_layout
5252 \begin_layout Itemize
5253 Make autofire operate in absolute time, not linear time
5254 \end_layout
5256 \begin_layout Itemize
5257 Reinitialize controls when resuming from loadstate
5258 \end_layout
5260 \begin_layout Itemize
5261 Some more code cleanups
5262 \end_layout
5264 \begin_layout Itemize
5265 If Lua allocator fails, call OOM_panic()
5266 \end_layout
5268 \begin_layout Itemize
5269 Byte/word/dword/qword sized host memory write/read functions.
5270 \end_layout
5272 \begin_layout Itemize
5273 Dump at correct framerate if dumping interlaced NTSC (height=448).
5274 \end_layout
5276 \begin_layout Subsection
5277 rr0-beta12
5278 \end_layout
5280 \begin_layout Itemize
5281 Actually include the complete source code
5282 \end_layout
5284 \begin_layout Itemize
5285 Keep track of RTC
5286 \end_layout
5288 \begin_layout Subsection
5289 rr0-beta13
5290 \end_layout
5292 \begin_layout Itemize
5293 Document {save,start}time.{,sub}second.
5294 \end_layout
5296 \begin_layout Itemize
5297 Intercept time() from bsnes core.
5298 \end_layout
5300 \begin_layout Subsection
5301 rr0-beta14
5302 \end_layout
5304 \begin_layout Itemize
5305 Allow disabling time() interception (allow build on Mac OS X)
5306 \end_layout
5308 \begin_layout Itemize
5309 Use SDLMain on Mac OS X (make SDL not crash)
5310 \end_layout
5312 \begin_layout Itemize
5313 Disable delayed resets (just plain too buggy for now).
5314 \end_layout
5316 \begin_layout Itemize
5317 Code cleanups
5318 \end_layout
5320 \begin_layout Itemize
5321 Use 16-bit for graphics/video instead of 32-bit.
5322 \end_layout
5324 \begin_layout Itemize
5325 gui.rectangle/gui.pixel
5326 \end_layout
5328 \begin_layout Itemize
5329 gui.crosshair
5330 \end_layout
5332 \begin_layout Itemize
5333 New CSCD writer implementation.
5334 \end_layout
5336 \begin_layout Subsection
5337 rr0-beta15
5338 \end_layout
5340 \begin_layout Itemize
5341 Fix interaction of * and +.
5342 \end_layout
5344 \begin_layout Itemize
5345 Manual improvements
5346 \end_layout
5348 \begin_layout Itemize
5349 Use gettimeofday()/usleep(), these seem portable enough.
5350 \end_layout
5352 \begin_layout Itemize
5353 Move joystick axis manipulation to keymapper code.
5354 \end_layout
5356 \begin_layout Itemize
5357 Changes to how read-only works.
5358 \end_layout
5360 \begin_layout Itemize
5361 Refactor controller input code.
5362 \end_layout
5364 \begin_layout Subsection
5365 rr0-beta16
5366 \end_layout
5368 \begin_layout Itemize
5369 Fix mouseclick scale compensation.
5370 \end_layout
5372 \begin_layout Itemize
5373 Draw area boundaries correctly in SDL code.
5374 \end_layout
5376 \begin_layout Itemize
5377 gui.screenshot.
5378 \end_layout
5380 \begin_layout Itemize
5381 Fix CSCD output (buffer overrun and race condition).
5382 \end_layout
5384 \begin_layout Subsection
5385 rr0-beta17
5386 \end_layout
5388 \begin_layout Itemize
5389 JMD dumping support.
5390 \end_layout
5392 \begin_layout Itemize
5393 Allow unattended dumping to JMD.
5394 \end_layout
5396 \begin_layout Itemize
5397 Move to BSNES v083.
5398 \end_layout
5400 \begin_layout Itemize
5401 Switch back to 32-bit colors.
5402 \end_layout
5404 \begin_layout Itemize
5405 Add Lua function gui.color.
5406 \end_layout
5408 \begin_layout Itemize
5409 Use some new C++11 features in GCC 4.6.
5410 \end_layout
5412 \begin_layout Itemize
5413 Be prepared for core frequency changes.
5414 \end_layout
5416 \begin_layout Itemize
5417 Pass colors in one chunk from Lua.
5418 \end_layout
5420 \begin_layout Subsection
5421 rr0-beta18
5422 \end_layout
5424 \begin_layout Itemize
5425 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5426  memory.read_vma() and memory.find_vma().
5427 \end_layout
5429 \begin_layout Itemize
5430 Numerious documentation fixups
5431 \end_layout
5433 \begin_layout Itemize
5434 RTC time format changed
5435 \end_layout
5437 \begin_layout Itemize
5438 Reformat flags display
5439 \end_layout
5441 \begin_layout Itemize
5442 Allow lua package name to be overridden
5443 \end_layout
5445 \begin_layout Itemize
5446 SDUMP (high-quality dumping).
5447 \end_layout
5449 \begin_layout Itemize
5450 Split platform support to plugins.
5451 \end_layout
5453 \begin_layout Itemize
5454 Make all sound plugins support basic sound commands
5455 \end_layout
5457 \begin_layout Itemize
5458 Support portaudio for sound.
5459 \end_layout
5461 \begin_layout Itemize
5462 Allow disable Lua/SDL searching.
5463 \end_layout
5465 \begin_layout Itemize
5466 Upconvert colors when copying lcscreen to screen.
5467 \end_layout
5469 \begin_layout Itemize
5470 Reorganize source tree.
5471 \end_layout
5473 \begin_layout Itemize
5474 Evdev joystick support.
5475 \end_layout
5477 \begin_layout Itemize
5478 Refactor more code into generic window code.
5479 \end_layout
5481 \begin_layout Subsection
5482 rr0-beta19
5483 \end_layout
5485 \begin_layout Itemize
5486 Refactor message handling.
5487 \end_layout
5489 \begin_layout Itemize
5490 Rework makefile
5491 \end_layout
5493 \begin_layout Itemize
5494 Documentation fixes
5495 \end_layout
5497 \begin_layout Itemize
5498 Finish pending saves before load/quit.
5499 \end_layout
5501 \begin_layout Itemize
5502 Wxwidgets graphics plugin.
5503 \end_layout
5505 \begin_layout Subsection
5506 rr0-beta20
5507 \end_layout
5509 \begin_layout Itemize
5510 Get rid of win32-crap.[ch]pp.
5511 \end_layout
5513 \begin_layout Itemize
5514 Move files around a lot.
5515 \end_layout
5517 \begin_layout Itemize
5518 Get rid of need for host C++ compiler.
5519 \end_layout
5521 \begin_layout Itemize
5522 Bsnes v084 core.
5523 \end_layout
5525 \begin_layout Itemize
5526 Refactor inter-component communication.
5527 \end_layout
5529 \begin_layout Itemize
5530 Fix zero luma.
5531 \end_layout
5533 \begin_layout Itemize
5534 Fix crash on multiline aliases.
5535 \end_layout
5537 \begin_layout Itemize
5538 Load/Save settings in wxwidgets gui.
5539 \end_layout
5541 \begin_layout Subsection
5542 rr0-beta21
5543 \end_layout
5545 \begin_layout Itemize
5546 Patch problems in bsnes core
5547 \end_layout
5549 \begin_layout Itemize
5550 SNES is little-endian, not big-endian!
5551 \end_layout
5553 \begin_layout Itemize
5554 Fix memory corruption in lcscreen::load()
5555 \end_layout
5557 \begin_layout Subsection
5558 rr0-beta22
5559 \end_layout
5561 \begin_layout Itemize
5562 Fix interpretting repeat counts in rrdata loading.
5563 \end_layout
5565 \begin_layout Itemize
5566 New lua callback: on_frame()
5567 \end_layout
5569 \begin_layout Itemize
5570 Remove calls to runtosave() that aren't supposed to be there
5571 \end_layout
5573 \begin_layout Itemize
5574 Lua function: movie.read_rtc()
5575 \end_layout
5577 \begin_layout Itemize
5578 Ignore src/fonts/font.cpp
5579 \end_layout
5581 \begin_layout Itemize
5582 Fix more bsnes core problems
5583 \end_layout
5585 \begin_layout Itemize
5586 Control bsnes random seeding
5587 \end_layout
5589 \begin_layout Itemize
5590 Pause-on-end
5591 \end_layout
5593 \begin_layout Itemize
5594 Some bsnes core debugging features (state dump and state hash)
5595 \end_layout
5597 \begin_layout Itemize
5598 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5599  it was 'lsnes rr0-beta21').
5600 \end_layout
5602 \begin_layout Subsection
5603 rr0-beta23
5604 \end_layout
5606 \begin_layout Itemize
5607 Fix memory corruption due to macro/field mixup
5608 \end_layout
5610 \begin_layout Itemize
5611 search-memory update
5612 \end_layout
5614 \begin_layout Itemize
5615 Allow direct-mapped framebuffer
5616 \end_layout
5618 \begin_layout Itemize
5619 SDL: Use SDL_ANYFORMAT if possible
5620 \end_layout
5622 \begin_layout Itemize
5623 SDMP2SOX: 2s delay modes.
5624 \end_layout
5626 \begin_layout Itemize
5627 Wxwidgets: Cleanups
5628 \end_layout
5630 \begin_layout Itemize
5631 Use sed -E, not sed -r.
5632  Fixes building on Mac OS X.
5633 \end_layout
5635 \begin_layout Itemize
5636 Wxwidgets: Save jukebox on exit
5637 \end_layout
5639 \begin_layout Itemize
5640 Fix RTC if using load-movie on savestate.
5641 \end_layout
5643 \begin_layout Itemize
5644 Fix crash related to full console mode.
5645 \end_layout
5647 \begin_layout Subsection
5648 rr0-beta24
5649 \end_layout
5651 \begin_layout Itemize
5652 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5653 \end_layout
5655 \begin_layout Itemize
5656 Wxwidgets: Allow compiling on Mac OS X.
5657 \end_layout
5659 \begin_layout Itemize
5660 Use movie compare instead of movie hashing (faster save/load).
5661 \end_layout
5663 \begin_layout Itemize
5664 Lua: _SYSTEM table.
5665 \end_layout
5667 \begin_layout Subsection
5668 rr0-beta25
5669 \end_layout
5671 \begin_layout Itemize
5672 sdmp2sox: Pad soundtrack if using -l or -L.
5673 \end_layout
5675 \begin_layout Itemize
5676 sdmp2sox: Fix NTSC overscan.
5677 \end_layout
5679 \begin_layout Itemize
5680 sdmp2sox: Add AR correction mode.
5681 \end_layout
5683 \begin_layout Itemize
5684 call lua_close() when exiting.
5685 \end_layout
5687 \begin_layout Itemize
5688 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5689 \end_layout
5691 \begin_layout Subsection
5692 rr0-beta26
5693 \end_layout
5695 \begin_layout Itemize
5696 Fix IPS patching code (use bsnes core IPS patcher).
5697 \end_layout
5699 \begin_layout Itemize
5700 Implement BPS patching (using bsnes core IPS patcher).
5701 \end_layout
5703 \begin_layout Itemize
5704 Add feature to load headered ROMs.
5705 \end_layout
5707 \begin_layout Subsection
5708 rr0-beta27
5709 \end_layout
5711 \begin_layout Itemize
5712 Show command names when showing keybindings
5713 \end_layout
5715 \begin_layout Subsection
5717 \end_layout
5719 \begin_layout Itemize
5720 Fix pause-on-end to be actually controllable
5721 \end_layout
5723 \begin_layout Itemize
5724 SDL: Poll all events in queue, not just first one (fixes slowness in command
5725  typing)
5726 \end_layout
5728 \begin_layout Itemize
5729 Wxwidgets: Fix ROM loading.
5730 \end_layout
5732 \begin_layout Subsection
5733 rr1-beta0
5734 \end_layout
5736 \begin_layout Itemize
5737 Lua: Add gui.textH, gui.textV, gui.textHV
5738 \end_layout
5740 \begin_layout Itemize
5741 Fix text colors on SDL on Mac OS X
5742 \end_layout
5744 \begin_layout Itemize
5745 Mode 'F' for finished in readonly mode.
5746 \end_layout
5748 \begin_layout Itemize
5749 Fix some WS errors.
5750 \end_layout
5752 \begin_layout Itemize
5753 Reliably pause after skip poll
5754 \end_layout
5756 \begin_layout Itemize
5757 Split UI and core into their own threads
5758 \end_layout
5760 \begin_layout Subsection
5761 rr1-beta1
5762 \end_layout
5764 \begin_layout Itemize
5765 Remove leftover dummy SRAM slot
5766 \end_layout
5768 \begin_layout Itemize
5769 Fix controller numbers.
5770 \end_layout
5772 \begin_layout Subsection
5773 rr1-beta2
5774 \end_layout
5776 \begin_layout Itemize
5777 Fix lsnes-dumpavi after interface change.
5778 \end_layout
5780 \begin_layout Itemize
5781 Also give BSNES patches for v085.
5782 \end_layout
5784 \begin_layout Itemize
5785 Pack movie data in memory.
5786 \end_layout
5788 \begin_layout Subsection
5789 rr1-beta3
5790 \end_layout
5792 \begin_layout Itemize
5793 Fix framecount/length given when loading movies.
5794 \end_layout
5796 \begin_layout Itemize
5797 Controller command memory leak fixes.
5798 \end_layout
5800 \begin_layout Itemize
5801 Don't leak palette if freeing screen object.
5802 \end_layout
5804 \begin_layout Subsection
5805 rr1-beta4
5806 \end_layout
5808 \begin_layout Itemize
5809 Detect revisions.
5810 \end_layout
5812 \begin_layout Itemize
5813 Wxwidgets: Allow controlling dumper from the menu.
5814 \end_layout
5816 \begin_layout Subsection
5817 rr1-beta5
5818 \end_layout
5820 \begin_layout Itemize
5821 Rewrite parts of manual
5822 \end_layout
5824 \begin_layout Itemize
5825 Lua: Make it work with Lua 5.2.
5826 \end_layout
5828 \begin_layout Subsection
5829 rr1-beta6
5830 \end_layout
5832 \begin_layout Itemize
5833 Win32: Fix compile errors.
5834 \end_layout
5836 \begin_layout Subsection
5837 rr1-beta7
5838 \end_layout
5840 \begin_layout Itemize
5841 Refactor controller input code.
5842 \end_layout
5844 \begin_layout Itemize
5845 Fix crash when using command line on SDL / Mac OS X.
5846 \end_layout
5848 \begin_layout Subsection
5849 rr1-beta8
5850 \end_layout
5852 \begin_layout Itemize
5853 Delete core/coroutine (obsolete)
5854 \end_layout
5856 \begin_layout Itemize
5857 Lag input display by one frame.
5858 \end_layout
5860 \begin_layout Itemize
5861 Rewind movie to beginning function.
5862 \end_layout
5864 \begin_layout Itemize
5865 Fix wrong frame number reported to Lua when repainting after loadstate
5866 \end_layout
5868 \begin_layout Itemize
5869 Support UI editing of jukebox
5870 \end_layout
5872 \begin_layout Itemize
5873 Wxwidgets: Save settings on exit.
5874 \end_layout
5876 \begin_layout Itemize
5877 Support ${project} for filenames
5878 \end_layout
5880 \begin_layout Itemize
5881 SDL: Fix command history
5882 \end_layout
5884 \begin_layout Subsection
5885 rr1-beta9
5886 \end_layout
5888 \begin_layout Itemize
5889 Fix some order-of-global-ctor bugs.
5890 \end_layout
5892 \begin_layout Subsection
5893 rr1-beta10
5894 \end_layout
5896 \begin_layout Itemize
5897 Fix crashes when quitting on Win32.
5898 \end_layout
5900 \begin_layout Subsection
5901 rr1-beta11
5902 \end_layout
5904 \begin_layout Itemize
5905 EVDEV: Queue keypresses from joystick, don't send directly
5906 \end_layout
5908 \begin_layout Itemize
5909 Wxwidgets: Load-Preserve that actually works.
5910 \end_layout
5912 \begin_layout Subsection
5913 rr1-beta12
5914 \end_layout
5916 \begin_layout Itemize
5917 Wxwidgets: GUI for memory search.
5918 \end_layout
5920 \begin_layout Itemize
5921 Warn about using synchronous queue in UI callback.
5922 \end_layout
5924 \begin_layout Subsection
5925 rr1-beta13
5926 \end_layout
5928 \begin_layout Itemize
5929 Remember last saved file for each ROM
5930 \end_layout
5932 \begin_layout Itemize
5933 Support MT dumping via boost.
5934 \end_layout
5936 \begin_layout Itemize
5937 Lua: input.raw
5938 \end_layout
5940 \begin_layout Itemize
5941 Lua: input.keyhook
5942 \end_layout
5944 \begin_layout Itemize
5945 Make mouse be ordinary input instead of special-casing
5946 \end_layout
5948 \begin_layout Itemize
5949 SDL: Don't screw up commands with NUL codepoints.
5950 \end_layout
5952 \begin_layout Subsection
5953 rr1-beta14
5954 \end_layout
5956 \begin_layout Itemize
5957 Merge status panel and main window
5958 \end_layout
5960 \begin_layout Itemize
5961 True movie slot support (the rest of it)
5962 \end_layout
5964 \begin_layout Itemize
5965 SDL: Fix compilation error
5966 \end_layout
5968 \begin_layout Itemize
5969 Elminate cross calls in dump menu code.
5970 \end_layout
5972 \begin_layout Subsection
5973 rr1-beta15
5974 \end_layout
5976 \begin_layout Itemize
5977 Cancel pending saves command
5978 \end_layout
5980 \begin_layout Itemize
5981 Wxwidgets: Code refactoring
5982 \end_layout
5984 \begin_layout Itemize
5985 Wxwidgets: Fix system -> reset
5986 \end_layout
5988 \begin_layout Itemize
5989 Wxwidgets: Read watch expressions in the right thread
5990 \end_layout
5992 \begin_layout Subsection
5993 rr1-beta16
5994 \end_layout
5996 \begin_layout Itemize
5997 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5998  support that).
5999 \end_layout
6001 \begin_layout Itemize
6002 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6003 \end_layout
6005 \begin_layout Itemize
6006 Don't append trailing '-' to prefix when saving movie.
6007 \end_layout
6009 \begin_layout Itemize
6010 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6011 \end_layout
6013 \begin_layout Subsection
6015 \end_layout
6017 \begin_layout Itemize
6018 Document memory watch syntax.
6019 \end_layout
6021 \begin_layout Subsection
6022 rr1-delta1
6023 \end_layout
6025 \begin_layout Itemize
6026 Fix unattended dumping (lsnes-dumpavi)
6027 \end_layout
6029 \begin_layout Itemize
6030 Support RAW dumping
6031 \end_layout
6033 \begin_layout Itemize
6034 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6035 \end_layout
6037 \begin_layout Itemize
6038 Add option to control sample rate preturbation in AVI dumper
6039 \end_layout
6041 \begin_layout Subsection
6042 rr1-delta2
6043 \end_layout
6045 \begin_layout Itemize
6046 Wxwidgets: Fix dumper submodes
6047 \end_layout
6049 \begin_layout Itemize
6050 Set core controller types before loadstate
6051 \end_layout
6053 \begin_layout Subsection
6054 rr1-delta2epsilon1
6055 \end_layout
6057 \begin_layout Itemize
6058 Fix compiling with bsnes v086.
6059 \end_layout
6061 \begin_layout Subsection
6062 rr1-delta3
6063 \end_layout
6065 \begin_layout Itemize
6066 Don't prompt before quitting
6067 \end_layout
6069 \begin_layout Itemize
6070 Start unpaused, preserve pause/unpause over load.
6071 \end_layout
6073 \begin_layout Itemize
6074 Try to autodetect if ROM is headered.
6075 \end_layout
6077 \begin_layout Itemize
6078 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6079 \end_layout
6081 \begin_layout Itemize
6082 Allow configuring some hotkeys.
6083 \end_layout
6085 \begin_layout Subsection
6086 rr1-delta4
6087 \end_layout
6089 \begin_layout Itemize
6090 Lots of code cleanups
6091 \end_layout
6093 \begin_layout Itemize
6094 Fix JMD compression (JMD dumping was broken)
6095 \end_layout
6097 \begin_layout Itemize
6098 Don't crash if Lua C function throws an exception.
6099 \end_layout
6101 \begin_layout Itemize
6102 Support bitmap drawing in Lua.
6103 \end_layout
6105 \begin_layout Itemize
6106 Fix bsnes v085/v086 patches.
6107 \end_layout
6109 \begin_layout Itemize
6110 Improve stability on win32.
6111 \end_layout
6113 \begin_layout Subsection
6114 rr1-delta4epsilon1
6115 \end_layout
6117 \begin_layout Itemize
6118 Don't corrupt movie if movie length is integer multiple of frames per page.
6119 \end_layout
6121 \begin_layout Subsection
6122 rr1-delta5
6123 \end_layout
6125 \begin_layout Itemize
6126 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6127 \end_layout
6129 \begin_layout Itemize
6130 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6131 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6133 \end_layout
6135 \begin_layout Itemize
6136 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6137 \end_layout
6139 \begin_layout Itemize
6140 Wxwidgets: Fix broken modifiers
6141 \end_layout
6143 \begin_layout Itemize
6144 on_paint has parameter now.
6145 \end_layout
6147 \begin_layout Itemize
6148 Optional initital fill for bitmaps
6149 \end_layout
6151 \begin_layout Itemize
6152 Fix palette changing.
6153 \end_layout
6155 \begin_layout Itemize
6156 Optimize rendering a bit.
6157 \end_layout
6159 \begin_layout Itemize
6160 Bsnes v087 support.
6161 \end_layout
6163 \begin_layout Subsection
6164 rr1-delta5epsilon1
6165 \end_layout
6167 \begin_layout Itemize
6168 Movieinfo: Fix display of port #2 type.
6169 \end_layout
6171 \begin_layout Itemize
6172 Call on_input() after loadstate.
6173 \end_layout
6175 \begin_layout Subsection
6176 rr1-delta5epsilon2
6177 \end_layout
6179 \begin_layout Itemize
6180 Fix writing port2 data to movie.
6181 \end_layout
6183 \begin_layout Itemize
6184 Fix SRAM handling with Bsnes v087.
6185 \end_layout
6187 \begin_layout Subsection
6188 rr1-delta6
6189 \end_layout
6191 \begin_layout Itemize
6192 Library loading support
6193 \end_layout
6195 \begin_layout Itemize
6196 Built-in TSCC encoder
6197 \end_layout
6199 \begin_layout Itemize
6200 Hi-color (256T colors) dumping.
6201 \end_layout
6203 \begin_layout Itemize
6204 Dump over TCP/IP(v6)
6205 \end_layout
6207 \begin_layout Itemize
6208 Hidable status panel
6209 \end_layout
6211 \begin_layout Itemize
6212 Turbo toggle/hold
6213 \end_layout
6215 \begin_layout Itemize
6216 Adjustable sound volume
6217 \end_layout
6219 \begin_layout Itemize
6220 Screen scaling
6221 \end_layout
6223 \begin_layout Itemize
6224 Allow DnD into filename boxes
6225 \end_layout
6227 \begin_layout Itemize
6228 Configurable paths
6229 \end_layout
6231 \begin_layout Itemize
6232 Portaudio: Fix speaker popping at start
6233 \end_layout
6235 \begin_layout Itemize
6236 Lots of UI changes
6237 \end_layout
6239 \begin_layout Itemize
6240 Speed adjustment menu
6241 \end_layout
6243 \begin_layout Itemize
6244 Win32 joystick support
6245 \end_layout
6247 \begin_layout Itemize
6248 Lua: gui.rainbow and gui.box
6249 \end_layout
6251 \begin_layout Itemize
6252 Split key lists into classes (the key list was large!)
6253 \end_layout
6255 \begin_layout Itemize
6256 More save slots support
6257 \end_layout
6259 \begin_layout Itemize
6260 Wxwidgets (wxJoystick) joystick support
6261 \end_layout
6263 \begin_layout Subsection
6264 rr1-delta7
6265 \end_layout
6267 \begin_layout Itemize
6268 Lots of internal joystick refactoring
6269 \end_layout
6271 \begin_layout Itemize
6272 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6273 \end_layout
6275 \begin_layout Itemize
6276 Wxwidgets: Settings mode (open settings without ROM)
6277 \end_layout
6279 \begin_layout Itemize
6280 Wxwidgets: Prompt key to use option
6281 \end_layout
6283 \begin_layout Itemize
6284 Wxwidgets: Fix crash if key goes away underneath
6285 \end_layout
6287 \begin_layout Itemize
6288 Wxwidgets: Fix mouse position in presence of scaling
6289 \end_layout
6291 \begin_layout Itemize
6292 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6293 \end_layout
6295 \begin_layout Itemize
6296 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6297  seem to work well on WinXP)
6298 \end_layout
6300 \begin_layout Itemize
6301 Start paused option.
6302 \end_layout
6304 \begin_layout Subsection
6305 rr1-delta7epsilon1
6306 \end_layout
6308 \begin_layout Itemize
6309 AVI: ZMBV support
6310 \end_layout
6312 \begin_layout Itemize
6313 lsnes-dumpavi: Start Lua before starting dumper
6314 \end_layout
6316 \begin_layout Itemize
6317 AVI: Fix secondary audio in mode 4.
6318 \end_layout
6320 \begin_layout Subsection
6321 rr1-delta7epsilon2
6322 \end_layout
6324 \begin_layout Itemize
6325 AVI: Refactor ZMBV a bit.
6326 \end_layout
6328 \begin_layout Itemize
6329 Fix error reading analog values from movie file
6330 \end_layout
6332 \begin_layout Subsection
6333 rr1-delta8
6334 \end_layout
6336 \begin_layout Itemize
6337 Delayed reset support
6338 \end_layout
6340 \begin_layout Itemize
6341 Lua: memory.hash_region
6342 \end_layout
6344 \begin_layout Subsection
6345 rr1-delta8epsilon1
6346 \end_layout
6348 \begin_layout Itemize
6349 Rework the build system
6350 \end_layout
6352 \begin_layout Itemize
6353 Typing input support
6354 \end_layout
6356 \begin_layout Itemize
6357 Fix building with bsnes v086 and v087.
6358 \end_layout
6360 \begin_layout Itemize
6361 SDL: Save settings on exit
6362 \end_layout
6364 \begin_layout Itemize
6365 SDL: Command to enter command line mode with given command.
6366 \end_layout
6368 \begin_layout Itemize
6369 SDL: More advanced command editing.
6370 \end_layout
6372 \begin_layout Subsection
6373 rr1-delta9
6374 \end_layout
6376 \begin_layout Itemize
6377 wxMSW: Fix the 
6378 \begin_inset Quotes eld
6379 \end_inset
6381 arrow keys and enter don't work
6382 \begin_inset Quotes erd
6383 \end_inset
6385  problem
6386 \end_layout
6388 \begin_layout Itemize
6389 MSU-1 support
6390 \end_layout
6392 \begin_layout Itemize
6393 Show mode changes due to rewinding.
6394 \end_layout
6396 \begin_layout Itemize
6397 Unsafe rewind support
6398 \end_layout
6400 \begin_layout Itemize
6401 Fix directory transversal.
6402 \end_layout
6404 \begin_layout Subsection
6405 rr1-delta10
6406 \end_layout
6408 \begin_layout Itemize
6409 AVI: Sound mode 5 (48kHz high-quality)
6410 \end_layout
6412 \begin_layout Itemize
6413 Lua: Reset Lua VM
6414 \end_layout
6416 \begin_layout Itemize
6417 Map the SNES bus into address space
6418 \end_layout
6420 \begin_layout Itemize
6421 Fix loading memory watch files with CRLF line endings
6422 \end_layout
6424 \begin_layout Subsection
6425 rr1-delta10epsilon1
6426 \end_layout
6428 \begin_layout Itemize
6429 Map bsnes internal state into memory space
6430 \end_layout
6432 \begin_layout Itemize
6433 Fix the 
6434 \begin_inset Quotes eld
6435 \end_inset
6437 click on panel wedges the emulator
6438 \begin_inset Quotes erd
6439 \end_inset
6441  for real.
6442 \end_layout
6444 \begin_layout Itemize
6445 DnD movies/saves on the main window.
6446 \end_layout
6448 \begin_layout Subsection
6449 rr1-delta11
6450 \end_layout
6452 \begin_layout Itemize
6453 Split core bindings into own module.
6454 \end_layout
6456 \begin_layout Itemize
6457 Remember invalid settings
6458 \end_layout
6460 \begin_layout Itemize
6461 Support for modified Gambatte core for GB/GBC emulation.
6462 \end_layout
6464 \begin_layout Itemize
6465 Reload/swap ROM function
6466 \end_layout
6468 \begin_layout Subsection
6469 rr1-delta11epsilon1
6470 \end_layout
6472 \begin_layout Itemize
6473 Fix step poll function
6474 \end_layout
6476 \begin_layout Subsection
6477 rr1-delta12
6478 \end_layout
6480 \begin_layout Itemize
6481 Non-insane savestate anchoring
6482 \end_layout
6484 \begin_layout Subsection
6485 rr1-delta13
6486 \end_layout
6488 \begin_layout Itemize
6489 More Memory search methods
6490 \end_layout
6492 \begin_layout Itemize
6493 Preserve movie if loading in RO mode.
6494 \end_layout
6496 \begin_layout Itemize
6497 Fix a obscure case in timeline check
6498 \end_layout
6500 \begin_layout Itemize
6501 Revamp the entiere ROM loading code
6502 \end_layout
6504 \begin_layout Itemize
6505 Support DnD on ROMs
6506 \end_layout
6508 \begin_layout Itemize
6509 Revamp menu layout
6510 \end_layout
6512 \begin_layout Itemize
6513 Standalone hotkey config dialog
6514 \end_layout
6516 \begin_layout Itemize
6517 Show bindings in more user-friendly format
6518 \end_layout
6520 \begin_layout Subsection
6521 rr1-delta13epsilon1
6522 \end_layout
6524 \begin_layout Itemize
6525 Pipedec support
6526 \end_layout
6528 \begin_layout Itemize
6529 Fix uninitialized variables in bsnes v085
6530 \end_layout
6532 \begin_layout Subsection
6533 rr1-delta14
6534 \end_layout
6536 \begin_layout Itemize
6537 Merge gambatte core into mainline (from its own branch)
6538 \end_layout
6540 \begin_layout Itemize
6541 Wxwidgets: Show expected dump file formats
6542 \end_layout
6544 \begin_layout Itemize
6545 Memory watch: Data typing
6546 \end_layout
6548 \begin_layout Itemize
6549 lsnes internal MMIO area.
6550 \end_layout
6552 \begin_layout Itemize
6553 Wxwidgets: New memory watch editor
6554 \end_layout
6556 \begin_layout Itemize
6557 Hexadecimal memory watches
6558 \end_layout
6560 \begin_layout Itemize
6561 Wxwidgets: Monospaced panel
6562 \end_layout
6564 \begin_layout Itemize
6565 Wxwidgets: Split memory watches in panel
6566 \end_layout
6568 \begin_layout Itemize
6569 Wxwidgets: Disable VMAs in memory search
6570 \end_layout
6572 \begin_layout Itemize
6573 lsnes-dumpavi: Fix speed bug
6574 \end_layout
6576 \begin_layout Itemize
6577 Movie subtitle support
6578 \end_layout
6580 \begin_layout Itemize
6581 Fix rerecord count reporting
6582 \end_layout
6584 \begin_layout Itemize
6585 Don't trash movie when loading in readonly mode.
6586 \end_layout
6588 \begin_layout Subsection
6589 rr1-delta14epsilon1
6590 \end_layout
6592 \begin_layout Itemize
6593 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
6594 \end_layout
6596 \begin_layout Itemize
6597 Fix build on Mac OS X.
6598 \end_layout
6600 \begin_layout Itemize
6601 Lua: loopwrapper
6602 \end_layout
6604 \begin_layout Itemize
6605 Wxwidgets: Hidable messages window
6606 \end_layout
6608 \begin_layout Itemize
6609 Lua: input.joyset
6610 \end_layout
6612 \begin_layout Itemize
6613 Bsnes: Support inconsistent saves
6614 \end_layout
6616 \begin_layout Itemize
6617 Bsnes: Allow simulating saving every frame
6618 \end_layout
6620 \begin_layout Itemize
6621 Fix desync if savestate is loaded in readonly mode in certain conditions.
6622 \end_layout
6624 \begin_layout Itemize
6625 Wxwidgets: Fix save dialogs on Mac OS X.
6626 \end_layout
6628 \begin_layout Itemize
6629 Wxwidgets: Fix insane status width on Win32.
6630 \end_layout
6632 \begin_layout Itemize
6633 Wxwidgets: Fix autohold processing to be faster.
6634 \end_layout
6636 \begin_layout Itemize
6637 Wxwidgets: Allow loading ROMs and movies from commandline.
6638 \end_layout
6640 \begin_layout Subsection
6641 rr1-delta15
6642 \end_layout
6644 \begin_layout Itemize
6645 Be a bit smarter with --load
6646 \end_layout
6648 \begin_layout Itemize
6649 Rewrote higher-level parts of audio system
6650 \end_layout
6652 \begin_layout Itemize
6653 Tool to build commentary tracks
6654 \end_layout
6656 \begin_layout Itemize
6657 Lua: input.joyget
6658 \end_layout
6660 \begin_layout Itemize
6661 Gambatte: Add support for SVN358
6662 \end_layout
6664 \begin_layout Itemize
6665 Use builtin font when rendering status panel.
6666 \end_layout
6668 \begin_layout Itemize
6669 Option to detach memory watch to its own window.
6670 \end_layout
6672 \begin_layout Itemize
6673 Recent ROMs/Movies menu
6674 \end_layout
6676 \begin_layout Itemize
6677 Libao support
6678 \end_layout
6680 \begin_layout Itemize
6681 Useful lag counter for SNES games that autopoll
6682 \end_layout
6684 \begin_layout Itemize
6685 Fix buffer overflow in gambatte sound output
6686 \end_layout
6688 \begin_layout Subsection
6689 rr1-delta15epsilon1
6690 \end_layout
6692 \begin_layout Itemize
6693 Don't blow up on wxGTK if the window is hidden somehow
6694 \end_layout
6696 \begin_layout Itemize
6697 Support simultaneous drop of ROM and movie.
6698 \end_layout
6700 \begin_layout Itemize
6701 Gambatte: Don't save spurious SRAMs.
6702 \end_layout
6704 \begin_layout Itemize
6705 Make SGB ROMs actually usable.
6706 \end_layout
6708 \begin_layout Itemize
6709 Fix so that saved movies appear in recent movies.
6710 \end_layout
6712 \begin_layout Itemize
6713 Don't open multiple commentary editors at once.
6714 \end_layout
6716 \begin_layout Subsection
6717 rr1-delta15epsilon2
6718 \end_layout
6720 \begin_layout Itemize
6721 Lua: memory.readregion/memory.writeregion
6722 \end_layout
6724 \begin_layout Itemize
6725 Lua: memory.map{,s}{byte,word,dword,qword}
6726 \end_layout
6728 \begin_layout Itemize
6729 Lua: memory.map_structure
6730 \end_layout
6732 \begin_layout Itemize
6733 Lua: Fix bus_address for gambatte
6734 \end_layout
6736 \begin_layout Itemize
6737 Fix features dependent of bsnes debugger
6738 \end_layout
6740 \begin_layout Itemize
6741 Cleanup bsnes debugger logic
6742 \end_layout
6744 \begin_layout Itemize
6745 Fix resets in presence of save every frame
6746 \end_layout
6748 \begin_layout Subsection
6749 rr1-delta15epsilon3
6750 \end_layout
6752 \begin_layout Itemize
6753 Lua: input.lcid_to_pcid
6754 \end_layout
6756 \begin_layout Itemize
6757 Fix off-by-one bug with slot hashes
6758 \end_layout
6760 \begin_layout Itemize
6761 Fix crashes on certain memory watch expressions
6762 \end_layout
6764 \begin_layout Itemize
6765 Lua: memory.read_expr
6766 \end_layout
6768 \begin_layout Itemize
6769 Lua: Fix memory.read_expr on nil argument
6770 \end_layout
6772 \begin_layout Itemize
6773 Fix the code to compile on G++ 4.7
6774 \end_layout
6776 \begin_layout Itemize
6777 Change button_id to be a function pointer field, not a virtual method
6778 \end_layout
6780 \begin_layout Itemize
6781 Add bsnes patches to fix libsnes to compile on GCC 4.7
6782 \end_layout
6784 \begin_layout Itemize
6785 Gambatte: Always use legacy lag counting
6786 \end_layout
6788 \begin_layout Itemize
6789 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
6790 \end_layout
6792 \begin_layout Itemize
6793 Fix analog controllers
6794 \end_layout
6796 \begin_layout Itemize
6797 Fix autohold menus
6798 \end_layout
6800 \begin_layout Itemize
6801 Fix button symbols in input display
6802 \end_layout
6804 \begin_layout Itemize
6805 Compensate for nuts bsnes superscope/justifier handling
6806 \end_layout
6808 \begin_layout Itemize
6809 Lua: Fix bit.extract boolean handling
6810 \end_layout
6812 \begin_layout Subsection
6813 rr2-beta0
6814 \end_layout
6816 \begin_layout Itemize
6817 Split emulation cores more from the rest
6818 \end_layout
6820 \begin_layout Itemize
6821 Support having multiple emulation cores compiled at once
6822 \end_layout
6824 \begin_layout Itemize
6825 Support arbitrary number of ports (well, up to 31 anyway).
6826 \end_layout
6828 \begin_layout Itemize
6829 SNES debugger support
6830 \end_layout
6832 \begin_layout Itemize
6833 Support 16-button controllers
6834 \end_layout
6836 \begin_layout Itemize
6837 Remove old SDL front end
6838 \end_layout
6840 \begin_layout Itemize
6841 Data-driven controller buttons
6842 \end_layout
6844 \begin_layout Itemize
6845 Generate the port code from defines
6846 \end_layout
6848 \begin_layout Subsection
6849 rr2-beta1
6850 \end_layout
6852 \begin_layout Itemize
6853 Update libgambatte to SVN364
6854 \end_layout
6856 \begin_layout Itemize
6857 Get rid of partial linking (building with MXE works)
6858 \end_layout
6860 \begin_layout Itemize
6861 Load XML even without gamepack files
6862 \end_layout
6864 \begin_layout Itemize
6865 Support screen rotate & flip
6866 \end_layout
6868 \begin_layout Itemize
6869 Fix bug when changing controller key to another subkey of the same key
6870 \end_layout
6872 \begin_layout Subsection
6873 rr1-delta16
6874 \end_layout
6876 \begin_layout Itemize
6877 Stop at movie end: Don't off-by-one
6878 \end_layout
6880 \begin_layout Itemize
6881 Fix crash closing lsnes with voice playback active.
6882 \end_layout
6884 \begin_layout Itemize
6885 Import/Export OggOpus for commentary tracks
6886 \end_layout
6888 \begin_layout Itemize
6889 16-button controllers.
6890 \end_layout
6892 \begin_layout Itemize
6893 Don't show nonexistent controllers in input display
6894 \end_layout
6896 \begin_layout Itemize
6897 Set voice record/playback volume from UI
6898 \end_layout
6900 \begin_layout Itemize
6901 Patches for gambatte SVN364.
6902 \end_layout
6904 \begin_layout Itemize
6905 Load markup (if exists) even without gamepack file.
6906 \end_layout
6908 \begin_layout Itemize
6909 Screen rotation & flipping
6910 \end_layout
6912 \begin_layout Itemize
6913 Lua: Some new bit functions
6914 \end_layout
6916 \begin_layout Itemize
6917 Auto-refresh voice streams on change.
6918 \end_layout
6920 \begin_layout Itemize
6921 Auto-refresh subtitles on change & new subtitle editor.
6922 \end_layout
6924 \begin_layout Itemize
6925 Fix music volume adjustment.
6926 \end_layout
6928 \begin_layout Subsection
6929 rr2-beta2
6930 \end_layout
6932 \begin_layout Itemize
6933 Use system threads instead of platform threads
6934 \end_layout
6936 \begin_layout Itemize
6937 Cleanup build by allowing dummy and real drivers to link together.
6938 \end_layout
6940 \begin_layout Itemize
6941 Split duplex support
6942 \end_layout
6944 \begin_layout Subsection
6945 rr1-delta16epsilon1
6946 \end_layout
6948 \begin_layout Itemize
6949 Wxwidgets: Fix memory watch rendering.
6950 \end_layout
6952 \begin_layout Itemize
6953 Wxwidgets: Allow setting voice stream gain.
6954 \end_layout
6956 \begin_layout Itemize
6957 Wxwidgets: VU meters and volume adjustment.
6958 \end_layout
6960 \begin_layout Itemize
6961 Lua: Custom fonts support.
6962 \end_layout
6964 \begin_layout Itemize
6965 Lua: Fix methods stopping working when resetting Lua.
6966 \end_layout
6968 \begin_layout Itemize
6969 Fix loading standard-format movies in preserve (readonly) mode.
6970 \end_layout
6972 \begin_layout Subsection
6973 rr1-delta17
6974 \end_layout
6976 \begin_layout Itemize
6977 Primitive movie editor
6978 \end_layout
6980 \begin_layout Itemize
6981 Fix VU meter with no sound device.
6982 \end_layout
6984 \begin_layout Itemize
6985 Fix various undefined return values.
6986 \end_layout
6988 \begin_layout Itemize
6989 Show rates in VU meter window.
6990 \end_layout
6992 \begin_layout Subsection
6993 rr2-beta3
6994 \end_layout
6996 \begin_layout Itemize
6997 Lua: Render queues as objects
6998 \end_layout
7000 \begin_layout Itemize
7001 Bsnes: support hard resets
7002 \end_layout
7004 \begin_layout Itemize
7005 Dedicated sound devices dialog
7006 \end_layout
7008 \begin_layout Itemize
7009 Change the default AVI sound mode to 2 or 5.
7010 \end_layout
7012 \begin_layout Itemize
7013 Fix totally borked movie saving.
7014 \end_layout
7016 \begin_layout Itemize
7017 Portaudio: Use split duplex with different devices.
7018 \end_layout
7020 \begin_layout Itemize
7021 Fix controls with gambatte core.
7022 \end_layout
7024 \begin_layout Itemize
7025 Modify save slot set handling.
7026 \end_layout
7028 \begin_layout Itemize
7029 lsnes-dumpavi: --firmware-path.
7030 \end_layout
7032 \begin_layout Itemize
7033 Fix lots of compiler warnings.
7034 \end_layout
7036 \begin_layout Subsection
7037 rr1-delta17epsilon1
7038 \end_layout
7040 \begin_layout Itemize
7041 Commentary tool: Set nominal bit rate and limit max bit rate.
7042 \end_layout
7044 \begin_layout Itemize
7045 Lua: Unconditionally reload host memory on loadstate
7046 \end_layout
7048 \begin_layout Itemize
7049 Lua: Query bindings, manipulate aliases, create inverse bindings
7050 \end_layout
7052 \begin_layout Itemize
7053 Lua: Fix crashes with resetting VM while some types of paint requests are
7054  in flight.
7055 \end_layout
7057 \begin_layout Itemize
7058 Lua: gui.text: Clip the text properly instead of corrupting memory in some
7059  cases.
7060 \end_layout
7062 \begin_layout Itemize
7063 Save screenshot header reliably
7064 \end_layout
7066 \begin_layout Itemize
7067 Lua: Backport input.get2 and input.set2
7068 \end_layout
7070 \begin_layout Itemize
7071 Lua: New controller info functions.
7072 \end_layout
7074 \begin_layout Itemize
7075 Movie editor: Fix reset delay counters to be the right way around.
7076 \end_layout
7078 \begin_layout Itemize
7079 Lua: on_snoop2
7080 \end_layout
7082 \begin_layout Itemize
7083 Lua: on_button and input.veto_button.
7084 \end_layout
7086 \begin_layout Subsection
7087 rr2-beta4
7088 \end_layout
7090 \begin_layout Itemize
7091 Revert memory leak fix breaking input
7092 \end_layout
7094 \begin_layout Itemize
7095 Refactor Opus handling
7096 \end_layout
7098 \begin_layout Itemize
7099 Restrict member picking only to .zip files
7100 \end_layout
7102 \begin_layout Itemize
7103 Fix reading of host-endian VMAs.
7104 \end_layout
7106 \begin_layout Itemize
7107 Fix rlow and rhigh to be the right way around.
7108 \end_layout
7110 \begin_layout Itemize
7111 Lua: Don't wedge VM if callback fails with an exception
7112 \end_layout
7114 \begin_layout Itemize
7115 Refactor Ogg handling.
7116 \end_layout
7118 \end_body
7119 \end_document