More cleanup via initializer lists
[lsnes.git] / manual.lyx
blob13e43d1ee00ba1d12236bc5b45d05207560e7b4e
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options true
7 \maintain_unincluded_children false
8 \language finnish
9 \language_package default
10 \inputencoding auto
11 \fontencoding global
12 \font_roman default
13 \font_sans default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
17 \font_sc false
18 \font_osf false
19 \font_sf_scale 100
20 \font_tt_scale 100
22 \graphics default
23 \default_output_format default
24 \output_sync 0
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
28 \use_hyperref false
29 \papersize default
30 \use_geometry false
31 \use_amsmath 1
32 \use_esint 1
33 \use_mhchem 1
34 \use_mathdots 1
35 \cite_engine basic
36 \use_bibtopic false
37 \use_indices false
38 \paperorientation portrait
39 \suppress_date false
40 \use_refstyle 1
41 \index Hakusana
42 \shortcut idx
43 \color #008000
44 \end_index
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle default
53 \tracking_changes false
54 \output_changes false
55 \html_math_output 0
56 \html_css_as_file 0
57 \html_be_strict false
58 \end_header
60 \begin_body
62 \begin_layout Section
63 Introduction
64 \end_layout
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
68 \end_layout
70 \begin_layout Section
71 Dependencies
72 \end_layout
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
94 \end_layout
96 \begin_deeper
97 \begin_layout Enumerate
98 SVN r320, r358 or r364
99 \end_layout
101 \begin_layout Enumerate
102 Patched with included patches
103 \end_layout
105 \end_deeper
106 \begin_layout Enumerate
107 Zlib
108 \end_layout
110 \begin_layout Enumerate
111 boost_iostreams
112 \end_layout
114 \begin_layout Enumerate
115 boost_filesystem
116 \end_layout
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
120 \end_layout
122 \begin_layout Enumerate
123 libsdl (SDL only)
124 \end_layout
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
128 \end_layout
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
132 \end_layout
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
136 \end_layout
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
140 \end_layout
142 \begin_layout Enumerate
143 libao (libao sound only)
144 \end_layout
146 \begin_layout Enumerate
147 Lua version 5.1.X or 5.2.X
148 \end_layout
150 \begin_layout Enumerate
151 G++ 4.6 or 4.7
152 \end_layout
154 \begin_layout Enumerate
155 libopus (optional, for commentary track tool)
156 \end_layout
158 \begin_layout Section
159 Building
160 \end_layout
162 \begin_layout Itemize
163 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
164  bsnes core).
165 \end_layout
167 \begin_layout Itemize
168 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
169 \end_layout
171 \begin_layout Itemize
172 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
173 >', bsnes core)
174 \end_layout
176 \begin_layout Itemize
177 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
178 ersion>', gambatte core)
179 \end_layout
181 \begin_layout Itemize
182 Edit options.build (or copy of that file)
183 \end_layout
185 \begin_layout Itemize
186 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
188 \end_layout
190 \begin_layout Section
191 Command line options
192 \end_layout
194 \begin_layout Subsection
195 Wxwidgets options
196 \end_layout
198 \begin_layout Subsubsection
199 --rom=<file>
200 \end_layout
202 \begin_layout Standard
203 Load <file> as ROM.
204 \end_layout
206 \begin_layout Subsubsection
207 <file>
208 \end_layout
210 \begin_layout Standard
211 Load <file> as ROM.
212 \end_layout
214 \begin_layout Subsubsection
215 --load=<file>
216 \end_layout
218 \begin_layout Standard
219 Load <file> as movie or savestate file on startup.
220 \end_layout
222 \begin_layout Subsubsection
223 --settings
224 \end_layout
226 \begin_layout Standard
227 Instead of starting the emulator, only display the settings.
228 \end_layout
230 \begin_layout Subsubsection
231 --lua=<file>
232 \end_layout
234 \begin_layout Standard
235 Run this Lua file on startup
236 \end_layout
238 \begin_layout Subsection
239 dump options (lsnes-dumpavi only)
240 \end_layout
242 \begin_layout Subsubsection
243 --rom=<file>
244 \end_layout
246 \begin_layout Standard
247 Load <file> as ROM.
248  Required.
249 \end_layout
251 \begin_layout Subsubsection
252 <filename>
253 \end_layout
255 \begin_layout Standard
256 Load <filename> as movie or savestate file on startup.
257  Required.
258 \end_layout
260 \begin_layout Subsubsection
261 --dumper=<dumper>
262 \end_layout
264 \begin_layout Standard
265 Set the dumper to use (required).
266  Use 'list' for listing of known dumpers.
267 \end_layout
269 \begin_layout Subsubsection
270 --firmware-path=<path>
271 \end_layout
273 \begin_layout Standard
274 Set path to look for firmware.
275 \end_layout
277 \begin_layout Subsubsection
278 --mode=<mode>
279 \end_layout
281 \begin_layout Standard
282 Set the mode to use (required for dumpers with multiple modes, forbidden
283  otherwise).
284  Use 'list' for known modes.
285 \end_layout
287 \begin_layout Subsubsection
288 --prefix=<prefix>
289 \end_layout
291 \begin_layout Standard
292 Set dump prefix.
293  Default is 
294 \begin_inset Quotes eld
295 \end_inset
297 avidump
298 \begin_inset Quotes erd
299 \end_inset
302 \end_layout
304 \begin_layout Subsubsection
305 --option=<name>=<value>
306 \end_layout
308 \begin_layout Standard
309 Set option <name> to value <value>.
310 \end_layout
312 \begin_layout Subsubsection
313 --length=<length>
314 \end_layout
316 \begin_layout Standard
317 Set number of frames to dump.
318  Mandatory.
319 \end_layout
321 \begin_layout Subsubsection
322 --lua=<script>
323 \end_layout
325 \begin_layout Standard
326 Run specified lua script (lsnes-dumpavi does not have initialization files).
327 \end_layout
329 \begin_layout Subsubsection
330 --load-library=<library>
331 \end_layout
333 \begin_layout Standard
334 Load the specified shared object / dynamic library / dynamic link library.
335 \end_layout
337 \begin_layout Subsection
338 lsnes settings directory
339 \end_layout
341 \begin_layout Standard
342 The lsnes settings directory is (in order of decreasing perference):
343 \end_layout
345 \begin_layout Itemize
346 Windows: %APPDATA%
347 \backslash
348 lsnes (if %APPDATA% exists)
349 \end_layout
351 \begin_layout Itemize
352 Unix: $XDG_CONFIG_HOME/lsnes (if $XDG_CONFIG_HOME exists)
353 \end_layout
355 \begin_layout Itemize
356 Unix: $HOME/.config/lsnes (if $HOME exists)
357 \end_layout
359 \begin_layout Itemize
360 All: .
361  (fallback default).
362 \end_layout
364 \begin_layout Standard
365 If leading directories do not exist, attempt to create them is made.
366 \end_layout
368 \begin_layout Section
369 Internal commands
370 \end_layout
372 \begin_layout Itemize
373 Commands beginning with '*' invoke the corresponding command without alias
374  expansion.
375 \end_layout
377 \begin_layout Itemize
378 If command starts with '+' (after possible '*'), the command is executed
379  as-is when button is pressed, and when button is released, it is executed
380  with '+' replaced by '-'.
381 \end_layout
383 \begin_layout Itemize
384 Commands without '+' execute only on negative edge (release).
385 \end_layout
387 \begin_layout Subsection
388 run-script <script>
389 \end_layout
391 \begin_layout Standard
392 Run <script> as if commands were entered on the command line.
393 \end_layout
395 \begin_layout Subsection
396 Memory manipulation
397 \end_layout
399 \begin_layout Standard
400 <address> may be decimal or hexadecimal (prefixed with '0x').
401  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
402  with '-') decimal.
403 \end_layout
405 \begin_layout Standard
406 The available element <sizes> are:
407 \end_layout
409 \begin_layout Itemize
410 byte: 1 byte
411 \end_layout
413 \begin_layout Itemize
414 word: 2 bytes
415 \end_layout
417 \begin_layout Itemize
418 dword: 4 bytes
419 \end_layout
421 \begin_layout Itemize
422 qword: 8 bytes
423 \end_layout
425 \begin_layout Standard
426 When reading RAM and ROM, multi-byte reads/writes are big-endian.
427  When dealing with DSP memory, multi-byte reads/writes are native-endian
428  (do not use operand sizes exceeding DSP bitness, except dword is OK for
429  24-bit memory).
430 \end_layout
432 \begin_layout Subsubsection
433 read-<size> <address>
434 \end_layout
436 \begin_layout Standard
437 Read the value of byte in <address>.
438 \end_layout
440 \begin_layout Subsubsection
441 read-s<size> <address>
442 \end_layout
444 \begin_layout Standard
445 Read the value of signed byte in <address>.
446 \end_layout
448 \begin_layout Subsubsection
449 write-<size> <address> <value>
450 \end_layout
452 \begin_layout Standard
453 Write <value> to byte in address <address>.
454 \end_layout
456 \begin_layout Subsection
457 Main commands
458 \end_layout
460 \begin_layout Standard
461 These commands are not available in lsnesrc, but are available after ROM
462  has been loaded.
463 \end_layout
465 \begin_layout Subsubsection
466 quit-emulator
467 \end_layout
469 \begin_layout Standard
470 Quits the emulator.
471 \end_layout
473 \begin_layout Subsubsection
474 pause-emulator
475 \end_layout
477 \begin_layout Standard
478 Toggle paused/unpaused
479 \end_layout
481 \begin_layout Subsubsection
482 +advance-frame 
483 \end_layout
485 \begin_layout Standard
486 Advance frame.
487  If the button is still held after configurable timeout expires, game unpauses
488  for the duration frame advance is held.
489 \end_layout
491 \begin_layout Subsubsection
492 +advance-poll 
493 \end_layout
495 \begin_layout Standard
496 Advance subframe.
497  If the button is still held after configurable timeout expires, game unpauses
498  for the duration frame advance is held.
499 \end_layout
501 \begin_layout Subsubsection
502 advance-skiplag 
503 \end_layout
505 \begin_layout Standard
506 Skip to first poll in frame after current.
507 \end_layout
509 \begin_layout Subsubsection
510 reset 
511 \end_layout
513 \begin_layout Standard
514 Reset the SNES after this frame.
515 \end_layout
517 \begin_layout Subsubsection
518 load <filename> 
519 \end_layout
521 \begin_layout Standard
522 Load savestate <filename> in current mode.
523 \end_layout
525 \begin_layout Subsubsection
526 load-state <filename> 
527 \end_layout
529 \begin_layout Standard
530 Load savestate <filename> in readwrite mode.
531 \end_layout
533 \begin_layout Subsubsection
534 load-readonly <filename> 
535 \end_layout
537 \begin_layout Standard
538 Load savestate <filename> in readonly mode.
539 \end_layout
541 \begin_layout Subsubsection
542 load-preserve <filename> 
543 \end_layout
545 \begin_layout Standard
546 Load savestate <filename> in readonly mode, preserving current events.
547 \end_layout
549 \begin_layout Subsubsection
550 load-movie <filename> 
551 \end_layout
553 \begin_layout Standard
554 Load savestate <filename>, ignoring save part in readonly mode.
555 \end_layout
557 \begin_layout Subsubsection
558 save-state <filename> 
559 \end_layout
561 \begin_layout Standard
562 Save system state to <filename> as soon as possible.
563 \end_layout
565 \begin_layout Subsubsection
566 save-movie <filename> 
567 \end_layout
569 \begin_layout Standard
570 Save movie to <filename>.
571 \end_layout
573 \begin_layout Subsubsection
574 set-rwmode 
575 \end_layout
577 \begin_layout Standard
578 Set read-write mode.
579 \end_layout
581 \begin_layout Subsubsection
582 set-romode 
583 \end_layout
585 \begin_layout Standard
586 Set read-only mode
587 \end_layout
589 \begin_layout Subsubsection
590 toggle-rwmode 
591 \end_layout
593 \begin_layout Standard
594 Toggle between read-only and read-write modes.
595 \end_layout
597 \begin_layout Subsubsection
598 test-1, test-2, test-3
599 \end_layout
601 \begin_layout Standard
602 Internal test commands.
603  Don't use.
604 \end_layout
606 \begin_layout Subsubsection
607 take-screenshot <filename> 
608 \end_layout
610 \begin_layout Standard
611 Save screenshot to <filename>.
612 \end_layout
614 \begin_layout Subsubsection
615 +controller <class>-<#>-<button>
616 \end_layout
618 \begin_layout Standard
619 Press button <button> on controller <num> of class <class>.
620 \end_layout
622 \begin_layout Itemize
623 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
624  ext0, ext1, ext2, ext3
625 \end_layout
627 \begin_layout Itemize
628 Class 'mouse': L, R
629 \end_layout
631 \begin_layout Itemize
632 Class 'superscope': trigger, cursor, turbo, pause
633 \end_layout
635 \begin_layout Itemize
636 Class 'justifier': trigger, start
637 \end_layout
639 \begin_layout Itemize
640 Class 'gb': A, B, select, start, up, down, left, right
641 \end_layout
643 \begin_layout Subsubsection
644 hold-controller <class>-<#>-<button>
645 \end_layout
647 \begin_layout Standard
648 Hold/unhold button <button> on controller <num> of class <class>.
649 \end_layout
651 \begin_layout Subsubsection
652 type-controller <class>-<#>-<button>
653 \end_layout
655 \begin_layout Standard
656 Hold/unhold button <button> on controller <num> of class <class> for the
657  next frame.
658  See +controller for button names.
659 \end_layout
661 \begin_layout Standard
662 Cauntion: Does not work properly if outside frame advance.
663 \end_layout
665 \begin_layout Subsubsection
666 +autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
667 \end_layout
669 \begin_layout Standard
670 Start autofire.
671  If duty is not specified, defaults to 1.
672  If <cyclelen> is not specified, defaults to 2.
673 \end_layout
675 \begin_layout Subsubsection
676 -autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
677 \end_layout
679 \begin_layout Standard
680 End autofire.
681 \end_layout
683 \begin_layout Subsubsection
684 autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
685 \end_layout
687 \begin_layout Standard
688 Toggle autofire.
689  If autofire is turned on, specified cycle is used.
690 \end_layout
692 \begin_layout Subsubsection
693 designate-position <class>-<#>-analog<n>
694 \end_layout
696 \begin_layout Standard
697 Designate position for analog pair.
698  <n> is only there if there are multiple axis pairs.
699 \end_layout
701 \begin_layout Subsubsection
702 repaint
703 \end_layout
705 \begin_layout Standard
706 Force a repaint.
707 \end_layout
709 \begin_layout Subsubsection
710 toggle-pause-on-end
711 \end_layout
713 \begin_layout Standard
714 Toggle pause on end flag.
715 \end_layout
717 \begin_layout Subsubsection
718 set-pause-on-end
719 \end_layout
721 \begin_layout Standard
722 Set pause on end flag.
723 \end_layout
725 \begin_layout Subsubsection
726 clear-pause-on-end
727 \end_layout
729 \begin_layout Standard
730 Clear pause on end flag.
731 \end_layout
733 \begin_layout Subsubsection
734 action <action> [<parameters>]
735 \end_layout
737 \begin_layout Standard
738 Run specified core action.
739 \end_layout
741 \begin_layout Subsection
742 Save jukebox 
743 \end_layout
745 \begin_layout Subsubsection
746 cycle-jukebox-backward
747 \end_layout
749 \begin_layout Standard
750 Cycle save jukebox backwards.
751 \end_layout
753 \begin_layout Subsubsection
754 cycle-jukebox-forward
755 \end_layout
757 \begin_layout Standard
758 Cycle save jukebox forwards
759 \end_layout
761 \begin_layout Subsubsection
762 load-jukebox
763 \end_layout
765 \begin_layout Standard
766 Do load from jukebox (current mode).
767 \end_layout
769 \begin_layout Subsubsection
770 save-jukebox
771 \end_layout
773 \begin_layout Standard
774 Do state save to jukebox.
775 \end_layout
777 \begin_layout Subsection
778 Lua 
779 \end_layout
781 \begin_layout Subsubsection
782 evaluate-lua <luacode>
783 \end_layout
785 \begin_layout Standard
786 Run Lua code <luacode> using built-in Lua interpretter.
787 \end_layout
789 \begin_layout Subsubsection
790 run-lua <script>
791 \end_layout
793 \begin_layout Standard
794 Run specified lua file using built-in Lua interpretter.
795 \end_layout
797 \begin_layout Subsubsection
798 reset-lua
799 \end_layout
801 \begin_layout Standard
802 Clear the Lua VM state and restore to factory defaults.
803 \end_layout
805 \begin_layout Subsection
806 Memory watch
807 \end_layout
809 \begin_layout Subsubsection
810 add-watch <name> <expression>
811 \end_layout
813 \begin_layout Standard
814 Adds new watch (or modifies old one).
815 \end_layout
817 \begin_layout Subsubsection
818 remove-watch <name>
819 \end_layout
821 \begin_layout Standard
822 Remove a watch.
823 \end_layout
825 \begin_layout Subsection
826 Sound 
827 \end_layout
829 \begin_layout Subsubsection
830 enable-sound <on/off> 
831 \end_layout
833 \begin_layout Standard
834 Enable/Disable sound.
835 \end_layout
837 \begin_layout Subsection
838 Misc.
839 \end_layout
841 \begin_layout Subsubsection
842 reload-rom [<file>]
843 \end_layout
845 \begin_layout Standard
846 Reloads the main ROM image from <file>.
847 \end_layout
849 \begin_layout Subsubsection
850 +tangent
851 \end_layout
853 \begin_layout Standard
854 Tangent for recording voice for commentary track.
855  While pressed, record a stream.
856 \end_layout
858 \begin_layout Subsubsection
859 advance-subframe-timeout
860 \end_layout
862 \begin_layout Standard
863 Subframe advance timeout in milliseconds.
864  Default is 100.
865 \end_layout
867 \begin_layout Section
868 Settings
869 \end_layout
871 \begin_layout Subsection
872 Core settings
873 \end_layout
875 \begin_layout Subsection
876 AVI dumper settings
877 \end_layout
879 \begin_layout Subsubsection
880 avi-large
881 \end_layout
883 \begin_layout Standard
884 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
885  outputs.
886 \end_layout
888 \begin_layout Subsubsection
889 avi-left-border
890 \end_layout
892 \begin_layout Standard
893 AVI dumper: Set the default left border thickness (unless lua overrides)
894  for dumps.
895  Range 0-8191.
896  Default is 0.
897 \end_layout
899 \begin_layout Subsubsection
900 avi-right-border
901 \end_layout
903 \begin_layout Standard
904 AVI dumper: Set the default right border thickness (unless lua overrides)
905  for dumps.
906  Range 0-8191.
907  Default is 0.
908 \end_layout
910 \begin_layout Subsubsection
911 avi-top-border
912 \end_layout
914 \begin_layout Standard
915 AVI dumper: Set the default top border thickness (unless lua overrides)
916  for dumps.
917  Range 0-8191.
918  Default is 0.
919 \end_layout
921 \begin_layout Subsubsection
922 avi-bottom-border
923 \end_layout
925 \begin_layout Standard
926 AVI dumper: Set the default bottom border thickness (unless lua overrides)
927  for dumps.
928  Range 0-8191.
929  Default is 0.
930 \end_layout
932 \begin_layout Subsubsection
933 avi-maxframes
934 \end_layout
936 \begin_layout Standard
937 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
938  Range 0-999999999.
939  Default is 0.
940 \end_layout
942 \begin_layout Subsubsection
943 avi-compresison
944 \end_layout
946 \begin_layout Standard
947 AVI dumper: Compression level (0-18).
948 \end_layout
950 \begin_layout Itemize
951 Compression levels 10 and above are not compatible with stock CSCD codec.
952 \end_layout
954 \begin_layout Itemize
955 Recomended level is 7.
956 \end_layout
958 \begin_layout Subsubsection
959 avi-soundrate
960 \end_layout
962 \begin_layout Standard
963 AVI dumper: Set method of determining the sound rate.
964 \end_layout
966 \begin_layout Itemize
967 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
968  128, 176.4 and 192 kHz.
969 \end_layout
971 \begin_layout Itemize
972 1: Round down to nearest integer.
973 \end_layout
975 \begin_layout Itemize
976 2: Round up to nearest ingeter.
977 \end_layout
979 \begin_layout Itemize
980 3: Multiply by denominator.
981 \end_layout
983 \begin_layout Itemize
984 4: High quality 44.1kHz (SRC needed).
985 \end_layout
987 \begin_layout Itemize
988 5: High quality 48kHz (SRC needed).
989 \end_layout
991 \begin_layout Subsection
992 JMD options
993 \end_layout
995 \begin_layout Subsubsection
996 jmd-compression
997 \end_layout
999 \begin_layout Standard
1000 JMD dumper: Compression level (0-9).
1001 \end_layout
1003 \begin_layout Section
1004 Lua functions
1005 \end_layout
1007 \begin_layout Subsection
1008 Core (in main table)
1009 \end_layout
1011 \begin_layout Subsubsection
1012 print
1013 \end_layout
1015 \begin_layout Standard
1016 Print line to message console.
1017 \end_layout
1019 \begin_layout Subsubsection
1020 exec(string command)
1021 \end_layout
1023 \begin_layout Standard
1024 Run command as it was entered on the command line
1025 \end_layout
1027 \begin_layout Subsubsection
1028 utime()
1029 \end_layout
1031 \begin_layout Standard
1032 Returns two values.
1033  First is time since some epoch in seconds, the second is microseconds mod
1034  10^6 since that epoch.
1035 \end_layout
1037 \begin_layout Subsubsection
1038 emulator_ready()
1039 \end_layout
1041 \begin_layout Standard
1042 Returns true if emulator has finished booting, false if not (on_startup()
1043  will be issued later).
1044 \end_layout
1046 \begin_layout Subsubsection
1047 set_idle_timeout(number timeout)
1048 \end_layout
1050 \begin_layout Standard
1051 Set number of microseconds to block idle for.
1052  After this timeout has expired, on_idle() will be called once.
1053 \end_layout
1055 \begin_layout Subsubsection
1056 set_timer_timeout(number timeout)
1057 \end_layout
1059 \begin_layout Standard
1060 Set number of microseconds to block timer for.
1061  After this timeout has expired, on_timer() will be called once.
1062 \end_layout
1064 \begin_layout Subsubsection
1065 bus_address(number snesaddr)
1066 \end_layout
1068 \begin_layout Standard
1069 Returns virtual address corresponding to specified address on SNES bus.
1070 \end_layout
1072 \begin_layout Subsubsection
1073 loopwrapper(function fun, ...)
1074 \end_layout
1076 \begin_layout Standard
1077 Calls function fun with function and specified arguments.
1078  The function passed suspends execution until the function returned is called.
1079  Handy for linear flow control among multiple invocations of a hook.
1080  Example code:
1081 \end_layout
1083 \begin_layout LyX-Code
1084 on_paint = loopwrapper(function(wait)
1085 \end_layout
1087 \begin_deeper
1088 \begin_layout LyX-Code
1089 while true do
1090 \end_layout
1092 \begin_deeper
1093 \begin_layout LyX-Code
1094 gui.text(0, 0, 
1095 \begin_inset Quotes eld
1096 \end_inset
1098 Test!
1099 \begin_inset Quotes erd
1100 \end_inset
1103 \end_layout
1105 \begin_layout LyX-Code
1106 wait();
1107 \end_layout
1109 \end_deeper
1110 \begin_layout LyX-Code
1112 \end_layout
1114 \end_deeper
1115 \begin_layout LyX-Code
1116 end);
1117 \end_layout
1119 \begin_layout Subsubsection
1120 list_bindings([string cmd])
1121 \end_layout
1123 \begin_layout Standard
1124 Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
1125  If command is specified, the table is limited to that command.
1126  Also searches for controller keys.
1127 \end_layout
1129 \begin_layout Subsubsection
1130 get_alias(string aname)
1131 \end_layout
1133 \begin_layout Standard
1134 Get expansion of given alias.
1135 \end_layout
1137 \begin_layout Subsubsection
1138 set_alias(string aname, string value)
1139 \end_layout
1141 \begin_layout Standard
1142 Set expansion of given alias.
1143 \end_layout
1145 \begin_layout Subsubsection
1146 create_ibind(string name, string cmd)
1147 \end_layout
1149 \begin_layout Standard
1150 Return object representing inverse binding with specified name and specified
1151  command.
1152 \end_layout
1154 \begin_layout Itemize
1155 To create press/release commands, use aliases +foo and -foo .
1156 \end_layout
1158 \begin_layout Itemize
1159 Keep the returned object around.
1160 \end_layout
1162 \begin_layout Subsubsection
1163 create_command(string name, function a[, function b])
1164 \end_layout
1166 \begin_layout Standard
1167 Return object representing a command (pair).
1168 \end_layout
1170 \begin_layout Itemize
1171 If b is NIL, the command is level-sensitive, a is callback.
1172 \end_layout
1174 \begin_layout Itemize
1175 If b is function, the function is edge-sensitive, a is positive edge callback
1176  and b is negative edge callback.
1177 \end_layout
1179 \begin_layout Itemize
1180 All callbacks get single argument: The parameters passed.
1181 \end_layout
1183 \begin_layout Itemize
1184 Keep the returned object around.
1185 \end_layout
1187 \begin_layout Subsection
1188 Table bit:
1189 \end_layout
1191 \begin_layout Standard
1192 Bitwise logical functions and related.
1193 \end_layout
1195 \begin_layout Subsubsection
1196 bit.none(number...) / bit.bnot(number...)
1197 \end_layout
1199 \begin_layout Standard
1200 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1201  arguments).
1202 \end_layout
1204 \begin_layout Subsubsection
1205 bit.any(number...) / bit.bor(number...)
1206 \end_layout
1208 \begin_layout Standard
1209 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1210 \end_layout
1212 \begin_layout Subsubsection
1213 bit.all(number...) / bit.band(number...)
1214 \end_layout
1216 \begin_layout Standard
1217 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1219 \end_layout
1221 \begin_layout Subsubsection
1222 bit.parity(number...) / bit.bxor(number...)
1223 \end_layout
1225 \begin_layout Standard
1226 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1227  of the arguments).
1228 \end_layout
1230 \begin_layout Subsubsection
1231 bit.lrotate(number base[, number amount[, number bits]])
1232 \end_layout
1234 \begin_layout Standard
1235 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1236 \end_layout
1238 \begin_layout Subsubsection
1239 bit.rrotate(number base[, number amount[, number bits]])
1240 \end_layout
1242 \begin_layout Standard
1243 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1244  places.
1245 \end_layout
1247 \begin_layout Subsubsection
1248 bit.lshift(number base[, number amount[, number bits]])
1249 \end_layout
1251 \begin_layout Standard
1252 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1253  The new bits are filled with zeroes.
1254 \end_layout
1256 \begin_layout Subsubsection
1257 bit.lrshift(number base[, number amount[, number bits]])
1258 \end_layout
1260 \begin_layout Standard
1261 Shift bits-bit (max 48, default 48) number logically right by amount (default
1262  1) places.
1263  The new bits are filled with zeroes.
1264 \end_layout
1266 \begin_layout Subsubsection
1267 bit.arshift(number base[, number amount[, number bits]])
1268 \end_layout
1270 \begin_layout Standard
1271 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1272  (default 1) places.
1273  The new bits are shifted in with copy of the high bit.
1274 \end_layout
1276 \begin_layout Subsubsection
1277 bit.extract(number base[, number bit0[, number bit1,...]])
1278 \end_layout
1280 \begin_layout Standard
1281 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1282 \end_layout
1284 \begin_layout Standard
1285 Notes: 
1286 \end_layout
1288 \begin_layout Itemize
1289 Bit numbers up to 51 should work reliably (then things start falling apart
1290  due to double precision issues).
1291 \end_layout
1293 \begin_layout Itemize
1294 There are two special bit positions, true and false, standing for always
1295  set bit and always clear bit.
1296 \end_layout
1298 \begin_layout Subsubsection
1299 bit.value([number bit1[, number bit2,...]])
1300 \end_layout
1302 \begin_layout Standard
1303 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1304  places and so on.
1305  As special value, nil argument is no-op.
1306 \end_layout
1308 \begin_layout Subsubsection
1309 bit.test_any(number a, number b)
1310 \end_layout
1312 \begin_layout Standard
1313 Returns true if bitwise and of a and b is nonzero, otherwise false.
1314 \end_layout
1316 \begin_layout Subsubsection
1317 bit.test_all(number a, number b)
1318 \end_layout
1320 \begin_layout Standard
1321 Returns true if bitwise and of a and b is equals b, otherwise false.
1322 \end_layout
1324 \begin_layout Subsubsection
1325 bit.popcount(number a)
1326 \end_layout
1328 \begin_layout Standard
1329 Returns number of set bits in a.
1330 \end_layout
1332 \begin_layout Subsubsection
1333 bit.clshift(number a, number b, [number amount,[number bits]])
1334 \end_layout
1336 \begin_layout Standard
1337 Does chained left shift on a, b by amount positions, assuming numbers to
1338  be of specified number of bits.
1339 \end_layout
1341 \begin_layout Subsubsection
1342 bit.crshift(number a, number b, [number amount,[number bits]])
1343 \end_layout
1345 \begin_layout Standard
1346 Does chained right shift on a, b by amount positions, assuming numbers to
1347  be of specified number of bits.
1348 \end_layout
1350 \begin_layout Subsubsection
1351 bit.flagdecode(number a, number bits, [string on, [string off]])
1352 \end_layout
1354 \begin_layout Standard
1355 Return string of length bits where ith character is ith character of on
1356  if bit i is on, otherwise ith character of off.
1357  Out of range reads give last character, or '*'/'-' if empty.
1358 \end_layout
1360 \begin_layout Subsubsection
1361 bit.rflagdecode(number a, number bits, [string on, [string off]])
1362 \end_layout
1364 \begin_layout Standard
1365 Like bit.flagdecode, but outputs the string in the opposite order (most significa
1366 nt bit first).
1367 \end_layout
1369 \begin_layout Subsection
1370 Table gui:
1371 \end_layout
1373 \begin_layout Standard
1374 Most of these functions can only be called in on_paint and on_video callbacks.
1375  Exceptions are noted.
1376 \end_layout
1378 \begin_layout Standard
1379 Colors are 32-bit.
1380  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1381  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1382  opaque, 255 is almost transparent).
1383  -1 is the fully transparent color.
1384  Alpha values greater than 127 do work.
1385 \end_layout
1387 \begin_layout Standard
1388 Origin of coordinates is at top left corner of game display area.
1389  Left and top gaps correspond to negative coordinates.
1390 \end_layout
1392 \begin_layout Subsubsection
1393 gui.resolution()
1394 \end_layout
1396 \begin_layout Standard
1397 Returns 2-tuple (hresolution, vresolution).
1398 \end_layout
1400 \begin_layout Subsubsection
1401 gui.<class>_gap(number gap)
1402 \end_layout
1404 \begin_layout Standard
1405 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1406  is 8191).
1407  If successful, old gap is returned.
1408 \end_layout
1410 \begin_layout Subsubsection
1411 gui.delta_<class>_gap(number gap)
1412 \end_layout
1414 \begin_layout Standard
1415 Increase the <class> (left, right, top, bottom) gap by specified value (max
1416  gap is 8191) and return the old gap (returns nothing on error).
1417 \end_layout
1419 \begin_layout Subsubsection
1420 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1421 \end_layout
1423 \begin_layout Standard
1424 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1425  16 high).
1426  Parameters:
1427 \end_layout
1429 \begin_layout Itemize
1430 x: X-coordinate to start the drawing from (and x-coordinate at begining
1431  of the lines).
1432 \end_layout
1434 \begin_layout Itemize
1435 y: Y-coordinate to start the drawing from.
1436 \end_layout
1438 \begin_layout Itemize
1439 text: The text to draw.
1440 \end_layout
1442 \begin_layout Itemize
1443 fgc: Text color (default is 0xFFFFFF (white))
1444 \end_layout
1446 \begin_layout Itemize
1447 bgc: Background color (default is -1 (transparent))
1448 \end_layout
1450 \begin_layout Subsubsection
1451 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1452 \end_layout
1454 \begin_layout Standard
1455 Like gui.text, but draw using double-width.
1456 \end_layout
1458 \begin_layout Subsubsection
1459 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1460 \end_layout
1462 \begin_layout Standard
1463 Like gui.text, but draw using double-height.
1464 \end_layout
1466 \begin_layout Subsubsection
1467 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
1468 \end_layout
1470 \begin_layout Standard
1471 Like gui.text, but draw using double-width/double-height.
1472 \end_layout
1474 \begin_layout Subsubsection
1475 gui.rectangle(number x, number y, number width, number height[, number thickness[
1476 , number outline[, number fill]]])
1477 \end_layout
1479 \begin_layout Standard
1480 Draw rectangle on the GUI.
1481  Parameters:
1482 \end_layout
1484 \begin_layout Itemize
1485 x: X-coordinate of left edge.
1486 \end_layout
1488 \begin_layout Itemize
1489 y: Y-coordinate of upper edge.
1490 \end_layout
1492 \begin_layout Itemize
1493 width: Width of rectangle.
1494 \end_layout
1496 \begin_layout Itemize
1497 height: Height of rectangle.
1498 \end_layout
1500 \begin_layout Itemize
1501 thickness: Thickness of outline (default is 1).
1502 \end_layout
1504 \begin_layout Itemize
1505 outline: Color of outline (default is 0xFFFFFF (white))
1506 \end_layout
1508 \begin_layout Itemize
1509 fill: Color of fill (default is -1 (transparent))
1510 \end_layout
1512 \begin_layout Subsubsection
1513 gui.box(number x, number y, number width, number height[, number thickness[,
1514  number outline1[,number outline2[, number fill]]]])
1515 \end_layout
1517 \begin_layout Standard
1518 Draw rectangle with 3D effect on the GUI.
1519  Parameters:
1520 \end_layout
1522 \begin_layout Itemize
1523 x: X-coordinate of left edge.
1524 \end_layout
1526 \begin_layout Itemize
1527 y: Y-coordinate of upper edge.
1528 \end_layout
1530 \begin_layout Itemize
1531 width: Width of rectangle.
1532 \end_layout
1534 \begin_layout Itemize
1535 height: Height of rectangle.
1536 \end_layout
1538 \begin_layout Itemize
1539 thickness: Thickness of outline (default is 1).
1540 \end_layout
1542 \begin_layout Itemize
1543 outline1: First color of outline (default is 0xFFFFFF (white))
1544 \end_layout
1546 \begin_layout Itemize
1547 outline2: First color of outline (default is 0x808080 (dark gray))
1548 \end_layout
1550 \begin_layout Itemize
1551 fill: Color of fill (default is 0xC0C0C0 (light grayy))
1552 \end_layout
1554 \begin_layout Subsubsection
1555 gui.pixel(number x, number y[, number color])
1556 \end_layout
1558 \begin_layout Standard
1559 Draw one pixel on the GUI.
1560  Parameters:
1561 \end_layout
1563 \begin_layout Itemize
1564 x: X-coordinate of the pixel
1565 \end_layout
1567 \begin_layout Itemize
1568 y: Y-coordinate of the pixel
1569 \end_layout
1571 \begin_layout Itemize
1572 color: Color of the pixel (default is 0xFFFFFF (white))
1573 \end_layout
1575 \begin_layout Subsubsection
1576 gui.crosshair(number x, number y[, number length[, number color]])
1577 \end_layout
1579 \begin_layout Standard
1580 Draw a crosshair.
1581  Parameters:
1582 \end_layout
1584 \begin_layout Itemize
1585 x: X-coordinate of the crosshair
1586 \end_layout
1588 \begin_layout Itemize
1589 y: Y-coordinate of the crosshair
1590 \end_layout
1592 \begin_layout Itemize
1593 length: Length of the crosshair lines (default 10).
1594 \end_layout
1596 \begin_layout Itemize
1597 color: Color of the crosshair (default is 0xFFFFFF (white))
1598 \end_layout
1600 \begin_layout Subsubsection
1601 gui.line(number x1, number y1, number x2, number y2[, number color])
1602 \end_layout
1604 \begin_layout Standard
1605 Draw a thin line.
1606  Parameters:
1607 \end_layout
1609 \begin_layout Itemize
1610 x1: X-coordinate of one end.
1611 \end_layout
1613 \begin_layout Itemize
1614 y1: Y-coordinate of one end.
1615 \end_layout
1617 \begin_layout Itemize
1618 x2: X-coordinate of the other end.
1619 \end_layout
1621 \begin_layout Itemize
1622 y2: Y-coordinate of the other end.
1623 \end_layout
1625 \begin_layout Itemize
1626 color: Color of the line (default is 0xFFFFFF (white)).
1627 \end_layout
1629 \begin_layout Subsubsection
1630 gui.circle(number x, number y, number r[, number thick[, number border[,
1631  number fil]]])
1632 \end_layout
1634 \begin_layout Standard
1635 Draw a circle.
1636  Parameters.
1637 \end_layout
1639 \begin_layout Itemize
1640 x: X-coordinate of the center
1641 \end_layout
1643 \begin_layout Itemize
1644 y: Y-coordinate of the center
1645 \end_layout
1647 \begin_layout Itemize
1648 r: The radius of the circle
1649 \end_layout
1651 \begin_layout Itemize
1652 thick: Border thickness
1653 \end_layout
1655 \begin_layout Itemize
1656 border: Border color (default is 0xFFFFFF (white))
1657 \end_layout
1659 \begin_layout Itemize
1660 fill: Fill color (default is -1 (transparent)).
1661 \end_layout
1663 \begin_layout Subsubsection
1664 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
1665 \end_layout
1667 \begin_layout Standard
1668 Draw a bitmap on screen with specified palette.
1669  Parameters:
1670 \end_layout
1672 \begin_layout Itemize
1673 x: X-coordinate of left edge.
1674 \end_layout
1676 \begin_layout Itemize
1677 y: Y-coordinate of top edge.
1678 \end_layout
1680 \begin_layout Itemize
1681 bitmap: The bitmap to draw
1682 \end_layout
1684 \begin_layout Itemize
1685 palette: The palette to draw the bitmap using.
1686 \end_layout
1688 \begin_layout Subsubsection
1689 gui.bitmap_draw(number x, number y, dbitmap bitmap)
1690 \end_layout
1692 \begin_layout Standard
1693 Draw a bitmap on screen.
1694  Parameters:
1695 \end_layout
1697 \begin_layout Itemize
1698 x: X-coordinate of left edge.
1699 \end_layout
1701 \begin_layout Itemize
1702 y: Y-coordinate of top edge.
1703 \end_layout
1705 \begin_layout Itemize
1706 bitmap: The bitmap to draw
1707 \end_layout
1709 \begin_layout Subsubsection
1710 gui.palette_new()
1711 \end_layout
1713 \begin_layout Standard
1714 Returns a new palette (initially all transparent).
1715  Can be used anywhere.
1716 \end_layout
1718 \begin_layout Subsubsection
1719 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
1720 \end_layout
1722 \begin_layout Standard
1723 Returns a new bitmap/dbitmap.
1724  Can be used anywhere.
1725  Parameters:
1726 \end_layout
1728 \begin_layout Itemize
1729 w: The width of new bitmap
1730 \end_layout
1732 \begin_layout Itemize
1733 h: The height of new bitmap
1734 \end_layout
1736 \begin_layout Itemize
1737 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
1738 \end_layout
1740 \begin_layout Itemize
1741 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
1742 \end_layout
1744 \begin_layout Subsubsection
1745 gui.bitmap_load(string file)
1746 \end_layout
1748 \begin_layout Standard
1749 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
1750  for bitmap).
1751  Can be used anywhere.
1752  Parameters:
1753 \end_layout
1755 \begin_layout Itemize
1756 file: The name of file to load.
1757 \end_layout
1759 \begin_layout Subsubsection
1760 gui.palette_set(palette palette, number index, number color)
1761 \end_layout
1763 \begin_layout Standard
1764 Sets color in palette.
1765  Can be used anywhere.
1766  Parameters:
1767 \end_layout
1769 \begin_layout Itemize
1770 palette: The palette to manipulate
1771 \end_layout
1773 \begin_layout Itemize
1774 index: Index of color (0-65535).
1775 \end_layout
1777 \begin_layout Itemize
1778 color: The color value.
1779 \end_layout
1781 \begin_layout Subsubsection
1782 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
1783 \end_layout
1785 \begin_layout Standard
1786 Sets specified pixel in bitmap.
1787  Can be used anywhere.
1788  Parameters:
1789 \end_layout
1791 \begin_layout Itemize
1792 bitmap: The bitmap to manipulate
1793 \end_layout
1795 \begin_layout Itemize
1796 x: The x-coordinate of the pixel.
1797 \end_layout
1799 \begin_layout Itemize
1800 y: The y-coordinate of the pixel.
1801 \end_layout
1803 \begin_layout Itemize
1804 color: If bitmap is a bitmap, color index (0-65535).
1805  Otherwise color value.
1806 \end_layout
1808 \begin_layout Subsubsection
1809 gui.bitmap_size(bitmap/dbitmap bitmap)
1810 \end_layout
1812 \begin_layout Standard
1813 Get size of bitmap.
1814  Can be used anywhere.
1815  Parameters:
1816 \end_layout
1818 \begin_layout Itemize
1819 bitmap: The bitmap to query.
1820 \end_layout
1822 \begin_layout Standard
1823 The first return is the width, the second is the height.
1824 \end_layout
1826 \begin_layout Subsubsection
1827 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
1828  src, number sx, number sy, number w, number h[, number ck])
1829 \end_layout
1831 \begin_layout Standard
1832 Blit a part of bitmap to another.
1833  Can be used anywhere.
1834  Parameters:
1835 \end_layout
1837 \begin_layout Itemize
1838 dest: Destination to blit to.
1839 \end_layout
1841 \begin_layout Itemize
1842 dx: left edge of target
1843 \end_layout
1845 \begin_layout Itemize
1846 dy: Top edge of target
1847 \end_layout
1849 \begin_layout Itemize
1850 src: The source to blit from.
1851  Must be of the same type as destination.
1852 \end_layout
1854 \begin_layout Itemize
1855 sx: left edge of source
1856 \end_layout
1858 \begin_layout Itemize
1859 sy: Top edge of source
1860 \end_layout
1862 \begin_layout Itemize
1863 w: Width of region
1864 \end_layout
1866 \begin_layout Itemize
1867 h: Height of region.
1868 \end_layout
1870 \begin_layout Itemize
1871 ck: Color key.
1872  Pixels of this color are not blitted.
1873 \end_layout
1875 \begin_deeper
1876 \begin_layout Itemize
1877 If bitmaps are bitmaps, this is color index of colorkey.
1878  Values outside range 0-65535 cause no key to be used as colorkey.
1879 \end_layout
1881 \begin_layout Itemize
1882 If bitmaps are dbitmaps, this color value of colorkey.
1883 \end_layout
1885 \begin_layout Itemize
1886 May be absent or nil for no colorkey blit.
1887 \end_layout
1889 \end_deeper
1890 \begin_layout Subsubsection
1891 gui.repaint()
1892 \end_layout
1894 \begin_layout Standard
1895 Request on_repaint() to happen as soon as possible.
1896  Can be used anywhere.
1897 \end_layout
1899 \begin_layout Subsubsection
1900 gui.subframe_update(boolean on)
1901 \end_layout
1903 \begin_layout Standard
1904 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
1905  or not happen (on=false).
1906  Can be used anywhere.
1907 \end_layout
1909 \begin_layout Subsubsection
1910 gui.screenshot(string filename)
1911 \end_layout
1913 \begin_layout Standard
1914 Write PNG screenshot of the current frame (no drawings) to specified file.
1915  Can be used anywhere.
1916 \end_layout
1918 \begin_layout Subsubsection
1919 gui.color(number r, number g, number b[, number a])
1920 \end_layout
1922 \begin_layout Standard
1923 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
1924  each component in scale 0-255.
1925  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
1926  opaque).
1927  The default alpha is 256.
1928 \end_layout
1930 \begin_layout Subsubsection
1931 gui.status(string name, string value)
1932 \end_layout
1934 \begin_layout Standard
1935 Set status field 
1936 \begin_inset Quotes eld
1937 \end_inset
1939 L[<name>]
1940 \begin_inset Quotes erd
1941 \end_inset
1943  to <value> in status area.
1944  Can be used anywhere.
1945 \end_layout
1947 \begin_layout Subsubsection
1948 gui.rainbow(number step, number steps[, number color])
1949 \end_layout
1951 \begin_layout Standard
1952 Perform hue rotation of color <color> (default bright red), by <step> steps.
1953  The number of steps per full rotation is given by absolute value of <steps>.
1954 \end_layout
1956 \begin_layout Standard
1957 If <steps> is negative, the rotation will be counterclockwise.
1958 \end_layout
1960 \begin_layout Subsubsection
1961 gui.screenshot(string filename)
1962 \end_layout
1964 \begin_layout Standard
1965 Saves a screenshot into specified file.
1966 \end_layout
1968 \begin_layout Subsubsection
1969 gui.renderq_new(number width, number height)
1970 \end_layout
1972 \begin_layout Standard
1973 Create render queue with specified reported size and return it.
1974 \end_layout
1976 \begin_layout Subsubsection
1977 gui.renderq_clear(RENDERQUEUE queue)
1978 \end_layout
1980 \begin_layout Standard
1981 Clear specified render queue.
1982 \end_layout
1984 \begin_layout Subsubsection
1985 gui.renderq_set(RENDERQUEUE queue)
1986 \end_layout
1988 \begin_layout Standard
1989 Switch to specified render queue.
1990  Use nil as queue to switch to default queue.
1991 \end_layout
1993 \begin_layout Itemize
1994 When switched to another queue, all drawing functions work and draw there,
1995  even outside on_video/on_paint.
1996 \end_layout
1998 \begin_layout Subsubsection
1999 gui.renderq_run(RENDERQUEUE queue)
2000 \end_layout
2002 \begin_layout Standard
2003 Run specified render queue, copying the objects to current render queue.
2005 \end_layout
2007 \begin_layout Itemize
2008 Warning: Don't try to run the current render queue.
2009 \end_layout
2011 \begin_layout Subsubsection
2012 gui.loadfont(string filename)
2013 \end_layout
2015 \begin_layout Standard
2016 Loads font from specified file (CUSTOMFONT object).
2017 \end_layout
2019 \begin_layout Subsubsection
2020 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc[, number
2021  hlc]]])
2022 \end_layout
2024 \begin_layout Standard
2025 Draw string with custom font to screen.
2026  The parameters are the same as in gui.text, except hlc is the halo color
2027  (default is no halo).
2029 \end_layout
2031 \begin_layout Subsection
2032 table input
2033 \end_layout
2035 \begin_layout Standard
2036 Input handling.
2037  Only available in on_input callback.
2038 \end_layout
2040 \begin_layout Subsubsection
2041 input.get(number controller, number index)
2042 \end_layout
2044 \begin_layout Standard
2045 Read the specified index (0-11) from specified controller (0-7).
2046  Notes:
2047 \end_layout
2049 \begin_layout Itemize
2050 Uses physical controller numbering.
2051  Gamepad in port 2 is controller 4, not 1!
2052 \end_layout
2054 \begin_layout Subsubsection
2055 input.set(number controller, number index, number value)
2056 \end_layout
2058 \begin_layout Standard
2059 Write the specified index (0-11) from specified controller (0-7), storing
2060  value.
2061  Notes:
2062 \end_layout
2064 \begin_layout Itemize
2065 Uses physical controller numbering.
2066  Gamepad in port 2 is controller 4, not 1!
2067 \end_layout
2069 \begin_layout Subsubsection
2070 input.get2(number port, number controller, number index)
2071 \end_layout
2073 \begin_layout Standard
2074 Read the specified input tuple.
2075 \end_layout
2077 \begin_layout Itemize
2078 Port 0 is system port.
2079 \end_layout
2081 \begin_layout Subsubsection
2082 input.set2(number port, number controller, number index, number value)
2083 \end_layout
2085 \begin_layout Standard
2086 Write the specified input tuple.
2087 \end_layout
2089 \begin_layout Itemize
2090 Port 0 is system port.
2091 \end_layout
2093 \begin_layout Subsubsection
2094 input.lcid_to_pcid2(number lcid)
2095 \end_layout
2097 \begin_layout Standard
2098 Look up physical pcid pair (port, controller) corresponding to specified
2099  logical controller (1-based).
2100  Returns nothing if controller does not exist.
2101 \end_layout
2103 \begin_layout Subsubsection
2104 input.port_type(number port)
2105 \end_layout
2107 \begin_layout Standard
2108 Return type of specified port.
2109 \end_layout
2111 \begin_layout Subsubsection
2112 input.controller_info(number port, number controller)
2113 \end_layout
2115 \begin_layout Standard
2116 Get controller info for specified controller.
2117  If controller does not exist, returns nil.
2118  Otherwise returns a table with following fields:
2119 \end_layout
2121 \begin_layout Itemize
2122 type (string): Type of the controller.
2123 \end_layout
2125 \begin_layout Itemize
2126 class (string): Class of the controller.
2127 \end_layout
2129 \begin_layout Itemize
2130 classnum (number): Number of the controller within its class (1-based)
2131 \end_layout
2133 \begin_layout Itemize
2134 lcid (number): Logical controller number of the controller.
2135 \end_layout
2137 \begin_layout Itemize
2138 button_count (number): Number of buttons on controller
2139 \end_layout
2141 \begin_layout Itemize
2142 buttons (array): Array of following info about each button:
2143 \end_layout
2145 \begin_deeper
2146 \begin_layout Itemize
2147 type (string): Type of button.
2148  Currently one of 
2149 \begin_inset Quotes eld
2150 \end_inset
2152 null
2153 \begin_inset Quotes erd
2154 \end_inset
2157 \begin_inset Quotes eld
2158 \end_inset
2160 button
2161 \begin_inset Quotes erd
2162 \end_inset
2165 \begin_inset Quotes eld
2166 \end_inset
2168 axis
2169 \begin_inset Quotes erd
2170 \end_inset
2173 \begin_inset Quotes eld
2174 \end_inset
2176 raxis
2177 \begin_inset Quotes erd
2178 \end_inset
2181 \end_layout
2183 \begin_layout Itemize
2184 name (string): Name of button.
2185 \end_layout
2187 \begin_layout Itemize
2188 symbol (string): Symbol of button.
2189  Only present for type 
2190 \begin_inset Quotes eld
2191 \end_inset
2193 button
2194 \begin_inset Quotes erd
2195 \end_inset
2198 \end_layout
2200 \begin_layout Itemize
2201 hidden (boolean): True if hidden button.
2203 \end_layout
2205 \end_deeper
2206 \begin_layout Subsubsection
2207 input.veto_button()
2208 \end_layout
2210 \begin_layout Standard
2211 Signals that the button event should be vetoed.
2212  Only valid in on_button callback.
2213 \end_layout
2215 \begin_layout Subsubsection
2216 input.geta(number controller)
2217 \end_layout
2219 \begin_layout Standard
2220 Get input state for entiere controller.
2221  Returns 13 return values.
2222 \end_layout
2224 \begin_layout Itemize
2225 1st return value: Bitmask: bit i is set if i:th index is nonzero
2226 \end_layout
2228 \begin_layout Itemize
2229 2nd-13th return value: value of i:th index.
2230 \end_layout
2232 \begin_layout Subsubsection
2233 input.seta(number controller, number bitmask, number args...)
2234 \end_layout
2236 \begin_layout Standard
2237 Set state for entiere controller.
2238  args is up to 12 values for indices (overriding values in bitmask if specified).
2239 \end_layout
2241 \begin_layout Subsubsection
2242 input.controllertype(number controller)
2243 \end_layout
2245 \begin_layout Standard
2246 Get the type of controller as string.
2247  Valid values are:
2248 \end_layout
2250 \begin_layout Itemize
2251 gamepad
2252 \end_layout
2254 \begin_layout Itemize
2255 mouse
2256 \end_layout
2258 \begin_layout Itemize
2259 justifier
2260 \end_layout
2262 \begin_layout Itemize
2263 superscope
2264 \end_layout
2266 \begin_layout Subsubsection
2267 input.reset([number cycles])
2268 \end_layout
2270 \begin_layout Standard
2271 Execute reset.
2272  If cycles is greater than zero, do delayed reset.
2273  0 (or no value) causes immediate reset.
2274 \end_layout
2276 \begin_layout Itemize
2277 Only available with subframe flag false.
2278 \end_layout
2280 \begin_layout Subsubsection
2281 input.raw()
2282 \end_layout
2284 \begin_layout Standard
2285 Returns table of tables of all available keys and axes.
2286  The first table is indexed by key name (platform-dependent!), and the inner
2287  table has the following fields:
2288 \end_layout
2290 \begin_layout Itemize
2291 value: Last reported value for control
2292 \end_layout
2294 \begin_deeper
2295 \begin_layout Itemize
2296 For keys: 1 for pressed, 0 for released.
2297 \end_layout
2299 \begin_layout Itemize
2300 For axes: -32767...32767.
2301 \end_layout
2303 \begin_layout Itemize
2304 For presure-sensitive buttons: 0...32767.
2305 \end_layout
2307 \begin_layout Itemize
2308 For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
2309 \end_layout
2311 \begin_layout Itemize
2312 For mouse: Coordinates relative to game area.
2313 \end_layout
2315 \end_deeper
2316 \begin_layout Itemize
2317 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2318  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2319 \end_layout
2321 \begin_layout Subsubsection
2322 input.keyhook(string key, boolean state)
2323 \end_layout
2325 \begin_layout Standard
2326 Requests that keyhook events to be sent for key (state=true) or not sent
2327  (state=false).
2328 \end_layout
2330 \begin_layout Subsubsection
2331 input.joyget(number controller)
2332 \end_layout
2334 \begin_layout Standard
2335 Returns table for current controls for specified controller.
2336  The names of fields vary by controller type.
2337 \end_layout
2339 \begin_layout Itemize
2340 The buttons have the same name as those are referred to in other contexts
2341  in the emulator
2342 \end_layout
2344 \begin_layout Itemize
2345 The analog axes are 
2346 \begin_inset Quotes eld
2347 \end_inset
2349 xaxis
2350 \begin_inset Quotes erd
2351 \end_inset
2353  and 
2354 \begin_inset Quotes eld
2355 \end_inset
2357 yaxis
2358 \begin_inset Quotes erd
2359 \end_inset
2362 \end_layout
2364 \begin_layout Subsubsection
2365 input.joyset(number controller, table controls)
2366 \end_layout
2368 \begin_layout Standard
2369 Set the the state of specified controller to values specified in specified
2370  table.
2371 \end_layout
2373 \begin_layout Subsubsection
2374 input.lcid_to_pcid(number controller)
2375 \end_layout
2377 \begin_layout Standard
2378 Return the physical index, physical port and controller number in port for
2379  specified (1-based) logical controller.
2380 \end_layout
2382 \begin_layout Subsection
2383 Table keyboard
2384 \end_layout
2386 \begin_layout Standard
2387 Various keybinding-related functions
2388 \end_layout
2390 \begin_layout Subsubsection
2391 keyboard.bind(string mod, string mask, string key, string cmd)
2392 \end_layout
2394 \begin_layout Standard
2395 Bind specified key with specified modifers to specified command.
2396 \end_layout
2398 \begin_layout Subsubsection
2399 keyboard.unbind(string mod, string mask, string key)
2400 \end_layout
2402 \begin_layout Standard
2403 Unbind specified key with specified modifers.
2404 \end_layout
2406 \begin_layout Itemize
2407 nil does not change value
2408 \end_layout
2410 \begin_layout Itemize
2411 true/false (buttons) and integers (axes) force value.
2412 \end_layout
2414 \begin_layout Itemize
2415 string (button) inverts the input.
2416 \end_layout
2418 \begin_layout Subsubsection
2419 keyboard.alias(string alias, string expansion)
2420 \end_layout
2422 \begin_layout Standard
2423 Set expansion of given command.
2424 \end_layout
2426 \begin_layout Subsection
2427 Table subtitle
2428 \end_layout
2430 \begin_layout Standard
2431 Subtitle handling
2432 \end_layout
2434 \begin_layout Subsubsection
2435 subtitle.byindex(number i)
2436 \end_layout
2438 \begin_layout Standard
2439 Read the frame and length of ith subtitle.
2440  Returns nothing if not present.
2441 \end_layout
2443 \begin_layout Subsubsection
2444 subtitle.set(number f, number l, string txt)
2445 \end_layout
2447 \begin_layout Standard
2448 Set the text of subtitle.
2449 \end_layout
2451 \begin_layout Subsubsection
2452 subtitle.get(number f, number l)
2453 \end_layout
2455 \begin_layout Standard
2456 Get the text of subtitle.
2457 \end_layout
2459 \begin_layout Subsubsection
2460 subtitle.delete(number f, number l)
2461 \end_layout
2463 \begin_layout Standard
2464 Delete specified subtitle.
2465 \end_layout
2467 \begin_layout Subsection
2468 Table hostmemory
2469 \end_layout
2471 \begin_layout Standard
2472 Host memory handling (extra memory saved to savestates).
2473  Host memory starts empty.
2474 \end_layout
2476 \begin_layout Subsubsection
2477 hostmemory.read(number address)
2478 \end_layout
2480 \begin_layout Standard
2481 Reads hostmemory slot address.
2482  Slot numbers out of range return false instead of numeric.
2483 \end_layout
2485 \begin_layout Subsubsection
2486 hostmemory.write(number address, number value)
2487 \end_layout
2489 \begin_layout Standard
2490 Writes hostmemory slot with 0-255.
2491  Slot numbers out of range cause extension of host memory slot space.
2492 \end_layout
2494 \begin_layout Subsubsection
2495 hostmemory.readbyte(number address)
2496 \end_layout
2498 \begin_layout Standard
2499 Read unsigned byte (1 element) from given address.
2500  Slots out of range return false.
2501 \end_layout
2503 \begin_layout Subsubsection
2504 hostmemory.writebyte(number address, number value)
2505 \end_layout
2507 \begin_layout Standard
2508 Write unsigned byte (1 element) to given slot.
2509  Slot numbers out of range cause extension.
2510 \end_layout
2512 \begin_layout Subsubsection
2513 hostmemory.readsbyte(number address)
2514 \end_layout
2516 \begin_layout Standard
2517 Read signed byte (1 element) from given address.
2518  Slots out of range return false.
2519 \end_layout
2521 \begin_layout Subsubsection
2522 hostmemory.writesbyte(number address, number value)
2523 \end_layout
2525 \begin_layout Standard
2526 Write signed byte (1 element) to given slot.
2527  Slot numbers out of range cause extension.
2528 \end_layout
2530 \begin_layout Subsubsection
2531 hostmemory.readword(number address)
2532 \end_layout
2534 \begin_layout Standard
2535 Read unsigned word (2 elements) from given address.
2536  Slots out of range return false.
2537 \end_layout
2539 \begin_layout Subsubsection
2540 hostmemory.writeword(number address, number value)
2541 \end_layout
2543 \begin_layout Standard
2544 Write unsigned word (2 elements) to given slot.
2545  Slot numbers out of range cause extension.
2546 \end_layout
2548 \begin_layout Subsubsection
2549 hostmemory.readsword(number address)
2550 \end_layout
2552 \begin_layout Standard
2553 Read signed word (2 elements) from given address.
2554  Slots out of range return false.
2555 \end_layout
2557 \begin_layout Subsubsection
2558 hostmemory.writesword(number address, number value)
2559 \end_layout
2561 \begin_layout Standard
2562 Write signed word (2 elements) to given slot.
2563  Slot numbers out of range cause extension.
2564 \end_layout
2566 \begin_layout Subsubsection
2567 hostmemory.readdword(number address)
2568 \end_layout
2570 \begin_layout Standard
2571 Read unsigned doubleword (4 elements) from given address.
2572  Slots out of range return false.
2573 \end_layout
2575 \begin_layout Subsubsection
2576 hostmemory.writedword(number address, number value)
2577 \end_layout
2579 \begin_layout Standard
2580 Write unsigned doubleword (4 elements) to given slot.
2581  Slot numbers out of range cause extension.
2582 \end_layout
2584 \begin_layout Subsubsection
2585 hostmemory.readsdword(number address)
2586 \end_layout
2588 \begin_layout Standard
2589 Read signed doubleword (4 elements) from given address.
2590  Slots out of range return false.
2591 \end_layout
2593 \begin_layout Subsubsection
2594 hostmemory.writesdword(number address, number value)
2595 \end_layout
2597 \begin_layout Standard
2598 Write signed doubleword (4 elements) to given slot.
2599  Slot numbers out of range cause extension.
2600 \end_layout
2602 \begin_layout Subsubsection
2603 hostmemory.readqword(number address)
2604 \end_layout
2606 \begin_layout Standard
2607 Read unsigned quadword (8 elements) from given address.
2608  Slots out of range return false.
2609 \end_layout
2611 \begin_layout Subsubsection
2612 hostmemory.writeqword(number address, number value)
2613 \end_layout
2615 \begin_layout Standard
2616 Write unsigned quadword (4 elements) to given slot.
2617  Slot numbers out of range cause extension.
2618 \end_layout
2620 \begin_layout Subsubsection
2621 hostmemory.readsqword(number address)
2622 \end_layout
2624 \begin_layout Standard
2625 Read signed quadword (8 elements) from given address.
2626  Slots out of range return false.
2627 \end_layout
2629 \begin_layout Subsubsection
2630 hostmemory.writesqword(number address, number value)
2631 \end_layout
2633 \begin_layout Standard
2634 Write signed quadword (8 elements) to given slot.
2635  Slot numbers out of range cause extension.
2636 \end_layout
2638 \begin_layout Subsection
2639 Table movie
2640 \end_layout
2642 \begin_layout Standard
2643 Movie handling
2644 \end_layout
2646 \begin_layout Subsubsection
2647 movie.currentframe()
2648 \end_layout
2650 \begin_layout Standard
2651 Return number of current frame.
2652 \end_layout
2654 \begin_layout Subsubsection
2655 movie.framecount()
2656 \end_layout
2658 \begin_layout Standard
2659 Return number of frames in movie.
2660 \end_layout
2662 \begin_layout Subsubsection
2663 movie.readonly()
2664 \end_layout
2666 \begin_layout Standard
2667 Return true if in readonly mode, false if in readwrite.
2668 \end_layout
2670 \begin_layout Subsubsection
2671 movie.rerecords()
2672 \end_layout
2674 \begin_layout Standard
2675 Returns the current value of rerecord count.
2676 \end_layout
2678 \begin_layout Subsubsection
2679 movie.set_readwrite()
2680 \end_layout
2682 \begin_layout Standard
2683 Set readwrite mode (does not cause on_readwrite callback).
2684 \end_layout
2686 \begin_layout Subsubsection
2687 movie.frame_subframes(number frame)
2688 \end_layout
2690 \begin_layout Standard
2691 Count number of subframes in specified frame (frame numbers are 1-based)
2692  and return that.
2693 \end_layout
2695 \begin_layout Subsubsection
2696 movie.read_subframes(number frame, number subframe)
2697 \end_layout
2699 \begin_layout Standard
2700 Read specifed subframe in specified frame and return data as array (100
2701  elements, numbered 0-99 currently).
2702 \end_layout
2704 \begin_layout Subsubsection
2705 movie.read_rtc()
2706 \end_layout
2708 \begin_layout Standard
2709 Returns the current value of the RTC as a pair (second, subsecond).
2710 \end_layout
2712 \begin_layout Subsubsection
2713 movie.unsafe_rewind([UNSAFEREWIND state])
2714 \end_layout
2716 \begin_layout Standard
2717 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2718 \end_layout
2720 \begin_layout Itemize
2721 If called without argument, causes emulator to start process of setting
2722  unsafe rewind point.
2723  When this has finished, callback on_set_rewind occurs, passing the rewind
2724  state to lua script.
2725 \end_layout
2727 \begin_layout Itemize
2728 If called with argument, causes emulator rewind to passed rewind point as
2729  soon as possible.
2730  Readwrite mode is implicitly activated.
2731 \end_layout
2733 \begin_layout Standard
2734 The following warnings apply to unsafe rewinding:
2735 \end_layout
2737 \begin_layout Itemize
2738 There are no safety checks against misuse (that's what 
2739 \begin_inset Quotes eld
2740 \end_inset
2742 unsafe
2743 \begin_inset Quotes erd
2744 \end_inset
2746  comes from)!
2747 \end_layout
2749 \begin_layout Itemize
2750 Only call rewind from timeline rewind point was set from.
2751 \end_layout
2753 \begin_layout Itemize
2754 Only call rewind from after the rewind point was set.
2755 \end_layout
2757 \begin_layout Subsection
2758 Table settings
2759 \end_layout
2761 \begin_layout Standard
2762 Routines for settings manipulation
2763 \end_layout
2765 \begin_layout Subsubsection
2766 settings.get(string name)
2767 \end_layout
2769 \begin_layout Standard
2770 Get value of setting.
2771  If setting is blank, returns false.
2772  If setting value can't be obtained, returns (nil, error message).
2773 \end_layout
2775 \begin_layout Subsubsection
2776 settings.set(string name, string value)
2777 \end_layout
2779 \begin_layout Standard
2780 Set value of setting.
2781  If setting can't be set, returns (nil, error message).
2782 \end_layout
2784 \begin_layout Subsubsection
2785 settings.is_set(string name)
2786 \end_layout
2788 \begin_layout Standard
2789 Returns if setting is set.
2790  If setting does not exist, returns (nil, error message).
2791 \end_layout
2793 \begin_layout Subsubsection
2794 settings.blank(string name)
2795 \end_layout
2797 \begin_layout Standard
2798 Blanks a setting and returns true.
2799  If setting can't be blanked, returns (nil, error message).
2800 \end_layout
2802 \begin_layout Subsection
2803 Table memory
2804 \end_layout
2806 \begin_layout Standard
2807 Contains various functions for managing memory
2808 \end_layout
2810 \begin_layout Subsubsection
2811 memory.vma_count()
2812 \end_layout
2814 \begin_layout Standard
2815 Returns the number of VMAs
2816 \end_layout
2818 \begin_layout Subsubsection
2819 memory.read_vma(number index)
2820 \end_layout
2822 \begin_layout Standard
2823 Reads the specified VMA (indices start from zero).
2824  Trying to read invalid VMA gives nil.
2825  The read VMA is table with the following fields:
2826 \end_layout
2828 \begin_layout Itemize
2829 region_name (string): The readable name of the VMA
2830 \end_layout
2832 \begin_layout Itemize
2833 baseaddr (number): Base address of the VMA
2834 \end_layout
2836 \begin_layout Itemize
2837 lastaddr (number): Last address in the VMA.
2838 \end_layout
2840 \begin_layout Itemize
2841 size (number): The size of VMA in bytes.
2842 \end_layout
2844 \begin_layout Itemize
2845 readonly (boolean): True of the VMA corresponds to ROM.
2846 \end_layout
2848 \begin_layout Itemize
2849 iospace (boolean): True if the VMA is I/O space.
2850 \end_layout
2852 \begin_layout Itemize
2853 native_endian (boolean): True if the VMA has native endian as opposed to
2854  little endian.
2855 \end_layout
2857 \begin_layout Subsubsection
2858 memory.find_vma(number address)
2859 \end_layout
2861 \begin_layout Standard
2862 Finds the VMA containing specified address.
2863  Returns table in the same format as read_vma or nil if not found.
2864 \end_layout
2866 \begin_layout Subsubsection
2867 memory.readbyte([string vma, ]number address)
2868 \end_layout
2870 \begin_layout Standard
2871 Reads the specified address as unsigned byte and returns the result.
2872 \end_layout
2874 \begin_layout Subsubsection
2875 memory.readsbyte([string vma, ]number address)
2876 \end_layout
2878 \begin_layout Standard
2879 Reads the specified address as signed byte and returns the result.
2880 \end_layout
2882 \begin_layout Subsubsection
2883 memory.writebyte([string vma, ]number address, number value)
2884 \end_layout
2886 \begin_layout Standard
2887 Writes the specified value (negative values undergo 2's complement) to specified
2888  address (as a byte).
2889 \end_layout
2891 \begin_layout Subsubsection
2892 memory.readword([string vma, ]number address)
2893 \end_layout
2895 \begin_layout Standard
2896 Reads the specified address as unsigned word and returns the result.
2897 \end_layout
2899 \begin_layout Subsubsection
2900 memory.readsword([string vma, ]number address)
2901 \end_layout
2903 \begin_layout Standard
2904 Reads the specified address as signed word and returns the result.
2905 \end_layout
2907 \begin_layout Subsubsection
2908 memory.writeword([string vma, ]number address, number value)
2909 \end_layout
2911 \begin_layout Standard
2912 Writes the specified value (negative values undergo 2's complement) to specified
2913  address (as a word).
2914 \end_layout
2916 \begin_layout Subsubsection
2917 memory.readdword([string vma, ]number address)
2918 \end_layout
2920 \begin_layout Standard
2921 Reads the specified address as unsigned doubleword and returns the result.
2922 \end_layout
2924 \begin_layout Subsubsection
2925 memory.readsdword([string vma, ]number address)
2926 \end_layout
2928 \begin_layout Standard
2929 Reads the specified address as signed doubleword and returns the result.
2930 \end_layout
2932 \begin_layout Subsubsection
2933 memory.writedword([string vma, ]number address, number value)
2934 \end_layout
2936 \begin_layout Standard
2937 Writes the specified value (negative values undergo 2's complement) to specified
2938  address (as a doubleword).
2939 \end_layout
2941 \begin_layout Subsubsection
2942 memory.readqword([string vma, ]number address)
2943 \end_layout
2945 \begin_layout Standard
2946 Reads the specified address as unsigned quadword and returns the result.
2947 \end_layout
2949 \begin_layout Subsubsection
2950 memory.readsqword([string vma, ]number address)
2951 \end_layout
2953 \begin_layout Standard
2954 Reads the specified address as signed quadword and returns the result.
2955 \end_layout
2957 \begin_layout Subsubsection
2958 memory.writeqword([string vma, ]number address, number value)
2959 \end_layout
2961 \begin_layout Standard
2962 Writes the specified value (negative values undergo 2's complement) to specified
2963  address (as a quadword).
2964 \end_layout
2966 \begin_layout Subsubsection
2967 memory.hash_region([string vma, ]number base, number size)
2968 \end_layout
2970 \begin_layout Standard
2971 Hash specified number of bytes starting from specified address and return
2972  the SHA-256.
2973 \end_layout
2975 \begin_layout Subsubsection
2976 memory.hash_state()
2977 \end_layout
2979 \begin_layout Standard
2980 Hash the current system state.
2981  Mainly useful for debugging savestates.
2982 \end_layout
2984 \begin_layout Subsubsection
2985 memory.readregion([string vma, ]number base, number size)
2986 \end_layout
2988 \begin_layout Standard
2989 Read a region of memory.
2990 \end_layout
2992 \begin_layout Itemize
2993 Warning: If the region crosses VMA boundary, the results are undefined.
2994 \end_layout
2996 \begin_layout Subsubsection
2997 memory.map<type>([[string vma, ]number base, number size])
2998 \end_layout
3000 \begin_layout Standard
3001 Returns a table mapping specified memory aperture for read/write.
3002  If parameters are omitted, entiere map space is the aperture.
3003 \end_layout
3005 \begin_layout Itemize
3006 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3007 \end_layout
3009 \begin_layout Subsubsection
3010 memory.writeregion([string vma, ]number base, number size, table data)
3011 \end_layout
3013 \begin_layout Standard
3014 Write a region of memory.
3015 \end_layout
3017 \begin_layout Itemize
3018 Warning: If the region crosses VMA boundary, the results are undefined.
3019 \end_layout
3021 \begin_layout Subsubsection
3022 memory.map_structure()
3023 \end_layout
3025 \begin_layout Standard
3026 Returns a new mapping structure (MMAP_STRUCT)
3027 \end_layout
3029 \begin_layout Subsubsection
3030 MMAP_STRUCT(string key, [string vma, ]number address, string type)
3031 \end_layout
3033 \begin_layout Standard
3034 Bind key in mmap structure to specified address with specified type.
3035 \end_layout
3037 \begin_layout Itemize
3038 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3039 \end_layout
3041 \begin_layout Subsubsection
3042 memory.read_expr(string expr)
3043 \end_layout
3045 \begin_layout Standard
3046 Evaluate specified watch expression and return result
3047 \end_layout
3049 \begin_layout Subsubsection
3050 memory.action(string action, [<params>])
3051 \end_layout
3053 \begin_layout Standard
3054 Run core action.
3055  The different models expect parameters as:
3056 \end_layout
3058 \begin_layout Itemize
3059 string: String
3060 \end_layout
3062 \begin_layout Itemize
3063 numeric: numeric
3064 \end_layout
3066 \begin_layout Itemize
3067 enumeration: String
3068 \end_layout
3070 \begin_layout Itemize
3071 boolean: String
3072 \end_layout
3074 \begin_layout Itemize
3075 toggle: None.
3076 \end_layout
3078 \begin_layout Subsection
3079 Table memory2
3080 \end_layout
3082 \begin_layout Standard
3083 Contains newer memory functions.
3084 \end_layout
3086 \begin_layout Subsubsection
3087 memory2()
3088 \end_layout
3090 \begin_layout Standard
3091 Returns array of all valid VMA names.
3092 \end_layout
3094 \begin_layout Subsubsection
3095 memory2.<vma>:info()
3096 \end_layout
3098 \begin_layout Standard
3099 Return table describing given VMA.
3100  Includes fields address, size, last, readonly, special and endian.
3101 \end_layout
3103 \begin_layout Subsubsection
3104 memory2.<vma>:<op>(number offset)
3105 \end_layout
3107 \begin_layout Standard
3108 Read from given VMA at given offset (must be in-range).
3109  Op is of form:
3110 \end_layout
3112 \begin_layout Itemize
3113 [i][s]<type>, where <type> is one of 'byte', 'word', 'dword', 'qword'.
3114  'i' signifies that the value is treated as opposite-to-normal endianess,
3115  's' signifies that value is treated as signed.
3116 \end_layout
3118 \begin_layout Subsubsection
3119 memory2.<vma>:<op>(number offset, number value)
3120 \end_layout
3122 \begin_layout Standard
3123 Write value to given VMA at given offset (must be in-range).
3124  See above for form of op.
3125 \end_layout
3127 \begin_layout Subsection
3128 Table subtitle
3129 \end_layout
3131 \begin_layout Standard
3132 Contains functions for manipulating subtitles.
3133 \end_layout
3135 \begin_layout Subsubsection
3136 subtitle.byindex(number index)
3137 \end_layout
3139 \begin_layout Standard
3140 Get (basetime, length) pair of specified subtitle index or nothing if index
3141  isn't valid.
3142 \end_layout
3144 \begin_layout Subsubsection
3145 subtitle.get(number basetime, number length)
3146 \end_layout
3148 \begin_layout Standard
3149 Read the specified subtitle.
3150  Returns 
3151 \begin_inset Quotes eld
3152 \end_inset
3155 \begin_inset Quotes erd
3156 \end_inset
3158  if the subtitle does not exist.
3159 \end_layout
3161 \begin_layout Subsubsection
3162 subtitle.set(number basetime, number length, string content)
3163 \end_layout
3165 \begin_layout Standard
3166 Set the specified subtitle.
3167 \end_layout
3169 \begin_layout Subsubsection
3170 subtitle.deltete(number basetime, number length)
3171 \end_layout
3173 \begin_layout Standard
3174 Delete the specified subtitle.
3175 \end_layout
3177 \begin_layout Subsection
3178 Table _SYSTEM
3179 \end_layout
3181 \begin_layout Standard
3182 Contains copy of global variables from time of Lua initialization.
3183  Non-writeable.
3184 \end_layout
3186 \begin_layout Subsection
3187 Callbacks
3188 \end_layout
3190 \begin_layout Standard
3191 Various callbacks to Lua that can occur.
3192 \end_layout
3194 \begin_layout Subsubsection
3195 Callback: on_paint(bool not_synth)
3196 \end_layout
3198 \begin_layout Standard
3199 Called when screen is being painted.
3200  Any gui.* calls requiring graphic context draw on the screen.
3201 \end_layout
3203 \begin_layout Standard
3204 not_synth is true if this hook is being called in response to received frame,
3205  false otherwise.
3206 \end_layout
3208 \begin_layout Subsubsection
3209 Callback: on_video()
3210 \end_layout
3212 \begin_layout Standard
3213 Called when video dump frame is being painted.
3214  Any gui.* calls requiring graphic context draw on the video.
3215 \end_layout
3217 \begin_layout Subsubsection
3218 Callback: on_frame_emulated()
3219 \end_layout
3221 \begin_layout Standard
3222 Called when emulating frame has completed and on_paint()/on_video() calls
3223  are about to be issued.
3224 \end_layout
3226 \begin_layout Subsubsection
3227 Callback: on_frame()
3228 \end_layout
3230 \begin_layout Standard
3231 Called on each starting whole frame.
3232 \end_layout
3234 \begin_layout Subsubsection
3235 Callback: on_startup()
3236 \end_layout
3238 \begin_layout Standard
3239 Called when the emulator is starting (lsnes.rc and --run files has been run).
3240 \end_layout
3242 \begin_layout Subsubsection
3243 Callback: on_rewind()
3244 \end_layout
3246 \begin_layout Standard
3247 Called when rewind movie to beginning has completed.
3248 \end_layout
3250 \begin_layout Subsubsection
3251 Callback: on_pre_load(string name)
3252 \end_layout
3254 \begin_layout Standard
3255 Called just before savestate/movie load occurs (note: loads are always delayed,
3256  so this occurs even when load was initiated by lua).
3257 \end_layout
3259 \begin_layout Subsubsection
3260 Callback: on_err_load(string name)
3261 \end_layout
3263 \begin_layout Standard
3264 Called if loadstate goes wrong.
3265 \end_layout
3267 \begin_layout Subsubsection
3268 Callback: on_post_load(string name, boolean was_savestate)
3269 \end_layout
3271 \begin_layout Standard
3272 Called on successful loadstate.
3273  was_savestate gives if this was a savestate or a movie.
3274 \end_layout
3276 \begin_layout Subsubsection
3277 Callback: on_pre_save(string name, boolean is_savestate)
3278 \end_layout
3280 \begin_layout Standard
3281 Called just before savestate save occurs (note: movie saves are synchronous
3282  and won't trigger these callbacks if called from Lua).
3283 \end_layout
3285 \begin_layout Subsubsection
3286 Callback: on_err_save(string name)
3287 \end_layout
3289 \begin_layout Standard
3290 Called if savestate goes wrong.
3291 \end_layout
3293 \begin_layout Subsubsection
3294 Callback: on_post_save(string name, boolean is_savestate)
3295 \end_layout
3297 \begin_layout Standard
3298 Called on successful savaestate.
3299  is_savestate gives if this was a savestate or a movie.
3300 \end_layout
3302 \begin_layout Subsubsection
3303 Callback: on_quit()
3304 \end_layout
3306 \begin_layout Standard
3307 Called when emulator is shutting down.
3308 \end_layout
3310 \begin_layout Subsubsection
3311 Callback: on_input(boolean subframe)
3312 \end_layout
3314 \begin_layout Standard
3315 Called when emulator is just sending input to bsnes core.
3316  Warning: This is called even in readonly mode, but the results are ignored.
3317 \end_layout
3319 \begin_layout Subsubsection
3320 Callback: on_reset()
3321 \end_layout
3323 \begin_layout Standard
3324 Called when SNES is reset.
3325 \end_layout
3327 \begin_layout Subsubsection
3328 Callback: on_readwrite()
3329 \end_layout
3331 \begin_layout Standard
3332 Called when moving into readwrite mode as result of 
3333 \begin_inset Quotes eld
3334 \end_inset
3336 set-rwmode
3337 \begin_inset Quotes erd
3338 \end_inset
3340  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3341  entry protection).
3342 \end_layout
3344 \begin_layout Subsubsection
3345 Callback: on_snoop(number port, number controller, number index, number
3346  value)
3347 \end_layout
3349 \begin_layout Standard
3350 Called each time bsnes asks for input.
3351  The value is the final value to be sent to bsnes core (readonly mode, autohold
3352  and autofire have been taken into account).
3353  Might be useful when translating movies to format suitable for console
3354  verification.
3355  Note: There is no way to modify the value to be sent.
3356 \end_layout
3358 \begin_layout Itemize
3359 Not called if callback on_snoop2 is defined.
3360 \end_layout
3362 \begin_layout Subsubsection
3363 Callback: on_snoop2(number port, number controller, number index, number
3364  value)
3365 \end_layout
3367 \begin_layout Standard
3368 Like on_snoop, but reserves port 0 for system, having first user port be
3369  port 1.
3370 \end_layout
3372 \begin_layout Subsubsection
3373 Callback: on_keyhook(string keyname, table state)
3374 \end_layout
3376 \begin_layout Standard
3377 Sent when key that has keyhook events requested changes state.
3378  Keyname is name of the key (group) and state is the state (same kind as
3379  table values in input.raw).
3380 \end_layout
3382 \begin_layout Subsubsection
3383 Callback: on_idle()
3384 \end_layout
3386 \begin_layout Standard
3387 Called when requested by set_idle_timeout(), the timeout has expired and
3388  emulator is waiting.
3389 \end_layout
3391 \begin_layout Subsubsection
3392 Callback: on_timer()
3393 \end_layout
3395 \begin_layout Standard
3396 Called when requested by set_idle_timeout() and the timeout has expired
3397  (regardless if emulator is waiting).
3398 \end_layout
3400 \begin_layout Subsubsection
3401 Callback: on_set_rewind(UNSAFEREWIND r)
3402 \end_layout
3404 \begin_layout Standard
3405 Called when unsafe rewind object has been constructed.
3406 \end_layout
3408 \begin_layout Subsubsection
3409 Callback: on_pre_rewind() 
3410 \end_layout
3412 \begin_layout Standard
3413 Called just before unsafe rewind is about to occur.
3414 \end_layout
3416 \begin_layout Subsubsection
3417 Callback: on_post_rewind() 
3418 \end_layout
3420 \begin_layout Standard
3421 Called just after unsafe rewind has occured.
3422 \end_layout
3424 \begin_layout Subsubsection
3425 Callback: on_button(number port, number controller, number index, string
3426  type)
3427 \end_layout
3429 \begin_layout Standard
3430 Called on controller button press, with following parameters:
3431 \end_layout
3433 \begin_layout Itemize
3434 port: Port number (0 is system)
3435 \end_layout
3437 \begin_layout Itemize
3438 controller: Controller within port
3439 \end_layout
3441 \begin_layout Itemize
3442 index: Index of button.
3443 \end_layout
3445 \begin_layout Itemize
3446 type: Type of event, one of:
3447 \end_layout
3449 \begin_deeper
3450 \begin_layout Itemize
3451 \begin_inset Quotes eld
3452 \end_inset
3454 pressed
3455 \begin_inset Quotes erd
3456 \end_inset
3458 : Button was pressed.
3459 \end_layout
3461 \begin_layout Itemize
3462 \begin_inset Quotes eld
3463 \end_inset
3465 released
3466 \begin_inset Quotes erd
3467 \end_inset
3469 : Button was released.
3470 \end_layout
3472 \begin_layout Itemize
3473 \begin_inset Quotes eld
3474 \end_inset
3476 hold
3477 \begin_inset Quotes erd
3478 \end_inset
3480 : Held.
3481 \end_layout
3483 \begin_layout Itemize
3484 \begin_inset Quotes eld
3485 \end_inset
3487 unhold
3488 \begin_inset Quotes erd
3489 \end_inset
3491 : Released from hold.
3492 \end_layout
3494 \begin_layout Itemize
3495 \begin_inset Quotes eld
3496 \end_inset
3498 type
3499 \begin_inset Quotes erd
3500 \end_inset
3502 : Typing input on button.
3503 \end_layout
3505 \begin_layout Itemize
3506 \begin_inset Quotes eld
3507 \end_inset
3509 untype
3510 \begin_inset Quotes erd
3511 \end_inset
3513 : Typing input undone.
3514 \end_layout
3516 \begin_layout Itemize
3517 \begin_inset Quotes eld
3518 \end_inset
3520 autofire <duty> <cycle>
3521 \begin_inset Quotes erd
3522 \end_inset
3524 : Autofire with specifie duty and cycle.
3525 \end_layout
3527 \begin_layout Itemize
3528 \begin_inset Quotes eld
3529 \end_inset
3531 autofire
3532 \begin_inset Quotes erd
3533 \end_inset
3535 : Stop autofire.
3536 \end_layout
3538 \begin_layout Itemize
3539 \begin_inset Quotes eld
3540 \end_inset
3542 analog
3543 \begin_inset Quotes erd
3544 \end_inset
3546 : Analog action on axis.
3547 \end_layout
3549 \end_deeper
3550 \begin_layout Section
3551 Movie editor
3552 \end_layout
3554 \begin_layout Itemize
3555 The editor edits in-memory movie.
3556 \end_layout
3558 \begin_layout Itemize
3559 Because past can't be edited and readwrite mode doesn't allow future, editing
3560  only works in 
3561 \emph on
3562 read only
3563 \emph default
3564  mode.
3565 \end_layout
3567 \begin_layout Itemize
3568 Keyboard triggers the normal hotkeys and bindings.
3569 \end_layout
3571 \begin_layout Subsection
3572 Left button actions
3573 \end_layout
3575 \begin_layout Itemize
3576 Clicking on cell in future (indicated by lack of redish background) toggles
3577  it (if it is a button) or prompts for a value (if it is an axis)
3578 \end_layout
3580 \begin_layout Itemize
3581 Dragging vertically toggles sequence of buttons or changes a sequence of
3582  axis values.
3583 \end_layout
3585 \begin_layout Subsection
3586 Right button actions
3587 \end_layout
3589 \begin_layout Standard
3590 The right mouse button pops up a context-sensitive menu:
3591 \end_layout
3593 \begin_layout Itemize
3594 Toggle <something>: Toggle this button
3595 \end_layout
3597 \begin_layout Itemize
3598 Change <something>: Change this axis value
3599 \end_layout
3601 \begin_layout Itemize
3602 Insert frame after: Insert a frame after this frame
3603 \end_layout
3605 \begin_layout Itemize
3606 Append frame: Append a frame to movie
3607 \end_layout
3609 \begin_layout Itemize
3610 Append frames: Append specified number of frames to movie
3611 \end_layout
3613 \begin_layout Itemize
3614 Delete frame: Delete this frame
3615 \end_layout
3617 \begin_layout Itemize
3618 Delete subframe: Delete this subframe
3619 \end_layout
3621 \begin_layout Itemize
3622 Truncate movie: Delete this subframe and everything after it.
3623 \end_layout
3625 \begin_layout Itemize
3626 Scroll to frame: Prompt for a frame and scroll the display to that frame.
3627 \end_layout
3629 \begin_layout Itemize
3630 Scroll to current frame: Scroll the display to current position
3631 \end_layout
3633 \begin_layout Itemize
3634 Run to frame: Prompts for frame and runs the emulation to that frame.
3635 \end_layout
3637 \begin_layout Itemize
3638 Change number of lines visible: Change the height of the movie display (1
3639  to 255).
3640 \end_layout
3642 \begin_layout Itemize
3643 Lock scroll to playback: While playing back or rewinding movies, the display
3644  will follow if enabled.
3645 \end_layout
3647 \begin_layout Section
3648 Memory watch expression syntax
3649 \end_layout
3651 \begin_layout Standard
3652 Memory watch expressions are in RPN (Reverse Polish Notation).
3653  At the end of expression, the top entry on stack is taken as the final
3654  result.
3655 \end_layout
3657 \begin_layout Standard
3658 Notations:
3659 \end_layout
3661 \begin_layout Itemize
3662 Evaluation order is strictly left to right.
3663 \end_layout
3665 \begin_layout Itemize
3666 a is the entry on top of stack
3667 \end_layout
3669 \begin_layout Itemize
3670 b is the entry immediately below top of stack
3671 \end_layout
3673 \begin_layout Itemize
3674 ; separates values to be pushed (no intermediate pop).
3675 \end_layout
3677 \begin_layout Itemize
3678 After end of element, all used stack slots are popped and all results are
3679  pushed.
3680 \end_layout
3682 \begin_layout Itemize
3683 When pushing multiple values, the pushes occur in order shown.
3684 \end_layout
3686 \begin_layout Standard
3687 The following operators are available:
3688 \end_layout
3690 \begin_layout Itemize
3691 + : a + b
3692 \end_layout
3694 \begin_layout Itemize
3695 - : a - b
3696 \end_layout
3698 \begin_layout Itemize
3699 * : a * b
3700 \end_layout
3702 \begin_layout Itemize
3703 / : a / b
3704 \end_layout
3706 \begin_layout Itemize
3707 % : a % b
3708 \end_layout
3710 \begin_layout Itemize
3711 a : atan(a)
3712 \end_layout
3714 \begin_layout Itemize
3715 b : read_signed_byte(a)
3716 \end_layout
3718 \begin_layout Itemize
3719 c : cos(a)
3720 \end_layout
3722 \begin_layout Itemize
3723 d : read_signed_dword(a)
3724 \end_layout
3726 \begin_layout Itemize
3727 i : quotent(a / b)
3728 \end_layout
3730 \begin_layout Itemize
3731 p :
3732 \begin_inset Formula $\pi$
3733 \end_inset
3736 \end_layout
3738 \begin_layout Itemize
3739 q : read_signed_qword(a)
3740 \end_layout
3742 \begin_layout Itemize
3743 r : sqrt(a)
3744 \end_layout
3746 \begin_layout Itemize
3747 s : sin(a)
3748 \end_layout
3750 \begin_layout Itemize
3751 t : tan(a)
3752 \end_layout
3754 \begin_layout Itemize
3755 u : a; a
3756 \end_layout
3758 \begin_layout Itemize
3759 w : read_signed_word(a)
3760 \end_layout
3762 \begin_layout Itemize
3763 A : atan2(a, b)
3764 \end_layout
3766 \begin_layout Itemize
3767 B : read_unsigned_byte(a)
3768 \end_layout
3770 \begin_layout Itemize
3771 C<number>z : Push number <number> to stack.
3772 \end_layout
3774 \begin_layout Itemize
3775 D : read_unsigned_dword(a)
3776 \end_layout
3778 \begin_layout Itemize
3779 C0x<number>z : Push number <number> (hexadecimal) to stack.
3780 \end_layout
3782 \begin_layout Itemize
3783 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
3784  for 10-16 digits).
3785 \end_layout
3787 \begin_layout Itemize
3788 Q : read_unsigned_qword(a)
3789 \end_layout
3791 \begin_layout Itemize
3792 R<digit> : round a to <digit> digits.
3793 \end_layout
3795 \begin_layout Itemize
3796 W : read_unsigned_word(a)
3797 \end_layout
3799 \begin_layout Subsection
3800 Example:
3801 \end_layout
3803 \begin_layout Standard
3804 C0x007e0878zWC0x007e002czW-
3805 \end_layout
3807 \begin_layout Enumerate
3808 Push value 0x7e0878 on top of stack (C0x007e0878z).
3809 \end_layout
3811 \begin_layout Enumerate
3812 Pop the value on top of stack (0x7e0878), read word value at that address
3813  and push the result,call it x1 (W).
3814 \end_layout
3816 \begin_layout Enumerate
3817 Push value 0x7e002c on top of stack (C0x007e002cz).
3818 \end_layout
3820 \begin_layout Enumerate
3821 Pop the value on top of stack (0x7e002c), read word value at that address
3822  and push the result,call it x2 (W).
3823 \end_layout
3825 \begin_layout Enumerate
3826 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3827  x2 - x1 (-).
3828 \end_layout
3830 \begin_layout Enumerate
3831 Since the expression ends, the final memory watch result is the top one
3832  on stack, which is x2 - x1.
3833 \end_layout
3835 \begin_layout Section
3836 Modifier and key names:
3837 \end_layout
3839 \begin_layout Subsection
3840 wxWidgets platform
3841 \end_layout
3843 \begin_layout Subsubsection
3844 Modifier names:
3845 \end_layout
3847 \begin_layout Standard
3848 Following modifier names are known:
3849 \end_layout
3851 \begin_layout Itemize
3853 \end_layout
3855 \begin_layout Itemize
3856 ctrl
3857 \end_layout
3859 \begin_layout Itemize
3860 shift 
3861 \end_layout
3863 \begin_layout Itemize
3864 meta
3865 \end_layout
3867 \begin_layout Itemize
3868 cmd (Mac OS X only)
3869 \end_layout
3871 \begin_layout Subsubsection
3872 Key names:
3873 \end_layout
3875 \begin_layout Standard
3876 Following key names are known:
3877 \end_layout
3879 \begin_layout Itemize
3880 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3881  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3882  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3883  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3884  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3885  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3886  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3887  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3888  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3889  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3890  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3891  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3892  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3893  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3894  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3895  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3896  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3897  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3898  windows_right, windows_menu, command, special1, special2, special3, special4,
3899  special5, special6, special7, special8, special9, special10, special11,
3900  special12, special13, special14, special15, special16, special17, special18,
3901  special19, special20
3902 \end_layout
3904 \begin_layout Section
3905 Movie file format
3906 \end_layout
3908 \begin_layout Standard
3909 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3910  (note: If you recompress it, do not use compression methods other than
3911  store and deflate and especially do not use encryption of any kind).
3912 \end_layout
3914 \begin_layout Subsection
3915 Detecting clean start/SRAM/Savestate
3916 \end_layout
3918 \begin_layout Itemize
3919 If file has member 
3920 \begin_inset Quotes eld
3921 \end_inset
3923 savestate
3924 \begin_inset Quotes erd
3925 \end_inset
3927  it is savestate, otherwise:
3928 \end_layout
3930 \begin_layout Itemize
3931 If file has members with names starting 
3932 \begin_inset Quotes eld
3933 \end_inset
3935 moviesram.
3936 \begin_inset Quotes erd
3937 \end_inset
3939  it is movie starting from SRAM, otherwise:
3940 \end_layout
3942 \begin_layout Itemize
3943 It is movie starting from clear state.
3944 \end_layout
3946 \begin_layout Subsection
3947 Member: gametype
3948 \end_layout
3950 \begin_layout Standard
3951 Type of game ROM and region (as one line).
3952  Valid values are:
3953 \end_layout
3955 \begin_layout Standard
3956 \begin_inset Tabular
3957 <lyxtabular version="3" rows="8" columns="3">
3958 <features tabularvalignment="middle">
3959 <column alignment="center" valignment="top" width="0">
3960 <column alignment="center" valignment="top" width="0">
3961 <column alignment="center" valignment="top" width="0">
3962 <row>
3963 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3964 \begin_inset Text
3966 \begin_layout Plain Layout
3967 Value
3968 \end_layout
3970 \end_inset
3971 </cell>
3972 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3973 \begin_inset Text
3975 \begin_layout Plain Layout
3976 System
3977 \end_layout
3979 \end_inset
3980 </cell>
3981 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3982 \begin_inset Text
3984 \begin_layout Plain Layout
3985 Region
3986 \end_layout
3988 \end_inset
3989 </cell>
3990 </row>
3991 <row>
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3993 \begin_inset Text
3995 \begin_layout Plain Layout
3996 snes_pal
3997 \end_layout
3999 \end_inset
4000 </cell>
4001 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4002 \begin_inset Text
4004 \begin_layout Plain Layout
4005 Super NES
4006 \end_layout
4008 \end_inset
4009 </cell>
4010 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4011 \begin_inset Text
4013 \begin_layout Plain Layout
4015 \end_layout
4017 \end_inset
4018 </cell>
4019 </row>
4020 <row>
4021 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4022 \begin_inset Text
4024 \begin_layout Plain Layout
4025 sgb_pal
4026 \end_layout
4028 \end_inset
4029 </cell>
4030 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4031 \begin_inset Text
4033 \begin_layout Plain Layout
4034 Super Game Boy
4035 \end_layout
4037 \end_inset
4038 </cell>
4039 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4040 \begin_inset Text
4042 \begin_layout Plain Layout
4044 \end_layout
4046 \end_inset
4047 </cell>
4048 </row>
4049 <row>
4050 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4051 \begin_inset Text
4053 \begin_layout Plain Layout
4054 snes_ntsc
4055 \end_layout
4057 \end_inset
4058 </cell>
4059 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4060 \begin_inset Text
4062 \begin_layout Plain Layout
4063 Super NES
4064 \end_layout
4066 \end_inset
4067 </cell>
4068 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4069 \begin_inset Text
4071 \begin_layout Plain Layout
4072 NTSC
4073 \end_layout
4075 \end_inset
4076 </cell>
4077 </row>
4078 <row>
4079 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4080 \begin_inset Text
4082 \begin_layout Plain Layout
4083 sgb_ntsc
4084 \end_layout
4086 \end_inset
4087 </cell>
4088 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4089 \begin_inset Text
4091 \begin_layout Plain Layout
4092 Super Game Boy
4093 \end_layout
4095 \end_inset
4096 </cell>
4097 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4098 \begin_inset Text
4100 \begin_layout Plain Layout
4101 NTSC
4102 \end_layout
4104 \end_inset
4105 </cell>
4106 </row>
4107 <row>
4108 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4109 \begin_inset Text
4111 \begin_layout Plain Layout
4113 \end_layout
4115 \end_inset
4116 </cell>
4117 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4118 \begin_inset Text
4120 \begin_layout Plain Layout
4121 BS-X (non-slotted)
4122 \end_layout
4124 \end_inset
4125 </cell>
4126 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4127 \begin_inset Text
4129 \begin_layout Plain Layout
4130 NTSC
4131 \end_layout
4133 \end_inset
4134 </cell>
4135 </row>
4136 <row>
4137 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4138 \begin_inset Text
4140 \begin_layout Plain Layout
4141 bsxslotted
4142 \end_layout
4144 \end_inset
4145 </cell>
4146 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4147 \begin_inset Text
4149 \begin_layout Plain Layout
4150 BS-X (slotted)
4151 \end_layout
4153 \end_inset
4154 </cell>
4155 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4156 \begin_inset Text
4158 \begin_layout Plain Layout
4159 NTSC
4160 \end_layout
4162 \end_inset
4163 </cell>
4164 </row>
4165 <row>
4166 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4167 \begin_inset Text
4169 \begin_layout Plain Layout
4170 sufamiturbo
4171 \end_layout
4173 \end_inset
4174 </cell>
4175 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4176 \begin_inset Text
4178 \begin_layout Plain Layout
4179 Sufami Turbo
4180 \end_layout
4182 \end_inset
4183 </cell>
4184 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4185 \begin_inset Text
4187 \begin_layout Plain Layout
4188 NTSC
4189 \end_layout
4191 \end_inset
4192 </cell>
4193 </row>
4194 </lyxtabular>
4196 \end_inset
4199 \end_layout
4201 \begin_layout Standard
4202 Frame rates are:
4203 \end_layout
4205 \begin_layout Standard
4206 \begin_inset Tabular
4207 <lyxtabular version="3" rows="3" columns="2">
4208 <features tabularvalignment="middle">
4209 <column alignment="center" valignment="top" width="0">
4210 <column alignment="center" valignment="top" width="0">
4211 <row>
4212 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4213 \begin_inset Text
4215 \begin_layout Plain Layout
4216 Region
4217 \end_layout
4219 \end_inset
4220 </cell>
4221 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4222 \begin_inset Text
4224 \begin_layout Plain Layout
4225 Framerate (fps)
4226 \end_layout
4228 \end_inset
4229 </cell>
4230 </row>
4231 <row>
4232 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4233 \begin_inset Text
4235 \begin_layout Plain Layout
4237 \end_layout
4239 \end_inset
4240 </cell>
4241 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4242 \begin_inset Text
4244 \begin_layout Plain Layout
4245 322445/6448
4246 \end_layout
4248 \end_inset
4249 </cell>
4250 </row>
4251 <row>
4252 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4253 \begin_inset Text
4255 \begin_layout Plain Layout
4256 NTSC
4257 \end_layout
4259 \end_inset
4260 </cell>
4261 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4262 \begin_inset Text
4264 \begin_layout Plain Layout
4265 10738636/178683
4266 \end_layout
4268 \end_inset
4269 </cell>
4270 </row>
4271 </lyxtabular>
4273 \end_inset
4276 \end_layout
4278 \begin_layout Subsection
4279 Member: port1
4280 \end_layout
4282 \begin_layout Standard
4283 Contains type of port #1 (as one line).
4284  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4285  If not present, defaults to 'gamepad'.
4286 \end_layout
4288 \begin_layout Subsection
4289 Member: port2
4290 \end_layout
4292 \begin_layout Standard
4293 Contains type of port #2 (as one line).
4294  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4295  'justifier' and 'justifiers'.
4296  If not present, defaults to 'none'.
4297 \end_layout
4299 \begin_layout Subsection
4300 Member: gamename
4301 \end_layout
4303 \begin_layout Standard
4304 Contains name of the game (as one line).
4305 \end_layout
4307 \begin_layout Subsection
4308 Member: authors
4309 \end_layout
4311 \begin_layout Standard
4312 Contains authors, one per line.
4313  Part before '|' is the full name, part after is the nickname.
4314 \end_layout
4316 \begin_layout Subsection
4317 Member: systemid
4318 \end_layout
4320 \begin_layout Standard
4321 Always 
4322 \begin_inset Quotes eld
4323 \end_inset
4325 lsnes-rr1
4326 \begin_inset Quotes erd
4327 \end_inset
4329  (one line).
4330  Used to reject other saves.
4331 \end_layout
4333 \begin_layout Subsection
4334 Member: controlsversion
4335 \end_layout
4337 \begin_layout Standard
4338 Always 
4339 \begin_inset Quotes eld
4340 \end_inset
4343 \begin_inset Quotes erd
4344 \end_inset
4346  (one line).
4347  Used to identify what controls are there.
4348 \end_layout
4350 \begin_layout Subsection
4351 Member: 
4352 \begin_inset Quotes eld
4353 \end_inset
4355 coreversion
4356 \begin_inset Quotes erd
4357 \end_inset
4360 \end_layout
4362 \begin_layout Standard
4363 Contains bsnes core version number (as one line).
4364 \end_layout
4366 \begin_layout Subsection
4367 Member: projectid
4368 \end_layout
4370 \begin_layout Standard
4371 Contains project ID (as one line).
4372  Used to identify if two movies are part of the same project.
4373 \end_layout
4375 \begin_layout Subsection
4376 Member: {rom,slota,slotb}{,xml}.sha256
4377 \end_layout
4379 \begin_layout Standard
4380 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4381  Absent if corresponding file is absent.
4382 \end_layout
4384 \begin_layout Subsection
4385 Member: moviesram.<name>
4386 \end_layout
4388 \begin_layout Standard
4389 Raw binary startup SRAM of kind <name>.
4390  Only present in savestates and movies starting from SRAM.
4391 \end_layout
4393 \begin_layout Subsection
4394 Member: saveframe
4395 \end_layout
4397 \begin_layout Standard
4398 Contains frame number (as one line) of frame movie was saved on.
4399  Only present in savestates.
4400 \end_layout
4402 \begin_layout Subsection
4403 Member: lagcounter
4404 \end_layout
4406 \begin_layout Standard
4407 Current value of lag counter (as one line).
4408  Only present in savestates.
4409 \end_layout
4411 \begin_layout Subsection
4412 Member: pollcounters
4413 \end_layout
4415 \begin_layout Standard
4416 Contains poll counters (currently 100 of them), one per line.
4417  Each line is raw poll count if DRDY is set for it.
4418  Otherwise it is negative poll count minus one.
4419  Only present in savestates.
4420 \end_layout
4422 \begin_layout Subsection
4423 Member: hostmemory
4424 \end_layout
4426 \begin_layout Standard
4427 Raw binary dump of host memory.
4428  Only present in savestates.
4429 \end_layout
4431 \begin_layout Subsection
4432 Member: savestate
4433 \end_layout
4435 \begin_layout Standard
4436 The raw binary savestate itself.
4437  Savestate detection uses this file, only present in savestates.
4438 \end_layout
4440 \begin_layout Subsection
4441 Member: screenshot
4442 \end_layout
4444 \begin_layout Standard
4445 Screenshot of current frame.
4446  Only present in savestates.
4447  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4448  data.
4449  Height of image is inferred from the width and size of data.
4450 \end_layout
4452 \begin_layout Subsection
4453 Member: sram.<name>
4454 \end_layout
4456 \begin_layout Standard
4457 Raw binary SRAM of kind <name> at time of savestate.
4458  Only present in savestates.
4459 \end_layout
4461 \begin_layout Subsection
4462 Member: input
4463 \end_layout
4465 \begin_layout Standard
4466 The actual input track, one line per subframe (blank lines are skipped).
4467 \end_layout
4469 \begin_layout Itemize
4470 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4471  part of same frame as previous, otherwise it starts a new frame.
4472 \end_layout
4474 \begin_layout Itemize
4475 First subframe must start a new frame.
4476 \end_layout
4478 \begin_layout Standard
4479 Length of movie in frames is number of lines in input file that start a
4480  new frame.
4481 \end_layout
4483 \begin_layout Subsection
4484 Member: subtitles
4485 \end_layout
4487 \begin_layout Standard
4488 Subtitle track.
4489  Optional.
4490 \end_layout
4492 \begin_layout Itemize
4493 Each line is in form <firstframe> <numframes> <text>.
4494 \end_layout
4496 \begin_layout Itemize
4497 Linefeed is encoded as 
4498 \backslash
4499 n, backslash is encoded as 
4500 \backslash
4502 \backslash
4504 \end_layout
4506 \begin_layout Subsection
4507 Member: rerecords
4508 \end_layout
4510 \begin_layout Standard
4511 Contains textual base-10 rerecord count (as one line; emulator just writes
4512  this, it doesn't read it) + 1.
4513 \end_layout
4515 \begin_layout Subsection
4516 Member: rrdata
4517 \end_layout
4519 \begin_layout Standard
4520 This member stores set of load IDs.
4521  There is one load ID per rerecord (plus one corresponding to start of project).
4522 \end_layout
4524 \begin_layout Itemize
4525 This member constists of concatenation of records
4526 \end_layout
4528 \begin_layout Itemize
4529 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4530  IDs.
4531 \end_layout
4533 \begin_layout Itemize
4534 IDs are interpretted as 256-bit big-endian integers with warparound.
4535 \end_layout
4537 \begin_layout Itemize
4538 Initial predicted ID is all zeroes.
4539 \end_layout
4541 \begin_layout Standard
4542 Format of each record is:
4543 \end_layout
4545 \begin_layout Itemize
4546 1 byte: Opcode byte.
4547  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4548  Bit 7 is unused.
4549 \end_layout
4551 \begin_layout Itemize
4552 32-prefixlen bytes of ID.
4553 \end_layout
4555 \begin_layout Itemize
4556 countlen bytes of big-endian count (count).
4557 \end_layout
4559 \begin_layout Standard
4560 Records are processed as follows:
4561 \end_layout
4563 \begin_layout Itemize
4564 To form the first ID encoded by record, take the first prefixlen bytes predicted
4565  ID and append the read ID value to it.
4566  The result is the first ID encoded.
4567 \end_layout
4569 \begin_layout Itemize
4570 If countlen is 0, record encodes 1 ID.
4571 \end_layout
4573 \begin_layout Itemize
4574 If countlen is 1, record encodes 2+count IDs.
4575 \end_layout
4577 \begin_layout Itemize
4578 If countlen is 2, record encodes 258+count IDs.
4579 \end_layout
4581 \begin_layout Itemize
4582 If countlen is 3, record encodes 65794+count IDs.
4583 \end_layout
4585 \begin_layout Itemize
4586 The new predicted ID is the next ID after last one encoded by the record.
4587 \end_layout
4589 \begin_layout Standard
4590 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4591  by all records.
4592 \end_layout
4594 \begin_layout Subsection
4595 Member: starttime.second
4596 \end_layout
4598 \begin_layout Standard
4599 Movie starting time, second part.
4600  Epoch is Unix epoch.
4601  Default is 1,000,000,000.
4602 \end_layout
4604 \begin_layout Subsection
4605 Member: starttime.subsecond
4606 \end_layout
4608 \begin_layout Standard
4609 Movie starting time, subsecond part.
4610  Unit is CPU clocks.
4611  Default is 0.
4612 \end_layout
4614 \begin_layout Subsection
4615 Member: savetime.second
4616 \end_layout
4618 \begin_layout Standard
4619 Movie saving time, second part.
4620  Default is starttime.second.
4621  Only present in savestates.
4622 \end_layout
4624 \begin_layout Subsection
4625 Member: savetime.subsecond
4626 \end_layout
4628 \begin_layout Standard
4629 Movie saving time, subsecond part.
4630  Default is starttime.subsecond.
4631  Only present in savestates.
4632 \end_layout
4634 \begin_layout Section
4635 lsvs file format (commentary tracks)
4636 \end_layout
4638 \begin_layout Subsection
4639 Clusters
4640 \end_layout
4642 \begin_layout Itemize
4643 Each cluster is 8kB (8192 bytes) in size.
4644 \end_layout
4646 \begin_layout Itemize
4647 Cluster n starts at offset 8192*n in file.
4648 \end_layout
4650 \begin_layout Itemize
4651 The following clusters are system special:
4652 \end_layout
4654 \begin_deeper
4655 \begin_layout Itemize
4656 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4657 \end_layout
4659 \begin_layout Itemize
4660 Cluster 1 (superblock)
4661 \end_layout
4663 \end_deeper
4664 \begin_layout Subsection
4665 Cluster tables
4666 \end_layout
4668 \begin_layout Itemize
4669 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4670  last 11 bits of n).
4671 \end_layout
4673 \begin_layout Itemize
4674 This cluster table consists of 2048 4-byte big-endian integers.
4675 \end_layout
4677 \begin_layout Itemize
4678 Each entry describes a cluster in 16MB supercluster, in order.
4679 \end_layout
4681 \begin_layout Itemize
4682 The valid values for entries are:
4683 \end_layout
4685 \begin_deeper
4686 \begin_layout Itemize
4687 0x00000000: Free cluster
4688 \end_layout
4690 \begin_layout Itemize
4691 0x00000001: Last cluster in chain.
4692 \end_layout
4694 \begin_layout Itemize
4695 0xFFFFFFFF: System cluster (cluster tables and superblock)
4696 \end_layout
4698 \begin_layout Itemize
4699 (anything else): Number of next cluster in chain.
4700  Must not be multiple of 2048.
4701 \end_layout
4703 \end_deeper
4704 \begin_layout Itemize
4705 Due to limitations of the format, there can be at most 2097052 superclusters,
4706  giving maximum file size of 16TB.
4707 \end_layout
4709 \begin_layout Subsection
4710 Stream table
4711 \end_layout
4713 \begin_layout Itemize
4714 The stream table chain always starts in cluster 2.
4715 \end_layout
4717 \begin_layout Itemize
4718 Otherwise, it follows normal chaining.
4719 \end_layout
4721 \begin_layout Itemize
4722 The stream table consists of 16-byte entries:
4723 \end_layout
4725 \begin_deeper
4726 \begin_layout Itemize
4727 The first 8 bytes of entry give big-endian beginning position of stream
4728  in units of 1/48000 s.
4729 \end_layout
4731 \begin_layout Itemize
4732 The next 4 bytes of entry give big-endian beginning cluster for control
4733  data.
4734  0 here marks the entry as not present.
4735 \end_layout
4737 \begin_layout Itemize
4738 The last 4 bytes of entry give big-endian beginning cluster for codec data.
4739 \end_layout
4741 \end_deeper
4742 \begin_layout Itemize
4743 Stream table clusters are normal clusters, following normal chaining.
4744 \end_layout
4746 \begin_layout Itemize
4747 The stream begnning position is not guarenteed unique.
4748  There can be multiple streams with the same starting position in the file.
4749 \end_layout
4751 \begin_layout Subsection
4752 Stream control data
4753 \end_layout
4755 \begin_layout Itemize
4756 The stream control data consists of entries 4 bytes each:
4757 \end_layout
4759 \begin_deeper
4760 \begin_layout Itemize
4761 The first 2 bytes of entry gives big-endian length of packet
4762 \end_layout
4764 \begin_layout Itemize
4765 The next byte of entry gives audio length of packet in units of 1/400 s.
4766 \end_layout
4768 \begin_layout Itemize
4769 The last byte is control byte.
4770 \end_layout
4772 \begin_deeper
4773 \begin_layout Itemize
4774 0 means this entry is not present and the control data ends.
4775 \end_layout
4777 \begin_layout Itemize
4778 1 is valid control entry.
4779 \end_layout
4781 \end_deeper
4782 \end_deeper
4783 \begin_layout Itemize
4784 The stream control data can also end by running into end of the readable
4785  chain.
4786 \end_layout
4788 \begin_deeper
4789 \begin_layout Itemize
4790 This happens if there happens to be exact multiple of 2048 packets in stream
4791  and number of packets is nonzero.
4792 \end_layout
4794 \end_deeper
4795 \begin_layout Itemize
4796 These clusters follow normal chaining.
4797 \end_layout
4799 \begin_layout Subsection
4800 Stream codec data
4801 \end_layout
4803 \begin_layout Itemize
4804 Stream codec data consists of raw Opus data packets packed back to back
4805  with nothing in between.
4806 \end_layout
4808 \begin_layout Itemize
4809 Warning: Due to internal limitations, this data must reside in the first
4810  65536 superclusters (that is, the first 1TB of the file).
4811 \end_layout
4813 \begin_layout Subsection
4814 Superblock
4815 \end_layout
4817 \begin_layout Itemize
4818 The superblock is stored in cluster 1.
4820 \end_layout
4822 \begin_layout Itemize
4823 The first 11 bytes are 
4824 \begin_inset Quotes eld
4825 \end_inset
4827 sefs-magic
4828 \begin_inset Quotes erd
4829 \end_inset
4831 <NUL>.
4832 \end_layout
4834 \begin_layout Itemize
4835 The rest are unused.
4836 \end_layout
4838 \begin_layout Itemize
4839 This cluster 1 is marked as system special.
4840 \end_layout
4842 \begin_layout Section
4843 Known ROM extensions
4844 \end_layout
4846 \begin_layout Itemize
4847 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4848 \end_layout
4850 \begin_layout Itemize
4851 DMG cartridge ROMs: dmg, gb.
4852 \end_layout
4854 \begin_layout Itemize
4855 GBC cartridge ROMs: cgb, gbc.
4856 \end_layout
4858 \begin_layout Section
4859 Gamepack files
4860 \end_layout
4862 \begin_layout Itemize
4863 The first line must be: 
4864 \begin_inset Quotes eld
4865 \end_inset
4867 [GAMEPACK FILE]
4868 \begin_inset Quotes erd
4869 \end_inset
4872 \end_layout
4874 \begin_layout Itemize
4875 There is one needed line: 
4876 \begin_inset Quotes eld
4877 \end_inset
4879 type <systype>
4880 \begin_inset Quotes erd
4881 \end_inset
4884  This sets system type to <systype>.
4885  The following system types are valid:
4886 \end_layout
4888 \begin_deeper
4889 \begin_layout Itemize
4890 snes (SNES)
4891 \end_layout
4893 \begin_layout Itemize
4894 bsx (BS-X non-slotted)
4895 \end_layout
4897 \begin_layout Itemize
4898 bsxslotted (BS-X slotted)
4899 \end_layout
4901 \begin_layout Itemize
4902 sufamiturbo (Sufami Turbo)
4903 \end_layout
4905 \begin_layout Itemize
4906 sgb (Super Game Boy)
4907 \end_layout
4909 \begin_layout Itemize
4910 dmg (Game Boy)
4911 \end_layout
4913 \begin_layout Itemize
4914 gbc (Game Boy Color)
4915 \end_layout
4917 \begin_layout Itemize
4918 gbc_gba (Game Boy Color with GBA initial register values)
4919 \end_layout
4921 \end_deeper
4922 \begin_layout Itemize
4923 Optionally a region can be specified: 
4924 \begin_inset Quotes eld
4925 \end_inset
4927 region <region>
4928 \begin_inset Quotes erd
4929 \end_inset
4932  The following values are valid:
4933 \end_layout
4935 \begin_deeper
4936 \begin_layout Itemize
4937 autodetect (Autodetect region: snes and sgb only)
4938 \end_layout
4940 \begin_layout Itemize
4941 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4942 \end_layout
4944 \begin_layout Itemize
4945 pal (PAL: snes, sgb)
4946 \end_layout
4948 \begin_layout Itemize
4949 world (World: dmg, gbc, gbc_gba)
4950 \end_layout
4952 \end_deeper
4953 \begin_layout Itemize
4954 ROM images are loaded as: 
4955 \begin_inset Quotes eld
4956 \end_inset
4958 rom <type> <file>
4959 \begin_inset Quotes erd
4960 \end_inset
4963  The following types are valid:
4964 \end_layout
4966 \begin_deeper
4967 \begin_layout Itemize
4968 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4969  BIOS in bsx, bsxslotted, sufamiturbo)
4970 \end_layout
4972 \begin_layout Itemize
4973 bsx (Cartridge ROM in bsx, bsxslotted)
4974 \end_layout
4976 \begin_layout Itemize
4977 slot-a (Cartridge ROM in sufamiturbo)
4978 \end_layout
4980 \begin_layout Itemize
4981 slot-b (Cartridge ROM in sufamiturbo)
4982 \end_layout
4984 \end_deeper
4985 \begin_layout Itemize
4986 ROM markup can be loaded as: 
4987 \begin_inset Quotes eld
4988 \end_inset
4990 xml <type> <file>
4991 \begin_inset Quotes erd
4992 \end_inset
4995  The types valid are the same as for ROMs.
4996 \end_layout
4998 \begin_layout Itemize
4999 Patches can be loaded as 
5000 \begin_inset Quotes eld
5001 \end_inset
5003 patch[<offset>] <type> <file>
5004 \begin_inset Quotes erd
5005 \end_inset
5008  The types are the same as for ROMs.
5009 \end_layout
5011 \begin_deeper
5012 \begin_layout Itemize
5013 Offset is given in form [+-]<number>.
5014  Usually offset is either +0 or -512.
5015 \end_layout
5017 \begin_layout Itemize
5018 Default offset is +0.
5019 \end_layout
5021 \end_deeper
5022 \begin_layout Subsection
5023 Example:
5024 \end_layout
5026 \begin_layout LyX-Code
5027 [GAMEPACK FILE]
5028 \end_layout
5030 \begin_layout LyX-Code
5031 type snes
5032 \end_layout
5034 \begin_layout LyX-Code
5035 rom rom speedygonzales.sfc
5036 \end_layout
5038 \begin_layout LyX-Code
5039 patch-512 rom sonicthehedgehog.ips
5040 \end_layout
5042 \begin_layout Subsection
5043 Example 2:
5044 \end_layout
5046 \begin_layout LyX-Code
5047 [GAMEPACK FILE]
5048 \end_layout
5050 \begin_layout LyX-Code
5051 type sgb
5052 \end_layout
5054 \begin_layout LyX-Code
5055 rom rom supergameboy.sfc
5056 \end_layout
5058 \begin_layout LyX-Code
5059 rom dmg megamanV.dmg
5060 \end_layout
5062 \begin_layout Section
5063 Quick'n'dirty encode guide
5064 \end_layout
5066 \begin_layout Enumerate
5067 Start the emulator and load the ROM and movie file.
5068 \end_layout
5070 \begin_layout Enumerate
5071 Set large AVI option 'set-setting avi-large on'
5072 \end_layout
5074 \begin_layout Enumerate
5075 Enable dumping 'dump-avi tmpdump' 
5076 \end_layout
5078 \begin_layout Enumerate
5079 Unpause and let it run until you want to end dumping.
5080 \end_layout
5082 \begin_layout Enumerate
5083 Close the emulator (closing the window is the easiest way).
5084  Or use 'end-avi'.
5085 \end_layout
5087 \begin_layout Enumerate
5088 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5089  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5090 \end_layout
5092 \begin_layout Enumerate
5093 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5094 \end_layout
5096 \begin_layout Enumerate
5097 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5098  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5099 \end_layout
5101 \begin_layout Enumerate
5102 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5103  Now final.mkv contains quick'n'dirty encode.
5104 \end_layout
5106 \begin_layout Section
5107 Axis configurations for some gamepad types:
5108 \end_layout
5110 \begin_layout Subsection
5111 XBox360 controller:
5112 \end_layout
5114 \begin_layout Standard
5115 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5116 \end_layout
5118 \begin_layout LyX-Code
5119 set-axis joystick0axis2 pressure-+
5120 \end_layout
5122 \begin_layout LyX-Code
5123 set-axis joystick0axis5 pressure-+
5124 \end_layout
5126 \begin_layout Itemize
5127 This is needed for SDL only.
5128  EVDEV sets those types correctly.
5129 \end_layout
5131 \begin_layout Subsection
5132 PS3 
5133 \begin_inset Quotes eld
5134 \end_inset
5136 sixaxis
5137 \begin_inset Quotes erd
5138 \end_inset
5140  controller:
5141 \end_layout
5143 \begin_layout Standard
5144 Axes 8-19 should be disabled.
5145 \end_layout
5147 \begin_layout LyX-Code
5148 set-axis joystick0axis8 disabled
5149 \end_layout
5151 \begin_layout LyX-Code
5152 set-axis joystick0axis9 disabled
5153 \end_layout
5155 \begin_layout LyX-Code
5156 set-axis joystick0axis10 disabled
5157 \end_layout
5159 \begin_layout LyX-Code
5160 set-axis joystick0axis11 disabled
5161 \end_layout
5163 \begin_layout LyX-Code
5164 set-axis joystick0axis12 disabled
5165 \end_layout
5167 \begin_layout LyX-Code
5168 set-axis joystick0axis13 disabled
5169 \end_layout
5171 \begin_layout LyX-Code
5172 set-axis joystick0axis14 disabled
5173 \end_layout
5175 \begin_layout LyX-Code
5176 set-axis joystick0axis15 disabled
5177 \end_layout
5179 \begin_layout LyX-Code
5180 set-axis joystick0axis16 disabled
5181 \end_layout
5183 \begin_layout LyX-Code
5184 set-axis joystick0axis17 disabled
5185 \end_layout
5187 \begin_layout LyX-Code
5188 set-axis joystick0axis18 disabled
5189 \end_layout
5191 \begin_layout LyX-Code
5192 set-axis joystick0axis19 disabled
5193 \end_layout
5195 \begin_layout Section
5196 Errata:
5197 \end_layout
5199 \begin_layout Subsection
5200 Problems from BSNES core:
5201 \end_layout
5203 \begin_layout Itemize
5204 The whole pending save stuff.
5205 \end_layout
5207 \begin_layout Itemize
5208 Lack of layer hiding.
5209 \end_layout
5211 \begin_layout Itemize
5212 It is slow (especially accuracy).
5213 \end_layout
5215 \begin_layout Itemize
5216 Firmwares can't be loaded from ZIP archives.
5217 \end_layout
5219 \begin_layout Subsection
5220 Other problems:
5221 \end_layout
5223 \begin_layout Itemize
5224 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5225 \end_layout
5227 \begin_layout Itemize
5228 Audio for last dumped frame is not itself dumped.
5229 \end_layout
5231 \begin_layout Itemize
5232 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5233 \end_layout
5235 \begin_layout Itemize
5236 No menus, command based interface (SDL).
5237 \end_layout
5239 \begin_layout Itemize
5240 Long commands don't scroll.
5241 \end_layout
5243 \begin_layout Section
5244 Changelog:
5245 \end_layout
5247 \begin_layout Subsection
5248 rr0-beta1
5249 \end_layout
5251 \begin_layout Itemize
5252 Fix -Wall warnings
5253 \end_layout
5255 \begin_layout Itemize
5256 Fix dumper video corruption with levels 10-18.
5257 \end_layout
5259 \begin_layout Subsection
5260 rr0-beta2
5261 \end_layout
5263 \begin_layout Itemize
5264 Autofire
5265 \end_layout
5267 \begin_layout Itemize
5268 Lots of code cleanups
5269 \end_layout
5271 \begin_layout Itemize
5272 Lua interface to settings
5273 \end_layout
5275 \begin_layout Itemize
5276 Allow specifying AVI borders without Lua
5277 \end_layout
5279 \begin_layout Itemize
5280 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5281 \end_layout
5283 \begin_layout Itemize
5284 on_snoop lua callback
5285 \end_layout
5287 \begin_layout Itemize
5288 Faster movie loading and saving.
5289 \end_layout
5291 \begin_layout Subsection
5292 rr0-beta3
5293 \end_layout
5295 \begin_layout Itemize
5296 Joystick support
5297 \end_layout
5299 \begin_layout Subsection
5300 rr0-beta4
5301 \end_layout
5303 \begin_layout Itemize
5304 Fix multi-buttons
5305 \end_layout
5307 \begin_layout Itemize
5308 Save jukebox functionality.
5309 \end_layout
5311 \begin_layout Subsection
5312 rr0-beta5
5313 \end_layout
5315 \begin_layout Itemize
5316 Try to fix some nasty failing movie load edge cases
5317 \end_layout
5319 \begin_layout Itemize
5320 Allow specifying scripts to run on command line.
5321 \end_layout
5323 \begin_layout Subsection
5324 rr0-beta6
5325 \end_layout
5327 \begin_layout Itemize
5328 Major source code reorganization.
5329 \end_layout
5331 \begin_layout Itemize
5332 Backup savestates before overwriting.
5333 \end_layout
5335 \begin_layout Itemize
5336 Don't crash if loading initial state fails.
5337 \end_layout
5339 \begin_layout Subsection
5340 rr0-beta7
5341 \end_layout
5343 \begin_layout Itemize
5344 Fix firmware lookup
5345 \end_layout
5347 \begin_layout Itemize
5348 Fix author name parsing
5349 \end_layout
5351 \begin_layout Itemize
5352 Fix rerecord counting
5353 \end_layout
5355 \begin_layout Itemize
5356 (SDL) Print messages to console if SDL is uninitialized
5357 \end_layout
5359 \begin_layout Itemize
5360 Add movieinfo program
5361 \end_layout
5363 \begin_layout Itemize
5364 Fix loading movies starting from SRAM.
5365 \end_layout
5367 \begin_layout Subsection
5368 rr0-beta8
5369 \end_layout
5371 \begin_layout Itemize
5372 Add support for unattended dumping
5373 \end_layout
5375 \begin_layout Itemize
5376 Fix compiling for Win32
5377 \end_layout
5379 \begin_layout Itemize
5380 Don't lock up if sound can't be initialized
5381 \end_layout
5383 \begin_layout Itemize
5384 Strip trailing CR from commands
5385 \end_layout
5387 \begin_layout Itemize
5388 Don't try to do dubious things in global ctors (fix crash on startup)
5389 \end_layout
5391 \begin_layout Subsection
5392 rr0-beta9
5393 \end_layout
5395 \begin_layout Itemize
5396 Small documentation tweaking
5397 \end_layout
5399 \begin_layout Itemize
5400 Fix make clean
5401 \end_layout
5403 \begin_layout Itemize
5404 Fix major bug in modifier matching
5405 \end_layout
5407 \begin_layout Subsection
5408 rr0-beta10
5409 \end_layout
5411 \begin_layout Itemize
5412 Lots of documentation fixes
5413 \end_layout
5415 \begin_layout Itemize
5416 Use dedicated callbacks for event backcomm., not commands.
5417 \end_layout
5419 \begin_layout Itemize
5420 Ensure that the watchdog is not hit when executing delayed reset.
5421 \end_layout
5423 \begin_layout Itemize
5424 Remove errant tab from joystick message.
5425 \end_layout
5427 \begin_layout Subsection
5428 rr0-beta11
5429 \end_layout
5431 \begin_layout Itemize
5432 Make autofire operate in absolute time, not linear time
5433 \end_layout
5435 \begin_layout Itemize
5436 Reinitialize controls when resuming from loadstate
5437 \end_layout
5439 \begin_layout Itemize
5440 Some more code cleanups
5441 \end_layout
5443 \begin_layout Itemize
5444 If Lua allocator fails, call OOM_panic()
5445 \end_layout
5447 \begin_layout Itemize
5448 Byte/word/dword/qword sized host memory write/read functions.
5449 \end_layout
5451 \begin_layout Itemize
5452 Dump at correct framerate if dumping interlaced NTSC (height=448).
5453 \end_layout
5455 \begin_layout Subsection
5456 rr0-beta12
5457 \end_layout
5459 \begin_layout Itemize
5460 Actually include the complete source code
5461 \end_layout
5463 \begin_layout Itemize
5464 Keep track of RTC
5465 \end_layout
5467 \begin_layout Subsection
5468 rr0-beta13
5469 \end_layout
5471 \begin_layout Itemize
5472 Document {save,start}time.{,sub}second.
5473 \end_layout
5475 \begin_layout Itemize
5476 Intercept time() from bsnes core.
5477 \end_layout
5479 \begin_layout Subsection
5480 rr0-beta14
5481 \end_layout
5483 \begin_layout Itemize
5484 Allow disabling time() interception (allow build on Mac OS X)
5485 \end_layout
5487 \begin_layout Itemize
5488 Use SDLMain on Mac OS X (make SDL not crash)
5489 \end_layout
5491 \begin_layout Itemize
5492 Disable delayed resets (just plain too buggy for now).
5493 \end_layout
5495 \begin_layout Itemize
5496 Code cleanups
5497 \end_layout
5499 \begin_layout Itemize
5500 Use 16-bit for graphics/video instead of 32-bit.
5501 \end_layout
5503 \begin_layout Itemize
5504 gui.rectangle/gui.pixel
5505 \end_layout
5507 \begin_layout Itemize
5508 gui.crosshair
5509 \end_layout
5511 \begin_layout Itemize
5512 New CSCD writer implementation.
5513 \end_layout
5515 \begin_layout Subsection
5516 rr0-beta15
5517 \end_layout
5519 \begin_layout Itemize
5520 Fix interaction of * and +.
5521 \end_layout
5523 \begin_layout Itemize
5524 Manual improvements
5525 \end_layout
5527 \begin_layout Itemize
5528 Use gettimeofday()/usleep(), these seem portable enough.
5529 \end_layout
5531 \begin_layout Itemize
5532 Move joystick axis manipulation to keymapper code.
5533 \end_layout
5535 \begin_layout Itemize
5536 Changes to how read-only works.
5537 \end_layout
5539 \begin_layout Itemize
5540 Refactor controller input code.
5541 \end_layout
5543 \begin_layout Subsection
5544 rr0-beta16
5545 \end_layout
5547 \begin_layout Itemize
5548 Fix mouseclick scale compensation.
5549 \end_layout
5551 \begin_layout Itemize
5552 Draw area boundaries correctly in SDL code.
5553 \end_layout
5555 \begin_layout Itemize
5556 gui.screenshot.
5557 \end_layout
5559 \begin_layout Itemize
5560 Fix CSCD output (buffer overrun and race condition).
5561 \end_layout
5563 \begin_layout Subsection
5564 rr0-beta17
5565 \end_layout
5567 \begin_layout Itemize
5568 JMD dumping support.
5569 \end_layout
5571 \begin_layout Itemize
5572 Allow unattended dumping to JMD.
5573 \end_layout
5575 \begin_layout Itemize
5576 Move to BSNES v083.
5577 \end_layout
5579 \begin_layout Itemize
5580 Switch back to 32-bit colors.
5581 \end_layout
5583 \begin_layout Itemize
5584 Add Lua function gui.color.
5585 \end_layout
5587 \begin_layout Itemize
5588 Use some new C++11 features in GCC 4.6.
5589 \end_layout
5591 \begin_layout Itemize
5592 Be prepared for core frequency changes.
5593 \end_layout
5595 \begin_layout Itemize
5596 Pass colors in one chunk from Lua.
5597 \end_layout
5599 \begin_layout Subsection
5600 rr0-beta18
5601 \end_layout
5603 \begin_layout Itemize
5604 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5605  memory.read_vma() and memory.find_vma().
5606 \end_layout
5608 \begin_layout Itemize
5609 Numerious documentation fixups
5610 \end_layout
5612 \begin_layout Itemize
5613 RTC time format changed
5614 \end_layout
5616 \begin_layout Itemize
5617 Reformat flags display
5618 \end_layout
5620 \begin_layout Itemize
5621 Allow lua package name to be overridden
5622 \end_layout
5624 \begin_layout Itemize
5625 SDUMP (high-quality dumping).
5626 \end_layout
5628 \begin_layout Itemize
5629 Split platform support to plugins.
5630 \end_layout
5632 \begin_layout Itemize
5633 Make all sound plugins support basic sound commands
5634 \end_layout
5636 \begin_layout Itemize
5637 Support portaudio for sound.
5638 \end_layout
5640 \begin_layout Itemize
5641 Allow disable Lua/SDL searching.
5642 \end_layout
5644 \begin_layout Itemize
5645 Upconvert colors when copying lcscreen to screen.
5646 \end_layout
5648 \begin_layout Itemize
5649 Reorganize source tree.
5650 \end_layout
5652 \begin_layout Itemize
5653 Evdev joystick support.
5654 \end_layout
5656 \begin_layout Itemize
5657 Refactor more code into generic window code.
5658 \end_layout
5660 \begin_layout Subsection
5661 rr0-beta19
5662 \end_layout
5664 \begin_layout Itemize
5665 Refactor message handling.
5666 \end_layout
5668 \begin_layout Itemize
5669 Rework makefile
5670 \end_layout
5672 \begin_layout Itemize
5673 Documentation fixes
5674 \end_layout
5676 \begin_layout Itemize
5677 Finish pending saves before load/quit.
5678 \end_layout
5680 \begin_layout Itemize
5681 Wxwidgets graphics plugin.
5682 \end_layout
5684 \begin_layout Subsection
5685 rr0-beta20
5686 \end_layout
5688 \begin_layout Itemize
5689 Get rid of win32-crap.[ch]pp.
5690 \end_layout
5692 \begin_layout Itemize
5693 Move files around a lot.
5694 \end_layout
5696 \begin_layout Itemize
5697 Get rid of need for host C++ compiler.
5698 \end_layout
5700 \begin_layout Itemize
5701 Bsnes v084 core.
5702 \end_layout
5704 \begin_layout Itemize
5705 Refactor inter-component communication.
5706 \end_layout
5708 \begin_layout Itemize
5709 Fix zero luma.
5710 \end_layout
5712 \begin_layout Itemize
5713 Fix crash on multiline aliases.
5714 \end_layout
5716 \begin_layout Itemize
5717 Load/Save settings in wxwidgets gui.
5718 \end_layout
5720 \begin_layout Subsection
5721 rr0-beta21
5722 \end_layout
5724 \begin_layout Itemize
5725 Patch problems in bsnes core
5726 \end_layout
5728 \begin_layout Itemize
5729 SNES is little-endian, not big-endian!
5730 \end_layout
5732 \begin_layout Itemize
5733 Fix memory corruption in lcscreen::load()
5734 \end_layout
5736 \begin_layout Subsection
5737 rr0-beta22
5738 \end_layout
5740 \begin_layout Itemize
5741 Fix interpretting repeat counts in rrdata loading.
5742 \end_layout
5744 \begin_layout Itemize
5745 New lua callback: on_frame()
5746 \end_layout
5748 \begin_layout Itemize
5749 Remove calls to runtosave() that aren't supposed to be there
5750 \end_layout
5752 \begin_layout Itemize
5753 Lua function: movie.read_rtc()
5754 \end_layout
5756 \begin_layout Itemize
5757 Ignore src/fonts/font.cpp
5758 \end_layout
5760 \begin_layout Itemize
5761 Fix more bsnes core problems
5762 \end_layout
5764 \begin_layout Itemize
5765 Control bsnes random seeding
5766 \end_layout
5768 \begin_layout Itemize
5769 Pause-on-end
5770 \end_layout
5772 \begin_layout Itemize
5773 Some bsnes core debugging features (state dump and state hash)
5774 \end_layout
5776 \begin_layout Itemize
5777 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5778  it was 'lsnes rr0-beta21').
5779 \end_layout
5781 \begin_layout Subsection
5782 rr0-beta23
5783 \end_layout
5785 \begin_layout Itemize
5786 Fix memory corruption due to macro/field mixup
5787 \end_layout
5789 \begin_layout Itemize
5790 search-memory update
5791 \end_layout
5793 \begin_layout Itemize
5794 Allow direct-mapped framebuffer
5795 \end_layout
5797 \begin_layout Itemize
5798 SDL: Use SDL_ANYFORMAT if possible
5799 \end_layout
5801 \begin_layout Itemize
5802 SDMP2SOX: 2s delay modes.
5803 \end_layout
5805 \begin_layout Itemize
5806 Wxwidgets: Cleanups
5807 \end_layout
5809 \begin_layout Itemize
5810 Use sed -E, not sed -r.
5811  Fixes building on Mac OS X.
5812 \end_layout
5814 \begin_layout Itemize
5815 Wxwidgets: Save jukebox on exit
5816 \end_layout
5818 \begin_layout Itemize
5819 Fix RTC if using load-movie on savestate.
5820 \end_layout
5822 \begin_layout Itemize
5823 Fix crash related to full console mode.
5824 \end_layout
5826 \begin_layout Subsection
5827 rr0-beta24
5828 \end_layout
5830 \begin_layout Itemize
5831 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5832 \end_layout
5834 \begin_layout Itemize
5835 Wxwidgets: Allow compiling on Mac OS X.
5836 \end_layout
5838 \begin_layout Itemize
5839 Use movie compare instead of movie hashing (faster save/load).
5840 \end_layout
5842 \begin_layout Itemize
5843 Lua: _SYSTEM table.
5844 \end_layout
5846 \begin_layout Subsection
5847 rr0-beta25
5848 \end_layout
5850 \begin_layout Itemize
5851 sdmp2sox: Pad soundtrack if using -l or -L.
5852 \end_layout
5854 \begin_layout Itemize
5855 sdmp2sox: Fix NTSC overscan.
5856 \end_layout
5858 \begin_layout Itemize
5859 sdmp2sox: Add AR correction mode.
5860 \end_layout
5862 \begin_layout Itemize
5863 call lua_close() when exiting.
5864 \end_layout
5866 \begin_layout Itemize
5867 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5868 \end_layout
5870 \begin_layout Subsection
5871 rr0-beta26
5872 \end_layout
5874 \begin_layout Itemize
5875 Fix IPS patching code (use bsnes core IPS patcher).
5876 \end_layout
5878 \begin_layout Itemize
5879 Implement BPS patching (using bsnes core IPS patcher).
5880 \end_layout
5882 \begin_layout Itemize
5883 Add feature to load headered ROMs.
5884 \end_layout
5886 \begin_layout Subsection
5887 rr0-beta27
5888 \end_layout
5890 \begin_layout Itemize
5891 Show command names when showing keybindings
5892 \end_layout
5894 \begin_layout Subsection
5896 \end_layout
5898 \begin_layout Itemize
5899 Fix pause-on-end to be actually controllable
5900 \end_layout
5902 \begin_layout Itemize
5903 SDL: Poll all events in queue, not just first one (fixes slowness in command
5904  typing)
5905 \end_layout
5907 \begin_layout Itemize
5908 Wxwidgets: Fix ROM loading.
5909 \end_layout
5911 \begin_layout Subsection
5912 rr1-beta0
5913 \end_layout
5915 \begin_layout Itemize
5916 Lua: Add gui.textH, gui.textV, gui.textHV
5917 \end_layout
5919 \begin_layout Itemize
5920 Fix text colors on SDL on Mac OS X
5921 \end_layout
5923 \begin_layout Itemize
5924 Mode 'F' for finished in readonly mode.
5925 \end_layout
5927 \begin_layout Itemize
5928 Fix some WS errors.
5929 \end_layout
5931 \begin_layout Itemize
5932 Reliably pause after skip poll
5933 \end_layout
5935 \begin_layout Itemize
5936 Split UI and core into their own threads
5937 \end_layout
5939 \begin_layout Subsection
5940 rr1-beta1
5941 \end_layout
5943 \begin_layout Itemize
5944 Remove leftover dummy SRAM slot
5945 \end_layout
5947 \begin_layout Itemize
5948 Fix controller numbers.
5949 \end_layout
5951 \begin_layout Subsection
5952 rr1-beta2
5953 \end_layout
5955 \begin_layout Itemize
5956 Fix lsnes-dumpavi after interface change.
5957 \end_layout
5959 \begin_layout Itemize
5960 Also give BSNES patches for v085.
5961 \end_layout
5963 \begin_layout Itemize
5964 Pack movie data in memory.
5965 \end_layout
5967 \begin_layout Subsection
5968 rr1-beta3
5969 \end_layout
5971 \begin_layout Itemize
5972 Fix framecount/length given when loading movies.
5973 \end_layout
5975 \begin_layout Itemize
5976 Controller command memory leak fixes.
5977 \end_layout
5979 \begin_layout Itemize
5980 Don't leak palette if freeing screen object.
5981 \end_layout
5983 \begin_layout Subsection
5984 rr1-beta4
5985 \end_layout
5987 \begin_layout Itemize
5988 Detect revisions.
5989 \end_layout
5991 \begin_layout Itemize
5992 Wxwidgets: Allow controlling dumper from the menu.
5993 \end_layout
5995 \begin_layout Subsection
5996 rr1-beta5
5997 \end_layout
5999 \begin_layout Itemize
6000 Rewrite parts of manual
6001 \end_layout
6003 \begin_layout Itemize
6004 Lua: Make it work with Lua 5.2.
6005 \end_layout
6007 \begin_layout Subsection
6008 rr1-beta6
6009 \end_layout
6011 \begin_layout Itemize
6012 Win32: Fix compile errors.
6013 \end_layout
6015 \begin_layout Subsection
6016 rr1-beta7
6017 \end_layout
6019 \begin_layout Itemize
6020 Refactor controller input code.
6021 \end_layout
6023 \begin_layout Itemize
6024 Fix crash when using command line on SDL / Mac OS X.
6025 \end_layout
6027 \begin_layout Subsection
6028 rr1-beta8
6029 \end_layout
6031 \begin_layout Itemize
6032 Delete core/coroutine (obsolete)
6033 \end_layout
6035 \begin_layout Itemize
6036 Lag input display by one frame.
6037 \end_layout
6039 \begin_layout Itemize
6040 Rewind movie to beginning function.
6041 \end_layout
6043 \begin_layout Itemize
6044 Fix wrong frame number reported to Lua when repainting after loadstate
6045 \end_layout
6047 \begin_layout Itemize
6048 Support UI editing of jukebox
6049 \end_layout
6051 \begin_layout Itemize
6052 Wxwidgets: Save settings on exit.
6053 \end_layout
6055 \begin_layout Itemize
6056 Support ${project} for filenames
6057 \end_layout
6059 \begin_layout Itemize
6060 SDL: Fix command history
6061 \end_layout
6063 \begin_layout Subsection
6064 rr1-beta9
6065 \end_layout
6067 \begin_layout Itemize
6068 Fix some order-of-global-ctor bugs.
6069 \end_layout
6071 \begin_layout Subsection
6072 rr1-beta10
6073 \end_layout
6075 \begin_layout Itemize
6076 Fix crashes when quitting on Win32.
6077 \end_layout
6079 \begin_layout Subsection
6080 rr1-beta11
6081 \end_layout
6083 \begin_layout Itemize
6084 EVDEV: Queue keypresses from joystick, don't send directly
6085 \end_layout
6087 \begin_layout Itemize
6088 Wxwidgets: Load-Preserve that actually works.
6089 \end_layout
6091 \begin_layout Subsection
6092 rr1-beta12
6093 \end_layout
6095 \begin_layout Itemize
6096 Wxwidgets: GUI for memory search.
6097 \end_layout
6099 \begin_layout Itemize
6100 Warn about using synchronous queue in UI callback.
6101 \end_layout
6103 \begin_layout Subsection
6104 rr1-beta13
6105 \end_layout
6107 \begin_layout Itemize
6108 Remember last saved file for each ROM
6109 \end_layout
6111 \begin_layout Itemize
6112 Support MT dumping via boost.
6113 \end_layout
6115 \begin_layout Itemize
6116 Lua: input.raw
6117 \end_layout
6119 \begin_layout Itemize
6120 Lua: input.keyhook
6121 \end_layout
6123 \begin_layout Itemize
6124 Make mouse be ordinary input instead of special-casing
6125 \end_layout
6127 \begin_layout Itemize
6128 SDL: Don't screw up commands with NUL codepoints.
6129 \end_layout
6131 \begin_layout Subsection
6132 rr1-beta14
6133 \end_layout
6135 \begin_layout Itemize
6136 Merge status panel and main window
6137 \end_layout
6139 \begin_layout Itemize
6140 True movie slot support (the rest of it)
6141 \end_layout
6143 \begin_layout Itemize
6144 SDL: Fix compilation error
6145 \end_layout
6147 \begin_layout Itemize
6148 Elminate cross calls in dump menu code.
6149 \end_layout
6151 \begin_layout Subsection
6152 rr1-beta15
6153 \end_layout
6155 \begin_layout Itemize
6156 Cancel pending saves command
6157 \end_layout
6159 \begin_layout Itemize
6160 Wxwidgets: Code refactoring
6161 \end_layout
6163 \begin_layout Itemize
6164 Wxwidgets: Fix system -> reset
6165 \end_layout
6167 \begin_layout Itemize
6168 Wxwidgets: Read watch expressions in the right thread
6169 \end_layout
6171 \begin_layout Subsection
6172 rr1-beta16
6173 \end_layout
6175 \begin_layout Itemize
6176 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6177  support that).
6178 \end_layout
6180 \begin_layout Itemize
6181 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6182 \end_layout
6184 \begin_layout Itemize
6185 Don't append trailing '-' to prefix when saving movie.
6186 \end_layout
6188 \begin_layout Itemize
6189 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6190 \end_layout
6192 \begin_layout Subsection
6194 \end_layout
6196 \begin_layout Itemize
6197 Document memory watch syntax.
6198 \end_layout
6200 \begin_layout Subsection
6201 rr1-delta1
6202 \end_layout
6204 \begin_layout Itemize
6205 Fix unattended dumping (lsnes-dumpavi)
6206 \end_layout
6208 \begin_layout Itemize
6209 Support RAW dumping
6210 \end_layout
6212 \begin_layout Itemize
6213 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6214 \end_layout
6216 \begin_layout Itemize
6217 Add option to control sample rate preturbation in AVI dumper
6218 \end_layout
6220 \begin_layout Subsection
6221 rr1-delta2
6222 \end_layout
6224 \begin_layout Itemize
6225 Wxwidgets: Fix dumper submodes
6226 \end_layout
6228 \begin_layout Itemize
6229 Set core controller types before loadstate
6230 \end_layout
6232 \begin_layout Subsection
6233 rr1-delta2epsilon1
6234 \end_layout
6236 \begin_layout Itemize
6237 Fix compiling with bsnes v086.
6238 \end_layout
6240 \begin_layout Subsection
6241 rr1-delta3
6242 \end_layout
6244 \begin_layout Itemize
6245 Don't prompt before quitting
6246 \end_layout
6248 \begin_layout Itemize
6249 Start unpaused, preserve pause/unpause over load.
6250 \end_layout
6252 \begin_layout Itemize
6253 Try to autodetect if ROM is headered.
6254 \end_layout
6256 \begin_layout Itemize
6257 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6258 \end_layout
6260 \begin_layout Itemize
6261 Allow configuring some hotkeys.
6262 \end_layout
6264 \begin_layout Subsection
6265 rr1-delta4
6266 \end_layout
6268 \begin_layout Itemize
6269 Lots of code cleanups
6270 \end_layout
6272 \begin_layout Itemize
6273 Fix JMD compression (JMD dumping was broken)
6274 \end_layout
6276 \begin_layout Itemize
6277 Don't crash if Lua C function throws an exception.
6278 \end_layout
6280 \begin_layout Itemize
6281 Support bitmap drawing in Lua.
6282 \end_layout
6284 \begin_layout Itemize
6285 Fix bsnes v085/v086 patches.
6286 \end_layout
6288 \begin_layout Itemize
6289 Improve stability on win32.
6290 \end_layout
6292 \begin_layout Subsection
6293 rr1-delta4epsilon1
6294 \end_layout
6296 \begin_layout Itemize
6297 Don't corrupt movie if movie length is integer multiple of frames per page.
6298 \end_layout
6300 \begin_layout Subsection
6301 rr1-delta5
6302 \end_layout
6304 \begin_layout Itemize
6305 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6306 \end_layout
6308 \begin_layout Itemize
6309 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6310 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6312 \end_layout
6314 \begin_layout Itemize
6315 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6316 \end_layout
6318 \begin_layout Itemize
6319 Wxwidgets: Fix broken modifiers
6320 \end_layout
6322 \begin_layout Itemize
6323 on_paint has parameter now.
6324 \end_layout
6326 \begin_layout Itemize
6327 Optional initital fill for bitmaps
6328 \end_layout
6330 \begin_layout Itemize
6331 Fix palette changing.
6332 \end_layout
6334 \begin_layout Itemize
6335 Optimize rendering a bit.
6336 \end_layout
6338 \begin_layout Itemize
6339 Bsnes v087 support.
6340 \end_layout
6342 \begin_layout Subsection
6343 rr1-delta5epsilon1
6344 \end_layout
6346 \begin_layout Itemize
6347 Movieinfo: Fix display of port #2 type.
6348 \end_layout
6350 \begin_layout Itemize
6351 Call on_input() after loadstate.
6352 \end_layout
6354 \begin_layout Subsection
6355 rr1-delta5epsilon2
6356 \end_layout
6358 \begin_layout Itemize
6359 Fix writing port2 data to movie.
6360 \end_layout
6362 \begin_layout Itemize
6363 Fix SRAM handling with Bsnes v087.
6364 \end_layout
6366 \begin_layout Subsection
6367 rr1-delta6
6368 \end_layout
6370 \begin_layout Itemize
6371 Library loading support
6372 \end_layout
6374 \begin_layout Itemize
6375 Built-in TSCC encoder
6376 \end_layout
6378 \begin_layout Itemize
6379 Hi-color (256T colors) dumping.
6380 \end_layout
6382 \begin_layout Itemize
6383 Dump over TCP/IP(v6)
6384 \end_layout
6386 \begin_layout Itemize
6387 Hidable status panel
6388 \end_layout
6390 \begin_layout Itemize
6391 Turbo toggle/hold
6392 \end_layout
6394 \begin_layout Itemize
6395 Adjustable sound volume
6396 \end_layout
6398 \begin_layout Itemize
6399 Screen scaling
6400 \end_layout
6402 \begin_layout Itemize
6403 Allow DnD into filename boxes
6404 \end_layout
6406 \begin_layout Itemize
6407 Configurable paths
6408 \end_layout
6410 \begin_layout Itemize
6411 Portaudio: Fix speaker popping at start
6412 \end_layout
6414 \begin_layout Itemize
6415 Lots of UI changes
6416 \end_layout
6418 \begin_layout Itemize
6419 Speed adjustment menu
6420 \end_layout
6422 \begin_layout Itemize
6423 Win32 joystick support
6424 \end_layout
6426 \begin_layout Itemize
6427 Lua: gui.rainbow and gui.box
6428 \end_layout
6430 \begin_layout Itemize
6431 Split key lists into classes (the key list was large!)
6432 \end_layout
6434 \begin_layout Itemize
6435 More save slots support
6436 \end_layout
6438 \begin_layout Itemize
6439 Wxwidgets (wxJoystick) joystick support
6440 \end_layout
6442 \begin_layout Subsection
6443 rr1-delta7
6444 \end_layout
6446 \begin_layout Itemize
6447 Lots of internal joystick refactoring
6448 \end_layout
6450 \begin_layout Itemize
6451 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6452 \end_layout
6454 \begin_layout Itemize
6455 Wxwidgets: Settings mode (open settings without ROM)
6456 \end_layout
6458 \begin_layout Itemize
6459 Wxwidgets: Prompt key to use option
6460 \end_layout
6462 \begin_layout Itemize
6463 Wxwidgets: Fix crash if key goes away underneath
6464 \end_layout
6466 \begin_layout Itemize
6467 Wxwidgets: Fix mouse position in presence of scaling
6468 \end_layout
6470 \begin_layout Itemize
6471 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6472 \end_layout
6474 \begin_layout Itemize
6475 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6476  seem to work well on WinXP)
6477 \end_layout
6479 \begin_layout Itemize
6480 Start paused option.
6481 \end_layout
6483 \begin_layout Subsection
6484 rr1-delta7epsilon1
6485 \end_layout
6487 \begin_layout Itemize
6488 AVI: ZMBV support
6489 \end_layout
6491 \begin_layout Itemize
6492 lsnes-dumpavi: Start Lua before starting dumper
6493 \end_layout
6495 \begin_layout Itemize
6496 AVI: Fix secondary audio in mode 4.
6497 \end_layout
6499 \begin_layout Subsection
6500 rr1-delta7epsilon2
6501 \end_layout
6503 \begin_layout Itemize
6504 AVI: Refactor ZMBV a bit.
6505 \end_layout
6507 \begin_layout Itemize
6508 Fix error reading analog values from movie file
6509 \end_layout
6511 \begin_layout Subsection
6512 rr1-delta8
6513 \end_layout
6515 \begin_layout Itemize
6516 Delayed reset support
6517 \end_layout
6519 \begin_layout Itemize
6520 Lua: memory.hash_region
6521 \end_layout
6523 \begin_layout Subsection
6524 rr1-delta8epsilon1
6525 \end_layout
6527 \begin_layout Itemize
6528 Rework the build system
6529 \end_layout
6531 \begin_layout Itemize
6532 Typing input support
6533 \end_layout
6535 \begin_layout Itemize
6536 Fix building with bsnes v086 and v087.
6537 \end_layout
6539 \begin_layout Itemize
6540 SDL: Save settings on exit
6541 \end_layout
6543 \begin_layout Itemize
6544 SDL: Command to enter command line mode with given command.
6545 \end_layout
6547 \begin_layout Itemize
6548 SDL: More advanced command editing.
6549 \end_layout
6551 \begin_layout Subsection
6552 rr1-delta9
6553 \end_layout
6555 \begin_layout Itemize
6556 wxMSW: Fix the 
6557 \begin_inset Quotes eld
6558 \end_inset
6560 arrow keys and enter don't work
6561 \begin_inset Quotes erd
6562 \end_inset
6564  problem
6565 \end_layout
6567 \begin_layout Itemize
6568 MSU-1 support
6569 \end_layout
6571 \begin_layout Itemize
6572 Show mode changes due to rewinding.
6573 \end_layout
6575 \begin_layout Itemize
6576 Unsafe rewind support
6577 \end_layout
6579 \begin_layout Itemize
6580 Fix directory transversal.
6581 \end_layout
6583 \begin_layout Subsection
6584 rr1-delta10
6585 \end_layout
6587 \begin_layout Itemize
6588 AVI: Sound mode 5 (48kHz high-quality)
6589 \end_layout
6591 \begin_layout Itemize
6592 Lua: Reset Lua VM
6593 \end_layout
6595 \begin_layout Itemize
6596 Map the SNES bus into address space
6597 \end_layout
6599 \begin_layout Itemize
6600 Fix loading memory watch files with CRLF line endings
6601 \end_layout
6603 \begin_layout Subsection
6604 rr1-delta10epsilon1
6605 \end_layout
6607 \begin_layout Itemize
6608 Map bsnes internal state into memory space
6609 \end_layout
6611 \begin_layout Itemize
6612 Fix the 
6613 \begin_inset Quotes eld
6614 \end_inset
6616 click on panel wedges the emulator
6617 \begin_inset Quotes erd
6618 \end_inset
6620  for real.
6621 \end_layout
6623 \begin_layout Itemize
6624 DnD movies/saves on the main window.
6625 \end_layout
6627 \begin_layout Subsection
6628 rr1-delta11
6629 \end_layout
6631 \begin_layout Itemize
6632 Split core bindings into own module.
6633 \end_layout
6635 \begin_layout Itemize
6636 Remember invalid settings
6637 \end_layout
6639 \begin_layout Itemize
6640 Support for modified Gambatte core for GB/GBC emulation.
6641 \end_layout
6643 \begin_layout Itemize
6644 Reload/swap ROM function
6645 \end_layout
6647 \begin_layout Subsection
6648 rr1-delta11epsilon1
6649 \end_layout
6651 \begin_layout Itemize
6652 Fix step poll function
6653 \end_layout
6655 \begin_layout Subsection
6656 rr1-delta12
6657 \end_layout
6659 \begin_layout Itemize
6660 Non-insane savestate anchoring
6661 \end_layout
6663 \begin_layout Subsection
6664 rr1-delta13
6665 \end_layout
6667 \begin_layout Itemize
6668 More Memory search methods
6669 \end_layout
6671 \begin_layout Itemize
6672 Preserve movie if loading in RO mode.
6673 \end_layout
6675 \begin_layout Itemize
6676 Fix a obscure case in timeline check
6677 \end_layout
6679 \begin_layout Itemize
6680 Revamp the entiere ROM loading code
6681 \end_layout
6683 \begin_layout Itemize
6684 Support DnD on ROMs
6685 \end_layout
6687 \begin_layout Itemize
6688 Revamp menu layout
6689 \end_layout
6691 \begin_layout Itemize
6692 Standalone hotkey config dialog
6693 \end_layout
6695 \begin_layout Itemize
6696 Show bindings in more user-friendly format
6697 \end_layout
6699 \begin_layout Subsection
6700 rr1-delta13epsilon1
6701 \end_layout
6703 \begin_layout Itemize
6704 Pipedec support
6705 \end_layout
6707 \begin_layout Itemize
6708 Fix uninitialized variables in bsnes v085
6709 \end_layout
6711 \begin_layout Subsection
6712 rr1-delta14
6713 \end_layout
6715 \begin_layout Itemize
6716 Merge gambatte core into mainline (from its own branch)
6717 \end_layout
6719 \begin_layout Itemize
6720 Wxwidgets: Show expected dump file formats
6721 \end_layout
6723 \begin_layout Itemize
6724 Memory watch: Data typing
6725 \end_layout
6727 \begin_layout Itemize
6728 lsnes internal MMIO area.
6729 \end_layout
6731 \begin_layout Itemize
6732 Wxwidgets: New memory watch editor
6733 \end_layout
6735 \begin_layout Itemize
6736 Hexadecimal memory watches
6737 \end_layout
6739 \begin_layout Itemize
6740 Wxwidgets: Monospaced panel
6741 \end_layout
6743 \begin_layout Itemize
6744 Wxwidgets: Split memory watches in panel
6745 \end_layout
6747 \begin_layout Itemize
6748 Wxwidgets: Disable VMAs in memory search
6749 \end_layout
6751 \begin_layout Itemize
6752 lsnes-dumpavi: Fix speed bug
6753 \end_layout
6755 \begin_layout Itemize
6756 Movie subtitle support
6757 \end_layout
6759 \begin_layout Itemize
6760 Fix rerecord count reporting
6761 \end_layout
6763 \begin_layout Itemize
6764 Don't trash movie when loading in readonly mode.
6765 \end_layout
6767 \begin_layout Subsection
6768 rr1-delta14epsilon1
6769 \end_layout
6771 \begin_layout Itemize
6772 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
6773 \end_layout
6775 \begin_layout Itemize
6776 Fix build on Mac OS X.
6777 \end_layout
6779 \begin_layout Itemize
6780 Lua: loopwrapper
6781 \end_layout
6783 \begin_layout Itemize
6784 Wxwidgets: Hidable messages window
6785 \end_layout
6787 \begin_layout Itemize
6788 Lua: input.joyset
6789 \end_layout
6791 \begin_layout Itemize
6792 Bsnes: Support inconsistent saves
6793 \end_layout
6795 \begin_layout Itemize
6796 Bsnes: Allow simulating saving every frame
6797 \end_layout
6799 \begin_layout Itemize
6800 Fix desync if savestate is loaded in readonly mode in certain conditions.
6801 \end_layout
6803 \begin_layout Itemize
6804 Wxwidgets: Fix save dialogs on Mac OS X.
6805 \end_layout
6807 \begin_layout Itemize
6808 Wxwidgets: Fix insane status width on Win32.
6809 \end_layout
6811 \begin_layout Itemize
6812 Wxwidgets: Fix autohold processing to be faster.
6813 \end_layout
6815 \begin_layout Itemize
6816 Wxwidgets: Allow loading ROMs and movies from commandline.
6817 \end_layout
6819 \begin_layout Subsection
6820 rr1-delta15
6821 \end_layout
6823 \begin_layout Itemize
6824 Be a bit smarter with --load
6825 \end_layout
6827 \begin_layout Itemize
6828 Rewrote higher-level parts of audio system
6829 \end_layout
6831 \begin_layout Itemize
6832 Tool to build commentary tracks
6833 \end_layout
6835 \begin_layout Itemize
6836 Lua: input.joyget
6837 \end_layout
6839 \begin_layout Itemize
6840 Gambatte: Add support for SVN358
6841 \end_layout
6843 \begin_layout Itemize
6844 Use builtin font when rendering status panel.
6845 \end_layout
6847 \begin_layout Itemize
6848 Option to detach memory watch to its own window.
6849 \end_layout
6851 \begin_layout Itemize
6852 Recent ROMs/Movies menu
6853 \end_layout
6855 \begin_layout Itemize
6856 Libao support
6857 \end_layout
6859 \begin_layout Itemize
6860 Useful lag counter for SNES games that autopoll
6861 \end_layout
6863 \begin_layout Itemize
6864 Fix buffer overflow in gambatte sound output
6865 \end_layout
6867 \begin_layout Subsection
6868 rr1-delta15epsilon1
6869 \end_layout
6871 \begin_layout Itemize
6872 Don't blow up on wxGTK if the window is hidden somehow
6873 \end_layout
6875 \begin_layout Itemize
6876 Support simultaneous drop of ROM and movie.
6877 \end_layout
6879 \begin_layout Itemize
6880 Gambatte: Don't save spurious SRAMs.
6881 \end_layout
6883 \begin_layout Itemize
6884 Make SGB ROMs actually usable.
6885 \end_layout
6887 \begin_layout Itemize
6888 Fix so that saved movies appear in recent movies.
6889 \end_layout
6891 \begin_layout Itemize
6892 Don't open multiple commentary editors at once.
6893 \end_layout
6895 \begin_layout Subsection
6896 rr1-delta15epsilon2
6897 \end_layout
6899 \begin_layout Itemize
6900 Lua: memory.readregion/memory.writeregion
6901 \end_layout
6903 \begin_layout Itemize
6904 Lua: memory.map{,s}{byte,word,dword,qword}
6905 \end_layout
6907 \begin_layout Itemize
6908 Lua: memory.map_structure
6909 \end_layout
6911 \begin_layout Itemize
6912 Lua: Fix bus_address for gambatte
6913 \end_layout
6915 \begin_layout Itemize
6916 Fix features dependent of bsnes debugger
6917 \end_layout
6919 \begin_layout Itemize
6920 Cleanup bsnes debugger logic
6921 \end_layout
6923 \begin_layout Itemize
6924 Fix resets in presence of save every frame
6925 \end_layout
6927 \begin_layout Subsection
6928 rr1-delta15epsilon3
6929 \end_layout
6931 \begin_layout Itemize
6932 Lua: input.lcid_to_pcid
6933 \end_layout
6935 \begin_layout Itemize
6936 Fix off-by-one bug with slot hashes
6937 \end_layout
6939 \begin_layout Itemize
6940 Fix crashes on certain memory watch expressions
6941 \end_layout
6943 \begin_layout Itemize
6944 Lua: memory.read_expr
6945 \end_layout
6947 \begin_layout Itemize
6948 Lua: Fix memory.read_expr on nil argument
6949 \end_layout
6951 \begin_layout Itemize
6952 Fix the code to compile on G++ 4.7
6953 \end_layout
6955 \begin_layout Itemize
6956 Change button_id to be a function pointer field, not a virtual method
6957 \end_layout
6959 \begin_layout Itemize
6960 Add bsnes patches to fix libsnes to compile on GCC 4.7
6961 \end_layout
6963 \begin_layout Itemize
6964 Gambatte: Always use legacy lag counting
6965 \end_layout
6967 \begin_layout Itemize
6968 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
6969 \end_layout
6971 \begin_layout Itemize
6972 Fix analog controllers
6973 \end_layout
6975 \begin_layout Itemize
6976 Fix autohold menus
6977 \end_layout
6979 \begin_layout Itemize
6980 Fix button symbols in input display
6981 \end_layout
6983 \begin_layout Itemize
6984 Compensate for nuts bsnes superscope/justifier handling
6985 \end_layout
6987 \begin_layout Itemize
6988 Lua: Fix bit.extract boolean handling
6989 \end_layout
6991 \begin_layout Subsection
6992 rr2-beta0
6993 \end_layout
6995 \begin_layout Itemize
6996 Split emulation cores more from the rest
6997 \end_layout
6999 \begin_layout Itemize
7000 Support having multiple emulation cores compiled at once
7001 \end_layout
7003 \begin_layout Itemize
7004 Support arbitrary number of ports (well, up to 31 anyway).
7005 \end_layout
7007 \begin_layout Itemize
7008 SNES debugger support
7009 \end_layout
7011 \begin_layout Itemize
7012 Support 16-button controllers
7013 \end_layout
7015 \begin_layout Itemize
7016 Remove old SDL front end
7017 \end_layout
7019 \begin_layout Itemize
7020 Data-driven controller buttons
7021 \end_layout
7023 \begin_layout Itemize
7024 Generate the port code from defines
7025 \end_layout
7027 \begin_layout Subsection
7028 rr2-beta1
7029 \end_layout
7031 \begin_layout Itemize
7032 Update libgambatte to SVN364
7033 \end_layout
7035 \begin_layout Itemize
7036 Get rid of partial linking (building with MXE works)
7037 \end_layout
7039 \begin_layout Itemize
7040 Load XML even without gamepack files
7041 \end_layout
7043 \begin_layout Itemize
7044 Support screen rotate & flip
7045 \end_layout
7047 \begin_layout Itemize
7048 Fix bug when changing controller key to another subkey of the same key
7049 \end_layout
7051 \begin_layout Subsection
7052 rr1-delta16
7053 \end_layout
7055 \begin_layout Itemize
7056 Stop at movie end: Don't off-by-one
7057 \end_layout
7059 \begin_layout Itemize
7060 Fix crash closing lsnes with voice playback active.
7061 \end_layout
7063 \begin_layout Itemize
7064 Import/Export OggOpus for commentary tracks
7065 \end_layout
7067 \begin_layout Itemize
7068 16-button controllers.
7069 \end_layout
7071 \begin_layout Itemize
7072 Don't show nonexistent controllers in input display
7073 \end_layout
7075 \begin_layout Itemize
7076 Set voice record/playback volume from UI
7077 \end_layout
7079 \begin_layout Itemize
7080 Patches for gambatte SVN364.
7081 \end_layout
7083 \begin_layout Itemize
7084 Load markup (if exists) even without gamepack file.
7085 \end_layout
7087 \begin_layout Itemize
7088 Screen rotation & flipping
7089 \end_layout
7091 \begin_layout Itemize
7092 Lua: Some new bit functions
7093 \end_layout
7095 \begin_layout Itemize
7096 Auto-refresh voice streams on change.
7097 \end_layout
7099 \begin_layout Itemize
7100 Auto-refresh subtitles on change & new subtitle editor.
7101 \end_layout
7103 \begin_layout Itemize
7104 Fix music volume adjustment.
7105 \end_layout
7107 \begin_layout Subsection
7108 rr2-beta2
7109 \end_layout
7111 \begin_layout Itemize
7112 Use system threads instead of platform threads
7113 \end_layout
7115 \begin_layout Itemize
7116 Cleanup build by allowing dummy and real drivers to link together.
7117 \end_layout
7119 \begin_layout Itemize
7120 Split duplex support
7121 \end_layout
7123 \begin_layout Subsection
7124 rr1-delta16epsilon1
7125 \end_layout
7127 \begin_layout Itemize
7128 Wxwidgets: Fix memory watch rendering.
7129 \end_layout
7131 \begin_layout Itemize
7132 Wxwidgets: Allow setting voice stream gain.
7133 \end_layout
7135 \begin_layout Itemize
7136 Wxwidgets: VU meters and volume adjustment.
7137 \end_layout
7139 \begin_layout Itemize
7140 Lua: Custom fonts support.
7141 \end_layout
7143 \begin_layout Itemize
7144 Lua: Fix methods stopping working when resetting Lua.
7145 \end_layout
7147 \begin_layout Itemize
7148 Fix loading standard-format movies in preserve (readonly) mode.
7149 \end_layout
7151 \begin_layout Subsection
7152 rr1-delta17
7153 \end_layout
7155 \begin_layout Itemize
7156 Primitive movie editor
7157 \end_layout
7159 \begin_layout Itemize
7160 Fix VU meter with no sound device.
7161 \end_layout
7163 \begin_layout Itemize
7164 Fix various undefined return values.
7165 \end_layout
7167 \begin_layout Itemize
7168 Show rates in VU meter window.
7169 \end_layout
7171 \begin_layout Subsection
7172 rr2-beta3
7173 \end_layout
7175 \begin_layout Itemize
7176 Lua: Render queues as objects
7177 \end_layout
7179 \begin_layout Itemize
7180 Bsnes: support hard resets
7181 \end_layout
7183 \begin_layout Itemize
7184 Dedicated sound devices dialog
7185 \end_layout
7187 \begin_layout Itemize
7188 Change the default AVI sound mode to 2 or 5.
7189 \end_layout
7191 \begin_layout Itemize
7192 Fix totally borked movie saving.
7193 \end_layout
7195 \begin_layout Itemize
7196 Portaudio: Use split duplex with different devices.
7197 \end_layout
7199 \begin_layout Itemize
7200 Fix controls with gambatte core.
7201 \end_layout
7203 \begin_layout Itemize
7204 Modify save slot set handling.
7205 \end_layout
7207 \begin_layout Itemize
7208 lsnes-dumpavi: --firmware-path.
7209 \end_layout
7211 \begin_layout Itemize
7212 Fix lots of compiler warnings.
7213 \end_layout
7215 \begin_layout Subsection
7216 rr1-delta17epsilon1
7217 \end_layout
7219 \begin_layout Itemize
7220 Commentary tool: Set nominal bit rate and limit max bit rate.
7221 \end_layout
7223 \begin_layout Itemize
7224 Lua: Unconditionally reload host memory on loadstate
7225 \end_layout
7227 \begin_layout Itemize
7228 Lua: Query bindings, manipulate aliases, create inverse bindings
7229 \end_layout
7231 \begin_layout Itemize
7232 Lua: Fix crashes with resetting VM while some types of paint requests are
7233  in flight.
7234 \end_layout
7236 \begin_layout Itemize
7237 Lua: gui.text: Clip the text properly instead of corrupting memory in some
7238  cases.
7239 \end_layout
7241 \begin_layout Itemize
7242 Save screenshot header reliably
7243 \end_layout
7245 \begin_layout Itemize
7246 Lua: Backport input.get2 and input.set2
7247 \end_layout
7249 \begin_layout Itemize
7250 Lua: New controller info functions.
7251 \end_layout
7253 \begin_layout Itemize
7254 Movie editor: Fix reset delay counters to be the right way around.
7255 \end_layout
7257 \begin_layout Itemize
7258 Lua: on_snoop2
7259 \end_layout
7261 \begin_layout Itemize
7262 Lua: on_button and input.veto_button.
7263 \end_layout
7265 \begin_layout Subsection
7266 rr2-beta4
7267 \end_layout
7269 \begin_layout Itemize
7270 Revert memory leak fix breaking input
7271 \end_layout
7273 \begin_layout Itemize
7274 Refactor Opus handling
7275 \end_layout
7277 \begin_layout Itemize
7278 Restrict member picking only to .zip files
7279 \end_layout
7281 \begin_layout Itemize
7282 Fix reading of host-endian VMAs.
7283 \end_layout
7285 \begin_layout Itemize
7286 Fix rlow and rhigh to be the right way around.
7287 \end_layout
7289 \begin_layout Itemize
7290 Lua: Don't wedge VM if callback fails with an exception
7291 \end_layout
7293 \begin_layout Itemize
7294 Refactor Ogg handling.
7295 \end_layout
7297 \begin_layout Subsection
7298 rr1-delta17epsilon2
7299 \end_layout
7301 \begin_layout Itemize
7302 Fix saving PNG screenshots on Win32.
7303 \end_layout
7305 \begin_layout Itemize
7306 Movie editor: Sweep axis.
7307 \end_layout
7309 \begin_layout Itemize
7310 Load selected slot in ro/rw/preserve/movie mode.
7311 \end_layout
7313 \begin_layout Itemize
7314 input.joyset: Preserve and invert user input.
7315 \end_layout
7317 \begin_layout Itemize
7318 Allow immediate saving at point of save (transfer saves).
7319 \end_layout
7321 \begin_layout Itemize
7322 Wxwidgets: Filter filenames in dialogs, autoappend extensions.
7323 \end_layout
7325 \begin_layout Itemize
7326 data/verysmall.font: Add missing glyph 70 (
7327 \begin_inset Quotes eld
7328 \end_inset
7331 \begin_inset Quotes erd
7332 \end_inset
7335 \end_layout
7337 \begin_layout Itemize
7338 Lua: Allow painting custom fonts with halo.
7339 \end_layout
7341 \begin_layout Itemize
7342 Fix memory value search to work on byte types.
7343 \end_layout
7345 \begin_layout Subsection
7346 rr2-beta5
7347 \end_layout
7349 \begin_layout Itemize
7350 Reject oggopus files with incomplete pregap
7351 \end_layout
7353 \begin_layout Itemize
7354 Fix multistream and ogg demuxing
7355 \end_layout
7357 \begin_layout Itemize
7358 Workaround bug with screen >1024 pixels wide.
7359 \end_layout
7361 \begin_layout Itemize
7362 Allow on_input to force/veto system controls.
7363 \end_layout
7365 \begin_layout Itemize
7366 Dedicated autohold/autofire window.
7367 \end_layout
7369 \begin_layout Itemize
7370 Support per-button autofire.
7371 \end_layout
7373 \begin_layout Itemize
7374 Fix crash on trying to frameadvance/exit with no ROM loaded.
7375 \end_layout
7377 \begin_layout Itemize
7378 Fix nonexistent controller key warnings.
7379 \end_layout
7381 \begin_layout Itemize
7382 Movie editor: Fix mouse editing (TYPE_RAXIS)
7383 \end_layout
7385 \begin_layout Itemize
7386 TAS input plugin
7387 \end_layout
7389 \begin_layout Itemize
7390 Analog passthrough.
7391 \end_layout
7393 \begin_layout Itemize
7394 Add throttle axes (TYPE_TAXIS).
7395 \end_layout
7397 \begin_layout Itemize
7398 Fix movie reading with first port having multiple controllers.
7399 \end_layout
7401 \begin_layout Itemize
7402 Move some info from status panel to statusbar.
7403 \end_layout
7405 \begin_layout Subsection
7406 rr1-delta17epsilon3
7407 \end_layout
7409 \begin_layout Itemize
7410 Fix status panel (and movie editor) flicker
7411 \end_layout
7413 \begin_layout Itemize
7414 Show effects of Lua in input display
7415 \end_layout
7417 \begin_layout Itemize
7418 Offer lsmv.backup as file filter too for load lsmv
7419 \end_layout
7421 \begin_layout Itemize
7422 Allow slowing down subframe advance 
7423 \end_layout
7425 \begin_layout Itemize
7426 Display current save slot information
7427 \end_layout
7429 \begin_layout Itemize
7430 Add snes9x fonts
7431 \end_layout
7433 \begin_layout Itemize
7434 Fix hotkeys stopping working after X-ing settings dialog
7435 \end_layout
7437 \begin_layout Itemize
7438 Movie editor: Fix bug if extending finished movie
7439 \end_layout
7441 \begin_layout Itemize
7442 Cap current_frame_first_subframe to movie size when recounting movie
7443 \end_layout
7445 \begin_layout Itemize
7446 Movie editor: Interpret ctrl+click as right click 
7447 \end_layout
7449 \begin_layout Subsection
7450 rr2-beta6
7451 \end_layout
7453 \begin_layout Itemize
7454 Autofire: Fix false status indications
7455 \end_layout
7457 \begin_layout Itemize
7458 Fix subframe counter
7459 \end_layout
7461 \begin_layout Itemize
7462 Fix print() after Lua reset
7463 \end_layout
7465 \begin_layout Itemize
7466 New settings framework
7467 \end_layout
7469 \begin_layout Itemize
7470 Remove some unused leftover stuff
7471 \end_layout
7473 \begin_layout Itemize
7474 Fix race condition causing possible crash on startup
7475 \end_layout
7477 \begin_layout Itemize
7478 Fix compiling if uint64_t and size_t are not compatible
7479 \end_layout
7481 \begin_layout Itemize
7482 Lua: Don't crash if input.[gs]et{,a} is called outside on_input
7483 \end_layout
7485 \begin_layout Subsection
7486 rr2-beta7
7487 \end_layout
7489 \begin_layout Itemize
7490 Fix bug causing crash if triple has invalid button
7491 \end_layout
7493 \end_body
7494 \end_document