Core actions
[lsnes.git] / manual.lyx
blob3a0ed3915101a9541703eeb1c86b1832407b0b4f
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options true
7 \maintain_unincluded_children false
8 \language finnish
9 \language_package default
10 \inputencoding auto
11 \fontencoding global
12 \font_roman default
13 \font_sans default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
17 \font_sc false
18 \font_osf false
19 \font_sf_scale 100
20 \font_tt_scale 100
22 \graphics default
23 \default_output_format default
24 \output_sync 0
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
28 \use_hyperref false
29 \papersize default
30 \use_geometry false
31 \use_amsmath 1
32 \use_esint 1
33 \use_mhchem 1
34 \use_mathdots 1
35 \cite_engine basic
36 \use_bibtopic false
37 \use_indices false
38 \paperorientation portrait
39 \suppress_date false
40 \use_refstyle 1
41 \index Hakusana
42 \shortcut idx
43 \color #008000
44 \end_index
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle default
53 \tracking_changes false
54 \output_changes false
55 \html_math_output 0
56 \html_css_as_file 0
57 \html_be_strict false
58 \end_header
60 \begin_body
62 \begin_layout Section
63 Introduction
64 \end_layout
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
68 \end_layout
70 \begin_layout Section
71 Dependencies
72 \end_layout
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
94 \end_layout
96 \begin_deeper
97 \begin_layout Enumerate
98 SVN r320, r358 or r364
99 \end_layout
101 \begin_layout Enumerate
102 Patched with included patches
103 \end_layout
105 \end_deeper
106 \begin_layout Enumerate
107 Zlib
108 \end_layout
110 \begin_layout Enumerate
111 boost_iostreams
112 \end_layout
114 \begin_layout Enumerate
115 boost_filesystem
116 \end_layout
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
120 \end_layout
122 \begin_layout Enumerate
123 libsdl (SDL only)
124 \end_layout
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
128 \end_layout
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
132 \end_layout
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
136 \end_layout
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
140 \end_layout
142 \begin_layout Enumerate
143 libao (libao sound only)
144 \end_layout
146 \begin_layout Enumerate
147 Lua version 5.1.X or 5.2.X
148 \end_layout
150 \begin_layout Enumerate
151 G++ 4.6 or 4.7
152 \end_layout
154 \begin_layout Enumerate
155 libopus (optional, for commentary track tool)
156 \end_layout
158 \begin_layout Section
159 Building
160 \end_layout
162 \begin_layout Itemize
163 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
164  bsnes core).
165 \end_layout
167 \begin_layout Itemize
168 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
169 \end_layout
171 \begin_layout Itemize
172 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
173 >', bsnes core)
174 \end_layout
176 \begin_layout Itemize
177 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
178 ersion>', gambatte core)
179 \end_layout
181 \begin_layout Itemize
182 Edit options.build (or copy of that file)
183 \end_layout
185 \begin_layout Itemize
186 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
188 \end_layout
190 \begin_layout Section
191 Command line options
192 \end_layout
194 \begin_layout Subsection
195 Wxwidgets options
196 \end_layout
198 \begin_layout Subsubsection
199 --rom=<file>
200 \end_layout
202 \begin_layout Standard
203 Load <file> as ROM.
204 \end_layout
206 \begin_layout Subsubsection
207 <file>
208 \end_layout
210 \begin_layout Standard
211 Load <file> as ROM.
212 \end_layout
214 \begin_layout Subsubsection
215 --load=<file>
216 \end_layout
218 \begin_layout Standard
219 Load <file> as movie or savestate file on startup.
220 \end_layout
222 \begin_layout Subsubsection
223 --settings
224 \end_layout
226 \begin_layout Standard
227 Instead of starting the emulator, only display the settings.
228 \end_layout
230 \begin_layout Subsubsection
231 --lua=<file>
232 \end_layout
234 \begin_layout Standard
235 Run this Lua file on startup
236 \end_layout
238 \begin_layout Subsection
239 dump options (lsnes-dumpavi only)
240 \end_layout
242 \begin_layout Subsubsection
243 --rom=<file>
244 \end_layout
246 \begin_layout Standard
247 Load <file> as ROM.
248  Required.
249 \end_layout
251 \begin_layout Subsubsection
252 <filename>
253 \end_layout
255 \begin_layout Standard
256 Load <filename> as movie or savestate file on startup.
257  Required.
258 \end_layout
260 \begin_layout Subsubsection
261 --dumper=<dumper>
262 \end_layout
264 \begin_layout Standard
265 Set the dumper to use (required).
266  Use 'list' for listing of known dumpers.
267 \end_layout
269 \begin_layout Subsubsection
270 --firmware-path=<path>
271 \end_layout
273 \begin_layout Standard
274 Set path to look for firmware.
275 \end_layout
277 \begin_layout Subsubsection
278 --mode=<mode>
279 \end_layout
281 \begin_layout Standard
282 Set the mode to use (required for dumpers with multiple modes, forbidden
283  otherwise).
284  Use 'list' for known modes.
285 \end_layout
287 \begin_layout Subsubsection
288 --prefix=<prefix>
289 \end_layout
291 \begin_layout Standard
292 Set dump prefix.
293  Default is 
294 \begin_inset Quotes eld
295 \end_inset
297 avidump
298 \begin_inset Quotes erd
299 \end_inset
302 \end_layout
304 \begin_layout Subsubsection
305 --option=<name>=<value>
306 \end_layout
308 \begin_layout Standard
309 Set option <name> to value <value>.
310 \end_layout
312 \begin_layout Subsubsection
313 --length=<length>
314 \end_layout
316 \begin_layout Standard
317 Set number of frames to dump.
318  Mandatory.
319 \end_layout
321 \begin_layout Subsubsection
322 --lua=<script>
323 \end_layout
325 \begin_layout Standard
326 Run specified lua script (lsnes-dumpavi does not have initialization files).
327 \end_layout
329 \begin_layout Subsubsection
330 --load-library=<library>
331 \end_layout
333 \begin_layout Standard
334 Load the specified shared object / dynamic library / dynamic link library.
335 \end_layout
337 \begin_layout Subsection
338 lsnes settings directory
339 \end_layout
341 \begin_layout Standard
342 The lsnes settings directory is (in order of decreasing perference):
343 \end_layout
345 \begin_layout Itemize
346 Windows: %APPDATA%
347 \backslash
348 lsnes (if %APPDATA% exists)
349 \end_layout
351 \begin_layout Itemize
352 Unix: $XDG_CONFIG_HOME/lsnes (if $XDG_CONFIG_HOME exists)
353 \end_layout
355 \begin_layout Itemize
356 Unix: $HOME/.config/lsnes (if $HOME exists)
357 \end_layout
359 \begin_layout Itemize
360 All: .
361  (fallback default).
362 \end_layout
364 \begin_layout Standard
365 If leading directories do not exist, attempt to create them is made.
366 \end_layout
368 \begin_layout Section
369 Internal commands
370 \end_layout
372 \begin_layout Itemize
373 Commands beginning with '*' invoke the corresponding command without alias
374  expansion.
375 \end_layout
377 \begin_layout Itemize
378 If command starts with '+' (after possible '*'), the command is executed
379  as-is when button is pressed, and when button is released, it is executed
380  with '+' replaced by '-'.
381 \end_layout
383 \begin_layout Itemize
384 Commands without '+' execute only on negative edge (release).
385 \end_layout
387 \begin_layout Subsection
388 run-script <script>
389 \end_layout
391 \begin_layout Standard
392 Run <script> as if commands were entered on the command line.
393 \end_layout
395 \begin_layout Subsection
396 Memory manipulation
397 \end_layout
399 \begin_layout Standard
400 <address> may be decimal or hexadecimal (prefixed with '0x').
401  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
402  with '-') decimal.
403 \end_layout
405 \begin_layout Standard
406 The available element <sizes> are:
407 \end_layout
409 \begin_layout Itemize
410 byte: 1 byte
411 \end_layout
413 \begin_layout Itemize
414 word: 2 bytes
415 \end_layout
417 \begin_layout Itemize
418 dword: 4 bytes
419 \end_layout
421 \begin_layout Itemize
422 qword: 8 bytes
423 \end_layout
425 \begin_layout Standard
426 When reading RAM and ROM, multi-byte reads/writes are big-endian.
427  When dealing with DSP memory, multi-byte reads/writes are native-endian
428  (do not use operand sizes exceeding DSP bitness, except dword is OK for
429  24-bit memory).
430 \end_layout
432 \begin_layout Subsubsection
433 read-<size> <address>
434 \end_layout
436 \begin_layout Standard
437 Read the value of byte in <address>.
438 \end_layout
440 \begin_layout Subsubsection
441 read-s<size> <address>
442 \end_layout
444 \begin_layout Standard
445 Read the value of signed byte in <address>.
446 \end_layout
448 \begin_layout Subsubsection
449 write-<size> <address> <value>
450 \end_layout
452 \begin_layout Standard
453 Write <value> to byte in address <address>.
454 \end_layout
456 \begin_layout Subsection
457 Main commands
458 \end_layout
460 \begin_layout Standard
461 These commands are not available in lsnesrc, but are available after ROM
462  has been loaded.
463 \end_layout
465 \begin_layout Subsubsection
466 quit-emulator
467 \end_layout
469 \begin_layout Standard
470 Quits the emulator.
471 \end_layout
473 \begin_layout Subsubsection
474 pause-emulator
475 \end_layout
477 \begin_layout Standard
478 Toggle paused/unpaused
479 \end_layout
481 \begin_layout Subsubsection
482 +advance-frame 
483 \end_layout
485 \begin_layout Standard
486 Advance frame.
487  If the button is still held after configurable timeout expires, game unpauses
488  for the duration frame advance is held.
489 \end_layout
491 \begin_layout Subsubsection
492 +advance-poll 
493 \end_layout
495 \begin_layout Standard
496 Advance subframe.
497  If the button is still held after configurable timeout expires, game unpauses
498  for the duration frame advance is held.
499 \end_layout
501 \begin_layout Subsubsection
502 advance-skiplag 
503 \end_layout
505 \begin_layout Standard
506 Skip to first poll in frame after current.
507 \end_layout
509 \begin_layout Subsubsection
510 reset 
511 \end_layout
513 \begin_layout Standard
514 Reset the SNES after this frame.
515 \end_layout
517 \begin_layout Subsubsection
518 load <filename> 
519 \end_layout
521 \begin_layout Standard
522 Load savestate <filename> in current mode.
523 \end_layout
525 \begin_layout Subsubsection
526 load-state <filename> 
527 \end_layout
529 \begin_layout Standard
530 Load savestate <filename> in readwrite mode.
531 \end_layout
533 \begin_layout Subsubsection
534 load-readonly <filename> 
535 \end_layout
537 \begin_layout Standard
538 Load savestate <filename> in readonly mode.
539 \end_layout
541 \begin_layout Subsubsection
542 load-preserve <filename> 
543 \end_layout
545 \begin_layout Standard
546 Load savestate <filename> in readonly mode, preserving current events.
547 \end_layout
549 \begin_layout Subsubsection
550 load-movie <filename> 
551 \end_layout
553 \begin_layout Standard
554 Load savestate <filename>, ignoring save part in readonly mode.
555 \end_layout
557 \begin_layout Subsubsection
558 save-state <filename> 
559 \end_layout
561 \begin_layout Standard
562 Save system state to <filename> as soon as possible.
563 \end_layout
565 \begin_layout Subsubsection
566 save-movie <filename> 
567 \end_layout
569 \begin_layout Standard
570 Save movie to <filename>.
571 \end_layout
573 \begin_layout Subsubsection
574 set-rwmode 
575 \end_layout
577 \begin_layout Standard
578 Set read-write mode.
579 \end_layout
581 \begin_layout Subsubsection
582 set-romode 
583 \end_layout
585 \begin_layout Standard
586 Set read-only mode
587 \end_layout
589 \begin_layout Subsubsection
590 toggle-rwmode 
591 \end_layout
593 \begin_layout Standard
594 Toggle between read-only and read-write modes.
595 \end_layout
597 \begin_layout Subsubsection
598 test-1, test-2, test-3
599 \end_layout
601 \begin_layout Standard
602 Internal test commands.
603  Don't use.
604 \end_layout
606 \begin_layout Subsubsection
607 take-screenshot <filename> 
608 \end_layout
610 \begin_layout Standard
611 Save screenshot to <filename>.
612 \end_layout
614 \begin_layout Subsubsection
615 +controller <class>-<#>-<button>
616 \end_layout
618 \begin_layout Standard
619 Press button <button> on controller <num> of class <class>.
620 \end_layout
622 \begin_layout Itemize
623 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
624  ext0, ext1, ext2, ext3
625 \end_layout
627 \begin_layout Itemize
628 Class 'mouse': L, R
629 \end_layout
631 \begin_layout Itemize
632 Class 'superscope': trigger, cursor, turbo, pause
633 \end_layout
635 \begin_layout Itemize
636 Class 'justifier': trigger, start
637 \end_layout
639 \begin_layout Itemize
640 Class 'gb': A, B, select, start, up, down, left, right
641 \end_layout
643 \begin_layout Subsubsection
644 hold-controller <class>-<#>-<button>
645 \end_layout
647 \begin_layout Standard
648 Hold/unhold button <button> on controller <num> of class <class>.
649 \end_layout
651 \begin_layout Subsubsection
652 type-controller <class>-<#>-<button>
653 \end_layout
655 \begin_layout Standard
656 Hold/unhold button <button> on controller <num> of class <class> for the
657  next frame.
658  See +controller for button names.
659 \end_layout
661 \begin_layout Standard
662 Cauntion: Does not work properly if outside frame advance.
663 \end_layout
665 \begin_layout Subsubsection
666 +autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
667 \end_layout
669 \begin_layout Standard
670 Start autofire.
671  If duty is not specified, defaults to 1.
672  If <cyclelen> is not specified, defaults to 2.
673 \end_layout
675 \begin_layout Subsubsection
676 -autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
677 \end_layout
679 \begin_layout Standard
680 End autofire.
681 \end_layout
683 \begin_layout Subsubsection
684 autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
685 \end_layout
687 \begin_layout Standard
688 Toggle autofire.
689  If autofire is turned on, specified cycle is used.
690 \end_layout
692 \begin_layout Subsubsection
693 designate-position <class>-<#>-analog<n>
694 \end_layout
696 \begin_layout Standard
697 Designate position for analog pair.
698  <n> is only there if there are multiple axis pairs.
699 \end_layout
701 \begin_layout Subsubsection
702 repaint
703 \end_layout
705 \begin_layout Standard
706 Force a repaint.
707 \end_layout
709 \begin_layout Subsubsection
710 toggle-pause-on-end
711 \end_layout
713 \begin_layout Standard
714 Toggle pause on end flag.
715 \end_layout
717 \begin_layout Subsubsection
718 set-pause-on-end
719 \end_layout
721 \begin_layout Standard
722 Set pause on end flag.
723 \end_layout
725 \begin_layout Subsubsection
726 clear-pause-on-end
727 \end_layout
729 \begin_layout Standard
730 Clear pause on end flag.
731 \end_layout
733 \begin_layout Subsection
734 Save jukebox 
735 \end_layout
737 \begin_layout Subsubsection
738 cycle-jukebox-backward
739 \end_layout
741 \begin_layout Standard
742 Cycle save jukebox backwards.
743 \end_layout
745 \begin_layout Subsubsection
746 cycle-jukebox-forward
747 \end_layout
749 \begin_layout Standard
750 Cycle save jukebox forwards
751 \end_layout
753 \begin_layout Subsubsection
754 load-jukebox
755 \end_layout
757 \begin_layout Standard
758 Do load from jukebox (current mode).
759 \end_layout
761 \begin_layout Subsubsection
762 save-jukebox
763 \end_layout
765 \begin_layout Standard
766 Do state save to jukebox.
767 \end_layout
769 \begin_layout Subsection
770 Lua 
771 \end_layout
773 \begin_layout Standard
774 Only available if lua support is compiled in.
775 \end_layout
777 \begin_layout Subsubsection
778 evaluate-lua <luacode>
779 \end_layout
781 \begin_layout Standard
782 Run Lua code <luacode> using built-in Lua interpretter.
783 \end_layout
785 \begin_layout Subsubsection
786 run-lua <script>
787 \end_layout
789 \begin_layout Standard
790 Run specified lua file using built-in Lua interpretter.
791 \end_layout
793 \begin_layout Subsubsection
794 reset-lua
795 \end_layout
797 \begin_layout Standard
798 Clear the Lua VM state and restore to factory defaults.
799 \end_layout
801 \begin_layout Subsection
802 Memory watch
803 \end_layout
805 \begin_layout Subsubsection
806 add-watch <name> <expression>
807 \end_layout
809 \begin_layout Standard
810 Adds new watch (or modifies old one).
811 \end_layout
813 \begin_layout Subsubsection
814 remove-watch <name>
815 \end_layout
817 \begin_layout Standard
818 Remove a watch.
819 \end_layout
821 \begin_layout Subsection
822 Sound 
823 \end_layout
825 \begin_layout Subsubsection
826 enable-sound <on/off> 
827 \end_layout
829 \begin_layout Standard
830 Enable/Disable sound.
831 \end_layout
833 \begin_layout Subsection
834 Misc.
835 \end_layout
837 \begin_layout Subsubsection
838 reload-rom [<file>]
839 \end_layout
841 \begin_layout Standard
842 Reloads the main ROM image from <file>.
843 \end_layout
845 \begin_layout Subsubsection
846 +tangent
847 \end_layout
849 \begin_layout Standard
850 Tangent for recording voice for commentary track.
851  While pressed, record a stream.
852 \end_layout
854 \begin_layout Subsubsection
855 advance-subframe-timeout
856 \end_layout
858 \begin_layout Standard
859 Subframe advance timeout in milliseconds.
860  Default is 100.
861 \end_layout
863 \begin_layout Section
864 Settings
865 \end_layout
867 \begin_layout Subsection
868 Core settings
869 \end_layout
871 \begin_layout Subsection
872 AVI dumper settings
873 \end_layout
875 \begin_layout Subsubsection
876 avi-large
877 \end_layout
879 \begin_layout Standard
880 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
881  outputs.
882 \end_layout
884 \begin_layout Subsubsection
885 avi-left-border
886 \end_layout
888 \begin_layout Standard
889 AVI dumper: Set the default left border thickness (unless lua overrides)
890  for dumps.
891  Range 0-8191.
892  Default is 0.
893 \end_layout
895 \begin_layout Subsubsection
896 avi-right-border
897 \end_layout
899 \begin_layout Standard
900 AVI dumper: Set the default right border thickness (unless lua overrides)
901  for dumps.
902  Range 0-8191.
903  Default is 0.
904 \end_layout
906 \begin_layout Subsubsection
907 avi-top-border
908 \end_layout
910 \begin_layout Standard
911 AVI dumper: Set the default top border thickness (unless lua overrides)
912  for dumps.
913  Range 0-8191.
914  Default is 0.
915 \end_layout
917 \begin_layout Subsubsection
918 avi-bottom-border
919 \end_layout
921 \begin_layout Standard
922 AVI dumper: Set the default bottom border thickness (unless lua overrides)
923  for dumps.
924  Range 0-8191.
925  Default is 0.
926 \end_layout
928 \begin_layout Subsubsection
929 avi-maxframes
930 \end_layout
932 \begin_layout Standard
933 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
934  Range 0-999999999.
935  Default is 0.
936 \end_layout
938 \begin_layout Subsubsection
939 avi-compresison
940 \end_layout
942 \begin_layout Standard
943 AVI dumper: Compression level (0-18).
944 \end_layout
946 \begin_layout Itemize
947 Compression levels 10 and above are not compatible with stock CSCD codec.
948 \end_layout
950 \begin_layout Itemize
951 Recomended level is 7.
952 \end_layout
954 \begin_layout Subsubsection
955 avi-soundrate
956 \end_layout
958 \begin_layout Standard
959 AVI dumper: Set method of determining the sound rate.
960 \end_layout
962 \begin_layout Itemize
963 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
964  128, 176.4 and 192 kHz.
965 \end_layout
967 \begin_layout Itemize
968 1: Round down to nearest integer.
969 \end_layout
971 \begin_layout Itemize
972 2: Round up to nearest ingeter.
973 \end_layout
975 \begin_layout Itemize
976 3: Multiply by denominator.
977 \end_layout
979 \begin_layout Itemize
980 4: High quality 44.1kHz (SRC needed).
981 \end_layout
983 \begin_layout Itemize
984 5: High quality 48kHz (SRC needed).
985 \end_layout
987 \begin_layout Subsection
988 JMD options
989 \end_layout
991 \begin_layout Subsubsection
992 jmd-compression
993 \end_layout
995 \begin_layout Standard
996 JMD dumper: Compression level (0-9).
997 \end_layout
999 \begin_layout Section
1000 Lua functions
1001 \end_layout
1003 \begin_layout Subsection
1004 Core (in main table)
1005 \end_layout
1007 \begin_layout Subsubsection
1008 print
1009 \end_layout
1011 \begin_layout Standard
1012 Print line to message console.
1013 \end_layout
1015 \begin_layout Subsubsection
1016 exec(string command)
1017 \end_layout
1019 \begin_layout Standard
1020 Run command as it was entered on the command line
1021 \end_layout
1023 \begin_layout Subsubsection
1024 utime()
1025 \end_layout
1027 \begin_layout Standard
1028 Returns two values.
1029  First is time since some epoch in seconds, the second is microseconds mod
1030  10^6 since that epoch.
1031 \end_layout
1033 \begin_layout Subsubsection
1034 emulator_ready()
1035 \end_layout
1037 \begin_layout Standard
1038 Returns true if emulator has finished booting, false if not (on_startup()
1039  will be issued later).
1040 \end_layout
1042 \begin_layout Subsubsection
1043 set_idle_timeout(number timeout)
1044 \end_layout
1046 \begin_layout Standard
1047 Set number of microseconds to block idle for.
1048  After this timeout has expired, on_idle() will be called once.
1049 \end_layout
1051 \begin_layout Subsubsection
1052 set_timer_timeout(number timeout)
1053 \end_layout
1055 \begin_layout Standard
1056 Set number of microseconds to block timer for.
1057  After this timeout has expired, on_timer() will be called once.
1058 \end_layout
1060 \begin_layout Subsubsection
1061 bus_address(number snesaddr)
1062 \end_layout
1064 \begin_layout Standard
1065 Returns virtual address corresponding to specified address on SNES bus.
1066 \end_layout
1068 \begin_layout Subsubsection
1069 loopwrapper(function fun, ...)
1070 \end_layout
1072 \begin_layout Standard
1073 Calls function fun with function and specified arguments.
1074  The function passed suspends execution until the function returned is called.
1075  Handy for linear flow control among multiple invocations of a hook.
1076  Example code:
1077 \end_layout
1079 \begin_layout LyX-Code
1080 on_paint = loopwrapper(function(wait)
1081 \end_layout
1083 \begin_deeper
1084 \begin_layout LyX-Code
1085 while true do
1086 \end_layout
1088 \begin_deeper
1089 \begin_layout LyX-Code
1090 gui.text(0, 0, 
1091 \begin_inset Quotes eld
1092 \end_inset
1094 Test!
1095 \begin_inset Quotes erd
1096 \end_inset
1099 \end_layout
1101 \begin_layout LyX-Code
1102 wait();
1103 \end_layout
1105 \end_deeper
1106 \begin_layout LyX-Code
1108 \end_layout
1110 \end_deeper
1111 \begin_layout LyX-Code
1112 end);
1113 \end_layout
1115 \begin_layout Subsubsection
1116 list_bindings([string cmd])
1117 \end_layout
1119 \begin_layout Standard
1120 Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
1121  If command is specified, the table is limited to that command.
1122  Also searches for controller keys.
1123 \end_layout
1125 \begin_layout Subsubsection
1126 get_alias(string aname)
1127 \end_layout
1129 \begin_layout Standard
1130 Get expansion of given alias.
1131 \end_layout
1133 \begin_layout Subsubsection
1134 set_alias(string aname, string value)
1135 \end_layout
1137 \begin_layout Standard
1138 Set expansion of given alias.
1139 \end_layout
1141 \begin_layout Subsubsection
1142 create_ibind(string name, string cmd)
1143 \end_layout
1145 \begin_layout Standard
1146 Return object representing inverse binding with specified name and specified
1147  command.
1148 \end_layout
1150 \begin_layout Itemize
1151 To create press/release commands, use aliases +foo and -foo .
1152 \end_layout
1154 \begin_layout Itemize
1155 Keep the returned object around.
1156 \end_layout
1158 \begin_layout Subsubsection
1159 create_command(string name, function a[, function b])
1160 \end_layout
1162 \begin_layout Standard
1163 Return object representing a command (pair).
1164 \end_layout
1166 \begin_layout Itemize
1167 If b is NIL, the command is level-sensitive, a is callback.
1168 \end_layout
1170 \begin_layout Itemize
1171 If b is function, the function is edge-sensitive, a is positive edge callback
1172  and b is negative edge callback.
1173 \end_layout
1175 \begin_layout Itemize
1176 All callbacks get single argument: The parameters passed.
1177 \end_layout
1179 \begin_layout Itemize
1180 Keep the returned object around.
1181 \end_layout
1183 \begin_layout Subsection
1184 Table bit:
1185 \end_layout
1187 \begin_layout Standard
1188 Bitwise logical functions and related.
1189 \end_layout
1191 \begin_layout Subsubsection
1192 bit.none(number...) / bit.bnot(number...)
1193 \end_layout
1195 \begin_layout Standard
1196 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1197  arguments).
1198 \end_layout
1200 \begin_layout Subsubsection
1201 bit.any(number...) / bit.bor(number...)
1202 \end_layout
1204 \begin_layout Standard
1205 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1206 \end_layout
1208 \begin_layout Subsubsection
1209 bit.all(number...) / bit.band(number...)
1210 \end_layout
1212 \begin_layout Standard
1213 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1215 \end_layout
1217 \begin_layout Subsubsection
1218 bit.parity(number...) / bit.bxor(number...)
1219 \end_layout
1221 \begin_layout Standard
1222 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1223  of the arguments).
1224 \end_layout
1226 \begin_layout Subsubsection
1227 bit.lrotate(number base[, number amount[, number bits]])
1228 \end_layout
1230 \begin_layout Standard
1231 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1232 \end_layout
1234 \begin_layout Subsubsection
1235 bit.rrotate(number base[, number amount[, number bits]])
1236 \end_layout
1238 \begin_layout Standard
1239 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1240  places.
1241 \end_layout
1243 \begin_layout Subsubsection
1244 bit.lshift(number base[, number amount[, number bits]])
1245 \end_layout
1247 \begin_layout Standard
1248 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1249  The new bits are filled with zeroes.
1250 \end_layout
1252 \begin_layout Subsubsection
1253 bit.lrshift(number base[, number amount[, number bits]])
1254 \end_layout
1256 \begin_layout Standard
1257 Shift bits-bit (max 48, default 48) number logically right by amount (default
1258  1) places.
1259  The new bits are filled with zeroes.
1260 \end_layout
1262 \begin_layout Subsubsection
1263 bit.arshift(number base[, number amount[, number bits]])
1264 \end_layout
1266 \begin_layout Standard
1267 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1268  (default 1) places.
1269  The new bits are shifted in with copy of the high bit.
1270 \end_layout
1272 \begin_layout Subsubsection
1273 bit.extract(number base[, number bit0[, number bit1,...]])
1274 \end_layout
1276 \begin_layout Standard
1277 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1278 \end_layout
1280 \begin_layout Standard
1281 Notes: 
1282 \end_layout
1284 \begin_layout Itemize
1285 Bit numbers up to 51 should work reliably (then things start falling apart
1286  due to double precision issues).
1287 \end_layout
1289 \begin_layout Itemize
1290 There are two special bit positions, true and false, standing for always
1291  set bit and always clear bit.
1292 \end_layout
1294 \begin_layout Subsubsection
1295 bit.value([number bit1[, number bit2,...]])
1296 \end_layout
1298 \begin_layout Standard
1299 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1300  places and so on.
1301  As special value, nil argument is no-op.
1302 \end_layout
1304 \begin_layout Subsubsection
1305 bit.test_any(number a, number b)
1306 \end_layout
1308 \begin_layout Standard
1309 Returns true if bitwise and of a and b is nonzero, otherwise false.
1310 \end_layout
1312 \begin_layout Subsubsection
1313 bit.test_all(number a, number b)
1314 \end_layout
1316 \begin_layout Standard
1317 Returns true if bitwise and of a and b is equals b, otherwise false.
1318 \end_layout
1320 \begin_layout Subsubsection
1321 bit.popcount(number a)
1322 \end_layout
1324 \begin_layout Standard
1325 Returns number of set bits in a.
1326 \end_layout
1328 \begin_layout Subsubsection
1329 bit.clshift(number a, number b, [number amount,[number bits]])
1330 \end_layout
1332 \begin_layout Standard
1333 Does chained left shift on a, b by amount positions, assuming numbers to
1334  be of specified number of bits.
1335 \end_layout
1337 \begin_layout Subsubsection
1338 bit.crshift(number a, number b, [number amount,[number bits]])
1339 \end_layout
1341 \begin_layout Standard
1342 Does chained right shift on a, b by amount positions, assuming numbers to
1343  be of specified number of bits.
1344 \end_layout
1346 \begin_layout Subsubsection
1347 bit.flagdecode(number a, number bits, [string on, [string off]])
1348 \end_layout
1350 \begin_layout Standard
1351 Return string of length bits where ith character is ith character of on
1352  if bit i is on, otherwise ith character of off.
1353  Out of range reads give last character, or '*'/'-' if empty.
1354 \end_layout
1356 \begin_layout Subsubsection
1357 bit.rflagdecode(number a, number bits, [string on, [string off]])
1358 \end_layout
1360 \begin_layout Standard
1361 Like bit.flagdecode, but outputs the string in the opposite order (most significa
1362 nt bit first).
1363 \end_layout
1365 \begin_layout Subsection
1366 Table gui:
1367 \end_layout
1369 \begin_layout Standard
1370 Most of these functions can only be called in on_paint and on_video callbacks.
1371  Exceptions are noted.
1372 \end_layout
1374 \begin_layout Standard
1375 Colors are 32-bit.
1376  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1377  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1378  opaque, 255 is almost transparent).
1379  -1 is the fully transparent color.
1380  Alpha values greater than 127 do work.
1381 \end_layout
1383 \begin_layout Standard
1384 Origin of coordinates is at top left corner of game display area.
1385  Left and top gaps correspond to negative coordinates.
1386 \end_layout
1388 \begin_layout Subsubsection
1389 gui.resolution()
1390 \end_layout
1392 \begin_layout Standard
1393 Returns 2-tuple (hresolution, vresolution).
1394 \end_layout
1396 \begin_layout Subsubsection
1397 gui.<class>_gap(number gap)
1398 \end_layout
1400 \begin_layout Standard
1401 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1402  is 8191).
1403  If successful, old gap is returned.
1404 \end_layout
1406 \begin_layout Subsubsection
1407 gui.delta_<class>_gap(number gap)
1408 \end_layout
1410 \begin_layout Standard
1411 Increase the <class> (left, right, top, bottom) gap by specified value (max
1412  gap is 8191) and return the old gap (returns nothing on error).
1413 \end_layout
1415 \begin_layout Subsubsection
1416 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1417 \end_layout
1419 \begin_layout Standard
1420 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1421  16 high).
1422  Parameters:
1423 \end_layout
1425 \begin_layout Itemize
1426 x: X-coordinate to start the drawing from (and x-coordinate at begining
1427  of the lines).
1428 \end_layout
1430 \begin_layout Itemize
1431 y: Y-coordinate to start the drawing from.
1432 \end_layout
1434 \begin_layout Itemize
1435 text: The text to draw.
1436 \end_layout
1438 \begin_layout Itemize
1439 fgc: Text color (default is 0xFFFFFF (white))
1440 \end_layout
1442 \begin_layout Itemize
1443 bgc: Background color (default is -1 (transparent))
1444 \end_layout
1446 \begin_layout Subsubsection
1447 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1448 \end_layout
1450 \begin_layout Standard
1451 Like gui.text, but draw using double-width.
1452 \end_layout
1454 \begin_layout Subsubsection
1455 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1456 \end_layout
1458 \begin_layout Standard
1459 Like gui.text, but draw using double-height.
1460 \end_layout
1462 \begin_layout Subsubsection
1463 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
1464 \end_layout
1466 \begin_layout Standard
1467 Like gui.text, but draw using double-width/double-height.
1468 \end_layout
1470 \begin_layout Subsubsection
1471 gui.rectangle(number x, number y, number width, number height[, number thickness[
1472 , number outline[, number fill]]])
1473 \end_layout
1475 \begin_layout Standard
1476 Draw rectangle on the GUI.
1477  Parameters:
1478 \end_layout
1480 \begin_layout Itemize
1481 x: X-coordinate of left edge.
1482 \end_layout
1484 \begin_layout Itemize
1485 y: Y-coordinate of upper edge.
1486 \end_layout
1488 \begin_layout Itemize
1489 width: Width of rectangle.
1490 \end_layout
1492 \begin_layout Itemize
1493 height: Height of rectangle.
1494 \end_layout
1496 \begin_layout Itemize
1497 thickness: Thickness of outline (default is 1).
1498 \end_layout
1500 \begin_layout Itemize
1501 outline: Color of outline (default is 0xFFFFFF (white))
1502 \end_layout
1504 \begin_layout Itemize
1505 fill: Color of fill (default is -1 (transparent))
1506 \end_layout
1508 \begin_layout Subsubsection
1509 gui.box(number x, number y, number width, number height[, number thickness[,
1510  number outline1[,number outline2[, number fill]]]])
1511 \end_layout
1513 \begin_layout Standard
1514 Draw rectangle with 3D effect on the GUI.
1515  Parameters:
1516 \end_layout
1518 \begin_layout Itemize
1519 x: X-coordinate of left edge.
1520 \end_layout
1522 \begin_layout Itemize
1523 y: Y-coordinate of upper edge.
1524 \end_layout
1526 \begin_layout Itemize
1527 width: Width of rectangle.
1528 \end_layout
1530 \begin_layout Itemize
1531 height: Height of rectangle.
1532 \end_layout
1534 \begin_layout Itemize
1535 thickness: Thickness of outline (default is 1).
1536 \end_layout
1538 \begin_layout Itemize
1539 outline1: First color of outline (default is 0xFFFFFF (white))
1540 \end_layout
1542 \begin_layout Itemize
1543 outline2: First color of outline (default is 0x808080 (dark gray))
1544 \end_layout
1546 \begin_layout Itemize
1547 fill: Color of fill (default is 0xC0C0C0 (light grayy))
1548 \end_layout
1550 \begin_layout Subsubsection
1551 gui.pixel(number x, number y[, number color])
1552 \end_layout
1554 \begin_layout Standard
1555 Draw one pixel on the GUI.
1556  Parameters:
1557 \end_layout
1559 \begin_layout Itemize
1560 x: X-coordinate of the pixel
1561 \end_layout
1563 \begin_layout Itemize
1564 y: Y-coordinate of the pixel
1565 \end_layout
1567 \begin_layout Itemize
1568 color: Color of the pixel (default is 0xFFFFFF (white))
1569 \end_layout
1571 \begin_layout Subsubsection
1572 gui.crosshair(number x, number y[, number length[, number color]])
1573 \end_layout
1575 \begin_layout Standard
1576 Draw a crosshair.
1577  Parameters:
1578 \end_layout
1580 \begin_layout Itemize
1581 x: X-coordinate of the crosshair
1582 \end_layout
1584 \begin_layout Itemize
1585 y: Y-coordinate of the crosshair
1586 \end_layout
1588 \begin_layout Itemize
1589 length: Length of the crosshair lines (default 10).
1590 \end_layout
1592 \begin_layout Itemize
1593 color: Color of the crosshair (default is 0xFFFFFF (white))
1594 \end_layout
1596 \begin_layout Subsubsection
1597 gui.line(number x1, number y1, number x2, number y2[, number color])
1598 \end_layout
1600 \begin_layout Standard
1601 Draw a thin line.
1602  Parameters:
1603 \end_layout
1605 \begin_layout Itemize
1606 x1: X-coordinate of one end.
1607 \end_layout
1609 \begin_layout Itemize
1610 y1: Y-coordinate of one end.
1611 \end_layout
1613 \begin_layout Itemize
1614 x2: X-coordinate of the other end.
1615 \end_layout
1617 \begin_layout Itemize
1618 y2: Y-coordinate of the other end.
1619 \end_layout
1621 \begin_layout Itemize
1622 color: Color of the line (default is 0xFFFFFF (white)).
1623 \end_layout
1625 \begin_layout Subsubsection
1626 gui.circle(number x, number y, number r[, number thick[, number border[,
1627  number fil]]])
1628 \end_layout
1630 \begin_layout Standard
1631 Draw a circle.
1632  Parameters.
1633 \end_layout
1635 \begin_layout Itemize
1636 x: X-coordinate of the center
1637 \end_layout
1639 \begin_layout Itemize
1640 y: Y-coordinate of the center
1641 \end_layout
1643 \begin_layout Itemize
1644 r: The radius of the circle
1645 \end_layout
1647 \begin_layout Itemize
1648 thick: Border thickness
1649 \end_layout
1651 \begin_layout Itemize
1652 border: Border color (default is 0xFFFFFF (white))
1653 \end_layout
1655 \begin_layout Itemize
1656 fill: Fill color (default is -1 (transparent)).
1657 \end_layout
1659 \begin_layout Subsubsection
1660 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
1661 \end_layout
1663 \begin_layout Standard
1664 Draw a bitmap on screen with specified palette.
1665  Parameters:
1666 \end_layout
1668 \begin_layout Itemize
1669 x: X-coordinate of left edge.
1670 \end_layout
1672 \begin_layout Itemize
1673 y: Y-coordinate of top edge.
1674 \end_layout
1676 \begin_layout Itemize
1677 bitmap: The bitmap to draw
1678 \end_layout
1680 \begin_layout Itemize
1681 palette: The palette to draw the bitmap using.
1682 \end_layout
1684 \begin_layout Subsubsection
1685 gui.bitmap_draw(number x, number y, dbitmap bitmap)
1686 \end_layout
1688 \begin_layout Standard
1689 Draw a bitmap on screen.
1690  Parameters:
1691 \end_layout
1693 \begin_layout Itemize
1694 x: X-coordinate of left edge.
1695 \end_layout
1697 \begin_layout Itemize
1698 y: Y-coordinate of top edge.
1699 \end_layout
1701 \begin_layout Itemize
1702 bitmap: The bitmap to draw
1703 \end_layout
1705 \begin_layout Subsubsection
1706 gui.palette_new()
1707 \end_layout
1709 \begin_layout Standard
1710 Returns a new palette (initially all transparent).
1711  Can be used anywhere.
1712 \end_layout
1714 \begin_layout Subsubsection
1715 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
1716 \end_layout
1718 \begin_layout Standard
1719 Returns a new bitmap/dbitmap.
1720  Can be used anywhere.
1721  Parameters:
1722 \end_layout
1724 \begin_layout Itemize
1725 w: The width of new bitmap
1726 \end_layout
1728 \begin_layout Itemize
1729 h: The height of new bitmap
1730 \end_layout
1732 \begin_layout Itemize
1733 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
1734 \end_layout
1736 \begin_layout Itemize
1737 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
1738 \end_layout
1740 \begin_layout Subsubsection
1741 gui.bitmap_load(string file)
1742 \end_layout
1744 \begin_layout Standard
1745 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
1746  for bitmap).
1747  Can be used anywhere.
1748  Parameters:
1749 \end_layout
1751 \begin_layout Itemize
1752 file: The name of file to load.
1753 \end_layout
1755 \begin_layout Subsubsection
1756 gui.palette_set(palette palette, number index, number color)
1757 \end_layout
1759 \begin_layout Standard
1760 Sets color in palette.
1761  Can be used anywhere.
1762  Parameters:
1763 \end_layout
1765 \begin_layout Itemize
1766 palette: The palette to manipulate
1767 \end_layout
1769 \begin_layout Itemize
1770 index: Index of color (0-65535).
1771 \end_layout
1773 \begin_layout Itemize
1774 color: The color value.
1775 \end_layout
1777 \begin_layout Subsubsection
1778 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
1779 \end_layout
1781 \begin_layout Standard
1782 Sets specified pixel in bitmap.
1783  Can be used anywhere.
1784  Parameters:
1785 \end_layout
1787 \begin_layout Itemize
1788 bitmap: The bitmap to manipulate
1789 \end_layout
1791 \begin_layout Itemize
1792 x: The x-coordinate of the pixel.
1793 \end_layout
1795 \begin_layout Itemize
1796 y: The y-coordinate of the pixel.
1797 \end_layout
1799 \begin_layout Itemize
1800 color: If bitmap is a bitmap, color index (0-65535).
1801  Otherwise color value.
1802 \end_layout
1804 \begin_layout Subsubsection
1805 gui.bitmap_size(bitmap/dbitmap bitmap)
1806 \end_layout
1808 \begin_layout Standard
1809 Get size of bitmap.
1810  Can be used anywhere.
1811  Parameters:
1812 \end_layout
1814 \begin_layout Itemize
1815 bitmap: The bitmap to query.
1816 \end_layout
1818 \begin_layout Standard
1819 The first return is the width, the second is the height.
1820 \end_layout
1822 \begin_layout Subsubsection
1823 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
1824  src, number sx, number sy, number w, number h[, number ck])
1825 \end_layout
1827 \begin_layout Standard
1828 Blit a part of bitmap to another.
1829  Can be used anywhere.
1830  Parameters:
1831 \end_layout
1833 \begin_layout Itemize
1834 dest: Destination to blit to.
1835 \end_layout
1837 \begin_layout Itemize
1838 dx: left edge of target
1839 \end_layout
1841 \begin_layout Itemize
1842 dy: Top edge of target
1843 \end_layout
1845 \begin_layout Itemize
1846 src: The source to blit from.
1847  Must be of the same type as destination.
1848 \end_layout
1850 \begin_layout Itemize
1851 sx: left edge of source
1852 \end_layout
1854 \begin_layout Itemize
1855 sy: Top edge of source
1856 \end_layout
1858 \begin_layout Itemize
1859 w: Width of region
1860 \end_layout
1862 \begin_layout Itemize
1863 h: Height of region.
1864 \end_layout
1866 \begin_layout Itemize
1867 ck: Color key.
1868  Pixels of this color are not blitted.
1869 \end_layout
1871 \begin_deeper
1872 \begin_layout Itemize
1873 If bitmaps are bitmaps, this is color index of colorkey.
1874  Values outside range 0-65535 cause no key to be used as colorkey.
1875 \end_layout
1877 \begin_layout Itemize
1878 If bitmaps are dbitmaps, this color value of colorkey.
1879 \end_layout
1881 \begin_layout Itemize
1882 May be absent or nil for no colorkey blit.
1883 \end_layout
1885 \end_deeper
1886 \begin_layout Subsubsection
1887 gui.repaint()
1888 \end_layout
1890 \begin_layout Standard
1891 Request on_repaint() to happen as soon as possible.
1892  Can be used anywhere.
1893 \end_layout
1895 \begin_layout Subsubsection
1896 gui.subframe_update(boolean on)
1897 \end_layout
1899 \begin_layout Standard
1900 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
1901  or not happen (on=false).
1902  Can be used anywhere.
1903 \end_layout
1905 \begin_layout Subsubsection
1906 gui.screenshot(string filename)
1907 \end_layout
1909 \begin_layout Standard
1910 Write PNG screenshot of the current frame (no drawings) to specified file.
1911  Can be used anywhere.
1912 \end_layout
1914 \begin_layout Subsubsection
1915 gui.color(number r, number g, number b[, number a])
1916 \end_layout
1918 \begin_layout Standard
1919 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
1920  each component in scale 0-255.
1921  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
1922  opaque).
1923  The default alpha is 256.
1924 \end_layout
1926 \begin_layout Subsubsection
1927 gui.status(string name, string value)
1928 \end_layout
1930 \begin_layout Standard
1931 Set status field 
1932 \begin_inset Quotes eld
1933 \end_inset
1935 L[<name>]
1936 \begin_inset Quotes erd
1937 \end_inset
1939  to <value> in status area.
1940  Can be used anywhere.
1941 \end_layout
1943 \begin_layout Subsubsection
1944 gui.rainbow(number step, number steps[, number color])
1945 \end_layout
1947 \begin_layout Standard
1948 Perform hue rotation of color <color> (default bright red), by <step> steps.
1949  The number of steps per full rotation is given by absolute value of <steps>.
1950 \end_layout
1952 \begin_layout Standard
1953 If <steps> is negative, the rotation will be counterclockwise.
1954 \end_layout
1956 \begin_layout Subsubsection
1957 gui.screenshot(string filename)
1958 \end_layout
1960 \begin_layout Standard
1961 Saves a screenshot into specified file.
1962 \end_layout
1964 \begin_layout Subsubsection
1965 gui.renderq_new(number width, number height)
1966 \end_layout
1968 \begin_layout Standard
1969 Create render queue with specified reported size and return it.
1970 \end_layout
1972 \begin_layout Subsubsection
1973 gui.renderq_clear(RENDERQUEUE queue)
1974 \end_layout
1976 \begin_layout Standard
1977 Clear specified render queue.
1978 \end_layout
1980 \begin_layout Subsubsection
1981 gui.renderq_set(RENDERQUEUE queue)
1982 \end_layout
1984 \begin_layout Standard
1985 Switch to specified render queue.
1986  Use nil as queue to switch to default queue.
1987 \end_layout
1989 \begin_layout Itemize
1990 When switched to another queue, all drawing functions work and draw there,
1991  even outside on_video/on_paint.
1992 \end_layout
1994 \begin_layout Subsubsection
1995 gui.renderq_run(RENDERQUEUE queue)
1996 \end_layout
1998 \begin_layout Standard
1999 Run specified render queue, copying the objects to current render queue.
2001 \end_layout
2003 \begin_layout Itemize
2004 Warning: Don't try to run the current render queue.
2005 \end_layout
2007 \begin_layout Subsubsection
2008 gui.loadfont(string filename)
2009 \end_layout
2011 \begin_layout Standard
2012 Loads font from specified file (CUSTOMFONT object).
2013 \end_layout
2015 \begin_layout Subsubsection
2016 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc[, number
2017  hlc]]])
2018 \end_layout
2020 \begin_layout Standard
2021 Draw string with custom font to screen.
2022  The parameters are the same as in gui.text, except hlc is the halo color
2023  (default is no halo).
2025 \end_layout
2027 \begin_layout Subsection
2028 table input
2029 \end_layout
2031 \begin_layout Standard
2032 Input handling.
2033  Only available in on_input callback.
2034 \end_layout
2036 \begin_layout Subsubsection
2037 input.get(number controller, number index)
2038 \end_layout
2040 \begin_layout Standard
2041 Read the specified index (0-11) from specified controller (0-7).
2042  Notes:
2043 \end_layout
2045 \begin_layout Itemize
2046 Uses physical controller numbering.
2047  Gamepad in port 2 is controller 4, not 1!
2048 \end_layout
2050 \begin_layout Subsubsection
2051 input.set(number controller, number index, number value)
2052 \end_layout
2054 \begin_layout Standard
2055 Write the specified index (0-11) from specified controller (0-7), storing
2056  value.
2057  Notes:
2058 \end_layout
2060 \begin_layout Itemize
2061 Uses physical controller numbering.
2062  Gamepad in port 2 is controller 4, not 1!
2063 \end_layout
2065 \begin_layout Subsubsection
2066 input.get2(number port, number controller, number index)
2067 \end_layout
2069 \begin_layout Standard
2070 Read the specified input tuple.
2071 \end_layout
2073 \begin_layout Itemize
2074 Port 0 is system port.
2075 \end_layout
2077 \begin_layout Subsubsection
2078 input.set2(number port, number controller, number index, number value)
2079 \end_layout
2081 \begin_layout Standard
2082 Write the specified input tuple.
2083 \end_layout
2085 \begin_layout Itemize
2086 Port 0 is system port.
2087 \end_layout
2089 \begin_layout Subsubsection
2090 input.lcid_to_pcid2(number lcid)
2091 \end_layout
2093 \begin_layout Standard
2094 Look up physical pcid pair (port, controller) corresponding to specified
2095  logical controller (1-based).
2096  Returns nothing if controller does not exist.
2097 \end_layout
2099 \begin_layout Subsubsection
2100 input.port_type(number port)
2101 \end_layout
2103 \begin_layout Standard
2104 Return type of specified port.
2105 \end_layout
2107 \begin_layout Subsubsection
2108 input.controller_info(number port, number controller)
2109 \end_layout
2111 \begin_layout Standard
2112 Get controller info for specified controller.
2113  If controller does not exist, returns nil.
2114  Otherwise returns a table with following fields:
2115 \end_layout
2117 \begin_layout Itemize
2118 type (string): Type of the controller.
2119 \end_layout
2121 \begin_layout Itemize
2122 class (string): Class of the controller.
2123 \end_layout
2125 \begin_layout Itemize
2126 classnum (number): Number of the controller within its class (1-based)
2127 \end_layout
2129 \begin_layout Itemize
2130 lcid (number): Logical controller number of the controller.
2131 \end_layout
2133 \begin_layout Itemize
2134 button_count (number): Number of buttons on controller
2135 \end_layout
2137 \begin_layout Itemize
2138 buttons (array): Array of following info about each button:
2139 \end_layout
2141 \begin_deeper
2142 \begin_layout Itemize
2143 type (string): Type of button.
2144  Currently one of 
2145 \begin_inset Quotes eld
2146 \end_inset
2148 null
2149 \begin_inset Quotes erd
2150 \end_inset
2153 \begin_inset Quotes eld
2154 \end_inset
2156 button
2157 \begin_inset Quotes erd
2158 \end_inset
2161 \begin_inset Quotes eld
2162 \end_inset
2164 axis
2165 \begin_inset Quotes erd
2166 \end_inset
2169 \begin_inset Quotes eld
2170 \end_inset
2172 raxis
2173 \begin_inset Quotes erd
2174 \end_inset
2177 \end_layout
2179 \begin_layout Itemize
2180 name (string): Name of button.
2181 \end_layout
2183 \begin_layout Itemize
2184 symbol (string): Symbol of button.
2185  Only present for type 
2186 \begin_inset Quotes eld
2187 \end_inset
2189 button
2190 \begin_inset Quotes erd
2191 \end_inset
2194 \end_layout
2196 \begin_layout Itemize
2197 hidden (boolean): True if hidden button.
2199 \end_layout
2201 \end_deeper
2202 \begin_layout Subsubsection
2203 input.veto_button()
2204 \end_layout
2206 \begin_layout Standard
2207 Signals that the button event should be vetoed.
2208  Only valid in on_button callback.
2209 \end_layout
2211 \begin_layout Subsubsection
2212 input.geta(number controller)
2213 \end_layout
2215 \begin_layout Standard
2216 Get input state for entiere controller.
2217  Returns 13 return values.
2218 \end_layout
2220 \begin_layout Itemize
2221 1st return value: Bitmask: bit i is set if i:th index is nonzero
2222 \end_layout
2224 \begin_layout Itemize
2225 2nd-13th return value: value of i:th index.
2226 \end_layout
2228 \begin_layout Subsubsection
2229 input.seta(number controller, number bitmask, number args...)
2230 \end_layout
2232 \begin_layout Standard
2233 Set state for entiere controller.
2234  args is up to 12 values for indices (overriding values in bitmask if specified).
2235 \end_layout
2237 \begin_layout Subsubsection
2238 input.controllertype(number controller)
2239 \end_layout
2241 \begin_layout Standard
2242 Get the type of controller as string.
2243  Valid values are:
2244 \end_layout
2246 \begin_layout Itemize
2247 gamepad
2248 \end_layout
2250 \begin_layout Itemize
2251 mouse
2252 \end_layout
2254 \begin_layout Itemize
2255 justifier
2256 \end_layout
2258 \begin_layout Itemize
2259 superscope
2260 \end_layout
2262 \begin_layout Subsubsection
2263 input.reset([number cycles])
2264 \end_layout
2266 \begin_layout Standard
2267 Execute reset.
2268  If cycles is greater than zero, do delayed reset.
2269  0 (or no value) causes immediate reset.
2270 \end_layout
2272 \begin_layout Itemize
2273 Only available with subframe flag false.
2274 \end_layout
2276 \begin_layout Subsubsection
2277 input.raw()
2278 \end_layout
2280 \begin_layout Standard
2281 Returns table of tables of all available keys and axes.
2282  The first table is indexed by key name (platform-dependent!), and the inner
2283  table has the following fields:
2284 \end_layout
2286 \begin_layout Itemize
2287 value: Last reported value for control
2288 \end_layout
2290 \begin_deeper
2291 \begin_layout Itemize
2292 For keys: 1 for pressed, 0 for released.
2293 \end_layout
2295 \begin_layout Itemize
2296 For axes: -32767...32767.
2297 \end_layout
2299 \begin_layout Itemize
2300 For presure-sensitive buttons: 0...32767.
2301 \end_layout
2303 \begin_layout Itemize
2304 For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
2305 \end_layout
2307 \begin_layout Itemize
2308 For mouse: Coordinates relative to game area.
2309 \end_layout
2311 \end_deeper
2312 \begin_layout Itemize
2313 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2314  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2315 \end_layout
2317 \begin_layout Subsubsection
2318 input.keyhook(string key, boolean state)
2319 \end_layout
2321 \begin_layout Standard
2322 Requests that keyhook events to be sent for key (state=true) or not sent
2323  (state=false).
2324 \end_layout
2326 \begin_layout Subsubsection
2327 input.joyget(number controller)
2328 \end_layout
2330 \begin_layout Standard
2331 Returns table for current controls for specified controller.
2332  The names of fields vary by controller type.
2333 \end_layout
2335 \begin_layout Itemize
2336 The buttons have the same name as those are referred to in other contexts
2337  in the emulator
2338 \end_layout
2340 \begin_layout Itemize
2341 The analog axes are 
2342 \begin_inset Quotes eld
2343 \end_inset
2345 xaxis
2346 \begin_inset Quotes erd
2347 \end_inset
2349  and 
2350 \begin_inset Quotes eld
2351 \end_inset
2353 yaxis
2354 \begin_inset Quotes erd
2355 \end_inset
2358 \end_layout
2360 \begin_layout Subsubsection
2361 input.joyset(number controller, table controls)
2362 \end_layout
2364 \begin_layout Standard
2365 Set the the state of specified controller to values specified in specified
2366  table.
2367 \end_layout
2369 \begin_layout Subsubsection
2370 input.lcid_to_pcid(number controller)
2371 \end_layout
2373 \begin_layout Standard
2374 Return the physical index, physical port and controller number in port for
2375  specified (1-based) logical controller.
2376 \end_layout
2378 \begin_layout Subsection
2379 Table keyboard
2380 \end_layout
2382 \begin_layout Standard
2383 Various keybinding-related functions
2384 \end_layout
2386 \begin_layout Subsubsection
2387 keyboard.bind(string mod, string mask, string key, string cmd)
2388 \end_layout
2390 \begin_layout Standard
2391 Bind specified key with specified modifers to specified command.
2392 \end_layout
2394 \begin_layout Subsubsection
2395 keyboard.unbind(string mod, string mask, string key)
2396 \end_layout
2398 \begin_layout Standard
2399 Unbind specified key with specified modifers.
2400 \end_layout
2402 \begin_layout Itemize
2403 nil does not change value
2404 \end_layout
2406 \begin_layout Itemize
2407 true/false (buttons) and integers (axes) force value.
2408 \end_layout
2410 \begin_layout Itemize
2411 string (button) inverts the input.
2412 \end_layout
2414 \begin_layout Subsubsection
2415 keyboard.alias(string alias, string expansion)
2416 \end_layout
2418 \begin_layout Standard
2419 Set expansion of given command.
2420 \end_layout
2422 \begin_layout Subsection
2423 Table subtitle
2424 \end_layout
2426 \begin_layout Standard
2427 Subtitle handling
2428 \end_layout
2430 \begin_layout Subsubsection
2431 subtitle.byindex(number i)
2432 \end_layout
2434 \begin_layout Standard
2435 Read the frame and length of ith subtitle.
2436  Returns nothing if not present.
2437 \end_layout
2439 \begin_layout Subsubsection
2440 subtitle.set(number f, number l, string txt)
2441 \end_layout
2443 \begin_layout Standard
2444 Set the text of subtitle.
2445 \end_layout
2447 \begin_layout Subsubsection
2448 subtitle.get(number f, number l)
2449 \end_layout
2451 \begin_layout Standard
2452 Get the text of subtitle.
2453 \end_layout
2455 \begin_layout Subsubsection
2456 subtitle.delete(number f, number l)
2457 \end_layout
2459 \begin_layout Standard
2460 Delete specified subtitle.
2461 \end_layout
2463 \begin_layout Subsection
2464 Table hostmemory
2465 \end_layout
2467 \begin_layout Standard
2468 Host memory handling (extra memory saved to savestates).
2469  Host memory starts empty.
2470 \end_layout
2472 \begin_layout Subsubsection
2473 hostmemory.read(number address)
2474 \end_layout
2476 \begin_layout Standard
2477 Reads hostmemory slot address.
2478  Slot numbers out of range return false instead of numeric.
2479 \end_layout
2481 \begin_layout Subsubsection
2482 hostmemory.write(number address, number value)
2483 \end_layout
2485 \begin_layout Standard
2486 Writes hostmemory slot with 0-255.
2487  Slot numbers out of range cause extension of host memory slot space.
2488 \end_layout
2490 \begin_layout Subsubsection
2491 hostmemory.readbyte(number address)
2492 \end_layout
2494 \begin_layout Standard
2495 Read unsigned byte (1 element) from given address.
2496  Slots out of range return false.
2497 \end_layout
2499 \begin_layout Subsubsection
2500 hostmemory.writebyte(number address, number value)
2501 \end_layout
2503 \begin_layout Standard
2504 Write unsigned byte (1 element) to given slot.
2505  Slot numbers out of range cause extension.
2506 \end_layout
2508 \begin_layout Subsubsection
2509 hostmemory.readsbyte(number address)
2510 \end_layout
2512 \begin_layout Standard
2513 Read signed byte (1 element) from given address.
2514  Slots out of range return false.
2515 \end_layout
2517 \begin_layout Subsubsection
2518 hostmemory.writesbyte(number address, number value)
2519 \end_layout
2521 \begin_layout Standard
2522 Write signed byte (1 element) to given slot.
2523  Slot numbers out of range cause extension.
2524 \end_layout
2526 \begin_layout Subsubsection
2527 hostmemory.readword(number address)
2528 \end_layout
2530 \begin_layout Standard
2531 Read unsigned word (2 elements) from given address.
2532  Slots out of range return false.
2533 \end_layout
2535 \begin_layout Subsubsection
2536 hostmemory.writeword(number address, number value)
2537 \end_layout
2539 \begin_layout Standard
2540 Write unsigned word (2 elements) to given slot.
2541  Slot numbers out of range cause extension.
2542 \end_layout
2544 \begin_layout Subsubsection
2545 hostmemory.readsword(number address)
2546 \end_layout
2548 \begin_layout Standard
2549 Read signed word (2 elements) from given address.
2550  Slots out of range return false.
2551 \end_layout
2553 \begin_layout Subsubsection
2554 hostmemory.writesword(number address, number value)
2555 \end_layout
2557 \begin_layout Standard
2558 Write signed word (2 elements) to given slot.
2559  Slot numbers out of range cause extension.
2560 \end_layout
2562 \begin_layout Subsubsection
2563 hostmemory.readdword(number address)
2564 \end_layout
2566 \begin_layout Standard
2567 Read unsigned doubleword (4 elements) from given address.
2568  Slots out of range return false.
2569 \end_layout
2571 \begin_layout Subsubsection
2572 hostmemory.writedword(number address, number value)
2573 \end_layout
2575 \begin_layout Standard
2576 Write unsigned doubleword (4 elements) to given slot.
2577  Slot numbers out of range cause extension.
2578 \end_layout
2580 \begin_layout Subsubsection
2581 hostmemory.readsdword(number address)
2582 \end_layout
2584 \begin_layout Standard
2585 Read signed doubleword (4 elements) from given address.
2586  Slots out of range return false.
2587 \end_layout
2589 \begin_layout Subsubsection
2590 hostmemory.writesdword(number address, number value)
2591 \end_layout
2593 \begin_layout Standard
2594 Write signed doubleword (4 elements) to given slot.
2595  Slot numbers out of range cause extension.
2596 \end_layout
2598 \begin_layout Subsubsection
2599 hostmemory.readqword(number address)
2600 \end_layout
2602 \begin_layout Standard
2603 Read unsigned quadword (8 elements) from given address.
2604  Slots out of range return false.
2605 \end_layout
2607 \begin_layout Subsubsection
2608 hostmemory.writeqword(number address, number value)
2609 \end_layout
2611 \begin_layout Standard
2612 Write unsigned quadword (4 elements) to given slot.
2613  Slot numbers out of range cause extension.
2614 \end_layout
2616 \begin_layout Subsubsection
2617 hostmemory.readsqword(number address)
2618 \end_layout
2620 \begin_layout Standard
2621 Read signed quadword (8 elements) from given address.
2622  Slots out of range return false.
2623 \end_layout
2625 \begin_layout Subsubsection
2626 hostmemory.writesqword(number address, number value)
2627 \end_layout
2629 \begin_layout Standard
2630 Write signed quadword (8 elements) to given slot.
2631  Slot numbers out of range cause extension.
2632 \end_layout
2634 \begin_layout Subsection
2635 Table movie
2636 \end_layout
2638 \begin_layout Standard
2639 Movie handling
2640 \end_layout
2642 \begin_layout Subsubsection
2643 movie.currentframe()
2644 \end_layout
2646 \begin_layout Standard
2647 Return number of current frame.
2648 \end_layout
2650 \begin_layout Subsubsection
2651 movie.framecount()
2652 \end_layout
2654 \begin_layout Standard
2655 Return number of frames in movie.
2656 \end_layout
2658 \begin_layout Subsubsection
2659 movie.readonly()
2660 \end_layout
2662 \begin_layout Standard
2663 Return true if in readonly mode, false if in readwrite.
2664 \end_layout
2666 \begin_layout Subsubsection
2667 movie.rerecords()
2668 \end_layout
2670 \begin_layout Standard
2671 Returns the current value of rerecord count.
2672 \end_layout
2674 \begin_layout Subsubsection
2675 movie.set_readwrite()
2676 \end_layout
2678 \begin_layout Standard
2679 Set readwrite mode (does not cause on_readwrite callback).
2680 \end_layout
2682 \begin_layout Subsubsection
2683 movie.frame_subframes(number frame)
2684 \end_layout
2686 \begin_layout Standard
2687 Count number of subframes in specified frame (frame numbers are 1-based)
2688  and return that.
2689 \end_layout
2691 \begin_layout Subsubsection
2692 movie.read_subframes(number frame, number subframe)
2693 \end_layout
2695 \begin_layout Standard
2696 Read specifed subframe in specified frame and return data as array (100
2697  elements, numbered 0-99 currently).
2698 \end_layout
2700 \begin_layout Subsubsection
2701 movie.read_rtc()
2702 \end_layout
2704 \begin_layout Standard
2705 Returns the current value of the RTC as a pair (second, subsecond).
2706 \end_layout
2708 \begin_layout Subsubsection
2709 movie.unsafe_rewind([UNSAFEREWIND state])
2710 \end_layout
2712 \begin_layout Standard
2713 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2714 \end_layout
2716 \begin_layout Itemize
2717 If called without argument, causes emulator to start process of setting
2718  unsafe rewind point.
2719  When this has finished, callback on_set_rewind occurs, passing the rewind
2720  state to lua script.
2721 \end_layout
2723 \begin_layout Itemize
2724 If called with argument, causes emulator rewind to passed rewind point as
2725  soon as possible.
2726  Readwrite mode is implicitly activated.
2727 \end_layout
2729 \begin_layout Standard
2730 The following warnings apply to unsafe rewinding:
2731 \end_layout
2733 \begin_layout Itemize
2734 There are no safety checks against misuse (that's what 
2735 \begin_inset Quotes eld
2736 \end_inset
2738 unsafe
2739 \begin_inset Quotes erd
2740 \end_inset
2742  comes from)!
2743 \end_layout
2745 \begin_layout Itemize
2746 Only call rewind from timeline rewind point was set from.
2747 \end_layout
2749 \begin_layout Itemize
2750 Only call rewind from after the rewind point was set.
2751 \end_layout
2753 \begin_layout Subsection
2754 Table settings
2755 \end_layout
2757 \begin_layout Standard
2758 Routines for settings manipulation
2759 \end_layout
2761 \begin_layout Subsubsection
2762 settings.get(string name)
2763 \end_layout
2765 \begin_layout Standard
2766 Get value of setting.
2767  If setting is blank, returns false.
2768  If setting value can't be obtained, returns (nil, error message).
2769 \end_layout
2771 \begin_layout Subsubsection
2772 settings.set(string name, string value)
2773 \end_layout
2775 \begin_layout Standard
2776 Set value of setting.
2777  If setting can't be set, returns (nil, error message).
2778 \end_layout
2780 \begin_layout Subsubsection
2781 settings.is_set(string name)
2782 \end_layout
2784 \begin_layout Standard
2785 Returns if setting is set.
2786  If setting does not exist, returns (nil, error message).
2787 \end_layout
2789 \begin_layout Subsubsection
2790 settings.blank(string name)
2791 \end_layout
2793 \begin_layout Standard
2794 Blanks a setting and returns true.
2795  If setting can't be blanked, returns (nil, error message).
2796 \end_layout
2798 \begin_layout Subsection
2799 Table memory
2800 \end_layout
2802 \begin_layout Standard
2803 Contains various functions for managing memory
2804 \end_layout
2806 \begin_layout Subsubsection
2807 memory.vma_count()
2808 \end_layout
2810 \begin_layout Standard
2811 Returns the number of VMAs
2812 \end_layout
2814 \begin_layout Subsubsection
2815 memory.read_vma(number index)
2816 \end_layout
2818 \begin_layout Standard
2819 Reads the specified VMA (indices start from zero).
2820  Trying to read invalid VMA gives nil.
2821  The read VMA is table with the following fields:
2822 \end_layout
2824 \begin_layout Itemize
2825 region_name (string): The readable name of the VMA
2826 \end_layout
2828 \begin_layout Itemize
2829 baseaddr (number): Base address of the VMA
2830 \end_layout
2832 \begin_layout Itemize
2833 lastaddr (number): Last address in the VMA.
2834 \end_layout
2836 \begin_layout Itemize
2837 size (number): The size of VMA in bytes.
2838 \end_layout
2840 \begin_layout Itemize
2841 readonly (boolean): True of the VMA corresponds to ROM.
2842 \end_layout
2844 \begin_layout Itemize
2845 iospace (boolean): True if the VMA is I/O space.
2846 \end_layout
2848 \begin_layout Itemize
2849 native_endian (boolean): True if the VMA has native endian as opposed to
2850  little endian.
2851 \end_layout
2853 \begin_layout Subsubsection
2854 memory.find_vma(number address)
2855 \end_layout
2857 \begin_layout Standard
2858 Finds the VMA containing specified address.
2859  Returns table in the same format as read_vma or nil if not found.
2860 \end_layout
2862 \begin_layout Subsubsection
2863 memory.readbyte([string vma, ]number address)
2864 \end_layout
2866 \begin_layout Standard
2867 Reads the specified address as unsigned byte and returns the result.
2868 \end_layout
2870 \begin_layout Subsubsection
2871 memory.readsbyte([string vma, ]number address)
2872 \end_layout
2874 \begin_layout Standard
2875 Reads the specified address as signed byte and returns the result.
2876 \end_layout
2878 \begin_layout Subsubsection
2879 memory.writebyte([string vma, ]number address, number value)
2880 \end_layout
2882 \begin_layout Standard
2883 Writes the specified value (negative values undergo 2's complement) to specified
2884  address (as a byte).
2885 \end_layout
2887 \begin_layout Subsubsection
2888 memory.readword([string vma, ]number address)
2889 \end_layout
2891 \begin_layout Standard
2892 Reads the specified address as unsigned word and returns the result.
2893 \end_layout
2895 \begin_layout Subsubsection
2896 memory.readsword([string vma, ]number address)
2897 \end_layout
2899 \begin_layout Standard
2900 Reads the specified address as signed word and returns the result.
2901 \end_layout
2903 \begin_layout Subsubsection
2904 memory.writeword([string vma, ]number address, number value)
2905 \end_layout
2907 \begin_layout Standard
2908 Writes the specified value (negative values undergo 2's complement) to specified
2909  address (as a word).
2910 \end_layout
2912 \begin_layout Subsubsection
2913 memory.readdword([string vma, ]number address)
2914 \end_layout
2916 \begin_layout Standard
2917 Reads the specified address as unsigned doubleword and returns the result.
2918 \end_layout
2920 \begin_layout Subsubsection
2921 memory.readsdword([string vma, ]number address)
2922 \end_layout
2924 \begin_layout Standard
2925 Reads the specified address as signed doubleword and returns the result.
2926 \end_layout
2928 \begin_layout Subsubsection
2929 memory.writedword([string vma, ]number address, number value)
2930 \end_layout
2932 \begin_layout Standard
2933 Writes the specified value (negative values undergo 2's complement) to specified
2934  address (as a doubleword).
2935 \end_layout
2937 \begin_layout Subsubsection
2938 memory.readqword([string vma, ]number address)
2939 \end_layout
2941 \begin_layout Standard
2942 Reads the specified address as unsigned quadword and returns the result.
2943 \end_layout
2945 \begin_layout Subsubsection
2946 memory.readsqword([string vma, ]number address)
2947 \end_layout
2949 \begin_layout Standard
2950 Reads the specified address as signed quadword and returns the result.
2951 \end_layout
2953 \begin_layout Subsubsection
2954 memory.writeqword([string vma, ]number address, number value)
2955 \end_layout
2957 \begin_layout Standard
2958 Writes the specified value (negative values undergo 2's complement) to specified
2959  address (as a quadword).
2960 \end_layout
2962 \begin_layout Subsubsection
2963 memory.hash_region([string vma, ]number base, number size)
2964 \end_layout
2966 \begin_layout Standard
2967 Hash specified number of bytes starting from specified address and return
2968  the SHA-256.
2969 \end_layout
2971 \begin_layout Subsubsection
2972 memory.hash_state()
2973 \end_layout
2975 \begin_layout Standard
2976 Hash the current system state.
2977  Mainly useful for debugging savestates.
2978 \end_layout
2980 \begin_layout Subsubsection
2981 memory.readregion([string vma, ]number base, number size)
2982 \end_layout
2984 \begin_layout Standard
2985 Read a region of memory.
2986 \end_layout
2988 \begin_layout Itemize
2989 Warning: If the region crosses VMA boundary, the results are undefined.
2990 \end_layout
2992 \begin_layout Subsubsection
2993 memory.map<type>([[string vma, ]number base, number size])
2994 \end_layout
2996 \begin_layout Standard
2997 Returns a table mapping specified memory aperture for read/write.
2998  If parameters are omitted, entiere map space is the aperture.
2999 \end_layout
3001 \begin_layout Itemize
3002 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3003 \end_layout
3005 \begin_layout Subsubsection
3006 memory.writeregion([string vma, ]number base, number size, table data)
3007 \end_layout
3009 \begin_layout Standard
3010 Write a region of memory.
3011 \end_layout
3013 \begin_layout Itemize
3014 Warning: If the region crosses VMA boundary, the results are undefined.
3015 \end_layout
3017 \begin_layout Subsubsection
3018 memory.map_structure()
3019 \end_layout
3021 \begin_layout Standard
3022 Returns a new mapping structure (MMAP_STRUCT)
3023 \end_layout
3025 \begin_layout Subsubsection
3026 MMAP_STRUCT(string key, [string vma, ]number address, string type)
3027 \end_layout
3029 \begin_layout Standard
3030 Bind key in mmap structure to specified address with specified type.
3031 \end_layout
3033 \begin_layout Itemize
3034 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3035 \end_layout
3037 \begin_layout Subsubsection
3038 memory.read_expr(string expr)
3039 \end_layout
3041 \begin_layout Standard
3042 Evaluate specified watch expression and return result
3043 \end_layout
3045 \begin_layout Subsection
3046 Table memory2
3047 \end_layout
3049 \begin_layout Standard
3050 Contains newer memory functions.
3051 \end_layout
3053 \begin_layout Subsubsection
3054 memory2()
3055 \end_layout
3057 \begin_layout Standard
3058 Returns array of all valid VMA names.
3059 \end_layout
3061 \begin_layout Subsubsection
3062 memory2.<vma>:info()
3063 \end_layout
3065 \begin_layout Standard
3066 Return table describing given VMA.
3067  Includes fields address, size, last, readonly, special and endian.
3068 \end_layout
3070 \begin_layout Subsubsection
3071 memory2.<vma>:<op>(number offset)
3072 \end_layout
3074 \begin_layout Standard
3075 Read from given VMA at given offset (must be in-range).
3076  Op is of form:
3077 \end_layout
3079 \begin_layout Itemize
3080 [i][s]<type>, where <type> is one of 'byte', 'word', 'dword', 'qword'.
3081  'i' signifies that the value is treated as opposite-to-normal endianess,
3082  's' signifies that value is treated as signed.
3083 \end_layout
3085 \begin_layout Subsubsection
3086 memory2.<vma>:<op>(number offset, number value)
3087 \end_layout
3089 \begin_layout Standard
3090 Write value to given VMA at given offset (must be in-range).
3091  See above for form of op.
3092 \end_layout
3094 \begin_layout Subsection
3095 Table subtitle
3096 \end_layout
3098 \begin_layout Standard
3099 Contains functions for manipulating subtitles.
3100 \end_layout
3102 \begin_layout Subsubsection
3103 subtitle.byindex(number index)
3104 \end_layout
3106 \begin_layout Standard
3107 Get (basetime, length) pair of specified subtitle index or nothing if index
3108  isn't valid.
3109 \end_layout
3111 \begin_layout Subsubsection
3112 subtitle.get(number basetime, number length)
3113 \end_layout
3115 \begin_layout Standard
3116 Read the specified subtitle.
3117  Returns 
3118 \begin_inset Quotes eld
3119 \end_inset
3122 \begin_inset Quotes erd
3123 \end_inset
3125  if the subtitle does not exist.
3126 \end_layout
3128 \begin_layout Subsubsection
3129 subtitle.set(number basetime, number length, string content)
3130 \end_layout
3132 \begin_layout Standard
3133 Set the specified subtitle.
3134 \end_layout
3136 \begin_layout Subsubsection
3137 subtitle.deltete(number basetime, number length)
3138 \end_layout
3140 \begin_layout Standard
3141 Delete the specified subtitle.
3142 \end_layout
3144 \begin_layout Subsection
3145 Table _SYSTEM
3146 \end_layout
3148 \begin_layout Standard
3149 Contains copy of global variables from time of Lua initialization.
3150  Non-writeable.
3151 \end_layout
3153 \begin_layout Subsection
3154 Callbacks
3155 \end_layout
3157 \begin_layout Standard
3158 Various callbacks to Lua that can occur.
3159 \end_layout
3161 \begin_layout Subsubsection
3162 Callback: on_paint(bool not_synth)
3163 \end_layout
3165 \begin_layout Standard
3166 Called when screen is being painted.
3167  Any gui.* calls requiring graphic context draw on the screen.
3168 \end_layout
3170 \begin_layout Standard
3171 not_synth is true if this hook is being called in response to received frame,
3172  false otherwise.
3173 \end_layout
3175 \begin_layout Subsubsection
3176 Callback: on_video()
3177 \end_layout
3179 \begin_layout Standard
3180 Called when video dump frame is being painted.
3181  Any gui.* calls requiring graphic context draw on the video.
3182 \end_layout
3184 \begin_layout Subsubsection
3185 Callback: on_frame_emulated()
3186 \end_layout
3188 \begin_layout Standard
3189 Called when emulating frame has completed and on_paint()/on_video() calls
3190  are about to be issued.
3191 \end_layout
3193 \begin_layout Subsubsection
3194 Callback: on_frame()
3195 \end_layout
3197 \begin_layout Standard
3198 Called on each starting whole frame.
3199 \end_layout
3201 \begin_layout Subsubsection
3202 Callback: on_startup()
3203 \end_layout
3205 \begin_layout Standard
3206 Called when the emulator is starting (lsnes.rc and --run files has been run).
3207 \end_layout
3209 \begin_layout Subsubsection
3210 Callback: on_rewind()
3211 \end_layout
3213 \begin_layout Standard
3214 Called when rewind movie to beginning has completed.
3215 \end_layout
3217 \begin_layout Subsubsection
3218 Callback: on_pre_load(string name)
3219 \end_layout
3221 \begin_layout Standard
3222 Called just before savestate/movie load occurs (note: loads are always delayed,
3223  so this occurs even when load was initiated by lua).
3224 \end_layout
3226 \begin_layout Subsubsection
3227 Callback: on_err_load(string name)
3228 \end_layout
3230 \begin_layout Standard
3231 Called if loadstate goes wrong.
3232 \end_layout
3234 \begin_layout Subsubsection
3235 Callback: on_post_load(string name, boolean was_savestate)
3236 \end_layout
3238 \begin_layout Standard
3239 Called on successful loadstate.
3240  was_savestate gives if this was a savestate or a movie.
3241 \end_layout
3243 \begin_layout Subsubsection
3244 Callback: on_pre_save(string name, boolean is_savestate)
3245 \end_layout
3247 \begin_layout Standard
3248 Called just before savestate save occurs (note: movie saves are synchronous
3249  and won't trigger these callbacks if called from Lua).
3250 \end_layout
3252 \begin_layout Subsubsection
3253 Callback: on_err_save(string name)
3254 \end_layout
3256 \begin_layout Standard
3257 Called if savestate goes wrong.
3258 \end_layout
3260 \begin_layout Subsubsection
3261 Callback: on_post_save(string name, boolean is_savestate)
3262 \end_layout
3264 \begin_layout Standard
3265 Called on successful savaestate.
3266  is_savestate gives if this was a savestate or a movie.
3267 \end_layout
3269 \begin_layout Subsubsection
3270 Callback: on_quit()
3271 \end_layout
3273 \begin_layout Standard
3274 Called when emulator is shutting down.
3275 \end_layout
3277 \begin_layout Subsubsection
3278 Callback: on_input(boolean subframe)
3279 \end_layout
3281 \begin_layout Standard
3282 Called when emulator is just sending input to bsnes core.
3283  Warning: This is called even in readonly mode, but the results are ignored.
3284 \end_layout
3286 \begin_layout Subsubsection
3287 Callback: on_reset()
3288 \end_layout
3290 \begin_layout Standard
3291 Called when SNES is reset.
3292 \end_layout
3294 \begin_layout Subsubsection
3295 Callback: on_readwrite()
3296 \end_layout
3298 \begin_layout Standard
3299 Called when moving into readwrite mode as result of 
3300 \begin_inset Quotes eld
3301 \end_inset
3303 set-rwmode
3304 \begin_inset Quotes erd
3305 \end_inset
3307  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3308  entry protection).
3309 \end_layout
3311 \begin_layout Subsubsection
3312 Callback: on_snoop(number port, number controller, number index, number
3313  value)
3314 \end_layout
3316 \begin_layout Standard
3317 Called each time bsnes asks for input.
3318  The value is the final value to be sent to bsnes core (readonly mode, autohold
3319  and autofire have been taken into account).
3320  Might be useful when translating movies to format suitable for console
3321  verification.
3322  Note: There is no way to modify the value to be sent.
3323 \end_layout
3325 \begin_layout Itemize
3326 Not called if callback on_snoop2 is defined.
3327 \end_layout
3329 \begin_layout Subsubsection
3330 Callback: on_snoop2(number port, number controller, number index, number
3331  value)
3332 \end_layout
3334 \begin_layout Standard
3335 Like on_snoop, but reserves port 0 for system, having first user port be
3336  port 1.
3337 \end_layout
3339 \begin_layout Subsubsection
3340 Callback: on_keyhook(string keyname, table state)
3341 \end_layout
3343 \begin_layout Standard
3344 Sent when key that has keyhook events requested changes state.
3345  Keyname is name of the key (group) and state is the state (same kind as
3346  table values in input.raw).
3347 \end_layout
3349 \begin_layout Subsubsection
3350 Callback: on_idle()
3351 \end_layout
3353 \begin_layout Standard
3354 Called when requested by set_idle_timeout(), the timeout has expired and
3355  emulator is waiting.
3356 \end_layout
3358 \begin_layout Subsubsection
3359 Callback: on_timer()
3360 \end_layout
3362 \begin_layout Standard
3363 Called when requested by set_idle_timeout() and the timeout has expired
3364  (regardless if emulator is waiting).
3365 \end_layout
3367 \begin_layout Subsubsection
3368 Callback: on_set_rewind(UNSAFEREWIND r)
3369 \end_layout
3371 \begin_layout Standard
3372 Called when unsafe rewind object has been constructed.
3373 \end_layout
3375 \begin_layout Subsubsection
3376 Callback: on_pre_rewind() 
3377 \end_layout
3379 \begin_layout Standard
3380 Called just before unsafe rewind is about to occur.
3381 \end_layout
3383 \begin_layout Subsubsection
3384 Callback: on_post_rewind() 
3385 \end_layout
3387 \begin_layout Standard
3388 Called just after unsafe rewind has occured.
3389 \end_layout
3391 \begin_layout Subsubsection
3392 Callback: on_button(number port, number controller, number index, string
3393  type)
3394 \end_layout
3396 \begin_layout Standard
3397 Called on controller button press, with following parameters:
3398 \end_layout
3400 \begin_layout Itemize
3401 port: Port number (0 is system)
3402 \end_layout
3404 \begin_layout Itemize
3405 controller: Controller within port
3406 \end_layout
3408 \begin_layout Itemize
3409 index: Index of button.
3410 \end_layout
3412 \begin_layout Itemize
3413 type: Type of event, one of:
3414 \end_layout
3416 \begin_deeper
3417 \begin_layout Itemize
3418 \begin_inset Quotes eld
3419 \end_inset
3421 pressed
3422 \begin_inset Quotes erd
3423 \end_inset
3425 : Button was pressed.
3426 \end_layout
3428 \begin_layout Itemize
3429 \begin_inset Quotes eld
3430 \end_inset
3432 released
3433 \begin_inset Quotes erd
3434 \end_inset
3436 : Button was released.
3437 \end_layout
3439 \begin_layout Itemize
3440 \begin_inset Quotes eld
3441 \end_inset
3443 hold
3444 \begin_inset Quotes erd
3445 \end_inset
3447 : Held.
3448 \end_layout
3450 \begin_layout Itemize
3451 \begin_inset Quotes eld
3452 \end_inset
3454 unhold
3455 \begin_inset Quotes erd
3456 \end_inset
3458 : Released from hold.
3459 \end_layout
3461 \begin_layout Itemize
3462 \begin_inset Quotes eld
3463 \end_inset
3465 type
3466 \begin_inset Quotes erd
3467 \end_inset
3469 : Typing input on button.
3470 \end_layout
3472 \begin_layout Itemize
3473 \begin_inset Quotes eld
3474 \end_inset
3476 untype
3477 \begin_inset Quotes erd
3478 \end_inset
3480 : Typing input undone.
3481 \end_layout
3483 \begin_layout Itemize
3484 \begin_inset Quotes eld
3485 \end_inset
3487 autofire <duty> <cycle>
3488 \begin_inset Quotes erd
3489 \end_inset
3491 : Autofire with specifie duty and cycle.
3492 \end_layout
3494 \begin_layout Itemize
3495 \begin_inset Quotes eld
3496 \end_inset
3498 autofire
3499 \begin_inset Quotes erd
3500 \end_inset
3502 : Stop autofire.
3503 \end_layout
3505 \begin_layout Itemize
3506 \begin_inset Quotes eld
3507 \end_inset
3509 analog
3510 \begin_inset Quotes erd
3511 \end_inset
3513 : Analog action on axis.
3514 \end_layout
3516 \end_deeper
3517 \begin_layout Section
3518 Movie editor
3519 \end_layout
3521 \begin_layout Itemize
3522 The editor edits in-memory movie.
3523 \end_layout
3525 \begin_layout Itemize
3526 Because past can't be edited and readwrite mode doesn't allow future, editing
3527  only works in 
3528 \emph on
3529 read only
3530 \emph default
3531  mode.
3532 \end_layout
3534 \begin_layout Itemize
3535 Keyboard triggers the normal hotkeys and bindings.
3536 \end_layout
3538 \begin_layout Subsection
3539 Left button actions
3540 \end_layout
3542 \begin_layout Itemize
3543 Clicking on cell in future (indicated by lack of redish background) toggles
3544  it (if it is a button) or prompts for a value (if it is an axis)
3545 \end_layout
3547 \begin_layout Itemize
3548 Dragging vertically toggles sequence of buttons or changes a sequence of
3549  axis values.
3550 \end_layout
3552 \begin_layout Subsection
3553 Right button actions
3554 \end_layout
3556 \begin_layout Standard
3557 The right mouse button pops up a context-sensitive menu:
3558 \end_layout
3560 \begin_layout Itemize
3561 Toggle <something>: Toggle this button
3562 \end_layout
3564 \begin_layout Itemize
3565 Change <something>: Change this axis value
3566 \end_layout
3568 \begin_layout Itemize
3569 Insert frame after: Insert a frame after this frame
3570 \end_layout
3572 \begin_layout Itemize
3573 Append frame: Append a frame to movie
3574 \end_layout
3576 \begin_layout Itemize
3577 Append frames: Append specified number of frames to movie
3578 \end_layout
3580 \begin_layout Itemize
3581 Delete frame: Delete this frame
3582 \end_layout
3584 \begin_layout Itemize
3585 Delete subframe: Delete this subframe
3586 \end_layout
3588 \begin_layout Itemize
3589 Truncate movie: Delete this subframe and everything after it.
3590 \end_layout
3592 \begin_layout Itemize
3593 Scroll to frame: Prompt for a frame and scroll the display to that frame.
3594 \end_layout
3596 \begin_layout Itemize
3597 Scroll to current frame: Scroll the display to current position
3598 \end_layout
3600 \begin_layout Itemize
3601 Run to frame: Prompts for frame and runs the emulation to that frame.
3602 \end_layout
3604 \begin_layout Itemize
3605 Change number of lines visible: Change the height of the movie display (1
3606  to 255).
3607 \end_layout
3609 \begin_layout Itemize
3610 Lock scroll to playback: While playing back or rewinding movies, the display
3611  will follow if enabled.
3612 \end_layout
3614 \begin_layout Section
3615 Memory watch expression syntax
3616 \end_layout
3618 \begin_layout Standard
3619 Memory watch expressions are in RPN (Reverse Polish Notation).
3620  At the end of expression, the top entry on stack is taken as the final
3621  result.
3622 \end_layout
3624 \begin_layout Standard
3625 Notations:
3626 \end_layout
3628 \begin_layout Itemize
3629 Evaluation order is strictly left to right.
3630 \end_layout
3632 \begin_layout Itemize
3633 a is the entry on top of stack
3634 \end_layout
3636 \begin_layout Itemize
3637 b is the entry immediately below top of stack
3638 \end_layout
3640 \begin_layout Itemize
3641 ; separates values to be pushed (no intermediate pop).
3642 \end_layout
3644 \begin_layout Itemize
3645 After end of element, all used stack slots are popped and all results are
3646  pushed.
3647 \end_layout
3649 \begin_layout Itemize
3650 When pushing multiple values, the pushes occur in order shown.
3651 \end_layout
3653 \begin_layout Standard
3654 The following operators are available:
3655 \end_layout
3657 \begin_layout Itemize
3658 + : a + b
3659 \end_layout
3661 \begin_layout Itemize
3662 - : a - b
3663 \end_layout
3665 \begin_layout Itemize
3666 * : a * b
3667 \end_layout
3669 \begin_layout Itemize
3670 / : a / b
3671 \end_layout
3673 \begin_layout Itemize
3674 % : a % b
3675 \end_layout
3677 \begin_layout Itemize
3678 a : atan(a)
3679 \end_layout
3681 \begin_layout Itemize
3682 b : read_signed_byte(a)
3683 \end_layout
3685 \begin_layout Itemize
3686 c : cos(a)
3687 \end_layout
3689 \begin_layout Itemize
3690 d : read_signed_dword(a)
3691 \end_layout
3693 \begin_layout Itemize
3694 i : quotent(a / b)
3695 \end_layout
3697 \begin_layout Itemize
3698 p :
3699 \begin_inset Formula $\pi$
3700 \end_inset
3703 \end_layout
3705 \begin_layout Itemize
3706 q : read_signed_qword(a)
3707 \end_layout
3709 \begin_layout Itemize
3710 r : sqrt(a)
3711 \end_layout
3713 \begin_layout Itemize
3714 s : sin(a)
3715 \end_layout
3717 \begin_layout Itemize
3718 t : tan(a)
3719 \end_layout
3721 \begin_layout Itemize
3722 u : a; a
3723 \end_layout
3725 \begin_layout Itemize
3726 w : read_signed_word(a)
3727 \end_layout
3729 \begin_layout Itemize
3730 A : atan2(a, b)
3731 \end_layout
3733 \begin_layout Itemize
3734 B : read_unsigned_byte(a)
3735 \end_layout
3737 \begin_layout Itemize
3738 C<number>z : Push number <number> to stack.
3739 \end_layout
3741 \begin_layout Itemize
3742 D : read_unsigned_dword(a)
3743 \end_layout
3745 \begin_layout Itemize
3746 C0x<number>z : Push number <number> (hexadecimal) to stack.
3747 \end_layout
3749 \begin_layout Itemize
3750 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
3751  for 10-16 digits).
3752 \end_layout
3754 \begin_layout Itemize
3755 Q : read_unsigned_qword(a)
3756 \end_layout
3758 \begin_layout Itemize
3759 R<digit> : round a to <digit> digits.
3760 \end_layout
3762 \begin_layout Itemize
3763 W : read_unsigned_word(a)
3764 \end_layout
3766 \begin_layout Subsection
3767 Example:
3768 \end_layout
3770 \begin_layout Standard
3771 C0x007e0878zWC0x007e002czW-
3772 \end_layout
3774 \begin_layout Enumerate
3775 Push value 0x7e0878 on top of stack (C0x007e0878z).
3776 \end_layout
3778 \begin_layout Enumerate
3779 Pop the value on top of stack (0x7e0878), read word value at that address
3780  and push the result,call it x1 (W).
3781 \end_layout
3783 \begin_layout Enumerate
3784 Push value 0x7e002c on top of stack (C0x007e002cz).
3785 \end_layout
3787 \begin_layout Enumerate
3788 Pop the value on top of stack (0x7e002c), read word value at that address
3789  and push the result,call it x2 (W).
3790 \end_layout
3792 \begin_layout Enumerate
3793 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3794  x2 - x1 (-).
3795 \end_layout
3797 \begin_layout Enumerate
3798 Since the expression ends, the final memory watch result is the top one
3799  on stack, which is x2 - x1.
3800 \end_layout
3802 \begin_layout Section
3803 Modifier and key names:
3804 \end_layout
3806 \begin_layout Subsection
3807 wxWidgets platform
3808 \end_layout
3810 \begin_layout Subsubsection
3811 Modifier names:
3812 \end_layout
3814 \begin_layout Standard
3815 Following modifier names are known:
3816 \end_layout
3818 \begin_layout Itemize
3820 \end_layout
3822 \begin_layout Itemize
3823 ctrl
3824 \end_layout
3826 \begin_layout Itemize
3827 shift 
3828 \end_layout
3830 \begin_layout Itemize
3831 meta
3832 \end_layout
3834 \begin_layout Itemize
3835 cmd (Mac OS X only)
3836 \end_layout
3838 \begin_layout Subsubsection
3839 Key names:
3840 \end_layout
3842 \begin_layout Standard
3843 Following key names are known:
3844 \end_layout
3846 \begin_layout Itemize
3847 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3848  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3849  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3850  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3851  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3852  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3853  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3854  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3855  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3856  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3857  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3858  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3859  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3860  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3861  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3862  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3863  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3864  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3865  windows_right, windows_menu, command, special1, special2, special3, special4,
3866  special5, special6, special7, special8, special9, special10, special11,
3867  special12, special13, special14, special15, special16, special17, special18,
3868  special19, special20
3869 \end_layout
3871 \begin_layout Section
3872 Movie file format
3873 \end_layout
3875 \begin_layout Standard
3876 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3877  (note: If you recompress it, do not use compression methods other than
3878  store and deflate and especially do not use encryption of any kind).
3879 \end_layout
3881 \begin_layout Subsection
3882 Detecting clean start/SRAM/Savestate
3883 \end_layout
3885 \begin_layout Itemize
3886 If file has member 
3887 \begin_inset Quotes eld
3888 \end_inset
3890 savestate
3891 \begin_inset Quotes erd
3892 \end_inset
3894  it is savestate, otherwise:
3895 \end_layout
3897 \begin_layout Itemize
3898 If file has members with names starting 
3899 \begin_inset Quotes eld
3900 \end_inset
3902 moviesram.
3903 \begin_inset Quotes erd
3904 \end_inset
3906  it is movie starting from SRAM, otherwise:
3907 \end_layout
3909 \begin_layout Itemize
3910 It is movie starting from clear state.
3911 \end_layout
3913 \begin_layout Subsection
3914 Member: gametype
3915 \end_layout
3917 \begin_layout Standard
3918 Type of game ROM and region (as one line).
3919  Valid values are:
3920 \end_layout
3922 \begin_layout Standard
3923 \begin_inset Tabular
3924 <lyxtabular version="3" rows="8" columns="3">
3925 <features tabularvalignment="middle">
3926 <column alignment="center" valignment="top" width="0">
3927 <column alignment="center" valignment="top" width="0">
3928 <column alignment="center" valignment="top" width="0">
3929 <row>
3930 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3931 \begin_inset Text
3933 \begin_layout Plain Layout
3934 Value
3935 \end_layout
3937 \end_inset
3938 </cell>
3939 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3940 \begin_inset Text
3942 \begin_layout Plain Layout
3943 System
3944 \end_layout
3946 \end_inset
3947 </cell>
3948 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3949 \begin_inset Text
3951 \begin_layout Plain Layout
3952 Region
3953 \end_layout
3955 \end_inset
3956 </cell>
3957 </row>
3958 <row>
3959 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3960 \begin_inset Text
3962 \begin_layout Plain Layout
3963 snes_pal
3964 \end_layout
3966 \end_inset
3967 </cell>
3968 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3969 \begin_inset Text
3971 \begin_layout Plain Layout
3972 Super NES
3973 \end_layout
3975 \end_inset
3976 </cell>
3977 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3978 \begin_inset Text
3980 \begin_layout Plain Layout
3982 \end_layout
3984 \end_inset
3985 </cell>
3986 </row>
3987 <row>
3988 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3989 \begin_inset Text
3991 \begin_layout Plain Layout
3992 sgb_pal
3993 \end_layout
3995 \end_inset
3996 </cell>
3997 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3998 \begin_inset Text
4000 \begin_layout Plain Layout
4001 Super Game Boy
4002 \end_layout
4004 \end_inset
4005 </cell>
4006 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4007 \begin_inset Text
4009 \begin_layout Plain Layout
4011 \end_layout
4013 \end_inset
4014 </cell>
4015 </row>
4016 <row>
4017 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4018 \begin_inset Text
4020 \begin_layout Plain Layout
4021 snes_ntsc
4022 \end_layout
4024 \end_inset
4025 </cell>
4026 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4027 \begin_inset Text
4029 \begin_layout Plain Layout
4030 Super NES
4031 \end_layout
4033 \end_inset
4034 </cell>
4035 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4036 \begin_inset Text
4038 \begin_layout Plain Layout
4039 NTSC
4040 \end_layout
4042 \end_inset
4043 </cell>
4044 </row>
4045 <row>
4046 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4047 \begin_inset Text
4049 \begin_layout Plain Layout
4050 sgb_ntsc
4051 \end_layout
4053 \end_inset
4054 </cell>
4055 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4056 \begin_inset Text
4058 \begin_layout Plain Layout
4059 Super Game Boy
4060 \end_layout
4062 \end_inset
4063 </cell>
4064 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4065 \begin_inset Text
4067 \begin_layout Plain Layout
4068 NTSC
4069 \end_layout
4071 \end_inset
4072 </cell>
4073 </row>
4074 <row>
4075 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4076 \begin_inset Text
4078 \begin_layout Plain Layout
4080 \end_layout
4082 \end_inset
4083 </cell>
4084 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4085 \begin_inset Text
4087 \begin_layout Plain Layout
4088 BS-X (non-slotted)
4089 \end_layout
4091 \end_inset
4092 </cell>
4093 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4094 \begin_inset Text
4096 \begin_layout Plain Layout
4097 NTSC
4098 \end_layout
4100 \end_inset
4101 </cell>
4102 </row>
4103 <row>
4104 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4105 \begin_inset Text
4107 \begin_layout Plain Layout
4108 bsxslotted
4109 \end_layout
4111 \end_inset
4112 </cell>
4113 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4114 \begin_inset Text
4116 \begin_layout Plain Layout
4117 BS-X (slotted)
4118 \end_layout
4120 \end_inset
4121 </cell>
4122 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4123 \begin_inset Text
4125 \begin_layout Plain Layout
4126 NTSC
4127 \end_layout
4129 \end_inset
4130 </cell>
4131 </row>
4132 <row>
4133 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4134 \begin_inset Text
4136 \begin_layout Plain Layout
4137 sufamiturbo
4138 \end_layout
4140 \end_inset
4141 </cell>
4142 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4143 \begin_inset Text
4145 \begin_layout Plain Layout
4146 Sufami Turbo
4147 \end_layout
4149 \end_inset
4150 </cell>
4151 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4152 \begin_inset Text
4154 \begin_layout Plain Layout
4155 NTSC
4156 \end_layout
4158 \end_inset
4159 </cell>
4160 </row>
4161 </lyxtabular>
4163 \end_inset
4166 \end_layout
4168 \begin_layout Standard
4169 Frame rates are:
4170 \end_layout
4172 \begin_layout Standard
4173 \begin_inset Tabular
4174 <lyxtabular version="3" rows="3" columns="2">
4175 <features tabularvalignment="middle">
4176 <column alignment="center" valignment="top" width="0">
4177 <column alignment="center" valignment="top" width="0">
4178 <row>
4179 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4180 \begin_inset Text
4182 \begin_layout Plain Layout
4183 Region
4184 \end_layout
4186 \end_inset
4187 </cell>
4188 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4189 \begin_inset Text
4191 \begin_layout Plain Layout
4192 Framerate (fps)
4193 \end_layout
4195 \end_inset
4196 </cell>
4197 </row>
4198 <row>
4199 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4200 \begin_inset Text
4202 \begin_layout Plain Layout
4204 \end_layout
4206 \end_inset
4207 </cell>
4208 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4209 \begin_inset Text
4211 \begin_layout Plain Layout
4212 322445/6448
4213 \end_layout
4215 \end_inset
4216 </cell>
4217 </row>
4218 <row>
4219 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4220 \begin_inset Text
4222 \begin_layout Plain Layout
4223 NTSC
4224 \end_layout
4226 \end_inset
4227 </cell>
4228 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4229 \begin_inset Text
4231 \begin_layout Plain Layout
4232 10738636/178683
4233 \end_layout
4235 \end_inset
4236 </cell>
4237 </row>
4238 </lyxtabular>
4240 \end_inset
4243 \end_layout
4245 \begin_layout Subsection
4246 Member: port1
4247 \end_layout
4249 \begin_layout Standard
4250 Contains type of port #1 (as one line).
4251  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4252  If not present, defaults to 'gamepad'.
4253 \end_layout
4255 \begin_layout Subsection
4256 Member: port2
4257 \end_layout
4259 \begin_layout Standard
4260 Contains type of port #2 (as one line).
4261  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4262  'justifier' and 'justifiers'.
4263  If not present, defaults to 'none'.
4264 \end_layout
4266 \begin_layout Subsection
4267 Member: gamename
4268 \end_layout
4270 \begin_layout Standard
4271 Contains name of the game (as one line).
4272 \end_layout
4274 \begin_layout Subsection
4275 Member: authors
4276 \end_layout
4278 \begin_layout Standard
4279 Contains authors, one per line.
4280  Part before '|' is the full name, part after is the nickname.
4281 \end_layout
4283 \begin_layout Subsection
4284 Member: systemid
4285 \end_layout
4287 \begin_layout Standard
4288 Always 
4289 \begin_inset Quotes eld
4290 \end_inset
4292 lsnes-rr1
4293 \begin_inset Quotes erd
4294 \end_inset
4296  (one line).
4297  Used to reject other saves.
4298 \end_layout
4300 \begin_layout Subsection
4301 Member: controlsversion
4302 \end_layout
4304 \begin_layout Standard
4305 Always 
4306 \begin_inset Quotes eld
4307 \end_inset
4310 \begin_inset Quotes erd
4311 \end_inset
4313  (one line).
4314  Used to identify what controls are there.
4315 \end_layout
4317 \begin_layout Subsection
4318 Member: 
4319 \begin_inset Quotes eld
4320 \end_inset
4322 coreversion
4323 \begin_inset Quotes erd
4324 \end_inset
4327 \end_layout
4329 \begin_layout Standard
4330 Contains bsnes core version number (as one line).
4331 \end_layout
4333 \begin_layout Subsection
4334 Member: projectid
4335 \end_layout
4337 \begin_layout Standard
4338 Contains project ID (as one line).
4339  Used to identify if two movies are part of the same project.
4340 \end_layout
4342 \begin_layout Subsection
4343 Member: {rom,slota,slotb}{,xml}.sha256
4344 \end_layout
4346 \begin_layout Standard
4347 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4348  Absent if corresponding file is absent.
4349 \end_layout
4351 \begin_layout Subsection
4352 Member: moviesram.<name>
4353 \end_layout
4355 \begin_layout Standard
4356 Raw binary startup SRAM of kind <name>.
4357  Only present in savestates and movies starting from SRAM.
4358 \end_layout
4360 \begin_layout Subsection
4361 Member: saveframe
4362 \end_layout
4364 \begin_layout Standard
4365 Contains frame number (as one line) of frame movie was saved on.
4366  Only present in savestates.
4367 \end_layout
4369 \begin_layout Subsection
4370 Member: lagcounter
4371 \end_layout
4373 \begin_layout Standard
4374 Current value of lag counter (as one line).
4375  Only present in savestates.
4376 \end_layout
4378 \begin_layout Subsection
4379 Member: pollcounters
4380 \end_layout
4382 \begin_layout Standard
4383 Contains poll counters (currently 100 of them), one per line.
4384  Each line is raw poll count if DRDY is set for it.
4385  Otherwise it is negative poll count minus one.
4386  Only present in savestates.
4387 \end_layout
4389 \begin_layout Subsection
4390 Member: hostmemory
4391 \end_layout
4393 \begin_layout Standard
4394 Raw binary dump of host memory.
4395  Only present in savestates.
4396 \end_layout
4398 \begin_layout Subsection
4399 Member: savestate
4400 \end_layout
4402 \begin_layout Standard
4403 The raw binary savestate itself.
4404  Savestate detection uses this file, only present in savestates.
4405 \end_layout
4407 \begin_layout Subsection
4408 Member: screenshot
4409 \end_layout
4411 \begin_layout Standard
4412 Screenshot of current frame.
4413  Only present in savestates.
4414  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4415  data.
4416  Height of image is inferred from the width and size of data.
4417 \end_layout
4419 \begin_layout Subsection
4420 Member: sram.<name>
4421 \end_layout
4423 \begin_layout Standard
4424 Raw binary SRAM of kind <name> at time of savestate.
4425  Only present in savestates.
4426 \end_layout
4428 \begin_layout Subsection
4429 Member: input
4430 \end_layout
4432 \begin_layout Standard
4433 The actual input track, one line per subframe (blank lines are skipped).
4434 \end_layout
4436 \begin_layout Itemize
4437 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4438  part of same frame as previous, otherwise it starts a new frame.
4439 \end_layout
4441 \begin_layout Itemize
4442 First subframe must start a new frame.
4443 \end_layout
4445 \begin_layout Standard
4446 Length of movie in frames is number of lines in input file that start a
4447  new frame.
4448 \end_layout
4450 \begin_layout Subsection
4451 Member: subtitles
4452 \end_layout
4454 \begin_layout Standard
4455 Subtitle track.
4456  Optional.
4457 \end_layout
4459 \begin_layout Itemize
4460 Each line is in form <firstframe> <numframes> <text>.
4461 \end_layout
4463 \begin_layout Itemize
4464 Linefeed is encoded as 
4465 \backslash
4466 n, backslash is encoded as 
4467 \backslash
4469 \backslash
4471 \end_layout
4473 \begin_layout Subsection
4474 Member: rerecords
4475 \end_layout
4477 \begin_layout Standard
4478 Contains textual base-10 rerecord count (as one line; emulator just writes
4479  this, it doesn't read it) + 1.
4480 \end_layout
4482 \begin_layout Subsection
4483 Member: rrdata
4484 \end_layout
4486 \begin_layout Standard
4487 This member stores set of load IDs.
4488  There is one load ID per rerecord (plus one corresponding to start of project).
4489 \end_layout
4491 \begin_layout Itemize
4492 This member constists of concatenation of records
4493 \end_layout
4495 \begin_layout Itemize
4496 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4497  IDs.
4498 \end_layout
4500 \begin_layout Itemize
4501 IDs are interpretted as 256-bit big-endian integers with warparound.
4502 \end_layout
4504 \begin_layout Itemize
4505 Initial predicted ID is all zeroes.
4506 \end_layout
4508 \begin_layout Standard
4509 Format of each record is:
4510 \end_layout
4512 \begin_layout Itemize
4513 1 byte: Opcode byte.
4514  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4515  Bit 7 is unused.
4516 \end_layout
4518 \begin_layout Itemize
4519 32-prefixlen bytes of ID.
4520 \end_layout
4522 \begin_layout Itemize
4523 countlen bytes of big-endian count (count).
4524 \end_layout
4526 \begin_layout Standard
4527 Records are processed as follows:
4528 \end_layout
4530 \begin_layout Itemize
4531 To form the first ID encoded by record, take the first prefixlen bytes predicted
4532  ID and append the read ID value to it.
4533  The result is the first ID encoded.
4534 \end_layout
4536 \begin_layout Itemize
4537 If countlen is 0, record encodes 1 ID.
4538 \end_layout
4540 \begin_layout Itemize
4541 If countlen is 1, record encodes 2+count IDs.
4542 \end_layout
4544 \begin_layout Itemize
4545 If countlen is 2, record encodes 258+count IDs.
4546 \end_layout
4548 \begin_layout Itemize
4549 If countlen is 3, record encodes 65794+count IDs.
4550 \end_layout
4552 \begin_layout Itemize
4553 The new predicted ID is the next ID after last one encoded by the record.
4554 \end_layout
4556 \begin_layout Standard
4557 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4558  by all records.
4559 \end_layout
4561 \begin_layout Subsection
4562 Member: starttime.second
4563 \end_layout
4565 \begin_layout Standard
4566 Movie starting time, second part.
4567  Epoch is Unix epoch.
4568  Default is 1,000,000,000.
4569 \end_layout
4571 \begin_layout Subsection
4572 Member: starttime.subsecond
4573 \end_layout
4575 \begin_layout Standard
4576 Movie starting time, subsecond part.
4577  Unit is CPU clocks.
4578  Default is 0.
4579 \end_layout
4581 \begin_layout Subsection
4582 Member: savetime.second
4583 \end_layout
4585 \begin_layout Standard
4586 Movie saving time, second part.
4587  Default is starttime.second.
4588  Only present in savestates.
4589 \end_layout
4591 \begin_layout Subsection
4592 Member: savetime.subsecond
4593 \end_layout
4595 \begin_layout Standard
4596 Movie saving time, subsecond part.
4597  Default is starttime.subsecond.
4598  Only present in savestates.
4599 \end_layout
4601 \begin_layout Section
4602 lsvs file format (commentary tracks)
4603 \end_layout
4605 \begin_layout Subsection
4606 Clusters
4607 \end_layout
4609 \begin_layout Itemize
4610 Each cluster is 8kB (8192 bytes) in size.
4611 \end_layout
4613 \begin_layout Itemize
4614 Cluster n starts at offset 8192*n in file.
4615 \end_layout
4617 \begin_layout Itemize
4618 The following clusters are system special:
4619 \end_layout
4621 \begin_deeper
4622 \begin_layout Itemize
4623 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4624 \end_layout
4626 \begin_layout Itemize
4627 Cluster 1 (superblock)
4628 \end_layout
4630 \end_deeper
4631 \begin_layout Subsection
4632 Cluster tables
4633 \end_layout
4635 \begin_layout Itemize
4636 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4637  last 11 bits of n).
4638 \end_layout
4640 \begin_layout Itemize
4641 This cluster table consists of 2048 4-byte big-endian integers.
4642 \end_layout
4644 \begin_layout Itemize
4645 Each entry describes a cluster in 16MB supercluster, in order.
4646 \end_layout
4648 \begin_layout Itemize
4649 The valid values for entries are:
4650 \end_layout
4652 \begin_deeper
4653 \begin_layout Itemize
4654 0x00000000: Free cluster
4655 \end_layout
4657 \begin_layout Itemize
4658 0x00000001: Last cluster in chain.
4659 \end_layout
4661 \begin_layout Itemize
4662 0xFFFFFFFF: System cluster (cluster tables and superblock)
4663 \end_layout
4665 \begin_layout Itemize
4666 (anything else): Number of next cluster in chain.
4667  Must not be multiple of 2048.
4668 \end_layout
4670 \end_deeper
4671 \begin_layout Itemize
4672 Due to limitations of the format, there can be at most 2097052 superclusters,
4673  giving maximum file size of 16TB.
4674 \end_layout
4676 \begin_layout Subsection
4677 Stream table
4678 \end_layout
4680 \begin_layout Itemize
4681 The stream table chain always starts in cluster 2.
4682 \end_layout
4684 \begin_layout Itemize
4685 Otherwise, it follows normal chaining.
4686 \end_layout
4688 \begin_layout Itemize
4689 The stream table consists of 16-byte entries:
4690 \end_layout
4692 \begin_deeper
4693 \begin_layout Itemize
4694 The first 8 bytes of entry give big-endian beginning position of stream
4695  in units of 1/48000 s.
4696 \end_layout
4698 \begin_layout Itemize
4699 The next 4 bytes of entry give big-endian beginning cluster for control
4700  data.
4701  0 here marks the entry as not present.
4702 \end_layout
4704 \begin_layout Itemize
4705 The last 4 bytes of entry give big-endian beginning cluster for codec data.
4706 \end_layout
4708 \end_deeper
4709 \begin_layout Itemize
4710 Stream table clusters are normal clusters, following normal chaining.
4711 \end_layout
4713 \begin_layout Itemize
4714 The stream begnning position is not guarenteed unique.
4715  There can be multiple streams with the same starting position in the file.
4716 \end_layout
4718 \begin_layout Subsection
4719 Stream control data
4720 \end_layout
4722 \begin_layout Itemize
4723 The stream control data consists of entries 4 bytes each:
4724 \end_layout
4726 \begin_deeper
4727 \begin_layout Itemize
4728 The first 2 bytes of entry gives big-endian length of packet
4729 \end_layout
4731 \begin_layout Itemize
4732 The next byte of entry gives audio length of packet in units of 1/400 s.
4733 \end_layout
4735 \begin_layout Itemize
4736 The last byte is control byte.
4737 \end_layout
4739 \begin_deeper
4740 \begin_layout Itemize
4741 0 means this entry is not present and the control data ends.
4742 \end_layout
4744 \begin_layout Itemize
4745 1 is valid control entry.
4746 \end_layout
4748 \end_deeper
4749 \end_deeper
4750 \begin_layout Itemize
4751 The stream control data can also end by running into end of the readable
4752  chain.
4753 \end_layout
4755 \begin_deeper
4756 \begin_layout Itemize
4757 This happens if there happens to be exact multiple of 2048 packets in stream
4758  and number of packets is nonzero.
4759 \end_layout
4761 \end_deeper
4762 \begin_layout Itemize
4763 These clusters follow normal chaining.
4764 \end_layout
4766 \begin_layout Subsection
4767 Stream codec data
4768 \end_layout
4770 \begin_layout Itemize
4771 Stream codec data consists of raw Opus data packets packed back to back
4772  with nothing in between.
4773 \end_layout
4775 \begin_layout Itemize
4776 Warning: Due to internal limitations, this data must reside in the first
4777  65536 superclusters (that is, the first 1TB of the file).
4778 \end_layout
4780 \begin_layout Subsection
4781 Superblock
4782 \end_layout
4784 \begin_layout Itemize
4785 The superblock is stored in cluster 1.
4787 \end_layout
4789 \begin_layout Itemize
4790 The first 11 bytes are 
4791 \begin_inset Quotes eld
4792 \end_inset
4794 sefs-magic
4795 \begin_inset Quotes erd
4796 \end_inset
4798 <NUL>.
4799 \end_layout
4801 \begin_layout Itemize
4802 The rest are unused.
4803 \end_layout
4805 \begin_layout Itemize
4806 This cluster 1 is marked as system special.
4807 \end_layout
4809 \begin_layout Section
4810 Known ROM extensions
4811 \end_layout
4813 \begin_layout Itemize
4814 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4815 \end_layout
4817 \begin_layout Itemize
4818 DMG cartridge ROMs: dmg, gb.
4819 \end_layout
4821 \begin_layout Itemize
4822 GBC cartridge ROMs: cgb, gbc.
4823 \end_layout
4825 \begin_layout Section
4826 Gamepack files
4827 \end_layout
4829 \begin_layout Itemize
4830 The first line must be: 
4831 \begin_inset Quotes eld
4832 \end_inset
4834 [GAMEPACK FILE]
4835 \begin_inset Quotes erd
4836 \end_inset
4839 \end_layout
4841 \begin_layout Itemize
4842 There is one needed line: 
4843 \begin_inset Quotes eld
4844 \end_inset
4846 type <systype>
4847 \begin_inset Quotes erd
4848 \end_inset
4851  This sets system type to <systype>.
4852  The following system types are valid:
4853 \end_layout
4855 \begin_deeper
4856 \begin_layout Itemize
4857 snes (SNES)
4858 \end_layout
4860 \begin_layout Itemize
4861 bsx (BS-X non-slotted)
4862 \end_layout
4864 \begin_layout Itemize
4865 bsxslotted (BS-X slotted)
4866 \end_layout
4868 \begin_layout Itemize
4869 sufamiturbo (Sufami Turbo)
4870 \end_layout
4872 \begin_layout Itemize
4873 sgb (Super Game Boy)
4874 \end_layout
4876 \begin_layout Itemize
4877 dmg (Game Boy)
4878 \end_layout
4880 \begin_layout Itemize
4881 gbc (Game Boy Color)
4882 \end_layout
4884 \begin_layout Itemize
4885 gbc_gba (Game Boy Color with GBA initial register values)
4886 \end_layout
4888 \end_deeper
4889 \begin_layout Itemize
4890 Optionally a region can be specified: 
4891 \begin_inset Quotes eld
4892 \end_inset
4894 region <region>
4895 \begin_inset Quotes erd
4896 \end_inset
4899  The following values are valid:
4900 \end_layout
4902 \begin_deeper
4903 \begin_layout Itemize
4904 autodetect (Autodetect region: snes and sgb only)
4905 \end_layout
4907 \begin_layout Itemize
4908 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4909 \end_layout
4911 \begin_layout Itemize
4912 pal (PAL: snes, sgb)
4913 \end_layout
4915 \begin_layout Itemize
4916 world (World: dmg, gbc, gbc_gba)
4917 \end_layout
4919 \end_deeper
4920 \begin_layout Itemize
4921 ROM images are loaded as: 
4922 \begin_inset Quotes eld
4923 \end_inset
4925 rom <type> <file>
4926 \begin_inset Quotes erd
4927 \end_inset
4930  The following types are valid:
4931 \end_layout
4933 \begin_deeper
4934 \begin_layout Itemize
4935 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4936  BIOS in bsx, bsxslotted, sufamiturbo)
4937 \end_layout
4939 \begin_layout Itemize
4940 bsx (Cartridge ROM in bsx, bsxslotted)
4941 \end_layout
4943 \begin_layout Itemize
4944 slot-a (Cartridge ROM in sufamiturbo)
4945 \end_layout
4947 \begin_layout Itemize
4948 slot-b (Cartridge ROM in sufamiturbo)
4949 \end_layout
4951 \end_deeper
4952 \begin_layout Itemize
4953 ROM markup can be loaded as: 
4954 \begin_inset Quotes eld
4955 \end_inset
4957 xml <type> <file>
4958 \begin_inset Quotes erd
4959 \end_inset
4962  The types valid are the same as for ROMs.
4963 \end_layout
4965 \begin_layout Itemize
4966 Patches can be loaded as 
4967 \begin_inset Quotes eld
4968 \end_inset
4970 patch[<offset>] <type> <file>
4971 \begin_inset Quotes erd
4972 \end_inset
4975  The types are the same as for ROMs.
4976 \end_layout
4978 \begin_deeper
4979 \begin_layout Itemize
4980 Offset is given in form [+-]<number>.
4981  Usually offset is either +0 or -512.
4982 \end_layout
4984 \begin_layout Itemize
4985 Default offset is +0.
4986 \end_layout
4988 \end_deeper
4989 \begin_layout Subsection
4990 Example:
4991 \end_layout
4993 \begin_layout LyX-Code
4994 [GAMEPACK FILE]
4995 \end_layout
4997 \begin_layout LyX-Code
4998 type snes
4999 \end_layout
5001 \begin_layout LyX-Code
5002 rom rom speedygonzales.sfc
5003 \end_layout
5005 \begin_layout LyX-Code
5006 patch-512 rom sonicthehedgehog.ips
5007 \end_layout
5009 \begin_layout Subsection
5010 Example 2:
5011 \end_layout
5013 \begin_layout LyX-Code
5014 [GAMEPACK FILE]
5015 \end_layout
5017 \begin_layout LyX-Code
5018 type sgb
5019 \end_layout
5021 \begin_layout LyX-Code
5022 rom rom supergameboy.sfc
5023 \end_layout
5025 \begin_layout LyX-Code
5026 rom dmg megamanV.dmg
5027 \end_layout
5029 \begin_layout Section
5030 Quick'n'dirty encode guide
5031 \end_layout
5033 \begin_layout Enumerate
5034 Start the emulator and load the ROM and movie file.
5035 \end_layout
5037 \begin_layout Enumerate
5038 Set large AVI option 'set-setting avi-large on'
5039 \end_layout
5041 \begin_layout Enumerate
5042 Enable dumping 'dump-avi tmpdump' 
5043 \end_layout
5045 \begin_layout Enumerate
5046 Unpause and let it run until you want to end dumping.
5047 \end_layout
5049 \begin_layout Enumerate
5050 Close the emulator (closing the window is the easiest way).
5051  Or use 'end-avi'.
5052 \end_layout
5054 \begin_layout Enumerate
5055 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5056  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5057 \end_layout
5059 \begin_layout Enumerate
5060 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5061 \end_layout
5063 \begin_layout Enumerate
5064 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5065  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5066 \end_layout
5068 \begin_layout Enumerate
5069 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5070  Now final.mkv contains quick'n'dirty encode.
5071 \end_layout
5073 \begin_layout Section
5074 Axis configurations for some gamepad types:
5075 \end_layout
5077 \begin_layout Subsection
5078 XBox360 controller:
5079 \end_layout
5081 \begin_layout Standard
5082 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5083 \end_layout
5085 \begin_layout LyX-Code
5086 set-axis joystick0axis2 pressure-+
5087 \end_layout
5089 \begin_layout LyX-Code
5090 set-axis joystick0axis5 pressure-+
5091 \end_layout
5093 \begin_layout Itemize
5094 This is needed for SDL only.
5095  EVDEV sets those types correctly.
5096 \end_layout
5098 \begin_layout Subsection
5099 PS3 
5100 \begin_inset Quotes eld
5101 \end_inset
5103 sixaxis
5104 \begin_inset Quotes erd
5105 \end_inset
5107  controller:
5108 \end_layout
5110 \begin_layout Standard
5111 Axes 8-19 should be disabled.
5112 \end_layout
5114 \begin_layout LyX-Code
5115 set-axis joystick0axis8 disabled
5116 \end_layout
5118 \begin_layout LyX-Code
5119 set-axis joystick0axis9 disabled
5120 \end_layout
5122 \begin_layout LyX-Code
5123 set-axis joystick0axis10 disabled
5124 \end_layout
5126 \begin_layout LyX-Code
5127 set-axis joystick0axis11 disabled
5128 \end_layout
5130 \begin_layout LyX-Code
5131 set-axis joystick0axis12 disabled
5132 \end_layout
5134 \begin_layout LyX-Code
5135 set-axis joystick0axis13 disabled
5136 \end_layout
5138 \begin_layout LyX-Code
5139 set-axis joystick0axis14 disabled
5140 \end_layout
5142 \begin_layout LyX-Code
5143 set-axis joystick0axis15 disabled
5144 \end_layout
5146 \begin_layout LyX-Code
5147 set-axis joystick0axis16 disabled
5148 \end_layout
5150 \begin_layout LyX-Code
5151 set-axis joystick0axis17 disabled
5152 \end_layout
5154 \begin_layout LyX-Code
5155 set-axis joystick0axis18 disabled
5156 \end_layout
5158 \begin_layout LyX-Code
5159 set-axis joystick0axis19 disabled
5160 \end_layout
5162 \begin_layout Section
5163 Errata:
5164 \end_layout
5166 \begin_layout Subsection
5167 Problems from BSNES core:
5168 \end_layout
5170 \begin_layout Itemize
5171 The whole pending save stuff.
5172 \end_layout
5174 \begin_layout Itemize
5175 Lack of layer hiding.
5176 \end_layout
5178 \begin_layout Itemize
5179 It is slow (especially accuracy).
5180 \end_layout
5182 \begin_layout Itemize
5183 Firmwares can't be loaded from ZIP archives.
5184 \end_layout
5186 \begin_layout Subsection
5187 Other problems:
5188 \end_layout
5190 \begin_layout Itemize
5191 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5192 \end_layout
5194 \begin_layout Itemize
5195 Audio for last dumped frame is not itself dumped.
5196 \end_layout
5198 \begin_layout Itemize
5199 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5200 \end_layout
5202 \begin_layout Itemize
5203 No menus, command based interface (SDL).
5204 \end_layout
5206 \begin_layout Itemize
5207 Long commands don't scroll.
5208 \end_layout
5210 \begin_layout Section
5211 Changelog:
5212 \end_layout
5214 \begin_layout Subsection
5215 rr0-beta1
5216 \end_layout
5218 \begin_layout Itemize
5219 Fix -Wall warnings
5220 \end_layout
5222 \begin_layout Itemize
5223 Fix dumper video corruption with levels 10-18.
5224 \end_layout
5226 \begin_layout Subsection
5227 rr0-beta2
5228 \end_layout
5230 \begin_layout Itemize
5231 Autofire
5232 \end_layout
5234 \begin_layout Itemize
5235 Lots of code cleanups
5236 \end_layout
5238 \begin_layout Itemize
5239 Lua interface to settings
5240 \end_layout
5242 \begin_layout Itemize
5243 Allow specifying AVI borders without Lua
5244 \end_layout
5246 \begin_layout Itemize
5247 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5248 \end_layout
5250 \begin_layout Itemize
5251 on_snoop lua callback
5252 \end_layout
5254 \begin_layout Itemize
5255 Faster movie loading and saving.
5256 \end_layout
5258 \begin_layout Subsection
5259 rr0-beta3
5260 \end_layout
5262 \begin_layout Itemize
5263 Joystick support
5264 \end_layout
5266 \begin_layout Subsection
5267 rr0-beta4
5268 \end_layout
5270 \begin_layout Itemize
5271 Fix multi-buttons
5272 \end_layout
5274 \begin_layout Itemize
5275 Save jukebox functionality.
5276 \end_layout
5278 \begin_layout Subsection
5279 rr0-beta5
5280 \end_layout
5282 \begin_layout Itemize
5283 Try to fix some nasty failing movie load edge cases
5284 \end_layout
5286 \begin_layout Itemize
5287 Allow specifying scripts to run on command line.
5288 \end_layout
5290 \begin_layout Subsection
5291 rr0-beta6
5292 \end_layout
5294 \begin_layout Itemize
5295 Major source code reorganization.
5296 \end_layout
5298 \begin_layout Itemize
5299 Backup savestates before overwriting.
5300 \end_layout
5302 \begin_layout Itemize
5303 Don't crash if loading initial state fails.
5304 \end_layout
5306 \begin_layout Subsection
5307 rr0-beta7
5308 \end_layout
5310 \begin_layout Itemize
5311 Fix firmware lookup
5312 \end_layout
5314 \begin_layout Itemize
5315 Fix author name parsing
5316 \end_layout
5318 \begin_layout Itemize
5319 Fix rerecord counting
5320 \end_layout
5322 \begin_layout Itemize
5323 (SDL) Print messages to console if SDL is uninitialized
5324 \end_layout
5326 \begin_layout Itemize
5327 Add movieinfo program
5328 \end_layout
5330 \begin_layout Itemize
5331 Fix loading movies starting from SRAM.
5332 \end_layout
5334 \begin_layout Subsection
5335 rr0-beta8
5336 \end_layout
5338 \begin_layout Itemize
5339 Add support for unattended dumping
5340 \end_layout
5342 \begin_layout Itemize
5343 Fix compiling for Win32
5344 \end_layout
5346 \begin_layout Itemize
5347 Don't lock up if sound can't be initialized
5348 \end_layout
5350 \begin_layout Itemize
5351 Strip trailing CR from commands
5352 \end_layout
5354 \begin_layout Itemize
5355 Don't try to do dubious things in global ctors (fix crash on startup)
5356 \end_layout
5358 \begin_layout Subsection
5359 rr0-beta9
5360 \end_layout
5362 \begin_layout Itemize
5363 Small documentation tweaking
5364 \end_layout
5366 \begin_layout Itemize
5367 Fix make clean
5368 \end_layout
5370 \begin_layout Itemize
5371 Fix major bug in modifier matching
5372 \end_layout
5374 \begin_layout Subsection
5375 rr0-beta10
5376 \end_layout
5378 \begin_layout Itemize
5379 Lots of documentation fixes
5380 \end_layout
5382 \begin_layout Itemize
5383 Use dedicated callbacks for event backcomm., not commands.
5384 \end_layout
5386 \begin_layout Itemize
5387 Ensure that the watchdog is not hit when executing delayed reset.
5388 \end_layout
5390 \begin_layout Itemize
5391 Remove errant tab from joystick message.
5392 \end_layout
5394 \begin_layout Subsection
5395 rr0-beta11
5396 \end_layout
5398 \begin_layout Itemize
5399 Make autofire operate in absolute time, not linear time
5400 \end_layout
5402 \begin_layout Itemize
5403 Reinitialize controls when resuming from loadstate
5404 \end_layout
5406 \begin_layout Itemize
5407 Some more code cleanups
5408 \end_layout
5410 \begin_layout Itemize
5411 If Lua allocator fails, call OOM_panic()
5412 \end_layout
5414 \begin_layout Itemize
5415 Byte/word/dword/qword sized host memory write/read functions.
5416 \end_layout
5418 \begin_layout Itemize
5419 Dump at correct framerate if dumping interlaced NTSC (height=448).
5420 \end_layout
5422 \begin_layout Subsection
5423 rr0-beta12
5424 \end_layout
5426 \begin_layout Itemize
5427 Actually include the complete source code
5428 \end_layout
5430 \begin_layout Itemize
5431 Keep track of RTC
5432 \end_layout
5434 \begin_layout Subsection
5435 rr0-beta13
5436 \end_layout
5438 \begin_layout Itemize
5439 Document {save,start}time.{,sub}second.
5440 \end_layout
5442 \begin_layout Itemize
5443 Intercept time() from bsnes core.
5444 \end_layout
5446 \begin_layout Subsection
5447 rr0-beta14
5448 \end_layout
5450 \begin_layout Itemize
5451 Allow disabling time() interception (allow build on Mac OS X)
5452 \end_layout
5454 \begin_layout Itemize
5455 Use SDLMain on Mac OS X (make SDL not crash)
5456 \end_layout
5458 \begin_layout Itemize
5459 Disable delayed resets (just plain too buggy for now).
5460 \end_layout
5462 \begin_layout Itemize
5463 Code cleanups
5464 \end_layout
5466 \begin_layout Itemize
5467 Use 16-bit for graphics/video instead of 32-bit.
5468 \end_layout
5470 \begin_layout Itemize
5471 gui.rectangle/gui.pixel
5472 \end_layout
5474 \begin_layout Itemize
5475 gui.crosshair
5476 \end_layout
5478 \begin_layout Itemize
5479 New CSCD writer implementation.
5480 \end_layout
5482 \begin_layout Subsection
5483 rr0-beta15
5484 \end_layout
5486 \begin_layout Itemize
5487 Fix interaction of * and +.
5488 \end_layout
5490 \begin_layout Itemize
5491 Manual improvements
5492 \end_layout
5494 \begin_layout Itemize
5495 Use gettimeofday()/usleep(), these seem portable enough.
5496 \end_layout
5498 \begin_layout Itemize
5499 Move joystick axis manipulation to keymapper code.
5500 \end_layout
5502 \begin_layout Itemize
5503 Changes to how read-only works.
5504 \end_layout
5506 \begin_layout Itemize
5507 Refactor controller input code.
5508 \end_layout
5510 \begin_layout Subsection
5511 rr0-beta16
5512 \end_layout
5514 \begin_layout Itemize
5515 Fix mouseclick scale compensation.
5516 \end_layout
5518 \begin_layout Itemize
5519 Draw area boundaries correctly in SDL code.
5520 \end_layout
5522 \begin_layout Itemize
5523 gui.screenshot.
5524 \end_layout
5526 \begin_layout Itemize
5527 Fix CSCD output (buffer overrun and race condition).
5528 \end_layout
5530 \begin_layout Subsection
5531 rr0-beta17
5532 \end_layout
5534 \begin_layout Itemize
5535 JMD dumping support.
5536 \end_layout
5538 \begin_layout Itemize
5539 Allow unattended dumping to JMD.
5540 \end_layout
5542 \begin_layout Itemize
5543 Move to BSNES v083.
5544 \end_layout
5546 \begin_layout Itemize
5547 Switch back to 32-bit colors.
5548 \end_layout
5550 \begin_layout Itemize
5551 Add Lua function gui.color.
5552 \end_layout
5554 \begin_layout Itemize
5555 Use some new C++11 features in GCC 4.6.
5556 \end_layout
5558 \begin_layout Itemize
5559 Be prepared for core frequency changes.
5560 \end_layout
5562 \begin_layout Itemize
5563 Pass colors in one chunk from Lua.
5564 \end_layout
5566 \begin_layout Subsection
5567 rr0-beta18
5568 \end_layout
5570 \begin_layout Itemize
5571 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5572  memory.read_vma() and memory.find_vma().
5573 \end_layout
5575 \begin_layout Itemize
5576 Numerious documentation fixups
5577 \end_layout
5579 \begin_layout Itemize
5580 RTC time format changed
5581 \end_layout
5583 \begin_layout Itemize
5584 Reformat flags display
5585 \end_layout
5587 \begin_layout Itemize
5588 Allow lua package name to be overridden
5589 \end_layout
5591 \begin_layout Itemize
5592 SDUMP (high-quality dumping).
5593 \end_layout
5595 \begin_layout Itemize
5596 Split platform support to plugins.
5597 \end_layout
5599 \begin_layout Itemize
5600 Make all sound plugins support basic sound commands
5601 \end_layout
5603 \begin_layout Itemize
5604 Support portaudio for sound.
5605 \end_layout
5607 \begin_layout Itemize
5608 Allow disable Lua/SDL searching.
5609 \end_layout
5611 \begin_layout Itemize
5612 Upconvert colors when copying lcscreen to screen.
5613 \end_layout
5615 \begin_layout Itemize
5616 Reorganize source tree.
5617 \end_layout
5619 \begin_layout Itemize
5620 Evdev joystick support.
5621 \end_layout
5623 \begin_layout Itemize
5624 Refactor more code into generic window code.
5625 \end_layout
5627 \begin_layout Subsection
5628 rr0-beta19
5629 \end_layout
5631 \begin_layout Itemize
5632 Refactor message handling.
5633 \end_layout
5635 \begin_layout Itemize
5636 Rework makefile
5637 \end_layout
5639 \begin_layout Itemize
5640 Documentation fixes
5641 \end_layout
5643 \begin_layout Itemize
5644 Finish pending saves before load/quit.
5645 \end_layout
5647 \begin_layout Itemize
5648 Wxwidgets graphics plugin.
5649 \end_layout
5651 \begin_layout Subsection
5652 rr0-beta20
5653 \end_layout
5655 \begin_layout Itemize
5656 Get rid of win32-crap.[ch]pp.
5657 \end_layout
5659 \begin_layout Itemize
5660 Move files around a lot.
5661 \end_layout
5663 \begin_layout Itemize
5664 Get rid of need for host C++ compiler.
5665 \end_layout
5667 \begin_layout Itemize
5668 Bsnes v084 core.
5669 \end_layout
5671 \begin_layout Itemize
5672 Refactor inter-component communication.
5673 \end_layout
5675 \begin_layout Itemize
5676 Fix zero luma.
5677 \end_layout
5679 \begin_layout Itemize
5680 Fix crash on multiline aliases.
5681 \end_layout
5683 \begin_layout Itemize
5684 Load/Save settings in wxwidgets gui.
5685 \end_layout
5687 \begin_layout Subsection
5688 rr0-beta21
5689 \end_layout
5691 \begin_layout Itemize
5692 Patch problems in bsnes core
5693 \end_layout
5695 \begin_layout Itemize
5696 SNES is little-endian, not big-endian!
5697 \end_layout
5699 \begin_layout Itemize
5700 Fix memory corruption in lcscreen::load()
5701 \end_layout
5703 \begin_layout Subsection
5704 rr0-beta22
5705 \end_layout
5707 \begin_layout Itemize
5708 Fix interpretting repeat counts in rrdata loading.
5709 \end_layout
5711 \begin_layout Itemize
5712 New lua callback: on_frame()
5713 \end_layout
5715 \begin_layout Itemize
5716 Remove calls to runtosave() that aren't supposed to be there
5717 \end_layout
5719 \begin_layout Itemize
5720 Lua function: movie.read_rtc()
5721 \end_layout
5723 \begin_layout Itemize
5724 Ignore src/fonts/font.cpp
5725 \end_layout
5727 \begin_layout Itemize
5728 Fix more bsnes core problems
5729 \end_layout
5731 \begin_layout Itemize
5732 Control bsnes random seeding
5733 \end_layout
5735 \begin_layout Itemize
5736 Pause-on-end
5737 \end_layout
5739 \begin_layout Itemize
5740 Some bsnes core debugging features (state dump and state hash)
5741 \end_layout
5743 \begin_layout Itemize
5744 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5745  it was 'lsnes rr0-beta21').
5746 \end_layout
5748 \begin_layout Subsection
5749 rr0-beta23
5750 \end_layout
5752 \begin_layout Itemize
5753 Fix memory corruption due to macro/field mixup
5754 \end_layout
5756 \begin_layout Itemize
5757 search-memory update
5758 \end_layout
5760 \begin_layout Itemize
5761 Allow direct-mapped framebuffer
5762 \end_layout
5764 \begin_layout Itemize
5765 SDL: Use SDL_ANYFORMAT if possible
5766 \end_layout
5768 \begin_layout Itemize
5769 SDMP2SOX: 2s delay modes.
5770 \end_layout
5772 \begin_layout Itemize
5773 Wxwidgets: Cleanups
5774 \end_layout
5776 \begin_layout Itemize
5777 Use sed -E, not sed -r.
5778  Fixes building on Mac OS X.
5779 \end_layout
5781 \begin_layout Itemize
5782 Wxwidgets: Save jukebox on exit
5783 \end_layout
5785 \begin_layout Itemize
5786 Fix RTC if using load-movie on savestate.
5787 \end_layout
5789 \begin_layout Itemize
5790 Fix crash related to full console mode.
5791 \end_layout
5793 \begin_layout Subsection
5794 rr0-beta24
5795 \end_layout
5797 \begin_layout Itemize
5798 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5799 \end_layout
5801 \begin_layout Itemize
5802 Wxwidgets: Allow compiling on Mac OS X.
5803 \end_layout
5805 \begin_layout Itemize
5806 Use movie compare instead of movie hashing (faster save/load).
5807 \end_layout
5809 \begin_layout Itemize
5810 Lua: _SYSTEM table.
5811 \end_layout
5813 \begin_layout Subsection
5814 rr0-beta25
5815 \end_layout
5817 \begin_layout Itemize
5818 sdmp2sox: Pad soundtrack if using -l or -L.
5819 \end_layout
5821 \begin_layout Itemize
5822 sdmp2sox: Fix NTSC overscan.
5823 \end_layout
5825 \begin_layout Itemize
5826 sdmp2sox: Add AR correction mode.
5827 \end_layout
5829 \begin_layout Itemize
5830 call lua_close() when exiting.
5831 \end_layout
5833 \begin_layout Itemize
5834 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5835 \end_layout
5837 \begin_layout Subsection
5838 rr0-beta26
5839 \end_layout
5841 \begin_layout Itemize
5842 Fix IPS patching code (use bsnes core IPS patcher).
5843 \end_layout
5845 \begin_layout Itemize
5846 Implement BPS patching (using bsnes core IPS patcher).
5847 \end_layout
5849 \begin_layout Itemize
5850 Add feature to load headered ROMs.
5851 \end_layout
5853 \begin_layout Subsection
5854 rr0-beta27
5855 \end_layout
5857 \begin_layout Itemize
5858 Show command names when showing keybindings
5859 \end_layout
5861 \begin_layout Subsection
5863 \end_layout
5865 \begin_layout Itemize
5866 Fix pause-on-end to be actually controllable
5867 \end_layout
5869 \begin_layout Itemize
5870 SDL: Poll all events in queue, not just first one (fixes slowness in command
5871  typing)
5872 \end_layout
5874 \begin_layout Itemize
5875 Wxwidgets: Fix ROM loading.
5876 \end_layout
5878 \begin_layout Subsection
5879 rr1-beta0
5880 \end_layout
5882 \begin_layout Itemize
5883 Lua: Add gui.textH, gui.textV, gui.textHV
5884 \end_layout
5886 \begin_layout Itemize
5887 Fix text colors on SDL on Mac OS X
5888 \end_layout
5890 \begin_layout Itemize
5891 Mode 'F' for finished in readonly mode.
5892 \end_layout
5894 \begin_layout Itemize
5895 Fix some WS errors.
5896 \end_layout
5898 \begin_layout Itemize
5899 Reliably pause after skip poll
5900 \end_layout
5902 \begin_layout Itemize
5903 Split UI and core into their own threads
5904 \end_layout
5906 \begin_layout Subsection
5907 rr1-beta1
5908 \end_layout
5910 \begin_layout Itemize
5911 Remove leftover dummy SRAM slot
5912 \end_layout
5914 \begin_layout Itemize
5915 Fix controller numbers.
5916 \end_layout
5918 \begin_layout Subsection
5919 rr1-beta2
5920 \end_layout
5922 \begin_layout Itemize
5923 Fix lsnes-dumpavi after interface change.
5924 \end_layout
5926 \begin_layout Itemize
5927 Also give BSNES patches for v085.
5928 \end_layout
5930 \begin_layout Itemize
5931 Pack movie data in memory.
5932 \end_layout
5934 \begin_layout Subsection
5935 rr1-beta3
5936 \end_layout
5938 \begin_layout Itemize
5939 Fix framecount/length given when loading movies.
5940 \end_layout
5942 \begin_layout Itemize
5943 Controller command memory leak fixes.
5944 \end_layout
5946 \begin_layout Itemize
5947 Don't leak palette if freeing screen object.
5948 \end_layout
5950 \begin_layout Subsection
5951 rr1-beta4
5952 \end_layout
5954 \begin_layout Itemize
5955 Detect revisions.
5956 \end_layout
5958 \begin_layout Itemize
5959 Wxwidgets: Allow controlling dumper from the menu.
5960 \end_layout
5962 \begin_layout Subsection
5963 rr1-beta5
5964 \end_layout
5966 \begin_layout Itemize
5967 Rewrite parts of manual
5968 \end_layout
5970 \begin_layout Itemize
5971 Lua: Make it work with Lua 5.2.
5972 \end_layout
5974 \begin_layout Subsection
5975 rr1-beta6
5976 \end_layout
5978 \begin_layout Itemize
5979 Win32: Fix compile errors.
5980 \end_layout
5982 \begin_layout Subsection
5983 rr1-beta7
5984 \end_layout
5986 \begin_layout Itemize
5987 Refactor controller input code.
5988 \end_layout
5990 \begin_layout Itemize
5991 Fix crash when using command line on SDL / Mac OS X.
5992 \end_layout
5994 \begin_layout Subsection
5995 rr1-beta8
5996 \end_layout
5998 \begin_layout Itemize
5999 Delete core/coroutine (obsolete)
6000 \end_layout
6002 \begin_layout Itemize
6003 Lag input display by one frame.
6004 \end_layout
6006 \begin_layout Itemize
6007 Rewind movie to beginning function.
6008 \end_layout
6010 \begin_layout Itemize
6011 Fix wrong frame number reported to Lua when repainting after loadstate
6012 \end_layout
6014 \begin_layout Itemize
6015 Support UI editing of jukebox
6016 \end_layout
6018 \begin_layout Itemize
6019 Wxwidgets: Save settings on exit.
6020 \end_layout
6022 \begin_layout Itemize
6023 Support ${project} for filenames
6024 \end_layout
6026 \begin_layout Itemize
6027 SDL: Fix command history
6028 \end_layout
6030 \begin_layout Subsection
6031 rr1-beta9
6032 \end_layout
6034 \begin_layout Itemize
6035 Fix some order-of-global-ctor bugs.
6036 \end_layout
6038 \begin_layout Subsection
6039 rr1-beta10
6040 \end_layout
6042 \begin_layout Itemize
6043 Fix crashes when quitting on Win32.
6044 \end_layout
6046 \begin_layout Subsection
6047 rr1-beta11
6048 \end_layout
6050 \begin_layout Itemize
6051 EVDEV: Queue keypresses from joystick, don't send directly
6052 \end_layout
6054 \begin_layout Itemize
6055 Wxwidgets: Load-Preserve that actually works.
6056 \end_layout
6058 \begin_layout Subsection
6059 rr1-beta12
6060 \end_layout
6062 \begin_layout Itemize
6063 Wxwidgets: GUI for memory search.
6064 \end_layout
6066 \begin_layout Itemize
6067 Warn about using synchronous queue in UI callback.
6068 \end_layout
6070 \begin_layout Subsection
6071 rr1-beta13
6072 \end_layout
6074 \begin_layout Itemize
6075 Remember last saved file for each ROM
6076 \end_layout
6078 \begin_layout Itemize
6079 Support MT dumping via boost.
6080 \end_layout
6082 \begin_layout Itemize
6083 Lua: input.raw
6084 \end_layout
6086 \begin_layout Itemize
6087 Lua: input.keyhook
6088 \end_layout
6090 \begin_layout Itemize
6091 Make mouse be ordinary input instead of special-casing
6092 \end_layout
6094 \begin_layout Itemize
6095 SDL: Don't screw up commands with NUL codepoints.
6096 \end_layout
6098 \begin_layout Subsection
6099 rr1-beta14
6100 \end_layout
6102 \begin_layout Itemize
6103 Merge status panel and main window
6104 \end_layout
6106 \begin_layout Itemize
6107 True movie slot support (the rest of it)
6108 \end_layout
6110 \begin_layout Itemize
6111 SDL: Fix compilation error
6112 \end_layout
6114 \begin_layout Itemize
6115 Elminate cross calls in dump menu code.
6116 \end_layout
6118 \begin_layout Subsection
6119 rr1-beta15
6120 \end_layout
6122 \begin_layout Itemize
6123 Cancel pending saves command
6124 \end_layout
6126 \begin_layout Itemize
6127 Wxwidgets: Code refactoring
6128 \end_layout
6130 \begin_layout Itemize
6131 Wxwidgets: Fix system -> reset
6132 \end_layout
6134 \begin_layout Itemize
6135 Wxwidgets: Read watch expressions in the right thread
6136 \end_layout
6138 \begin_layout Subsection
6139 rr1-beta16
6140 \end_layout
6142 \begin_layout Itemize
6143 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6144  support that).
6145 \end_layout
6147 \begin_layout Itemize
6148 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6149 \end_layout
6151 \begin_layout Itemize
6152 Don't append trailing '-' to prefix when saving movie.
6153 \end_layout
6155 \begin_layout Itemize
6156 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6157 \end_layout
6159 \begin_layout Subsection
6161 \end_layout
6163 \begin_layout Itemize
6164 Document memory watch syntax.
6165 \end_layout
6167 \begin_layout Subsection
6168 rr1-delta1
6169 \end_layout
6171 \begin_layout Itemize
6172 Fix unattended dumping (lsnes-dumpavi)
6173 \end_layout
6175 \begin_layout Itemize
6176 Support RAW dumping
6177 \end_layout
6179 \begin_layout Itemize
6180 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6181 \end_layout
6183 \begin_layout Itemize
6184 Add option to control sample rate preturbation in AVI dumper
6185 \end_layout
6187 \begin_layout Subsection
6188 rr1-delta2
6189 \end_layout
6191 \begin_layout Itemize
6192 Wxwidgets: Fix dumper submodes
6193 \end_layout
6195 \begin_layout Itemize
6196 Set core controller types before loadstate
6197 \end_layout
6199 \begin_layout Subsection
6200 rr1-delta2epsilon1
6201 \end_layout
6203 \begin_layout Itemize
6204 Fix compiling with bsnes v086.
6205 \end_layout
6207 \begin_layout Subsection
6208 rr1-delta3
6209 \end_layout
6211 \begin_layout Itemize
6212 Don't prompt before quitting
6213 \end_layout
6215 \begin_layout Itemize
6216 Start unpaused, preserve pause/unpause over load.
6217 \end_layout
6219 \begin_layout Itemize
6220 Try to autodetect if ROM is headered.
6221 \end_layout
6223 \begin_layout Itemize
6224 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6225 \end_layout
6227 \begin_layout Itemize
6228 Allow configuring some hotkeys.
6229 \end_layout
6231 \begin_layout Subsection
6232 rr1-delta4
6233 \end_layout
6235 \begin_layout Itemize
6236 Lots of code cleanups
6237 \end_layout
6239 \begin_layout Itemize
6240 Fix JMD compression (JMD dumping was broken)
6241 \end_layout
6243 \begin_layout Itemize
6244 Don't crash if Lua C function throws an exception.
6245 \end_layout
6247 \begin_layout Itemize
6248 Support bitmap drawing in Lua.
6249 \end_layout
6251 \begin_layout Itemize
6252 Fix bsnes v085/v086 patches.
6253 \end_layout
6255 \begin_layout Itemize
6256 Improve stability on win32.
6257 \end_layout
6259 \begin_layout Subsection
6260 rr1-delta4epsilon1
6261 \end_layout
6263 \begin_layout Itemize
6264 Don't corrupt movie if movie length is integer multiple of frames per page.
6265 \end_layout
6267 \begin_layout Subsection
6268 rr1-delta5
6269 \end_layout
6271 \begin_layout Itemize
6272 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6273 \end_layout
6275 \begin_layout Itemize
6276 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6277 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6279 \end_layout
6281 \begin_layout Itemize
6282 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6283 \end_layout
6285 \begin_layout Itemize
6286 Wxwidgets: Fix broken modifiers
6287 \end_layout
6289 \begin_layout Itemize
6290 on_paint has parameter now.
6291 \end_layout
6293 \begin_layout Itemize
6294 Optional initital fill for bitmaps
6295 \end_layout
6297 \begin_layout Itemize
6298 Fix palette changing.
6299 \end_layout
6301 \begin_layout Itemize
6302 Optimize rendering a bit.
6303 \end_layout
6305 \begin_layout Itemize
6306 Bsnes v087 support.
6307 \end_layout
6309 \begin_layout Subsection
6310 rr1-delta5epsilon1
6311 \end_layout
6313 \begin_layout Itemize
6314 Movieinfo: Fix display of port #2 type.
6315 \end_layout
6317 \begin_layout Itemize
6318 Call on_input() after loadstate.
6319 \end_layout
6321 \begin_layout Subsection
6322 rr1-delta5epsilon2
6323 \end_layout
6325 \begin_layout Itemize
6326 Fix writing port2 data to movie.
6327 \end_layout
6329 \begin_layout Itemize
6330 Fix SRAM handling with Bsnes v087.
6331 \end_layout
6333 \begin_layout Subsection
6334 rr1-delta6
6335 \end_layout
6337 \begin_layout Itemize
6338 Library loading support
6339 \end_layout
6341 \begin_layout Itemize
6342 Built-in TSCC encoder
6343 \end_layout
6345 \begin_layout Itemize
6346 Hi-color (256T colors) dumping.
6347 \end_layout
6349 \begin_layout Itemize
6350 Dump over TCP/IP(v6)
6351 \end_layout
6353 \begin_layout Itemize
6354 Hidable status panel
6355 \end_layout
6357 \begin_layout Itemize
6358 Turbo toggle/hold
6359 \end_layout
6361 \begin_layout Itemize
6362 Adjustable sound volume
6363 \end_layout
6365 \begin_layout Itemize
6366 Screen scaling
6367 \end_layout
6369 \begin_layout Itemize
6370 Allow DnD into filename boxes
6371 \end_layout
6373 \begin_layout Itemize
6374 Configurable paths
6375 \end_layout
6377 \begin_layout Itemize
6378 Portaudio: Fix speaker popping at start
6379 \end_layout
6381 \begin_layout Itemize
6382 Lots of UI changes
6383 \end_layout
6385 \begin_layout Itemize
6386 Speed adjustment menu
6387 \end_layout
6389 \begin_layout Itemize
6390 Win32 joystick support
6391 \end_layout
6393 \begin_layout Itemize
6394 Lua: gui.rainbow and gui.box
6395 \end_layout
6397 \begin_layout Itemize
6398 Split key lists into classes (the key list was large!)
6399 \end_layout
6401 \begin_layout Itemize
6402 More save slots support
6403 \end_layout
6405 \begin_layout Itemize
6406 Wxwidgets (wxJoystick) joystick support
6407 \end_layout
6409 \begin_layout Subsection
6410 rr1-delta7
6411 \end_layout
6413 \begin_layout Itemize
6414 Lots of internal joystick refactoring
6415 \end_layout
6417 \begin_layout Itemize
6418 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6419 \end_layout
6421 \begin_layout Itemize
6422 Wxwidgets: Settings mode (open settings without ROM)
6423 \end_layout
6425 \begin_layout Itemize
6426 Wxwidgets: Prompt key to use option
6427 \end_layout
6429 \begin_layout Itemize
6430 Wxwidgets: Fix crash if key goes away underneath
6431 \end_layout
6433 \begin_layout Itemize
6434 Wxwidgets: Fix mouse position in presence of scaling
6435 \end_layout
6437 \begin_layout Itemize
6438 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6439 \end_layout
6441 \begin_layout Itemize
6442 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6443  seem to work well on WinXP)
6444 \end_layout
6446 \begin_layout Itemize
6447 Start paused option.
6448 \end_layout
6450 \begin_layout Subsection
6451 rr1-delta7epsilon1
6452 \end_layout
6454 \begin_layout Itemize
6455 AVI: ZMBV support
6456 \end_layout
6458 \begin_layout Itemize
6459 lsnes-dumpavi: Start Lua before starting dumper
6460 \end_layout
6462 \begin_layout Itemize
6463 AVI: Fix secondary audio in mode 4.
6464 \end_layout
6466 \begin_layout Subsection
6467 rr1-delta7epsilon2
6468 \end_layout
6470 \begin_layout Itemize
6471 AVI: Refactor ZMBV a bit.
6472 \end_layout
6474 \begin_layout Itemize
6475 Fix error reading analog values from movie file
6476 \end_layout
6478 \begin_layout Subsection
6479 rr1-delta8
6480 \end_layout
6482 \begin_layout Itemize
6483 Delayed reset support
6484 \end_layout
6486 \begin_layout Itemize
6487 Lua: memory.hash_region
6488 \end_layout
6490 \begin_layout Subsection
6491 rr1-delta8epsilon1
6492 \end_layout
6494 \begin_layout Itemize
6495 Rework the build system
6496 \end_layout
6498 \begin_layout Itemize
6499 Typing input support
6500 \end_layout
6502 \begin_layout Itemize
6503 Fix building with bsnes v086 and v087.
6504 \end_layout
6506 \begin_layout Itemize
6507 SDL: Save settings on exit
6508 \end_layout
6510 \begin_layout Itemize
6511 SDL: Command to enter command line mode with given command.
6512 \end_layout
6514 \begin_layout Itemize
6515 SDL: More advanced command editing.
6516 \end_layout
6518 \begin_layout Subsection
6519 rr1-delta9
6520 \end_layout
6522 \begin_layout Itemize
6523 wxMSW: Fix the 
6524 \begin_inset Quotes eld
6525 \end_inset
6527 arrow keys and enter don't work
6528 \begin_inset Quotes erd
6529 \end_inset
6531  problem
6532 \end_layout
6534 \begin_layout Itemize
6535 MSU-1 support
6536 \end_layout
6538 \begin_layout Itemize
6539 Show mode changes due to rewinding.
6540 \end_layout
6542 \begin_layout Itemize
6543 Unsafe rewind support
6544 \end_layout
6546 \begin_layout Itemize
6547 Fix directory transversal.
6548 \end_layout
6550 \begin_layout Subsection
6551 rr1-delta10
6552 \end_layout
6554 \begin_layout Itemize
6555 AVI: Sound mode 5 (48kHz high-quality)
6556 \end_layout
6558 \begin_layout Itemize
6559 Lua: Reset Lua VM
6560 \end_layout
6562 \begin_layout Itemize
6563 Map the SNES bus into address space
6564 \end_layout
6566 \begin_layout Itemize
6567 Fix loading memory watch files with CRLF line endings
6568 \end_layout
6570 \begin_layout Subsection
6571 rr1-delta10epsilon1
6572 \end_layout
6574 \begin_layout Itemize
6575 Map bsnes internal state into memory space
6576 \end_layout
6578 \begin_layout Itemize
6579 Fix the 
6580 \begin_inset Quotes eld
6581 \end_inset
6583 click on panel wedges the emulator
6584 \begin_inset Quotes erd
6585 \end_inset
6587  for real.
6588 \end_layout
6590 \begin_layout Itemize
6591 DnD movies/saves on the main window.
6592 \end_layout
6594 \begin_layout Subsection
6595 rr1-delta11
6596 \end_layout
6598 \begin_layout Itemize
6599 Split core bindings into own module.
6600 \end_layout
6602 \begin_layout Itemize
6603 Remember invalid settings
6604 \end_layout
6606 \begin_layout Itemize
6607 Support for modified Gambatte core for GB/GBC emulation.
6608 \end_layout
6610 \begin_layout Itemize
6611 Reload/swap ROM function
6612 \end_layout
6614 \begin_layout Subsection
6615 rr1-delta11epsilon1
6616 \end_layout
6618 \begin_layout Itemize
6619 Fix step poll function
6620 \end_layout
6622 \begin_layout Subsection
6623 rr1-delta12
6624 \end_layout
6626 \begin_layout Itemize
6627 Non-insane savestate anchoring
6628 \end_layout
6630 \begin_layout Subsection
6631 rr1-delta13
6632 \end_layout
6634 \begin_layout Itemize
6635 More Memory search methods
6636 \end_layout
6638 \begin_layout Itemize
6639 Preserve movie if loading in RO mode.
6640 \end_layout
6642 \begin_layout Itemize
6643 Fix a obscure case in timeline check
6644 \end_layout
6646 \begin_layout Itemize
6647 Revamp the entiere ROM loading code
6648 \end_layout
6650 \begin_layout Itemize
6651 Support DnD on ROMs
6652 \end_layout
6654 \begin_layout Itemize
6655 Revamp menu layout
6656 \end_layout
6658 \begin_layout Itemize
6659 Standalone hotkey config dialog
6660 \end_layout
6662 \begin_layout Itemize
6663 Show bindings in more user-friendly format
6664 \end_layout
6666 \begin_layout Subsection
6667 rr1-delta13epsilon1
6668 \end_layout
6670 \begin_layout Itemize
6671 Pipedec support
6672 \end_layout
6674 \begin_layout Itemize
6675 Fix uninitialized variables in bsnes v085
6676 \end_layout
6678 \begin_layout Subsection
6679 rr1-delta14
6680 \end_layout
6682 \begin_layout Itemize
6683 Merge gambatte core into mainline (from its own branch)
6684 \end_layout
6686 \begin_layout Itemize
6687 Wxwidgets: Show expected dump file formats
6688 \end_layout
6690 \begin_layout Itemize
6691 Memory watch: Data typing
6692 \end_layout
6694 \begin_layout Itemize
6695 lsnes internal MMIO area.
6696 \end_layout
6698 \begin_layout Itemize
6699 Wxwidgets: New memory watch editor
6700 \end_layout
6702 \begin_layout Itemize
6703 Hexadecimal memory watches
6704 \end_layout
6706 \begin_layout Itemize
6707 Wxwidgets: Monospaced panel
6708 \end_layout
6710 \begin_layout Itemize
6711 Wxwidgets: Split memory watches in panel
6712 \end_layout
6714 \begin_layout Itemize
6715 Wxwidgets: Disable VMAs in memory search
6716 \end_layout
6718 \begin_layout Itemize
6719 lsnes-dumpavi: Fix speed bug
6720 \end_layout
6722 \begin_layout Itemize
6723 Movie subtitle support
6724 \end_layout
6726 \begin_layout Itemize
6727 Fix rerecord count reporting
6728 \end_layout
6730 \begin_layout Itemize
6731 Don't trash movie when loading in readonly mode.
6732 \end_layout
6734 \begin_layout Subsection
6735 rr1-delta14epsilon1
6736 \end_layout
6738 \begin_layout Itemize
6739 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
6740 \end_layout
6742 \begin_layout Itemize
6743 Fix build on Mac OS X.
6744 \end_layout
6746 \begin_layout Itemize
6747 Lua: loopwrapper
6748 \end_layout
6750 \begin_layout Itemize
6751 Wxwidgets: Hidable messages window
6752 \end_layout
6754 \begin_layout Itemize
6755 Lua: input.joyset
6756 \end_layout
6758 \begin_layout Itemize
6759 Bsnes: Support inconsistent saves
6760 \end_layout
6762 \begin_layout Itemize
6763 Bsnes: Allow simulating saving every frame
6764 \end_layout
6766 \begin_layout Itemize
6767 Fix desync if savestate is loaded in readonly mode in certain conditions.
6768 \end_layout
6770 \begin_layout Itemize
6771 Wxwidgets: Fix save dialogs on Mac OS X.
6772 \end_layout
6774 \begin_layout Itemize
6775 Wxwidgets: Fix insane status width on Win32.
6776 \end_layout
6778 \begin_layout Itemize
6779 Wxwidgets: Fix autohold processing to be faster.
6780 \end_layout
6782 \begin_layout Itemize
6783 Wxwidgets: Allow loading ROMs and movies from commandline.
6784 \end_layout
6786 \begin_layout Subsection
6787 rr1-delta15
6788 \end_layout
6790 \begin_layout Itemize
6791 Be a bit smarter with --load
6792 \end_layout
6794 \begin_layout Itemize
6795 Rewrote higher-level parts of audio system
6796 \end_layout
6798 \begin_layout Itemize
6799 Tool to build commentary tracks
6800 \end_layout
6802 \begin_layout Itemize
6803 Lua: input.joyget
6804 \end_layout
6806 \begin_layout Itemize
6807 Gambatte: Add support for SVN358
6808 \end_layout
6810 \begin_layout Itemize
6811 Use builtin font when rendering status panel.
6812 \end_layout
6814 \begin_layout Itemize
6815 Option to detach memory watch to its own window.
6816 \end_layout
6818 \begin_layout Itemize
6819 Recent ROMs/Movies menu
6820 \end_layout
6822 \begin_layout Itemize
6823 Libao support
6824 \end_layout
6826 \begin_layout Itemize
6827 Useful lag counter for SNES games that autopoll
6828 \end_layout
6830 \begin_layout Itemize
6831 Fix buffer overflow in gambatte sound output
6832 \end_layout
6834 \begin_layout Subsection
6835 rr1-delta15epsilon1
6836 \end_layout
6838 \begin_layout Itemize
6839 Don't blow up on wxGTK if the window is hidden somehow
6840 \end_layout
6842 \begin_layout Itemize
6843 Support simultaneous drop of ROM and movie.
6844 \end_layout
6846 \begin_layout Itemize
6847 Gambatte: Don't save spurious SRAMs.
6848 \end_layout
6850 \begin_layout Itemize
6851 Make SGB ROMs actually usable.
6852 \end_layout
6854 \begin_layout Itemize
6855 Fix so that saved movies appear in recent movies.
6856 \end_layout
6858 \begin_layout Itemize
6859 Don't open multiple commentary editors at once.
6860 \end_layout
6862 \begin_layout Subsection
6863 rr1-delta15epsilon2
6864 \end_layout
6866 \begin_layout Itemize
6867 Lua: memory.readregion/memory.writeregion
6868 \end_layout
6870 \begin_layout Itemize
6871 Lua: memory.map{,s}{byte,word,dword,qword}
6872 \end_layout
6874 \begin_layout Itemize
6875 Lua: memory.map_structure
6876 \end_layout
6878 \begin_layout Itemize
6879 Lua: Fix bus_address for gambatte
6880 \end_layout
6882 \begin_layout Itemize
6883 Fix features dependent of bsnes debugger
6884 \end_layout
6886 \begin_layout Itemize
6887 Cleanup bsnes debugger logic
6888 \end_layout
6890 \begin_layout Itemize
6891 Fix resets in presence of save every frame
6892 \end_layout
6894 \begin_layout Subsection
6895 rr1-delta15epsilon3
6896 \end_layout
6898 \begin_layout Itemize
6899 Lua: input.lcid_to_pcid
6900 \end_layout
6902 \begin_layout Itemize
6903 Fix off-by-one bug with slot hashes
6904 \end_layout
6906 \begin_layout Itemize
6907 Fix crashes on certain memory watch expressions
6908 \end_layout
6910 \begin_layout Itemize
6911 Lua: memory.read_expr
6912 \end_layout
6914 \begin_layout Itemize
6915 Lua: Fix memory.read_expr on nil argument
6916 \end_layout
6918 \begin_layout Itemize
6919 Fix the code to compile on G++ 4.7
6920 \end_layout
6922 \begin_layout Itemize
6923 Change button_id to be a function pointer field, not a virtual method
6924 \end_layout
6926 \begin_layout Itemize
6927 Add bsnes patches to fix libsnes to compile on GCC 4.7
6928 \end_layout
6930 \begin_layout Itemize
6931 Gambatte: Always use legacy lag counting
6932 \end_layout
6934 \begin_layout Itemize
6935 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
6936 \end_layout
6938 \begin_layout Itemize
6939 Fix analog controllers
6940 \end_layout
6942 \begin_layout Itemize
6943 Fix autohold menus
6944 \end_layout
6946 \begin_layout Itemize
6947 Fix button symbols in input display
6948 \end_layout
6950 \begin_layout Itemize
6951 Compensate for nuts bsnes superscope/justifier handling
6952 \end_layout
6954 \begin_layout Itemize
6955 Lua: Fix bit.extract boolean handling
6956 \end_layout
6958 \begin_layout Subsection
6959 rr2-beta0
6960 \end_layout
6962 \begin_layout Itemize
6963 Split emulation cores more from the rest
6964 \end_layout
6966 \begin_layout Itemize
6967 Support having multiple emulation cores compiled at once
6968 \end_layout
6970 \begin_layout Itemize
6971 Support arbitrary number of ports (well, up to 31 anyway).
6972 \end_layout
6974 \begin_layout Itemize
6975 SNES debugger support
6976 \end_layout
6978 \begin_layout Itemize
6979 Support 16-button controllers
6980 \end_layout
6982 \begin_layout Itemize
6983 Remove old SDL front end
6984 \end_layout
6986 \begin_layout Itemize
6987 Data-driven controller buttons
6988 \end_layout
6990 \begin_layout Itemize
6991 Generate the port code from defines
6992 \end_layout
6994 \begin_layout Subsection
6995 rr2-beta1
6996 \end_layout
6998 \begin_layout Itemize
6999 Update libgambatte to SVN364
7000 \end_layout
7002 \begin_layout Itemize
7003 Get rid of partial linking (building with MXE works)
7004 \end_layout
7006 \begin_layout Itemize
7007 Load XML even without gamepack files
7008 \end_layout
7010 \begin_layout Itemize
7011 Support screen rotate & flip
7012 \end_layout
7014 \begin_layout Itemize
7015 Fix bug when changing controller key to another subkey of the same key
7016 \end_layout
7018 \begin_layout Subsection
7019 rr1-delta16
7020 \end_layout
7022 \begin_layout Itemize
7023 Stop at movie end: Don't off-by-one
7024 \end_layout
7026 \begin_layout Itemize
7027 Fix crash closing lsnes with voice playback active.
7028 \end_layout
7030 \begin_layout Itemize
7031 Import/Export OggOpus for commentary tracks
7032 \end_layout
7034 \begin_layout Itemize
7035 16-button controllers.
7036 \end_layout
7038 \begin_layout Itemize
7039 Don't show nonexistent controllers in input display
7040 \end_layout
7042 \begin_layout Itemize
7043 Set voice record/playback volume from UI
7044 \end_layout
7046 \begin_layout Itemize
7047 Patches for gambatte SVN364.
7048 \end_layout
7050 \begin_layout Itemize
7051 Load markup (if exists) even without gamepack file.
7052 \end_layout
7054 \begin_layout Itemize
7055 Screen rotation & flipping
7056 \end_layout
7058 \begin_layout Itemize
7059 Lua: Some new bit functions
7060 \end_layout
7062 \begin_layout Itemize
7063 Auto-refresh voice streams on change.
7064 \end_layout
7066 \begin_layout Itemize
7067 Auto-refresh subtitles on change & new subtitle editor.
7068 \end_layout
7070 \begin_layout Itemize
7071 Fix music volume adjustment.
7072 \end_layout
7074 \begin_layout Subsection
7075 rr2-beta2
7076 \end_layout
7078 \begin_layout Itemize
7079 Use system threads instead of platform threads
7080 \end_layout
7082 \begin_layout Itemize
7083 Cleanup build by allowing dummy and real drivers to link together.
7084 \end_layout
7086 \begin_layout Itemize
7087 Split duplex support
7088 \end_layout
7090 \begin_layout Subsection
7091 rr1-delta16epsilon1
7092 \end_layout
7094 \begin_layout Itemize
7095 Wxwidgets: Fix memory watch rendering.
7096 \end_layout
7098 \begin_layout Itemize
7099 Wxwidgets: Allow setting voice stream gain.
7100 \end_layout
7102 \begin_layout Itemize
7103 Wxwidgets: VU meters and volume adjustment.
7104 \end_layout
7106 \begin_layout Itemize
7107 Lua: Custom fonts support.
7108 \end_layout
7110 \begin_layout Itemize
7111 Lua: Fix methods stopping working when resetting Lua.
7112 \end_layout
7114 \begin_layout Itemize
7115 Fix loading standard-format movies in preserve (readonly) mode.
7116 \end_layout
7118 \begin_layout Subsection
7119 rr1-delta17
7120 \end_layout
7122 \begin_layout Itemize
7123 Primitive movie editor
7124 \end_layout
7126 \begin_layout Itemize
7127 Fix VU meter with no sound device.
7128 \end_layout
7130 \begin_layout Itemize
7131 Fix various undefined return values.
7132 \end_layout
7134 \begin_layout Itemize
7135 Show rates in VU meter window.
7136 \end_layout
7138 \begin_layout Subsection
7139 rr2-beta3
7140 \end_layout
7142 \begin_layout Itemize
7143 Lua: Render queues as objects
7144 \end_layout
7146 \begin_layout Itemize
7147 Bsnes: support hard resets
7148 \end_layout
7150 \begin_layout Itemize
7151 Dedicated sound devices dialog
7152 \end_layout
7154 \begin_layout Itemize
7155 Change the default AVI sound mode to 2 or 5.
7156 \end_layout
7158 \begin_layout Itemize
7159 Fix totally borked movie saving.
7160 \end_layout
7162 \begin_layout Itemize
7163 Portaudio: Use split duplex with different devices.
7164 \end_layout
7166 \begin_layout Itemize
7167 Fix controls with gambatte core.
7168 \end_layout
7170 \begin_layout Itemize
7171 Modify save slot set handling.
7172 \end_layout
7174 \begin_layout Itemize
7175 lsnes-dumpavi: --firmware-path.
7176 \end_layout
7178 \begin_layout Itemize
7179 Fix lots of compiler warnings.
7180 \end_layout
7182 \begin_layout Subsection
7183 rr1-delta17epsilon1
7184 \end_layout
7186 \begin_layout Itemize
7187 Commentary tool: Set nominal bit rate and limit max bit rate.
7188 \end_layout
7190 \begin_layout Itemize
7191 Lua: Unconditionally reload host memory on loadstate
7192 \end_layout
7194 \begin_layout Itemize
7195 Lua: Query bindings, manipulate aliases, create inverse bindings
7196 \end_layout
7198 \begin_layout Itemize
7199 Lua: Fix crashes with resetting VM while some types of paint requests are
7200  in flight.
7201 \end_layout
7203 \begin_layout Itemize
7204 Lua: gui.text: Clip the text properly instead of corrupting memory in some
7205  cases.
7206 \end_layout
7208 \begin_layout Itemize
7209 Save screenshot header reliably
7210 \end_layout
7212 \begin_layout Itemize
7213 Lua: Backport input.get2 and input.set2
7214 \end_layout
7216 \begin_layout Itemize
7217 Lua: New controller info functions.
7218 \end_layout
7220 \begin_layout Itemize
7221 Movie editor: Fix reset delay counters to be the right way around.
7222 \end_layout
7224 \begin_layout Itemize
7225 Lua: on_snoop2
7226 \end_layout
7228 \begin_layout Itemize
7229 Lua: on_button and input.veto_button.
7230 \end_layout
7232 \begin_layout Subsection
7233 rr2-beta4
7234 \end_layout
7236 \begin_layout Itemize
7237 Revert memory leak fix breaking input
7238 \end_layout
7240 \begin_layout Itemize
7241 Refactor Opus handling
7242 \end_layout
7244 \begin_layout Itemize
7245 Restrict member picking only to .zip files
7246 \end_layout
7248 \begin_layout Itemize
7249 Fix reading of host-endian VMAs.
7250 \end_layout
7252 \begin_layout Itemize
7253 Fix rlow and rhigh to be the right way around.
7254 \end_layout
7256 \begin_layout Itemize
7257 Lua: Don't wedge VM if callback fails with an exception
7258 \end_layout
7260 \begin_layout Itemize
7261 Refactor Ogg handling.
7262 \end_layout
7264 \begin_layout Subsection
7265 rr1-delta17epsilon2
7266 \end_layout
7268 \begin_layout Itemize
7269 Fix saving PNG screenshots on Win32.
7270 \end_layout
7272 \begin_layout Itemize
7273 Movie editor: Sweep axis.
7274 \end_layout
7276 \begin_layout Itemize
7277 Load selected slot in ro/rw/preserve/movie mode.
7278 \end_layout
7280 \begin_layout Itemize
7281 input.joyset: Preserve and invert user input.
7282 \end_layout
7284 \begin_layout Itemize
7285 Allow immediate saving at point of save (transfer saves).
7286 \end_layout
7288 \begin_layout Itemize
7289 Wxwidgets: Filter filenames in dialogs, autoappend extensions.
7290 \end_layout
7292 \begin_layout Itemize
7293 data/verysmall.font: Add missing glyph 70 (
7294 \begin_inset Quotes eld
7295 \end_inset
7298 \begin_inset Quotes erd
7299 \end_inset
7302 \end_layout
7304 \begin_layout Itemize
7305 Lua: Allow painting custom fonts with halo.
7306 \end_layout
7308 \begin_layout Itemize
7309 Fix memory value search to work on byte types.
7310 \end_layout
7312 \begin_layout Subsection
7313 rr2-beta5
7314 \end_layout
7316 \begin_layout Itemize
7317 Reject oggopus files with incomplete pregap
7318 \end_layout
7320 \begin_layout Itemize
7321 Fix multistream and ogg demuxing
7322 \end_layout
7324 \begin_layout Itemize
7325 Workaround bug with screen >1024 pixels wide.
7326 \end_layout
7328 \begin_layout Itemize
7329 Allow on_input to force/veto system controls.
7330 \end_layout
7332 \begin_layout Itemize
7333 Dedicated autohold/autofire window.
7334 \end_layout
7336 \begin_layout Itemize
7337 Support per-button autofire.
7338 \end_layout
7340 \begin_layout Itemize
7341 Fix crash on trying to frameadvance/exit with no ROM loaded.
7342 \end_layout
7344 \begin_layout Itemize
7345 Fix nonexistent controller key warnings.
7346 \end_layout
7348 \begin_layout Itemize
7349 Movie editor: Fix mouse editing (TYPE_RAXIS)
7350 \end_layout
7352 \begin_layout Itemize
7353 TAS input plugin
7354 \end_layout
7356 \begin_layout Itemize
7357 Analog passthrough.
7358 \end_layout
7360 \begin_layout Itemize
7361 Add throttle axes (TYPE_TAXIS).
7362 \end_layout
7364 \begin_layout Itemize
7365 Fix movie reading with first port having multiple controllers.
7366 \end_layout
7368 \begin_layout Itemize
7369 Move some info from status panel to statusbar.
7370 \end_layout
7372 \begin_layout Subsection
7373 rr1-delta17epsilon3
7374 \end_layout
7376 \begin_layout Itemize
7377 Fix status panel (and movie editor) flicker
7378 \end_layout
7380 \begin_layout Itemize
7381 Show effects of Lua in input display
7382 \end_layout
7384 \begin_layout Itemize
7385 Offer lsmv.backup as file filter too for load lsmv
7386 \end_layout
7388 \begin_layout Itemize
7389 Allow slowing down subframe advance 
7390 \end_layout
7392 \begin_layout Itemize
7393 Display current save slot information
7394 \end_layout
7396 \begin_layout Itemize
7397 Add snes9x fonts
7398 \end_layout
7400 \begin_layout Itemize
7401 Fix hotkeys stopping working after X-ing settings dialog
7402 \end_layout
7404 \begin_layout Itemize
7405 Movie editor: Fix bug if extending finished movie
7406 \end_layout
7408 \begin_layout Itemize
7409 Cap current_frame_first_subframe to movie size when recounting movie
7410 \end_layout
7412 \begin_layout Itemize
7413 Movie editor: Interpret ctrl+click as right click 
7414 \end_layout
7416 \begin_layout Subsection
7417 rr2-beta6
7418 \end_layout
7420 \begin_layout Itemize
7421 Autofire: Fix false status indications
7422 \end_layout
7424 \begin_layout Itemize
7425 Fix subframe counter
7426 \end_layout
7428 \begin_layout Itemize
7429 Fix print() after Lua reset
7430 \end_layout
7432 \begin_layout Itemize
7433 New settings framework
7434 \end_layout
7436 \begin_layout Itemize
7437 Remove some unused leftover stuff
7438 \end_layout
7440 \begin_layout Itemize
7441 Fix race condition causing possible crash on startup
7442 \end_layout
7444 \begin_layout Itemize
7445 Fix compiling if uint64_t and size_t are not compatible
7446 \end_layout
7448 \begin_layout Itemize
7449 Lua: Don't crash if input.[gs]et{,a} is called outside on_input
7450 \end_layout
7452 \begin_layout Subsection
7453 rr2-beta7
7454 \end_layout
7456 \begin_layout Itemize
7457 Fix bug causing crash if triple has invalid button
7458 \end_layout
7460 \end_body
7461 \end_document