Cleanup port defintions
[lsnes.git] / manual.lyx
blobfe00321bf4f3e7516f78fea3bf7a196d747ed388
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 Subsection
1159 Table bit:
1160 \end_layout
1162 \begin_layout Standard
1163 Bitwise logical functions and related.
1164 \end_layout
1166 \begin_layout Subsubsection
1167 bit.none(number...) / bit.bnot(number...)
1168 \end_layout
1170 \begin_layout Standard
1171 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1172  arguments).
1173 \end_layout
1175 \begin_layout Subsubsection
1176 bit.any(number...) / bit.bor(number...)
1177 \end_layout
1179 \begin_layout Standard
1180 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1181 \end_layout
1183 \begin_layout Subsubsection
1184 bit.all(number...) / bit.band(number...)
1185 \end_layout
1187 \begin_layout Standard
1188 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1190 \end_layout
1192 \begin_layout Subsubsection
1193 bit.parity(number...) / bit.bxor(number...)
1194 \end_layout
1196 \begin_layout Standard
1197 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1198  of the arguments).
1199 \end_layout
1201 \begin_layout Subsubsection
1202 bit.lrotate(number base[, number amount[, number bits]])
1203 \end_layout
1205 \begin_layout Standard
1206 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1207 \end_layout
1209 \begin_layout Subsubsection
1210 bit.rrotate(number base[, number amount[, number bits]])
1211 \end_layout
1213 \begin_layout Standard
1214 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1215  places.
1216 \end_layout
1218 \begin_layout Subsubsection
1219 bit.lshift(number base[, number amount[, number bits]])
1220 \end_layout
1222 \begin_layout Standard
1223 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1224  The new bits are filled with zeroes.
1225 \end_layout
1227 \begin_layout Subsubsection
1228 bit.lrshift(number base[, number amount[, number bits]])
1229 \end_layout
1231 \begin_layout Standard
1232 Shift bits-bit (max 48, default 48) number logically right by amount (default
1233  1) places.
1234  The new bits are filled with zeroes.
1235 \end_layout
1237 \begin_layout Subsubsection
1238 bit.arshift(number base[, number amount[, number bits]])
1239 \end_layout
1241 \begin_layout Standard
1242 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1243  (default 1) places.
1244  The new bits are shifted in with copy of the high bit.
1245 \end_layout
1247 \begin_layout Subsubsection
1248 bit.extract(number base[, number bit0[, number bit1,...]])
1249 \end_layout
1251 \begin_layout Standard
1252 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1253 \end_layout
1255 \begin_layout Standard
1256 Notes: 
1257 \end_layout
1259 \begin_layout Itemize
1260 Bit numbers up to 51 should work reliably (then things start falling apart
1261  due to double precision issues).
1262 \end_layout
1264 \begin_layout Itemize
1265 There are two special bit positions, true and false, standing for always
1266  set bit and always clear bit.
1267 \end_layout
1269 \begin_layout Subsubsection
1270 bit.value([number bit1[, number bit2,...]])
1271 \end_layout
1273 \begin_layout Standard
1274 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1275  places and so on.
1276  As special value, nil argument is no-op.
1277 \end_layout
1279 \begin_layout Subsubsection
1280 bit.test_any(number a, number b)
1281 \end_layout
1283 \begin_layout Standard
1284 Returns true if bitwise and of a and b is nonzero, otherwise false.
1285 \end_layout
1287 \begin_layout Subsubsection
1288 bit.test_all(number a, number b)
1289 \end_layout
1291 \begin_layout Standard
1292 Returns true if bitwise and of a and b is equals b, otherwise false.
1293 \end_layout
1295 \begin_layout Subsubsection
1296 bit.popcount(number a)
1297 \end_layout
1299 \begin_layout Standard
1300 Returns number of set bits in a.
1301 \end_layout
1303 \begin_layout Subsubsection
1304 bit.clshift(number a, number b, [number amount,[number bits]])
1305 \end_layout
1307 \begin_layout Standard
1308 Does chained left shift on a, b by amount positions, assuming numbers to
1309  be of specified number of bits.
1310 \end_layout
1312 \begin_layout Subsubsection
1313 bit.crshift(number a, number b, [number amount,[number bits]])
1314 \end_layout
1316 \begin_layout Standard
1317 Does chained right shift on a, b by amount positions, assuming numbers to
1318  be of specified number of bits.
1319 \end_layout
1321 \begin_layout Subsubsection
1322 bit.flagdecode(number a, number bits, [string on, [string off]])
1323 \end_layout
1325 \begin_layout Standard
1326 Return string of length bits where ith character is ith character of on
1327  if bit i is on, otherwise ith character of off.
1328  Out of range reads give last character, or '*'/'-' if empty.
1329 \end_layout
1331 \begin_layout Subsubsection
1332 bit.rflagdecode(number a, number bits, [string on, [string off]])
1333 \end_layout
1335 \begin_layout Standard
1336 Like bit.flagdecode, but outputs the string in the opposite order (most significa
1337 nt bit first).
1338 \end_layout
1340 \begin_layout Subsection
1341 Table gui:
1342 \end_layout
1344 \begin_layout Standard
1345 Most of these functions can only be called in on_paint and on_video callbacks.
1346  Exceptions are noted.
1347 \end_layout
1349 \begin_layout Standard
1350 Colors are 32-bit.
1351  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1352  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1353  opaque, 255 is almost transparent).
1354  -1 is the fully transparent color.
1355  Alpha values greater than 127 do work.
1356 \end_layout
1358 \begin_layout Standard
1359 Origin of coordinates is at top left corner of game display area.
1360  Left and top gaps correspond to negative coordinates.
1361 \end_layout
1363 \begin_layout Subsubsection
1364 gui.resolution()
1365 \end_layout
1367 \begin_layout Standard
1368 Returns 2-tuple (hresolution, vresolution).
1369 \end_layout
1371 \begin_layout Subsubsection
1372 gui.<class>_gap(number gap)
1373 \end_layout
1375 \begin_layout Standard
1376 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1377  is 8191).
1378 \end_layout
1380 \begin_layout Subsubsection
1381 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1382 \end_layout
1384 \begin_layout Standard
1385 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1386  16 high).
1387  Parameters:
1388 \end_layout
1390 \begin_layout Itemize
1391 x: X-coordinate to start the drawing from (and x-coordinate at begining
1392  of the lines).
1393 \end_layout
1395 \begin_layout Itemize
1396 y: Y-coordinate to start the drawing from.
1397 \end_layout
1399 \begin_layout Itemize
1400 text: The text to draw.
1401 \end_layout
1403 \begin_layout Itemize
1404 fgc: Text color (default is 0xFFFFFF (white))
1405 \end_layout
1407 \begin_layout Itemize
1408 bgc: Background color (default is -1 (transparent))
1409 \end_layout
1411 \begin_layout Subsubsection
1412 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1413 \end_layout
1415 \begin_layout Standard
1416 Like gui.text, but draw using double-width.
1417 \end_layout
1419 \begin_layout Subsubsection
1420 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1421 \end_layout
1423 \begin_layout Standard
1424 Like gui.text, but draw using double-height.
1425 \end_layout
1427 \begin_layout Subsubsection
1428 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
1429 \end_layout
1431 \begin_layout Standard
1432 Like gui.text, but draw using double-width/double-height.
1433 \end_layout
1435 \begin_layout Subsubsection
1436 gui.rectangle(number x, number y, number width, number height[, number thickness[
1437 , number outline[, number fill]]])
1438 \end_layout
1440 \begin_layout Standard
1441 Draw rectangle on the GUI.
1442  Parameters:
1443 \end_layout
1445 \begin_layout Itemize
1446 x: X-coordinate of left edge.
1447 \end_layout
1449 \begin_layout Itemize
1450 y: Y-coordinate of upper edge.
1451 \end_layout
1453 \begin_layout Itemize
1454 width: Width of rectangle.
1455 \end_layout
1457 \begin_layout Itemize
1458 height: Height of rectangle.
1459 \end_layout
1461 \begin_layout Itemize
1462 thickness: Thickness of outline (default is 1).
1463 \end_layout
1465 \begin_layout Itemize
1466 outline: Color of outline (default is 0xFFFFFF (white))
1467 \end_layout
1469 \begin_layout Itemize
1470 fill: Color of fill (default is -1 (transparent))
1471 \end_layout
1473 \begin_layout Subsubsection
1474 gui.box(number x, number y, number width, number height[, number thickness[,
1475  number outline1[,number outline2[, number fill]]]])
1476 \end_layout
1478 \begin_layout Standard
1479 Draw rectangle with 3D effect on the GUI.
1480  Parameters:
1481 \end_layout
1483 \begin_layout Itemize
1484 x: X-coordinate of left edge.
1485 \end_layout
1487 \begin_layout Itemize
1488 y: Y-coordinate of upper edge.
1489 \end_layout
1491 \begin_layout Itemize
1492 width: Width of rectangle.
1493 \end_layout
1495 \begin_layout Itemize
1496 height: Height of rectangle.
1497 \end_layout
1499 \begin_layout Itemize
1500 thickness: Thickness of outline (default is 1).
1501 \end_layout
1503 \begin_layout Itemize
1504 outline1: First color of outline (default is 0xFFFFFF (white))
1505 \end_layout
1507 \begin_layout Itemize
1508 outline2: First color of outline (default is 0x808080 (dark gray))
1509 \end_layout
1511 \begin_layout Itemize
1512 fill: Color of fill (default is 0xC0C0C0 (light grayy))
1513 \end_layout
1515 \begin_layout Subsubsection
1516 gui.pixel(number x, number y[, number color])
1517 \end_layout
1519 \begin_layout Standard
1520 Draw one pixel on the GUI.
1521  Parameters:
1522 \end_layout
1524 \begin_layout Itemize
1525 x: X-coordinate of the pixel
1526 \end_layout
1528 \begin_layout Itemize
1529 y: Y-coordinate of the pixel
1530 \end_layout
1532 \begin_layout Itemize
1533 color: Color of the pixel (default is 0xFFFFFF (white))
1534 \end_layout
1536 \begin_layout Subsubsection
1537 gui.crosshair(number x, number y[, number length[, number color]])
1538 \end_layout
1540 \begin_layout Standard
1541 Draw a crosshair.
1542  Parameters:
1543 \end_layout
1545 \begin_layout Itemize
1546 x: X-coordinate of the crosshair
1547 \end_layout
1549 \begin_layout Itemize
1550 y: Y-coordinate of the crosshair
1551 \end_layout
1553 \begin_layout Itemize
1554 length: Length of the crosshair lines (default 10).
1555 \end_layout
1557 \begin_layout Itemize
1558 color: Color of the crosshair (default is 0xFFFFFF (white))
1559 \end_layout
1561 \begin_layout Subsubsection
1562 gui.line(number x1, number y1, number x2, number y2[, number color])
1563 \end_layout
1565 \begin_layout Standard
1566 Draw a thin line.
1567  Parameters:
1568 \end_layout
1570 \begin_layout Itemize
1571 x1: X-coordinate of one end.
1572 \end_layout
1574 \begin_layout Itemize
1575 y1: Y-coordinate of one end.
1576 \end_layout
1578 \begin_layout Itemize
1579 x2: X-coordinate of the other end.
1580 \end_layout
1582 \begin_layout Itemize
1583 y2: Y-coordinate of the other end.
1584 \end_layout
1586 \begin_layout Itemize
1587 color: Color of the line (default is 0xFFFFFF (white)).
1588 \end_layout
1590 \begin_layout Subsubsection
1591 gui.circle(number x, number y, number r[, number thick[, number border[,
1592  number fil]]])
1593 \end_layout
1595 \begin_layout Standard
1596 Draw a circle.
1597  Parameters.
1598 \end_layout
1600 \begin_layout Itemize
1601 x: X-coordinate of the center
1602 \end_layout
1604 \begin_layout Itemize
1605 y: Y-coordinate of the center
1606 \end_layout
1608 \begin_layout Itemize
1609 r: The radius of the circle
1610 \end_layout
1612 \begin_layout Itemize
1613 thick: Border thickness
1614 \end_layout
1616 \begin_layout Itemize
1617 border: Border color (default is 0xFFFFFF (white))
1618 \end_layout
1620 \begin_layout Itemize
1621 fill: Fill color (default is -1 (transparent)).
1622 \end_layout
1624 \begin_layout Subsubsection
1625 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
1626 \end_layout
1628 \begin_layout Standard
1629 Draw a bitmap on screen with specified palette.
1630  Parameters:
1631 \end_layout
1633 \begin_layout Itemize
1634 x: X-coordinate of left edge.
1635 \end_layout
1637 \begin_layout Itemize
1638 y: Y-coordinate of top edge.
1639 \end_layout
1641 \begin_layout Itemize
1642 bitmap: The bitmap to draw
1643 \end_layout
1645 \begin_layout Itemize
1646 palette: The palette to draw the bitmap using.
1647 \end_layout
1649 \begin_layout Subsubsection
1650 gui.bitmap_draw(number x, number y, dbitmap bitmap)
1651 \end_layout
1653 \begin_layout Standard
1654 Draw a bitmap on screen.
1655  Parameters:
1656 \end_layout
1658 \begin_layout Itemize
1659 x: X-coordinate of left edge.
1660 \end_layout
1662 \begin_layout Itemize
1663 y: Y-coordinate of top edge.
1664 \end_layout
1666 \begin_layout Itemize
1667 bitmap: The bitmap to draw
1668 \end_layout
1670 \begin_layout Subsubsection
1671 gui.palette_new()
1672 \end_layout
1674 \begin_layout Standard
1675 Returns a new palette (initially all transparent).
1676  Can be used anywhere.
1677 \end_layout
1679 \begin_layout Subsubsection
1680 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
1681 \end_layout
1683 \begin_layout Standard
1684 Returns a new bitmap/dbitmap.
1685  Can be used anywhere.
1686  Parameters:
1687 \end_layout
1689 \begin_layout Itemize
1690 w: The width of new bitmap
1691 \end_layout
1693 \begin_layout Itemize
1694 h: The height of new bitmap
1695 \end_layout
1697 \begin_layout Itemize
1698 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
1699 \end_layout
1701 \begin_layout Itemize
1702 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
1703 \end_layout
1705 \begin_layout Subsubsection
1706 gui.bitmap_load(string file)
1707 \end_layout
1709 \begin_layout Standard
1710 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
1711  for bitmap).
1712  Can be used anywhere.
1713  Parameters:
1714 \end_layout
1716 \begin_layout Itemize
1717 file: The name of file to load.
1718 \end_layout
1720 \begin_layout Subsubsection
1721 gui.palette_set(palette palette, number index, number color)
1722 \end_layout
1724 \begin_layout Standard
1725 Sets color in palette.
1726  Can be used anywhere.
1727  Parameters:
1728 \end_layout
1730 \begin_layout Itemize
1731 palette: The palette to manipulate
1732 \end_layout
1734 \begin_layout Itemize
1735 index: Index of color (0-65535).
1736 \end_layout
1738 \begin_layout Itemize
1739 color: The color value.
1740 \end_layout
1742 \begin_layout Subsubsection
1743 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
1744 \end_layout
1746 \begin_layout Standard
1747 Sets specified pixel in bitmap.
1748  Can be used anywhere.
1749  Parameters:
1750 \end_layout
1752 \begin_layout Itemize
1753 bitmap: The bitmap to manipulate
1754 \end_layout
1756 \begin_layout Itemize
1757 x: The x-coordinate of the pixel.
1758 \end_layout
1760 \begin_layout Itemize
1761 y: The y-coordinate of the pixel.
1762 \end_layout
1764 \begin_layout Itemize
1765 color: If bitmap is a bitmap, color index (0-65535).
1766  Otherwise color value.
1767 \end_layout
1769 \begin_layout Subsubsection
1770 gui.bitmap_size(bitmap/dbitmap bitmap)
1771 \end_layout
1773 \begin_layout Standard
1774 Get size of bitmap.
1775  Can be used anywhere.
1776  Parameters:
1777 \end_layout
1779 \begin_layout Itemize
1780 bitmap: The bitmap to query.
1781 \end_layout
1783 \begin_layout Standard
1784 The first return is the width, the second is the height.
1785 \end_layout
1787 \begin_layout Subsubsection
1788 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
1789  src, number sx, number sy, number w, number h[, number ck])
1790 \end_layout
1792 \begin_layout Standard
1793 Blit a part of bitmap to another.
1794  Can be used anywhere.
1795  Parameters:
1796 \end_layout
1798 \begin_layout Itemize
1799 dest: Destination to blit to.
1800 \end_layout
1802 \begin_layout Itemize
1803 dx: left edge of target
1804 \end_layout
1806 \begin_layout Itemize
1807 dy: Top edge of target
1808 \end_layout
1810 \begin_layout Itemize
1811 src: The source to blit from.
1812  Must be of the same type as destination.
1813 \end_layout
1815 \begin_layout Itemize
1816 sx: left edge of source
1817 \end_layout
1819 \begin_layout Itemize
1820 sy: Top edge of source
1821 \end_layout
1823 \begin_layout Itemize
1824 w: Width of region
1825 \end_layout
1827 \begin_layout Itemize
1828 h: Height of region.
1829 \end_layout
1831 \begin_layout Itemize
1832 ck: Color key.
1833  Pixels of this color are not blitted.
1834 \end_layout
1836 \begin_deeper
1837 \begin_layout Itemize
1838 If bitmaps are bitmaps, this is color index of colorkey.
1839  Values outside range 0-65535 cause no key to be used as colorkey.
1840 \end_layout
1842 \begin_layout Itemize
1843 If bitmaps are dbitmaps, this color value of colorkey.
1844 \end_layout
1846 \begin_layout Itemize
1847 May be absent or nil for no colorkey blit.
1848 \end_layout
1850 \end_deeper
1851 \begin_layout Subsubsection
1852 gui.repaint()
1853 \end_layout
1855 \begin_layout Standard
1856 Request on_repaint() to happen as soon as possible.
1857  Can be used anywhere.
1858 \end_layout
1860 \begin_layout Subsubsection
1861 gui.subframe_update(boolean on)
1862 \end_layout
1864 \begin_layout Standard
1865 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
1866  or not happen (on=false).
1867  Can be used anywhere.
1868 \end_layout
1870 \begin_layout Subsubsection
1871 gui.screenshot(string filename)
1872 \end_layout
1874 \begin_layout Standard
1875 Write PNG screenshot of the current frame (no drawings) to specified file.
1876  Can be used anywhere.
1877 \end_layout
1879 \begin_layout Subsubsection
1880 gui.color(number r, number g, number b[, number a])
1881 \end_layout
1883 \begin_layout Standard
1884 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
1885  each component in scale 0-255.
1886  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
1887  opaque).
1888  The default alpha is 256.
1889 \end_layout
1891 \begin_layout Subsubsection
1892 gui.status(string name, string value)
1893 \end_layout
1895 \begin_layout Standard
1896 Set status field 
1897 \begin_inset Quotes eld
1898 \end_inset
1900 L[<name>]
1901 \begin_inset Quotes erd
1902 \end_inset
1904  to <value> in status area.
1905  Can be used anywhere.
1906 \end_layout
1908 \begin_layout Subsubsection
1909 gui.rainbow(number step, number steps[, number color])
1910 \end_layout
1912 \begin_layout Standard
1913 Perform hue rotation of color <color> (default bright red), by <step> steps.
1914  The number of steps per full rotation is given by absolute value of <steps>.
1915 \end_layout
1917 \begin_layout Standard
1918 If <steps> is negative, the rotation will be counterclockwise.
1919 \end_layout
1921 \begin_layout Subsubsection
1922 gui.screenshot(string filename)
1923 \end_layout
1925 \begin_layout Standard
1926 Saves a screenshot into specified file.
1927 \end_layout
1929 \begin_layout Subsubsection
1930 gui.renderq_new(number width, number height)
1931 \end_layout
1933 \begin_layout Standard
1934 Create render queue with specified reported size and return it.
1935 \end_layout
1937 \begin_layout Subsubsection
1938 gui.renderq_clear(RENDERQUEUE queue)
1939 \end_layout
1941 \begin_layout Standard
1942 Clear specified render queue.
1943 \end_layout
1945 \begin_layout Subsubsection
1946 gui.renderq_set(RENDERQUEUE queue)
1947 \end_layout
1949 \begin_layout Standard
1950 Switch to specified render queue.
1951  Use nil as queue to switch to default queue.
1952 \end_layout
1954 \begin_layout Itemize
1955 When switched to another queue, all drawing functions work and draw there,
1956  even outside on_video/on_paint.
1957 \end_layout
1959 \begin_layout Subsubsection
1960 gui.renderq_run(RENDERQUEUE queue)
1961 \end_layout
1963 \begin_layout Standard
1964 Run specified render queue, copying the objects to current render queue.
1966 \end_layout
1968 \begin_layout Itemize
1969 Warning: Don't try to run the current render queue.
1970 \end_layout
1972 \begin_layout Subsubsection
1973 gui.loadfont(string filename)
1974 \end_layout
1976 \begin_layout Standard
1977 Loads font from specified file (CUSTOMFONT object).
1978 \end_layout
1980 \begin_layout Subsubsection
1981 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc[, number
1982  hlc]]])
1983 \end_layout
1985 \begin_layout Standard
1986 Draw string with custom font to screen.
1987  The parameters are the same as in gui.text, except hlc is the halo color
1988  (default is no halo).
1990 \end_layout
1992 \begin_layout Subsection
1993 table input
1994 \end_layout
1996 \begin_layout Standard
1997 Input handling.
1998  Only available in on_input callback.
1999 \end_layout
2001 \begin_layout Subsubsection
2002 input.get(number controller, number index)
2003 \end_layout
2005 \begin_layout Standard
2006 Read the specified index (0-11) from specified controller (0-7).
2007  Notes:
2008 \end_layout
2010 \begin_layout Itemize
2011 Uses physical controller numbering.
2012  Gamepad in port 2 is controller 4, not 1!
2013 \end_layout
2015 \begin_layout Subsubsection
2016 input.set(number controller, number index, number value)
2017 \end_layout
2019 \begin_layout Standard
2020 Write the specified index (0-11) from specified controller (0-7), storing
2021  value.
2022  Notes:
2023 \end_layout
2025 \begin_layout Itemize
2026 Uses physical controller numbering.
2027  Gamepad in port 2 is controller 4, not 1!
2028 \end_layout
2030 \begin_layout Subsubsection
2031 input.get2(number port, number controller, number index)
2032 \end_layout
2034 \begin_layout Standard
2035 Read the specified input tuple.
2036 \end_layout
2038 \begin_layout Itemize
2039 Port 0 is system port.
2040 \end_layout
2042 \begin_layout Subsubsection
2043 input.set2(number port, number controller, number index, number value)
2044 \end_layout
2046 \begin_layout Standard
2047 Write the specified input tuple.
2048 \end_layout
2050 \begin_layout Itemize
2051 Port 0 is system port.
2052 \end_layout
2054 \begin_layout Subsubsection
2055 input.lcid_to_pcid2(number lcid)
2056 \end_layout
2058 \begin_layout Standard
2059 Look up physical pcid pair (port, controller) corresponding to specified
2060  logical controller (1-based).
2061  Returns nothing if controller does not exist.
2062 \end_layout
2064 \begin_layout Subsubsection
2065 input.port_type(number port)
2066 \end_layout
2068 \begin_layout Standard
2069 Return type of specified port.
2070 \end_layout
2072 \begin_layout Subsubsection
2073 input.controller_info(number port, number controller)
2074 \end_layout
2076 \begin_layout Standard
2077 Get controller info for specified controller.
2078  If controller does not exist, returns nil.
2079  Otherwise returns a table with following fields:
2080 \end_layout
2082 \begin_layout Itemize
2083 type (string): Type of the controller.
2084 \end_layout
2086 \begin_layout Itemize
2087 class (string): Class of the controller.
2088 \end_layout
2090 \begin_layout Itemize
2091 classnum (number): Number of the controller within its class (1-based)
2092 \end_layout
2094 \begin_layout Itemize
2095 lcid (number): Logical controller number of the controller.
2096 \end_layout
2098 \begin_layout Itemize
2099 button_count (number): Number of buttons on controller
2100 \end_layout
2102 \begin_layout Itemize
2103 buttons (array): Array of following info about each button:
2104 \end_layout
2106 \begin_deeper
2107 \begin_layout Itemize
2108 type (string): Type of button.
2109  Currently one of 
2110 \begin_inset Quotes eld
2111 \end_inset
2113 null
2114 \begin_inset Quotes erd
2115 \end_inset
2118 \begin_inset Quotes eld
2119 \end_inset
2121 button
2122 \begin_inset Quotes erd
2123 \end_inset
2126 \begin_inset Quotes eld
2127 \end_inset
2129 axis
2130 \begin_inset Quotes erd
2131 \end_inset
2134 \begin_inset Quotes eld
2135 \end_inset
2137 raxis
2138 \begin_inset Quotes erd
2139 \end_inset
2142 \end_layout
2144 \begin_layout Itemize
2145 name (string): Name of button.
2146 \end_layout
2148 \begin_layout Itemize
2149 symbol (string): Symbol of button.
2150  Only present for type 
2151 \begin_inset Quotes eld
2152 \end_inset
2154 button
2155 \begin_inset Quotes erd
2156 \end_inset
2159 \end_layout
2161 \begin_layout Itemize
2162 hidden (boolean): True if hidden button.
2164 \end_layout
2166 \end_deeper
2167 \begin_layout Subsubsection
2168 input.veto_button()
2169 \end_layout
2171 \begin_layout Standard
2172 Signals that the button event should be vetoed.
2173  Only valid in on_button callback.
2174 \end_layout
2176 \begin_layout Subsubsection
2177 input.geta(number controller)
2178 \end_layout
2180 \begin_layout Standard
2181 Get input state for entiere controller.
2182  Returns 13 return values.
2183 \end_layout
2185 \begin_layout Itemize
2186 1st return value: Bitmask: bit i is set if i:th index is nonzero
2187 \end_layout
2189 \begin_layout Itemize
2190 2nd-13th return value: value of i:th index.
2191 \end_layout
2193 \begin_layout Subsubsection
2194 input.seta(number controller, number bitmask, number args...)
2195 \end_layout
2197 \begin_layout Standard
2198 Set state for entiere controller.
2199  args is up to 12 values for indices (overriding values in bitmask if specified).
2200 \end_layout
2202 \begin_layout Subsubsection
2203 input.controllertype(number controller)
2204 \end_layout
2206 \begin_layout Standard
2207 Get the type of controller as string.
2208  Valid values are:
2209 \end_layout
2211 \begin_layout Itemize
2212 gamepad
2213 \end_layout
2215 \begin_layout Itemize
2216 mouse
2217 \end_layout
2219 \begin_layout Itemize
2220 justifier
2221 \end_layout
2223 \begin_layout Itemize
2224 superscope
2225 \end_layout
2227 \begin_layout Subsubsection
2228 input.reset([number cycles])
2229 \end_layout
2231 \begin_layout Standard
2232 Execute reset.
2233  If cycles is greater than zero, do delayed reset.
2234  0 (or no value) causes immediate reset.
2235 \end_layout
2237 \begin_layout Itemize
2238 Only available with subframe flag false.
2239 \end_layout
2241 \begin_layout Subsubsection
2242 input.raw()
2243 \end_layout
2245 \begin_layout Standard
2246 Returns table of tables of all available keys and axes.
2247  The first table is indexed by key name (platform-dependent!), and the inner
2248  table has the following fields:
2249 \end_layout
2251 \begin_layout Itemize
2252 value: Last reported value for control
2253 \end_layout
2255 \begin_deeper
2256 \begin_layout Itemize
2257 For keys: 1 for pressed, 0 for released.
2258 \end_layout
2260 \begin_layout Itemize
2261 For axes: -32767...32767.
2262 \end_layout
2264 \begin_layout Itemize
2265 For presure-sensitive buttons: 0...32767.
2266 \end_layout
2268 \begin_layout Itemize
2269 For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
2270 \end_layout
2272 \begin_layout Itemize
2273 For mouse: Coordinates relative to game area.
2274 \end_layout
2276 \end_deeper
2277 \begin_layout Itemize
2278 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2279  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2280 \end_layout
2282 \begin_layout Subsubsection
2283 input.keyhook(string key, boolean state)
2284 \end_layout
2286 \begin_layout Standard
2287 Requests that keyhook events to be sent for key (state=true) or not sent
2288  (state=false).
2289 \end_layout
2291 \begin_layout Subsubsection
2292 input.joyget(number controller)
2293 \end_layout
2295 \begin_layout Standard
2296 Returns table for current controls for specified controller.
2297  The names of fields vary by controller type.
2298 \end_layout
2300 \begin_layout Itemize
2301 The buttons have the same name as those are referred to in other contexts
2302  in the emulator
2303 \end_layout
2305 \begin_layout Itemize
2306 The analog axes are 
2307 \begin_inset Quotes eld
2308 \end_inset
2310 xaxis
2311 \begin_inset Quotes erd
2312 \end_inset
2314  and 
2315 \begin_inset Quotes eld
2316 \end_inset
2318 yaxis
2319 \begin_inset Quotes erd
2320 \end_inset
2323 \end_layout
2325 \begin_layout Subsubsection
2326 input.joyset(number controller, table controls)
2327 \end_layout
2329 \begin_layout Standard
2330 Set the the state of specified controller to values specified in specified
2331  table.
2332 \end_layout
2334 \begin_layout Subsubsection
2335 input.lcid_to_pcid(number controller)
2336 \end_layout
2338 \begin_layout Standard
2339 Return the physical index, physical port and controller number in port for
2340  specified (1-based) logical controller.
2341 \end_layout
2343 \begin_layout Subsection
2344 Table keyboard
2345 \end_layout
2347 \begin_layout Standard
2348 Various keybinding-related functions
2349 \end_layout
2351 \begin_layout Subsubsection
2352 keyboard.bind(string mod, string mask, string key, string cmd)
2353 \end_layout
2355 \begin_layout Standard
2356 Bind specified key with specified modifers to specified command.
2357 \end_layout
2359 \begin_layout Subsubsection
2360 keyboard.unbind(string mod, string mask, string key)
2361 \end_layout
2363 \begin_layout Standard
2364 Unbind specified key with specified modifers.
2365 \end_layout
2367 \begin_layout Itemize
2368 nil does not change value
2369 \end_layout
2371 \begin_layout Itemize
2372 true/false (buttons) and integers (axes) force value.
2373 \end_layout
2375 \begin_layout Itemize
2376 string (button) inverts the input.
2377 \end_layout
2379 \begin_layout Subsubsection
2380 keyboard.alias(string alias, string expansion)
2381 \end_layout
2383 \begin_layout Standard
2384 Set expansion of given command.
2385 \end_layout
2387 \begin_layout Subsection
2388 Table subtitle
2389 \end_layout
2391 \begin_layout Standard
2392 Subtitle handling
2393 \end_layout
2395 \begin_layout Subsubsection
2396 subtitle.byindex(number i)
2397 \end_layout
2399 \begin_layout Standard
2400 Read the frame and length of ith subtitle.
2401  Returns nothing if not present.
2402 \end_layout
2404 \begin_layout Subsubsection
2405 subtitle.set(number f, number l, string txt)
2406 \end_layout
2408 \begin_layout Standard
2409 Set the text of subtitle.
2410 \end_layout
2412 \begin_layout Subsubsection
2413 subtitle.get(number f, number l)
2414 \end_layout
2416 \begin_layout Standard
2417 Get the text of subtitle.
2418 \end_layout
2420 \begin_layout Subsubsection
2421 subtitle.delete(number f, number l)
2422 \end_layout
2424 \begin_layout Standard
2425 Delete specified subtitle.
2426 \end_layout
2428 \begin_layout Subsection
2429 Table hostmemory
2430 \end_layout
2432 \begin_layout Standard
2433 Host memory handling (extra memory saved to savestates).
2434  Host memory starts empty.
2435 \end_layout
2437 \begin_layout Subsubsection
2438 hostmemory.read(number address)
2439 \end_layout
2441 \begin_layout Standard
2442 Reads hostmemory slot address.
2443  Slot numbers out of range return false instead of numeric.
2444 \end_layout
2446 \begin_layout Subsubsection
2447 hostmemory.write(number address, number value)
2448 \end_layout
2450 \begin_layout Standard
2451 Writes hostmemory slot with 0-255.
2452  Slot numbers out of range cause extension of host memory slot space.
2453 \end_layout
2455 \begin_layout Subsubsection
2456 hostmemory.readbyte(number address)
2457 \end_layout
2459 \begin_layout Standard
2460 Read unsigned byte (1 element) from given address.
2461  Slots out of range return false.
2462 \end_layout
2464 \begin_layout Subsubsection
2465 hostmemory.writebyte(number address, number value)
2466 \end_layout
2468 \begin_layout Standard
2469 Write unsigned byte (1 element) to given slot.
2470  Slot numbers out of range cause extension.
2471 \end_layout
2473 \begin_layout Subsubsection
2474 hostmemory.readsbyte(number address)
2475 \end_layout
2477 \begin_layout Standard
2478 Read signed byte (1 element) from given address.
2479  Slots out of range return false.
2480 \end_layout
2482 \begin_layout Subsubsection
2483 hostmemory.writesbyte(number address, number value)
2484 \end_layout
2486 \begin_layout Standard
2487 Write signed byte (1 element) to given slot.
2488  Slot numbers out of range cause extension.
2489 \end_layout
2491 \begin_layout Subsubsection
2492 hostmemory.readword(number address)
2493 \end_layout
2495 \begin_layout Standard
2496 Read unsigned word (2 elements) from given address.
2497  Slots out of range return false.
2498 \end_layout
2500 \begin_layout Subsubsection
2501 hostmemory.writeword(number address, number value)
2502 \end_layout
2504 \begin_layout Standard
2505 Write unsigned word (2 elements) to given slot.
2506  Slot numbers out of range cause extension.
2507 \end_layout
2509 \begin_layout Subsubsection
2510 hostmemory.readsword(number address)
2511 \end_layout
2513 \begin_layout Standard
2514 Read signed word (2 elements) from given address.
2515  Slots out of range return false.
2516 \end_layout
2518 \begin_layout Subsubsection
2519 hostmemory.writesword(number address, number value)
2520 \end_layout
2522 \begin_layout Standard
2523 Write signed word (2 elements) to given slot.
2524  Slot numbers out of range cause extension.
2525 \end_layout
2527 \begin_layout Subsubsection
2528 hostmemory.readdword(number address)
2529 \end_layout
2531 \begin_layout Standard
2532 Read unsigned doubleword (4 elements) from given address.
2533  Slots out of range return false.
2534 \end_layout
2536 \begin_layout Subsubsection
2537 hostmemory.writedword(number address, number value)
2538 \end_layout
2540 \begin_layout Standard
2541 Write unsigned doubleword (4 elements) to given slot.
2542  Slot numbers out of range cause extension.
2543 \end_layout
2545 \begin_layout Subsubsection
2546 hostmemory.readsdword(number address)
2547 \end_layout
2549 \begin_layout Standard
2550 Read signed doubleword (4 elements) from given address.
2551  Slots out of range return false.
2552 \end_layout
2554 \begin_layout Subsubsection
2555 hostmemory.writesdword(number address, number value)
2556 \end_layout
2558 \begin_layout Standard
2559 Write signed doubleword (4 elements) to given slot.
2560  Slot numbers out of range cause extension.
2561 \end_layout
2563 \begin_layout Subsubsection
2564 hostmemory.readqword(number address)
2565 \end_layout
2567 \begin_layout Standard
2568 Read unsigned quadword (8 elements) from given address.
2569  Slots out of range return false.
2570 \end_layout
2572 \begin_layout Subsubsection
2573 hostmemory.writeqword(number address, number value)
2574 \end_layout
2576 \begin_layout Standard
2577 Write unsigned quadword (4 elements) to given slot.
2578  Slot numbers out of range cause extension.
2579 \end_layout
2581 \begin_layout Subsubsection
2582 hostmemory.readsqword(number address)
2583 \end_layout
2585 \begin_layout Standard
2586 Read signed quadword (8 elements) from given address.
2587  Slots out of range return false.
2588 \end_layout
2590 \begin_layout Subsubsection
2591 hostmemory.writesqword(number address, number value)
2592 \end_layout
2594 \begin_layout Standard
2595 Write signed quadword (8 elements) to given slot.
2596  Slot numbers out of range cause extension.
2597 \end_layout
2599 \begin_layout Subsection
2600 Table movie
2601 \end_layout
2603 \begin_layout Standard
2604 Movie handling
2605 \end_layout
2607 \begin_layout Subsubsection
2608 movie.currentframe()
2609 \end_layout
2611 \begin_layout Standard
2612 Return number of current frame.
2613 \end_layout
2615 \begin_layout Subsubsection
2616 movie.framecount()
2617 \end_layout
2619 \begin_layout Standard
2620 Return number of frames in movie.
2621 \end_layout
2623 \begin_layout Subsubsection
2624 movie.readonly()
2625 \end_layout
2627 \begin_layout Standard
2628 Return true if in readonly mode, false if in readwrite.
2629 \end_layout
2631 \begin_layout Subsubsection
2632 movie.rerecords()
2633 \end_layout
2635 \begin_layout Standard
2636 Returns the current value of rerecord count.
2637 \end_layout
2639 \begin_layout Subsubsection
2640 movie.set_readwrite()
2641 \end_layout
2643 \begin_layout Standard
2644 Set readwrite mode (does not cause on_readwrite callback).
2645 \end_layout
2647 \begin_layout Subsubsection
2648 movie.frame_subframes(number frame)
2649 \end_layout
2651 \begin_layout Standard
2652 Count number of subframes in specified frame (frame numbers are 1-based)
2653  and return that.
2654 \end_layout
2656 \begin_layout Subsubsection
2657 movie.read_subframes(number frame, number subframe)
2658 \end_layout
2660 \begin_layout Standard
2661 Read specifed subframe in specified frame and return data as array (100
2662  elements, numbered 0-99 currently).
2663 \end_layout
2665 \begin_layout Subsubsection
2666 movie.read_rtc()
2667 \end_layout
2669 \begin_layout Standard
2670 Returns the current value of the RTC as a pair (second, subsecond).
2671 \end_layout
2673 \begin_layout Subsubsection
2674 movie.unsafe_rewind([UNSAFEREWIND state])
2675 \end_layout
2677 \begin_layout Standard
2678 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2679 \end_layout
2681 \begin_layout Itemize
2682 If called without argument, causes emulator to start process of setting
2683  unsafe rewind point.
2684  When this has finished, callback on_set_rewind occurs, passing the rewind
2685  state to lua script.
2686 \end_layout
2688 \begin_layout Itemize
2689 If called with argument, causes emulator rewind to passed rewind point as
2690  soon as possible.
2691  Readwrite mode is implicitly activated.
2692 \end_layout
2694 \begin_layout Standard
2695 The following warnings apply to unsafe rewinding:
2696 \end_layout
2698 \begin_layout Itemize
2699 There are no safety checks against misuse (that's what 
2700 \begin_inset Quotes eld
2701 \end_inset
2703 unsafe
2704 \begin_inset Quotes erd
2705 \end_inset
2707  comes from)!
2708 \end_layout
2710 \begin_layout Itemize
2711 Only call rewind from timeline rewind point was set from.
2712 \end_layout
2714 \begin_layout Itemize
2715 Only call rewind from after the rewind point was set.
2716 \end_layout
2718 \begin_layout Subsection
2719 Table settings
2720 \end_layout
2722 \begin_layout Standard
2723 Routines for settings manipulation
2724 \end_layout
2726 \begin_layout Subsubsection
2727 settings.get(string name)
2728 \end_layout
2730 \begin_layout Standard
2731 Get value of setting.
2732  If setting is blank, returns false.
2733  If setting value can't be obtained, returns (nil, error message).
2734 \end_layout
2736 \begin_layout Subsubsection
2737 settings.set(string name, string value)
2738 \end_layout
2740 \begin_layout Standard
2741 Set value of setting.
2742  If setting can't be set, returns (nil, error message).
2743 \end_layout
2745 \begin_layout Subsubsection
2746 settings.is_set(string name)
2747 \end_layout
2749 \begin_layout Standard
2750 Returns if setting is set.
2751  If setting does not exist, returns (nil, error message).
2752 \end_layout
2754 \begin_layout Subsubsection
2755 settings.blank(string name)
2756 \end_layout
2758 \begin_layout Standard
2759 Blanks a setting and returns true.
2760  If setting can't be blanked, returns (nil, error message).
2761 \end_layout
2763 \begin_layout Subsection
2764 Table memory
2765 \end_layout
2767 \begin_layout Standard
2768 Contains various functions for managing memory
2769 \end_layout
2771 \begin_layout Subsubsection
2772 memory.vma_count()
2773 \end_layout
2775 \begin_layout Standard
2776 Returns the number of VMAs
2777 \end_layout
2779 \begin_layout Subsubsection
2780 memory.read_vma(number index)
2781 \end_layout
2783 \begin_layout Standard
2784 Reads the specified VMA (indices start from zero).
2785  Trying to read invalid VMA gives nil.
2786  The read VMA is table with the following fields:
2787 \end_layout
2789 \begin_layout Itemize
2790 region_name (string): The readable name of the VMA
2791 \end_layout
2793 \begin_layout Itemize
2794 baseaddr (number): Base address of the VMA
2795 \end_layout
2797 \begin_layout Itemize
2798 lastaddr (number): Last address in the VMA.
2799 \end_layout
2801 \begin_layout Itemize
2802 size (number): The size of VMA in bytes.
2803 \end_layout
2805 \begin_layout Itemize
2806 readonly (boolean): True of the VMA corresponds to ROM.
2807 \end_layout
2809 \begin_layout Itemize
2810 iospace (boolean): True if the VMA is I/O space.
2811 \end_layout
2813 \begin_layout Itemize
2814 native_endian (boolean): True if the VMA has native endian as opposed to
2815  little endian.
2816 \end_layout
2818 \begin_layout Subsubsection
2819 memory.find_vma(number address)
2820 \end_layout
2822 \begin_layout Standard
2823 Finds the VMA containing specified address.
2824  Returns table in the same format as read_vma or nil if not found.
2825 \end_layout
2827 \begin_layout Subsubsection
2828 memory.readbyte(number address)
2829 \end_layout
2831 \begin_layout Standard
2832 Reads the specified address as unsigned byte and returns the result.
2833 \end_layout
2835 \begin_layout Subsubsection
2836 memory.readsbyte(number address)
2837 \end_layout
2839 \begin_layout Standard
2840 Reads the specified address as signed byte and returns the result.
2841 \end_layout
2843 \begin_layout Subsubsection
2844 memory.writebyte(number address, number value)
2845 \end_layout
2847 \begin_layout Standard
2848 Writes the specified value (negative values undergo 2's complement) to specified
2849  address (as a byte).
2850 \end_layout
2852 \begin_layout Subsubsection
2853 memory.readword(number address)
2854 \end_layout
2856 \begin_layout Standard
2857 Reads the specified address as unsigned word and returns the result.
2858 \end_layout
2860 \begin_layout Subsubsection
2861 memory.readsword(number address)
2862 \end_layout
2864 \begin_layout Standard
2865 Reads the specified address as signed word and returns the result.
2866 \end_layout
2868 \begin_layout Subsubsection
2869 memory.writeword(number address, number value)
2870 \end_layout
2872 \begin_layout Standard
2873 Writes the specified value (negative values undergo 2's complement) to specified
2874  address (as a word).
2875 \end_layout
2877 \begin_layout Subsubsection
2878 memory.readdword(number address)
2879 \end_layout
2881 \begin_layout Standard
2882 Reads the specified address as unsigned doubleword and returns the result.
2883 \end_layout
2885 \begin_layout Subsubsection
2886 memory.readsdword(number address)
2887 \end_layout
2889 \begin_layout Standard
2890 Reads the specified address as signed doubleword and returns the result.
2891 \end_layout
2893 \begin_layout Subsubsection
2894 memory.writedword(number address, number value)
2895 \end_layout
2897 \begin_layout Standard
2898 Writes the specified value (negative values undergo 2's complement) to specified
2899  address (as a doubleword).
2900 \end_layout
2902 \begin_layout Subsubsection
2903 memory.readqword(number address)
2904 \end_layout
2906 \begin_layout Standard
2907 Reads the specified address as unsigned quadword and returns the result.
2908 \end_layout
2910 \begin_layout Subsubsection
2911 memory.readsqword(number address)
2912 \end_layout
2914 \begin_layout Standard
2915 Reads the specified address as signed quadword and returns the result.
2916 \end_layout
2918 \begin_layout Subsubsection
2919 memory.writeqword(number address, number value)
2920 \end_layout
2922 \begin_layout Standard
2923 Writes the specified value (negative values undergo 2's complement) to specified
2924  address (as a quadword).
2925 \end_layout
2927 \begin_layout Subsubsection
2928 memory.hash_region(number base, number size)
2929 \end_layout
2931 \begin_layout Standard
2932 Hash specified number of bytes starting from specified address and return
2933  the SHA-256.
2934 \end_layout
2936 \begin_layout Subsubsection
2937 memory.hash_state()
2938 \end_layout
2940 \begin_layout Standard
2941 Hash the current system state.
2942  Mainly useful for debugging savestates.
2943 \end_layout
2945 \begin_layout Subsubsection
2946 memory.readregion(number base, number size)
2947 \end_layout
2949 \begin_layout Standard
2950 Read a region of memory.
2951 \end_layout
2953 \begin_layout Itemize
2954 Warning: If the region crosses VMA boundary, the results are undefined.
2955 \end_layout
2957 \begin_layout Subsubsection
2958 memory.map<type>([number base, number size])
2959 \end_layout
2961 \begin_layout Standard
2962 Returns a table mapping specified memory aperture for read/write.
2963  If parameters are omitted, entiere map space is the aperture.
2964 \end_layout
2966 \begin_layout Itemize
2967 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2968 \end_layout
2970 \begin_layout Subsubsection
2971 memory.writeregion(number base, number size, table data)
2972 \end_layout
2974 \begin_layout Standard
2975 Write a region of memory.
2976 \end_layout
2978 \begin_layout Itemize
2979 Warning: If the region crosses VMA boundary, the results are undefined.
2980 \end_layout
2982 \begin_layout Subsubsection
2983 memory.map_structure()
2984 \end_layout
2986 \begin_layout Standard
2987 Returns a new mapping structure (MMAP_STRUCT)
2988 \end_layout
2990 \begin_layout Subsubsection
2991 MMAP_STRUCT(string key, number address, string type)
2992 \end_layout
2994 \begin_layout Standard
2995 Bind key in mmap structure to specified address with specified type.
2996 \end_layout
2998 \begin_layout Itemize
2999 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3000 \end_layout
3002 \begin_layout Subsubsection
3003 memory.read_expr(string expr)
3004 \end_layout
3006 \begin_layout Standard
3007 Evaluate specified watch expression and return result
3008 \end_layout
3010 \begin_layout Subsection
3011 Table subtitle
3012 \end_layout
3014 \begin_layout Standard
3015 Contains functions for manipulating subtitles.
3016 \end_layout
3018 \begin_layout Subsubsection
3019 subtitle.byindex(number index)
3020 \end_layout
3022 \begin_layout Standard
3023 Get (basetime, length) pair of specified subtitle index or nothing if index
3024  isn't valid.
3025 \end_layout
3027 \begin_layout Subsubsection
3028 subtitle.get(number basetime, number length)
3029 \end_layout
3031 \begin_layout Standard
3032 Read the specified subtitle.
3033  Returns 
3034 \begin_inset Quotes eld
3035 \end_inset
3038 \begin_inset Quotes erd
3039 \end_inset
3041  if the subtitle does not exist.
3042 \end_layout
3044 \begin_layout Subsubsection
3045 subtitle.set(number basetime, number length, string content)
3046 \end_layout
3048 \begin_layout Standard
3049 Set the specified subtitle.
3050 \end_layout
3052 \begin_layout Subsubsection
3053 subtitle.deltete(number basetime, number length)
3054 \end_layout
3056 \begin_layout Standard
3057 Delete the specified subtitle.
3058 \end_layout
3060 \begin_layout Subsection
3061 Table _SYSTEM
3062 \end_layout
3064 \begin_layout Standard
3065 Contains copy of global variables from time of Lua initialization.
3066  Non-writeable.
3067 \end_layout
3069 \begin_layout Subsection
3070 Callbacks
3071 \end_layout
3073 \begin_layout Standard
3074 Various callbacks to Lua that can occur.
3075 \end_layout
3077 \begin_layout Subsubsection
3078 Callback: on_paint(bool not_synth)
3079 \end_layout
3081 \begin_layout Standard
3082 Called when screen is being painted.
3083  Any gui.* calls requiring graphic context draw on the screen.
3084 \end_layout
3086 \begin_layout Standard
3087 not_synth is true if this hook is being called in response to received frame,
3088  false otherwise.
3089 \end_layout
3091 \begin_layout Subsubsection
3092 Callback: on_video()
3093 \end_layout
3095 \begin_layout Standard
3096 Called when video dump frame is being painted.
3097  Any gui.* calls requiring graphic context draw on the video.
3098 \end_layout
3100 \begin_layout Subsubsection
3101 Callback: on_frame_emulated()
3102 \end_layout
3104 \begin_layout Standard
3105 Called when emulating frame has completed and on_paint()/on_video() calls
3106  are about to be issued.
3107 \end_layout
3109 \begin_layout Subsubsection
3110 Callback: on_frame()
3111 \end_layout
3113 \begin_layout Standard
3114 Called on each starting whole frame.
3115 \end_layout
3117 \begin_layout Subsubsection
3118 Callback: on_startup()
3119 \end_layout
3121 \begin_layout Standard
3122 Called when the emulator is starting (lsnes.rc and --run files has been run).
3123 \end_layout
3125 \begin_layout Subsubsection
3126 Callback: on_rewind()
3127 \end_layout
3129 \begin_layout Standard
3130 Called when rewind movie to beginning has completed.
3131 \end_layout
3133 \begin_layout Subsubsection
3134 Callback: on_pre_load(string name)
3135 \end_layout
3137 \begin_layout Standard
3138 Called just before savestate/movie load occurs (note: loads are always delayed,
3139  so this occurs even when load was initiated by lua).
3140 \end_layout
3142 \begin_layout Subsubsection
3143 Callback: on_err_load(string name)
3144 \end_layout
3146 \begin_layout Standard
3147 Called if loadstate goes wrong.
3148 \end_layout
3150 \begin_layout Subsubsection
3151 Callback: on_post_load(string name, boolean was_savestate)
3152 \end_layout
3154 \begin_layout Standard
3155 Called on successful loadstate.
3156  was_savestate gives if this was a savestate or a movie.
3157 \end_layout
3159 \begin_layout Subsubsection
3160 Callback: on_pre_save(string name, boolean is_savestate)
3161 \end_layout
3163 \begin_layout Standard
3164 Called just before savestate save occurs (note: movie saves are synchronous
3165  and won't trigger these callbacks if called from Lua).
3166 \end_layout
3168 \begin_layout Subsubsection
3169 Callback: on_err_save(string name)
3170 \end_layout
3172 \begin_layout Standard
3173 Called if savestate goes wrong.
3174 \end_layout
3176 \begin_layout Subsubsection
3177 Callback: on_post_save(string name, boolean is_savestate)
3178 \end_layout
3180 \begin_layout Standard
3181 Called on successful savaestate.
3182  is_savestate gives if this was a savestate or a movie.
3183 \end_layout
3185 \begin_layout Subsubsection
3186 Callback: on_quit()
3187 \end_layout
3189 \begin_layout Standard
3190 Called when emulator is shutting down.
3191 \end_layout
3193 \begin_layout Subsubsection
3194 Callback: on_input(boolean subframe)
3195 \end_layout
3197 \begin_layout Standard
3198 Called when emulator is just sending input to bsnes core.
3199  Warning: This is called even in readonly mode, but the results are ignored.
3200 \end_layout
3202 \begin_layout Subsubsection
3203 Callback: on_reset()
3204 \end_layout
3206 \begin_layout Standard
3207 Called when SNES is reset.
3208 \end_layout
3210 \begin_layout Subsubsection
3211 Callback: on_readwrite()
3212 \end_layout
3214 \begin_layout Standard
3215 Called when moving into readwrite mode as result of 
3216 \begin_inset Quotes eld
3217 \end_inset
3219 set-rwmode
3220 \begin_inset Quotes erd
3221 \end_inset
3223  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3224  entry protection).
3225 \end_layout
3227 \begin_layout Subsubsection
3228 Callback: on_snoop(number port, number controller, number index, number
3229  value)
3230 \end_layout
3232 \begin_layout Standard
3233 Called each time bsnes asks for input.
3234  The value is the final value to be sent to bsnes core (readonly mode, autohold
3235  and autofire have been taken into account).
3236  Might be useful when translating movies to format suitable for console
3237  verification.
3238  Note: There is no way to modify the value to be sent.
3239 \end_layout
3241 \begin_layout Itemize
3242 Not called if callback on_snoop2 is defined.
3243 \end_layout
3245 \begin_layout Subsubsection
3246 Callback: on_snoop2(number port, number controller, number index, number
3247  value)
3248 \end_layout
3250 \begin_layout Standard
3251 Like on_snoop, but reserves port 0 for system, having first user port be
3252  port 1.
3253 \end_layout
3255 \begin_layout Subsubsection
3256 Callback: on_keyhook(string keyname, table state)
3257 \end_layout
3259 \begin_layout Standard
3260 Sent when key that has keyhook events requested changes state.
3261  Keyname is name of the key (group) and state is the state (same kind as
3262  table values in input.raw).
3263 \end_layout
3265 \begin_layout Subsubsection
3266 Callback: on_idle()
3267 \end_layout
3269 \begin_layout Standard
3270 Called when requested by set_idle_timeout(), the timeout has expired and
3271  emulator is waiting.
3272 \end_layout
3274 \begin_layout Subsubsection
3275 Callback: on_timer()
3276 \end_layout
3278 \begin_layout Standard
3279 Called when requested by set_idle_timeout() and the timeout has expired
3280  (regardless if emulator is waiting).
3281 \end_layout
3283 \begin_layout Subsubsection
3284 Callback: on_set_rewind(UNSAFEREWIND r)
3285 \end_layout
3287 \begin_layout Standard
3288 Called when unsafe rewind object has been constructed.
3289 \end_layout
3291 \begin_layout Subsubsection
3292 Callback: on_pre_rewind() 
3293 \end_layout
3295 \begin_layout Standard
3296 Called just before unsafe rewind is about to occur.
3297 \end_layout
3299 \begin_layout Subsubsection
3300 Callback: on_post_rewind() 
3301 \end_layout
3303 \begin_layout Standard
3304 Called just after unsafe rewind has occured.
3305 \end_layout
3307 \begin_layout Subsubsection
3308 Callback: on_button(number port, number controller, number index, string
3309  type)
3310 \end_layout
3312 \begin_layout Standard
3313 Called on controller button press, with following parameters:
3314 \end_layout
3316 \begin_layout Itemize
3317 port: Port number (0 is system)
3318 \end_layout
3320 \begin_layout Itemize
3321 controller: Controller within port
3322 \end_layout
3324 \begin_layout Itemize
3325 index: Index of button.
3326 \end_layout
3328 \begin_layout Itemize
3329 type: Type of event, one of:
3330 \end_layout
3332 \begin_deeper
3333 \begin_layout Itemize
3334 \begin_inset Quotes eld
3335 \end_inset
3337 pressed
3338 \begin_inset Quotes erd
3339 \end_inset
3341 : Button was pressed.
3342 \end_layout
3344 \begin_layout Itemize
3345 \begin_inset Quotes eld
3346 \end_inset
3348 released
3349 \begin_inset Quotes erd
3350 \end_inset
3352 : Button was released.
3353 \end_layout
3355 \begin_layout Itemize
3356 \begin_inset Quotes eld
3357 \end_inset
3359 hold
3360 \begin_inset Quotes erd
3361 \end_inset
3363 : Held.
3364 \end_layout
3366 \begin_layout Itemize
3367 \begin_inset Quotes eld
3368 \end_inset
3370 unhold
3371 \begin_inset Quotes erd
3372 \end_inset
3374 : Released from hold.
3375 \end_layout
3377 \begin_layout Itemize
3378 \begin_inset Quotes eld
3379 \end_inset
3381 type
3382 \begin_inset Quotes erd
3383 \end_inset
3385 : Typing input on button.
3386 \end_layout
3388 \begin_layout Itemize
3389 \begin_inset Quotes eld
3390 \end_inset
3392 untype
3393 \begin_inset Quotes erd
3394 \end_inset
3396 : Typing input undone.
3397 \end_layout
3399 \begin_layout Itemize
3400 \begin_inset Quotes eld
3401 \end_inset
3403 autofire <duty> <cycle>
3404 \begin_inset Quotes erd
3405 \end_inset
3407 : Autofire with specifie duty and cycle.
3408 \end_layout
3410 \begin_layout Itemize
3411 \begin_inset Quotes eld
3412 \end_inset
3414 autofire
3415 \begin_inset Quotes erd
3416 \end_inset
3418 : Stop autofire.
3419 \end_layout
3421 \begin_layout Itemize
3422 \begin_inset Quotes eld
3423 \end_inset
3425 analog
3426 \begin_inset Quotes erd
3427 \end_inset
3429 : Analog action on axis.
3430 \end_layout
3432 \end_deeper
3433 \begin_layout Section
3434 Movie editor
3435 \end_layout
3437 \begin_layout Itemize
3438 The editor edits in-memory movie.
3439 \end_layout
3441 \begin_layout Itemize
3442 Because past can't be edited and readwrite mode doesn't allow future, editing
3443  only works in 
3444 \emph on
3445 read only
3446 \emph default
3447  mode.
3448 \end_layout
3450 \begin_layout Itemize
3451 Keyboard triggers the normal hotkeys and bindings.
3452 \end_layout
3454 \begin_layout Subsection
3455 Left button actions
3456 \end_layout
3458 \begin_layout Itemize
3459 Clicking on cell in future (indicated by lack of redish background) toggles
3460  it (if it is a button) or prompts for a value (if it is an axis)
3461 \end_layout
3463 \begin_layout Itemize
3464 Dragging vertically toggles sequence of buttons or changes a sequence of
3465  axis values.
3466 \end_layout
3468 \begin_layout Subsection
3469 Right button actions
3470 \end_layout
3472 \begin_layout Standard
3473 The right mouse button pops up a context-sensitive menu:
3474 \end_layout
3476 \begin_layout Itemize
3477 Toggle <something>: Toggle this button
3478 \end_layout
3480 \begin_layout Itemize
3481 Change <something>: Change this axis value
3482 \end_layout
3484 \begin_layout Itemize
3485 Insert frame after: Insert a frame after this frame
3486 \end_layout
3488 \begin_layout Itemize
3489 Append frame: Append a frame to movie
3490 \end_layout
3492 \begin_layout Itemize
3493 Append frames: Append specified number of frames to movie
3494 \end_layout
3496 \begin_layout Itemize
3497 Delete frame: Delete this frame
3498 \end_layout
3500 \begin_layout Itemize
3501 Delete subframe: Delete this subframe
3502 \end_layout
3504 \begin_layout Itemize
3505 Truncate movie: Delete this subframe and everything after it.
3506 \end_layout
3508 \begin_layout Itemize
3509 Scroll to frame: Prompt for a frame and scroll the display to that frame.
3510 \end_layout
3512 \begin_layout Itemize
3513 Scroll to current frame: Scroll the display to current position
3514 \end_layout
3516 \begin_layout Itemize
3517 Run to frame: Prompts for frame and runs the emulation to that frame.
3518 \end_layout
3520 \begin_layout Itemize
3521 Change number of lines visible: Change the height of the movie display (1
3522  to 255).
3523 \end_layout
3525 \begin_layout Itemize
3526 Lock scroll to playback: While playing back or rewinding movies, the display
3527  will follow if enabled.
3528 \end_layout
3530 \begin_layout Section
3531 Memory watch expression syntax
3532 \end_layout
3534 \begin_layout Standard
3535 Memory watch expressions are in RPN (Reverse Polish Notation).
3536  At the end of expression, the top entry on stack is taken as the final
3537  result.
3538 \end_layout
3540 \begin_layout Standard
3541 Notations:
3542 \end_layout
3544 \begin_layout Itemize
3545 Evaluation order is strictly left to right.
3546 \end_layout
3548 \begin_layout Itemize
3549 a is the entry on top of stack
3550 \end_layout
3552 \begin_layout Itemize
3553 b is the entry immediately below top of stack
3554 \end_layout
3556 \begin_layout Itemize
3557 ; separates values to be pushed (no intermediate pop).
3558 \end_layout
3560 \begin_layout Itemize
3561 After end of element, all used stack slots are popped and all results are
3562  pushed.
3563 \end_layout
3565 \begin_layout Itemize
3566 When pushing multiple values, the pushes occur in order shown.
3567 \end_layout
3569 \begin_layout Standard
3570 The following operators are available:
3571 \end_layout
3573 \begin_layout Itemize
3574 + : a + b
3575 \end_layout
3577 \begin_layout Itemize
3578 - : a - b
3579 \end_layout
3581 \begin_layout Itemize
3582 * : a * b
3583 \end_layout
3585 \begin_layout Itemize
3586 / : a / b
3587 \end_layout
3589 \begin_layout Itemize
3590 % : a % b
3591 \end_layout
3593 \begin_layout Itemize
3594 a : atan(a)
3595 \end_layout
3597 \begin_layout Itemize
3598 b : read_signed_byte(a)
3599 \end_layout
3601 \begin_layout Itemize
3602 c : cos(a)
3603 \end_layout
3605 \begin_layout Itemize
3606 d : read_signed_dword(a)
3607 \end_layout
3609 \begin_layout Itemize
3610 i : quotent(a / b)
3611 \end_layout
3613 \begin_layout Itemize
3614 p :
3615 \begin_inset Formula $\pi$
3616 \end_inset
3619 \end_layout
3621 \begin_layout Itemize
3622 q : read_signed_qword(a)
3623 \end_layout
3625 \begin_layout Itemize
3626 r : sqrt(a)
3627 \end_layout
3629 \begin_layout Itemize
3630 s : sin(a)
3631 \end_layout
3633 \begin_layout Itemize
3634 t : tan(a)
3635 \end_layout
3637 \begin_layout Itemize
3638 u : a; a
3639 \end_layout
3641 \begin_layout Itemize
3642 w : read_signed_word(a)
3643 \end_layout
3645 \begin_layout Itemize
3646 A : atan2(a, b)
3647 \end_layout
3649 \begin_layout Itemize
3650 B : read_unsigned_byte(a)
3651 \end_layout
3653 \begin_layout Itemize
3654 C<number>z : Push number <number> to stack.
3655 \end_layout
3657 \begin_layout Itemize
3658 D : read_unsigned_dword(a)
3659 \end_layout
3661 \begin_layout Itemize
3662 C0x<number>z : Push number <number> (hexadecimal) to stack.
3663 \end_layout
3665 \begin_layout Itemize
3666 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
3667  for 10-16 digits).
3668 \end_layout
3670 \begin_layout Itemize
3671 Q : read_unsigned_qword(a)
3672 \end_layout
3674 \begin_layout Itemize
3675 R<digit> : round a to <digit> digits.
3676 \end_layout
3678 \begin_layout Itemize
3679 W : read_unsigned_word(a)
3680 \end_layout
3682 \begin_layout Subsection
3683 Example:
3684 \end_layout
3686 \begin_layout Standard
3687 C0x007e0878zWC0x007e002czW-
3688 \end_layout
3690 \begin_layout Enumerate
3691 Push value 0x7e0878 on top of stack (C0x007e0878z).
3692 \end_layout
3694 \begin_layout Enumerate
3695 Pop the value on top of stack (0x7e0878), read word value at that address
3696  and push the result,call it x1 (W).
3697 \end_layout
3699 \begin_layout Enumerate
3700 Push value 0x7e002c on top of stack (C0x007e002cz).
3701 \end_layout
3703 \begin_layout Enumerate
3704 Pop the value on top of stack (0x7e002c), read word value at that address
3705  and push the result,call it x2 (W).
3706 \end_layout
3708 \begin_layout Enumerate
3709 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3710  x2 - x1 (-).
3711 \end_layout
3713 \begin_layout Enumerate
3714 Since the expression ends, the final memory watch result is the top one
3715  on stack, which is x2 - x1.
3716 \end_layout
3718 \begin_layout Section
3719 Modifier and key names:
3720 \end_layout
3722 \begin_layout Subsection
3723 wxWidgets platform
3724 \end_layout
3726 \begin_layout Subsubsection
3727 Modifier names:
3728 \end_layout
3730 \begin_layout Standard
3731 Following modifier names are known:
3732 \end_layout
3734 \begin_layout Itemize
3736 \end_layout
3738 \begin_layout Itemize
3739 ctrl
3740 \end_layout
3742 \begin_layout Itemize
3743 shift 
3744 \end_layout
3746 \begin_layout Itemize
3747 meta
3748 \end_layout
3750 \begin_layout Itemize
3751 cmd (Mac OS X only)
3752 \end_layout
3754 \begin_layout Subsubsection
3755 Key names:
3756 \end_layout
3758 \begin_layout Standard
3759 Following key names are known:
3760 \end_layout
3762 \begin_layout Itemize
3763 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3764  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3765  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3766  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3767  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3768  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3769  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3770  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3771  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3772  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3773  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3774  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3775  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3776  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3777  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3778  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3779  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3780  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3781  windows_right, windows_menu, command, special1, special2, special3, special4,
3782  special5, special6, special7, special8, special9, special10, special11,
3783  special12, special13, special14, special15, special16, special17, special18,
3784  special19, special20
3785 \end_layout
3787 \begin_layout Section
3788 Movie file format
3789 \end_layout
3791 \begin_layout Standard
3792 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3793  (note: If you recompress it, do not use compression methods other than
3794  store and deflate and especially do not use encryption of any kind).
3795 \end_layout
3797 \begin_layout Subsection
3798 Detecting clean start/SRAM/Savestate
3799 \end_layout
3801 \begin_layout Itemize
3802 If file has member 
3803 \begin_inset Quotes eld
3804 \end_inset
3806 savestate
3807 \begin_inset Quotes erd
3808 \end_inset
3810  it is savestate, otherwise:
3811 \end_layout
3813 \begin_layout Itemize
3814 If file has members with names starting 
3815 \begin_inset Quotes eld
3816 \end_inset
3818 moviesram.
3819 \begin_inset Quotes erd
3820 \end_inset
3822  it is movie starting from SRAM, otherwise:
3823 \end_layout
3825 \begin_layout Itemize
3826 It is movie starting from clear state.
3827 \end_layout
3829 \begin_layout Subsection
3830 Member: gametype
3831 \end_layout
3833 \begin_layout Standard
3834 Type of game ROM and region (as one line).
3835  Valid values are:
3836 \end_layout
3838 \begin_layout Standard
3839 \begin_inset Tabular
3840 <lyxtabular version="3" rows="8" columns="3">
3841 <features tabularvalignment="middle">
3842 <column alignment="center" valignment="top" width="0">
3843 <column alignment="center" valignment="top" width="0">
3844 <column alignment="center" valignment="top" width="0">
3845 <row>
3846 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3847 \begin_inset Text
3849 \begin_layout Plain Layout
3850 Value
3851 \end_layout
3853 \end_inset
3854 </cell>
3855 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3856 \begin_inset Text
3858 \begin_layout Plain Layout
3859 System
3860 \end_layout
3862 \end_inset
3863 </cell>
3864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3865 \begin_inset Text
3867 \begin_layout Plain Layout
3868 Region
3869 \end_layout
3871 \end_inset
3872 </cell>
3873 </row>
3874 <row>
3875 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3876 \begin_inset Text
3878 \begin_layout Plain Layout
3879 snes_pal
3880 \end_layout
3882 \end_inset
3883 </cell>
3884 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3885 \begin_inset Text
3887 \begin_layout Plain Layout
3888 Super NES
3889 \end_layout
3891 \end_inset
3892 </cell>
3893 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3894 \begin_inset Text
3896 \begin_layout Plain Layout
3898 \end_layout
3900 \end_inset
3901 </cell>
3902 </row>
3903 <row>
3904 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3905 \begin_inset Text
3907 \begin_layout Plain Layout
3908 sgb_pal
3909 \end_layout
3911 \end_inset
3912 </cell>
3913 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3914 \begin_inset Text
3916 \begin_layout Plain Layout
3917 Super Game Boy
3918 \end_layout
3920 \end_inset
3921 </cell>
3922 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3923 \begin_inset Text
3925 \begin_layout Plain Layout
3927 \end_layout
3929 \end_inset
3930 </cell>
3931 </row>
3932 <row>
3933 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3934 \begin_inset Text
3936 \begin_layout Plain Layout
3937 snes_ntsc
3938 \end_layout
3940 \end_inset
3941 </cell>
3942 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3943 \begin_inset Text
3945 \begin_layout Plain Layout
3946 Super NES
3947 \end_layout
3949 \end_inset
3950 </cell>
3951 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3952 \begin_inset Text
3954 \begin_layout Plain Layout
3955 NTSC
3956 \end_layout
3958 \end_inset
3959 </cell>
3960 </row>
3961 <row>
3962 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3963 \begin_inset Text
3965 \begin_layout Plain Layout
3966 sgb_ntsc
3967 \end_layout
3969 \end_inset
3970 </cell>
3971 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3972 \begin_inset Text
3974 \begin_layout Plain Layout
3975 Super Game Boy
3976 \end_layout
3978 \end_inset
3979 </cell>
3980 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3981 \begin_inset Text
3983 \begin_layout Plain Layout
3984 NTSC
3985 \end_layout
3987 \end_inset
3988 </cell>
3989 </row>
3990 <row>
3991 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3992 \begin_inset Text
3994 \begin_layout Plain Layout
3996 \end_layout
3998 \end_inset
3999 </cell>
4000 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4001 \begin_inset Text
4003 \begin_layout Plain Layout
4004 BS-X (non-slotted)
4005 \end_layout
4007 \end_inset
4008 </cell>
4009 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4010 \begin_inset Text
4012 \begin_layout Plain Layout
4013 NTSC
4014 \end_layout
4016 \end_inset
4017 </cell>
4018 </row>
4019 <row>
4020 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4021 \begin_inset Text
4023 \begin_layout Plain Layout
4024 bsxslotted
4025 \end_layout
4027 \end_inset
4028 </cell>
4029 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4030 \begin_inset Text
4032 \begin_layout Plain Layout
4033 BS-X (slotted)
4034 \end_layout
4036 \end_inset
4037 </cell>
4038 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4039 \begin_inset Text
4041 \begin_layout Plain Layout
4042 NTSC
4043 \end_layout
4045 \end_inset
4046 </cell>
4047 </row>
4048 <row>
4049 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4050 \begin_inset Text
4052 \begin_layout Plain Layout
4053 sufamiturbo
4054 \end_layout
4056 \end_inset
4057 </cell>
4058 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4059 \begin_inset Text
4061 \begin_layout Plain Layout
4062 Sufami Turbo
4063 \end_layout
4065 \end_inset
4066 </cell>
4067 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4068 \begin_inset Text
4070 \begin_layout Plain Layout
4071 NTSC
4072 \end_layout
4074 \end_inset
4075 </cell>
4076 </row>
4077 </lyxtabular>
4079 \end_inset
4082 \end_layout
4084 \begin_layout Standard
4085 Frame rates are:
4086 \end_layout
4088 \begin_layout Standard
4089 \begin_inset Tabular
4090 <lyxtabular version="3" rows="3" columns="2">
4091 <features tabularvalignment="middle">
4092 <column alignment="center" valignment="top" width="0">
4093 <column alignment="center" valignment="top" width="0">
4094 <row>
4095 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4096 \begin_inset Text
4098 \begin_layout Plain Layout
4099 Region
4100 \end_layout
4102 \end_inset
4103 </cell>
4104 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4105 \begin_inset Text
4107 \begin_layout Plain Layout
4108 Framerate (fps)
4109 \end_layout
4111 \end_inset
4112 </cell>
4113 </row>
4114 <row>
4115 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4116 \begin_inset Text
4118 \begin_layout Plain Layout
4120 \end_layout
4122 \end_inset
4123 </cell>
4124 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4125 \begin_inset Text
4127 \begin_layout Plain Layout
4128 322445/6448
4129 \end_layout
4131 \end_inset
4132 </cell>
4133 </row>
4134 <row>
4135 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4136 \begin_inset Text
4138 \begin_layout Plain Layout
4139 NTSC
4140 \end_layout
4142 \end_inset
4143 </cell>
4144 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4145 \begin_inset Text
4147 \begin_layout Plain Layout
4148 10738636/178683
4149 \end_layout
4151 \end_inset
4152 </cell>
4153 </row>
4154 </lyxtabular>
4156 \end_inset
4159 \end_layout
4161 \begin_layout Subsection
4162 Member: port1
4163 \end_layout
4165 \begin_layout Standard
4166 Contains type of port #1 (as one line).
4167  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4168  If not present, defaults to 'gamepad'.
4169 \end_layout
4171 \begin_layout Subsection
4172 Member: port2
4173 \end_layout
4175 \begin_layout Standard
4176 Contains type of port #2 (as one line).
4177  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4178  'justifier' and 'justifiers'.
4179  If not present, defaults to 'none'.
4180 \end_layout
4182 \begin_layout Subsection
4183 Member: gamename
4184 \end_layout
4186 \begin_layout Standard
4187 Contains name of the game (as one line).
4188 \end_layout
4190 \begin_layout Subsection
4191 Member: authors
4192 \end_layout
4194 \begin_layout Standard
4195 Contains authors, one per line.
4196  Part before '|' is the full name, part after is the nickname.
4197 \end_layout
4199 \begin_layout Subsection
4200 Member: systemid
4201 \end_layout
4203 \begin_layout Standard
4204 Always 
4205 \begin_inset Quotes eld
4206 \end_inset
4208 lsnes-rr1
4209 \begin_inset Quotes erd
4210 \end_inset
4212  (one line).
4213  Used to reject other saves.
4214 \end_layout
4216 \begin_layout Subsection
4217 Member: controlsversion
4218 \end_layout
4220 \begin_layout Standard
4221 Always 
4222 \begin_inset Quotes eld
4223 \end_inset
4226 \begin_inset Quotes erd
4227 \end_inset
4229  (one line).
4230  Used to identify what controls are there.
4231 \end_layout
4233 \begin_layout Subsection
4234 Member: 
4235 \begin_inset Quotes eld
4236 \end_inset
4238 coreversion
4239 \begin_inset Quotes erd
4240 \end_inset
4243 \end_layout
4245 \begin_layout Standard
4246 Contains bsnes core version number (as one line).
4247 \end_layout
4249 \begin_layout Subsection
4250 Member: projectid
4251 \end_layout
4253 \begin_layout Standard
4254 Contains project ID (as one line).
4255  Used to identify if two movies are part of the same project.
4256 \end_layout
4258 \begin_layout Subsection
4259 Member: {rom,slota,slotb}{,xml}.sha256
4260 \end_layout
4262 \begin_layout Standard
4263 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4264  Absent if corresponding file is absent.
4265 \end_layout
4267 \begin_layout Subsection
4268 Member: moviesram.<name>
4269 \end_layout
4271 \begin_layout Standard
4272 Raw binary startup SRAM of kind <name>.
4273  Only present in savestates and movies starting from SRAM.
4274 \end_layout
4276 \begin_layout Subsection
4277 Member: saveframe
4278 \end_layout
4280 \begin_layout Standard
4281 Contains frame number (as one line) of frame movie was saved on.
4282  Only present in savestates.
4283 \end_layout
4285 \begin_layout Subsection
4286 Member: lagcounter
4287 \end_layout
4289 \begin_layout Standard
4290 Current value of lag counter (as one line).
4291  Only present in savestates.
4292 \end_layout
4294 \begin_layout Subsection
4295 Member: pollcounters
4296 \end_layout
4298 \begin_layout Standard
4299 Contains poll counters (currently 100 of them), one per line.
4300  Each line is raw poll count if DRDY is set for it.
4301  Otherwise it is negative poll count minus one.
4302  Only present in savestates.
4303 \end_layout
4305 \begin_layout Subsection
4306 Member: hostmemory
4307 \end_layout
4309 \begin_layout Standard
4310 Raw binary dump of host memory.
4311  Only present in savestates.
4312 \end_layout
4314 \begin_layout Subsection
4315 Member: savestate
4316 \end_layout
4318 \begin_layout Standard
4319 The raw binary savestate itself.
4320  Savestate detection uses this file, only present in savestates.
4321 \end_layout
4323 \begin_layout Subsection
4324 Member: screenshot
4325 \end_layout
4327 \begin_layout Standard
4328 Screenshot of current frame.
4329  Only present in savestates.
4330  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4331  data.
4332  Height of image is inferred from the width and size of data.
4333 \end_layout
4335 \begin_layout Subsection
4336 Member: sram.<name>
4337 \end_layout
4339 \begin_layout Standard
4340 Raw binary SRAM of kind <name> at time of savestate.
4341  Only present in savestates.
4342 \end_layout
4344 \begin_layout Subsection
4345 Member: input
4346 \end_layout
4348 \begin_layout Standard
4349 The actual input track, one line per subframe (blank lines are skipped).
4350 \end_layout
4352 \begin_layout Itemize
4353 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4354  part of same frame as previous, otherwise it starts a new frame.
4355 \end_layout
4357 \begin_layout Itemize
4358 First subframe must start a new frame.
4359 \end_layout
4361 \begin_layout Standard
4362 Length of movie in frames is number of lines in input file that start a
4363  new frame.
4364 \end_layout
4366 \begin_layout Subsection
4367 Member: subtitles
4368 \end_layout
4370 \begin_layout Standard
4371 Subtitle track.
4372  Optional.
4373 \end_layout
4375 \begin_layout Itemize
4376 Each line is in form <firstframe> <numframes> <text>.
4377 \end_layout
4379 \begin_layout Itemize
4380 Linefeed is encoded as 
4381 \backslash
4382 n, backslash is encoded as 
4383 \backslash
4385 \backslash
4387 \end_layout
4389 \begin_layout Subsection
4390 Member: rerecords
4391 \end_layout
4393 \begin_layout Standard
4394 Contains textual base-10 rerecord count (as one line; emulator just writes
4395  this, it doesn't read it) + 1.
4396 \end_layout
4398 \begin_layout Subsection
4399 Member: rrdata
4400 \end_layout
4402 \begin_layout Standard
4403 This member stores set of load IDs.
4404  There is one load ID per rerecord (plus one corresponding to start of project).
4405 \end_layout
4407 \begin_layout Itemize
4408 This member constists of concatenation of records
4409 \end_layout
4411 \begin_layout Itemize
4412 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4413  IDs.
4414 \end_layout
4416 \begin_layout Itemize
4417 IDs are interpretted as 256-bit big-endian integers with warparound.
4418 \end_layout
4420 \begin_layout Itemize
4421 Initial predicted ID is all zeroes.
4422 \end_layout
4424 \begin_layout Standard
4425 Format of each record is:
4426 \end_layout
4428 \begin_layout Itemize
4429 1 byte: Opcode byte.
4430  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4431  Bit 7 is unused.
4432 \end_layout
4434 \begin_layout Itemize
4435 32-prefixlen bytes of ID.
4436 \end_layout
4438 \begin_layout Itemize
4439 countlen bytes of big-endian count (count).
4440 \end_layout
4442 \begin_layout Standard
4443 Records are processed as follows:
4444 \end_layout
4446 \begin_layout Itemize
4447 To form the first ID encoded by record, take the first prefixlen bytes predicted
4448  ID and append the read ID value to it.
4449  The result is the first ID encoded.
4450 \end_layout
4452 \begin_layout Itemize
4453 If countlen is 0, record encodes 1 ID.
4454 \end_layout
4456 \begin_layout Itemize
4457 If countlen is 1, record encodes 2+count IDs.
4458 \end_layout
4460 \begin_layout Itemize
4461 If countlen is 2, record encodes 258+count IDs.
4462 \end_layout
4464 \begin_layout Itemize
4465 If countlen is 3, record encodes 65794+count IDs.
4466 \end_layout
4468 \begin_layout Itemize
4469 The new predicted ID is the next ID after last one encoded by the record.
4470 \end_layout
4472 \begin_layout Standard
4473 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4474  by all records.
4475 \end_layout
4477 \begin_layout Subsection
4478 Member: starttime.second
4479 \end_layout
4481 \begin_layout Standard
4482 Movie starting time, second part.
4483  Epoch is Unix epoch.
4484  Default is 1,000,000,000.
4485 \end_layout
4487 \begin_layout Subsection
4488 Member: starttime.subsecond
4489 \end_layout
4491 \begin_layout Standard
4492 Movie starting time, subsecond part.
4493  Unit is CPU clocks.
4494  Default is 0.
4495 \end_layout
4497 \begin_layout Subsection
4498 Member: savetime.second
4499 \end_layout
4501 \begin_layout Standard
4502 Movie saving time, second part.
4503  Default is starttime.second.
4504  Only present in savestates.
4505 \end_layout
4507 \begin_layout Subsection
4508 Member: savetime.subsecond
4509 \end_layout
4511 \begin_layout Standard
4512 Movie saving time, subsecond part.
4513  Default is starttime.subsecond.
4514  Only present in savestates.
4515 \end_layout
4517 \begin_layout Section
4518 lsvs file format (commentary tracks)
4519 \end_layout
4521 \begin_layout Subsection
4522 Clusters
4523 \end_layout
4525 \begin_layout Itemize
4526 Each cluster is 8kB (8192 bytes) in size.
4527 \end_layout
4529 \begin_layout Itemize
4530 Cluster n starts at offset 8192*n in file.
4531 \end_layout
4533 \begin_layout Itemize
4534 The following clusters are system special:
4535 \end_layout
4537 \begin_deeper
4538 \begin_layout Itemize
4539 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4540 \end_layout
4542 \begin_layout Itemize
4543 Cluster 1 (superblock)
4544 \end_layout
4546 \end_deeper
4547 \begin_layout Subsection
4548 Cluster tables
4549 \end_layout
4551 \begin_layout Itemize
4552 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4553  last 11 bits of n).
4554 \end_layout
4556 \begin_layout Itemize
4557 This cluster table consists of 2048 4-byte big-endian integers.
4558 \end_layout
4560 \begin_layout Itemize
4561 Each entry describes a cluster in 16MB supercluster, in order.
4562 \end_layout
4564 \begin_layout Itemize
4565 The valid values for entries are:
4566 \end_layout
4568 \begin_deeper
4569 \begin_layout Itemize
4570 0x00000000: Free cluster
4571 \end_layout
4573 \begin_layout Itemize
4574 0x00000001: Last cluster in chain.
4575 \end_layout
4577 \begin_layout Itemize
4578 0xFFFFFFFF: System cluster (cluster tables and superblock)
4579 \end_layout
4581 \begin_layout Itemize
4582 (anything else): Number of next cluster in chain.
4583  Must not be multiple of 2048.
4584 \end_layout
4586 \end_deeper
4587 \begin_layout Itemize
4588 Due to limitations of the format, there can be at most 2097052 superclusters,
4589  giving maximum file size of 16TB.
4590 \end_layout
4592 \begin_layout Subsection
4593 Stream table
4594 \end_layout
4596 \begin_layout Itemize
4597 The stream table chain always starts in cluster 2.
4598 \end_layout
4600 \begin_layout Itemize
4601 Otherwise, it follows normal chaining.
4602 \end_layout
4604 \begin_layout Itemize
4605 The stream table consists of 16-byte entries:
4606 \end_layout
4608 \begin_deeper
4609 \begin_layout Itemize
4610 The first 8 bytes of entry give big-endian beginning position of stream
4611  in units of 1/48000 s.
4612 \end_layout
4614 \begin_layout Itemize
4615 The next 4 bytes of entry give big-endian beginning cluster for control
4616  data.
4617  0 here marks the entry as not present.
4618 \end_layout
4620 \begin_layout Itemize
4621 The last 4 bytes of entry give big-endian beginning cluster for codec data.
4622 \end_layout
4624 \end_deeper
4625 \begin_layout Itemize
4626 Stream table clusters are normal clusters, following normal chaining.
4627 \end_layout
4629 \begin_layout Itemize
4630 The stream begnning position is not guarenteed unique.
4631  There can be multiple streams with the same starting position in the file.
4632 \end_layout
4634 \begin_layout Subsection
4635 Stream control data
4636 \end_layout
4638 \begin_layout Itemize
4639 The stream control data consists of entries 4 bytes each:
4640 \end_layout
4642 \begin_deeper
4643 \begin_layout Itemize
4644 The first 2 bytes of entry gives big-endian length of packet
4645 \end_layout
4647 \begin_layout Itemize
4648 The next byte of entry gives audio length of packet in units of 1/400 s.
4649 \end_layout
4651 \begin_layout Itemize
4652 The last byte is control byte.
4653 \end_layout
4655 \begin_deeper
4656 \begin_layout Itemize
4657 0 means this entry is not present and the control data ends.
4658 \end_layout
4660 \begin_layout Itemize
4661 1 is valid control entry.
4662 \end_layout
4664 \end_deeper
4665 \end_deeper
4666 \begin_layout Itemize
4667 The stream control data can also end by running into end of the readable
4668  chain.
4669 \end_layout
4671 \begin_deeper
4672 \begin_layout Itemize
4673 This happens if there happens to be exact multiple of 2048 packets in stream
4674  and number of packets is nonzero.
4675 \end_layout
4677 \end_deeper
4678 \begin_layout Itemize
4679 These clusters follow normal chaining.
4680 \end_layout
4682 \begin_layout Subsection
4683 Stream codec data
4684 \end_layout
4686 \begin_layout Itemize
4687 Stream codec data consists of raw Opus data packets packed back to back
4688  with nothing in between.
4689 \end_layout
4691 \begin_layout Itemize
4692 Warning: Due to internal limitations, this data must reside in the first
4693  65536 superclusters (that is, the first 1TB of the file).
4694 \end_layout
4696 \begin_layout Subsection
4697 Superblock
4698 \end_layout
4700 \begin_layout Itemize
4701 The superblock is stored in cluster 1.
4703 \end_layout
4705 \begin_layout Itemize
4706 The first 11 bytes are 
4707 \begin_inset Quotes eld
4708 \end_inset
4710 sefs-magic
4711 \begin_inset Quotes erd
4712 \end_inset
4714 <NUL>.
4715 \end_layout
4717 \begin_layout Itemize
4718 The rest are unused.
4719 \end_layout
4721 \begin_layout Itemize
4722 This cluster 1 is marked as system special.
4723 \end_layout
4725 \begin_layout Section
4726 Known ROM extensions
4727 \end_layout
4729 \begin_layout Itemize
4730 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4731 \end_layout
4733 \begin_layout Itemize
4734 DMG cartridge ROMs: dmg, gb.
4735 \end_layout
4737 \begin_layout Itemize
4738 GBC cartridge ROMs: cgb, gbc.
4739 \end_layout
4741 \begin_layout Section
4742 Gamepack files
4743 \end_layout
4745 \begin_layout Itemize
4746 The first line must be: 
4747 \begin_inset Quotes eld
4748 \end_inset
4750 [GAMEPACK FILE]
4751 \begin_inset Quotes erd
4752 \end_inset
4755 \end_layout
4757 \begin_layout Itemize
4758 There is one needed line: 
4759 \begin_inset Quotes eld
4760 \end_inset
4762 type <systype>
4763 \begin_inset Quotes erd
4764 \end_inset
4767  This sets system type to <systype>.
4768  The following system types are valid:
4769 \end_layout
4771 \begin_deeper
4772 \begin_layout Itemize
4773 snes (SNES)
4774 \end_layout
4776 \begin_layout Itemize
4777 bsx (BS-X non-slotted)
4778 \end_layout
4780 \begin_layout Itemize
4781 bsxslotted (BS-X slotted)
4782 \end_layout
4784 \begin_layout Itemize
4785 sufamiturbo (Sufami Turbo)
4786 \end_layout
4788 \begin_layout Itemize
4789 sgb (Super Game Boy)
4790 \end_layout
4792 \begin_layout Itemize
4793 dmg (Game Boy)
4794 \end_layout
4796 \begin_layout Itemize
4797 gbc (Game Boy Color)
4798 \end_layout
4800 \begin_layout Itemize
4801 gbc_gba (Game Boy Color with GBA initial register values)
4802 \end_layout
4804 \end_deeper
4805 \begin_layout Itemize
4806 Optionally a region can be specified: 
4807 \begin_inset Quotes eld
4808 \end_inset
4810 region <region>
4811 \begin_inset Quotes erd
4812 \end_inset
4815  The following values are valid:
4816 \end_layout
4818 \begin_deeper
4819 \begin_layout Itemize
4820 autodetect (Autodetect region: snes and sgb only)
4821 \end_layout
4823 \begin_layout Itemize
4824 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4825 \end_layout
4827 \begin_layout Itemize
4828 pal (PAL: snes, sgb)
4829 \end_layout
4831 \begin_layout Itemize
4832 world (World: dmg, gbc, gbc_gba)
4833 \end_layout
4835 \end_deeper
4836 \begin_layout Itemize
4837 ROM images are loaded as: 
4838 \begin_inset Quotes eld
4839 \end_inset
4841 rom <type> <file>
4842 \begin_inset Quotes erd
4843 \end_inset
4846  The following types are valid:
4847 \end_layout
4849 \begin_deeper
4850 \begin_layout Itemize
4851 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4852  BIOS in bsx, bsxslotted, sufamiturbo)
4853 \end_layout
4855 \begin_layout Itemize
4856 bsx (Cartridge ROM in bsx, bsxslotted)
4857 \end_layout
4859 \begin_layout Itemize
4860 slot-a (Cartridge ROM in sufamiturbo)
4861 \end_layout
4863 \begin_layout Itemize
4864 slot-b (Cartridge ROM in sufamiturbo)
4865 \end_layout
4867 \end_deeper
4868 \begin_layout Itemize
4869 ROM markup can be loaded as: 
4870 \begin_inset Quotes eld
4871 \end_inset
4873 xml <type> <file>
4874 \begin_inset Quotes erd
4875 \end_inset
4878  The types valid are the same as for ROMs.
4879 \end_layout
4881 \begin_layout Itemize
4882 Patches can be loaded as 
4883 \begin_inset Quotes eld
4884 \end_inset
4886 patch[<offset>] <type> <file>
4887 \begin_inset Quotes erd
4888 \end_inset
4891  The types are the same as for ROMs.
4892 \end_layout
4894 \begin_deeper
4895 \begin_layout Itemize
4896 Offset is given in form [+-]<number>.
4897  Usually offset is either +0 or -512.
4898 \end_layout
4900 \begin_layout Itemize
4901 Default offset is +0.
4902 \end_layout
4904 \end_deeper
4905 \begin_layout Subsection
4906 Example:
4907 \end_layout
4909 \begin_layout LyX-Code
4910 [GAMEPACK FILE]
4911 \end_layout
4913 \begin_layout LyX-Code
4914 type snes
4915 \end_layout
4917 \begin_layout LyX-Code
4918 rom rom speedygonzales.sfc
4919 \end_layout
4921 \begin_layout LyX-Code
4922 patch-512 rom sonicthehedgehog.ips
4923 \end_layout
4925 \begin_layout Subsection
4926 Example 2:
4927 \end_layout
4929 \begin_layout LyX-Code
4930 [GAMEPACK FILE]
4931 \end_layout
4933 \begin_layout LyX-Code
4934 type sgb
4935 \end_layout
4937 \begin_layout LyX-Code
4938 rom rom supergameboy.sfc
4939 \end_layout
4941 \begin_layout LyX-Code
4942 rom dmg megamanV.dmg
4943 \end_layout
4945 \begin_layout Section
4946 Quick'n'dirty encode guide
4947 \end_layout
4949 \begin_layout Enumerate
4950 Start the emulator and load the ROM and movie file.
4951 \end_layout
4953 \begin_layout Enumerate
4954 Set large AVI option 'set-setting avi-large on'
4955 \end_layout
4957 \begin_layout Enumerate
4958 Enable dumping 'dump-avi tmpdump' 
4959 \end_layout
4961 \begin_layout Enumerate
4962 Unpause and let it run until you want to end dumping.
4963 \end_layout
4965 \begin_layout Enumerate
4966 Close the emulator (closing the window is the easiest way).
4967  Or use 'end-avi'.
4968 \end_layout
4970 \begin_layout Enumerate
4971 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4972  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4973 \end_layout
4975 \begin_layout Enumerate
4976 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4977 \end_layout
4979 \begin_layout Enumerate
4980 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4981  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4982 \end_layout
4984 \begin_layout Enumerate
4985 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4986  Now final.mkv contains quick'n'dirty encode.
4987 \end_layout
4989 \begin_layout Section
4990 Axis configurations for some gamepad types:
4991 \end_layout
4993 \begin_layout Subsection
4994 XBox360 controller:
4995 \end_layout
4997 \begin_layout Standard
4998 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4999 \end_layout
5001 \begin_layout LyX-Code
5002 set-axis joystick0axis2 pressure-+
5003 \end_layout
5005 \begin_layout LyX-Code
5006 set-axis joystick0axis5 pressure-+
5007 \end_layout
5009 \begin_layout Itemize
5010 This is needed for SDL only.
5011  EVDEV sets those types correctly.
5012 \end_layout
5014 \begin_layout Subsection
5015 PS3 
5016 \begin_inset Quotes eld
5017 \end_inset
5019 sixaxis
5020 \begin_inset Quotes erd
5021 \end_inset
5023  controller:
5024 \end_layout
5026 \begin_layout Standard
5027 Axes 8-19 should be disabled.
5028 \end_layout
5030 \begin_layout LyX-Code
5031 set-axis joystick0axis8 disabled
5032 \end_layout
5034 \begin_layout LyX-Code
5035 set-axis joystick0axis9 disabled
5036 \end_layout
5038 \begin_layout LyX-Code
5039 set-axis joystick0axis10 disabled
5040 \end_layout
5042 \begin_layout LyX-Code
5043 set-axis joystick0axis11 disabled
5044 \end_layout
5046 \begin_layout LyX-Code
5047 set-axis joystick0axis12 disabled
5048 \end_layout
5050 \begin_layout LyX-Code
5051 set-axis joystick0axis13 disabled
5052 \end_layout
5054 \begin_layout LyX-Code
5055 set-axis joystick0axis14 disabled
5056 \end_layout
5058 \begin_layout LyX-Code
5059 set-axis joystick0axis15 disabled
5060 \end_layout
5062 \begin_layout LyX-Code
5063 set-axis joystick0axis16 disabled
5064 \end_layout
5066 \begin_layout LyX-Code
5067 set-axis joystick0axis17 disabled
5068 \end_layout
5070 \begin_layout LyX-Code
5071 set-axis joystick0axis18 disabled
5072 \end_layout
5074 \begin_layout LyX-Code
5075 set-axis joystick0axis19 disabled
5076 \end_layout
5078 \begin_layout Section
5079 Errata:
5080 \end_layout
5082 \begin_layout Subsection
5083 Problems from BSNES core:
5084 \end_layout
5086 \begin_layout Itemize
5087 The whole pending save stuff.
5088 \end_layout
5090 \begin_layout Itemize
5091 Lack of layer hiding.
5092 \end_layout
5094 \begin_layout Itemize
5095 It is slow (especially accuracy).
5096 \end_layout
5098 \begin_layout Itemize
5099 Firmwares can't be loaded from ZIP archives.
5100 \end_layout
5102 \begin_layout Subsection
5103 Other problems:
5104 \end_layout
5106 \begin_layout Itemize
5107 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5108 \end_layout
5110 \begin_layout Itemize
5111 Audio for last dumped frame is not itself dumped.
5112 \end_layout
5114 \begin_layout Itemize
5115 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5116 \end_layout
5118 \begin_layout Itemize
5119 No menus, command based interface (SDL).
5120 \end_layout
5122 \begin_layout Itemize
5123 Long commands don't scroll.
5124 \end_layout
5126 \begin_layout Section
5127 Changelog:
5128 \end_layout
5130 \begin_layout Subsection
5131 rr0-beta1
5132 \end_layout
5134 \begin_layout Itemize
5135 Fix -Wall warnings
5136 \end_layout
5138 \begin_layout Itemize
5139 Fix dumper video corruption with levels 10-18.
5140 \end_layout
5142 \begin_layout Subsection
5143 rr0-beta2
5144 \end_layout
5146 \begin_layout Itemize
5147 Autofire
5148 \end_layout
5150 \begin_layout Itemize
5151 Lots of code cleanups
5152 \end_layout
5154 \begin_layout Itemize
5155 Lua interface to settings
5156 \end_layout
5158 \begin_layout Itemize
5159 Allow specifying AVI borders without Lua
5160 \end_layout
5162 \begin_layout Itemize
5163 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5164 \end_layout
5166 \begin_layout Itemize
5167 on_snoop lua callback
5168 \end_layout
5170 \begin_layout Itemize
5171 Faster movie loading and saving.
5172 \end_layout
5174 \begin_layout Subsection
5175 rr0-beta3
5176 \end_layout
5178 \begin_layout Itemize
5179 Joystick support
5180 \end_layout
5182 \begin_layout Subsection
5183 rr0-beta4
5184 \end_layout
5186 \begin_layout Itemize
5187 Fix multi-buttons
5188 \end_layout
5190 \begin_layout Itemize
5191 Save jukebox functionality.
5192 \end_layout
5194 \begin_layout Subsection
5195 rr0-beta5
5196 \end_layout
5198 \begin_layout Itemize
5199 Try to fix some nasty failing movie load edge cases
5200 \end_layout
5202 \begin_layout Itemize
5203 Allow specifying scripts to run on command line.
5204 \end_layout
5206 \begin_layout Subsection
5207 rr0-beta6
5208 \end_layout
5210 \begin_layout Itemize
5211 Major source code reorganization.
5212 \end_layout
5214 \begin_layout Itemize
5215 Backup savestates before overwriting.
5216 \end_layout
5218 \begin_layout Itemize
5219 Don't crash if loading initial state fails.
5220 \end_layout
5222 \begin_layout Subsection
5223 rr0-beta7
5224 \end_layout
5226 \begin_layout Itemize
5227 Fix firmware lookup
5228 \end_layout
5230 \begin_layout Itemize
5231 Fix author name parsing
5232 \end_layout
5234 \begin_layout Itemize
5235 Fix rerecord counting
5236 \end_layout
5238 \begin_layout Itemize
5239 (SDL) Print messages to console if SDL is uninitialized
5240 \end_layout
5242 \begin_layout Itemize
5243 Add movieinfo program
5244 \end_layout
5246 \begin_layout Itemize
5247 Fix loading movies starting from SRAM.
5248 \end_layout
5250 \begin_layout Subsection
5251 rr0-beta8
5252 \end_layout
5254 \begin_layout Itemize
5255 Add support for unattended dumping
5256 \end_layout
5258 \begin_layout Itemize
5259 Fix compiling for Win32
5260 \end_layout
5262 \begin_layout Itemize
5263 Don't lock up if sound can't be initialized
5264 \end_layout
5266 \begin_layout Itemize
5267 Strip trailing CR from commands
5268 \end_layout
5270 \begin_layout Itemize
5271 Don't try to do dubious things in global ctors (fix crash on startup)
5272 \end_layout
5274 \begin_layout Subsection
5275 rr0-beta9
5276 \end_layout
5278 \begin_layout Itemize
5279 Small documentation tweaking
5280 \end_layout
5282 \begin_layout Itemize
5283 Fix make clean
5284 \end_layout
5286 \begin_layout Itemize
5287 Fix major bug in modifier matching
5288 \end_layout
5290 \begin_layout Subsection
5291 rr0-beta10
5292 \end_layout
5294 \begin_layout Itemize
5295 Lots of documentation fixes
5296 \end_layout
5298 \begin_layout Itemize
5299 Use dedicated callbacks for event backcomm., not commands.
5300 \end_layout
5302 \begin_layout Itemize
5303 Ensure that the watchdog is not hit when executing delayed reset.
5304 \end_layout
5306 \begin_layout Itemize
5307 Remove errant tab from joystick message.
5308 \end_layout
5310 \begin_layout Subsection
5311 rr0-beta11
5312 \end_layout
5314 \begin_layout Itemize
5315 Make autofire operate in absolute time, not linear time
5316 \end_layout
5318 \begin_layout Itemize
5319 Reinitialize controls when resuming from loadstate
5320 \end_layout
5322 \begin_layout Itemize
5323 Some more code cleanups
5324 \end_layout
5326 \begin_layout Itemize
5327 If Lua allocator fails, call OOM_panic()
5328 \end_layout
5330 \begin_layout Itemize
5331 Byte/word/dword/qword sized host memory write/read functions.
5332 \end_layout
5334 \begin_layout Itemize
5335 Dump at correct framerate if dumping interlaced NTSC (height=448).
5336 \end_layout
5338 \begin_layout Subsection
5339 rr0-beta12
5340 \end_layout
5342 \begin_layout Itemize
5343 Actually include the complete source code
5344 \end_layout
5346 \begin_layout Itemize
5347 Keep track of RTC
5348 \end_layout
5350 \begin_layout Subsection
5351 rr0-beta13
5352 \end_layout
5354 \begin_layout Itemize
5355 Document {save,start}time.{,sub}second.
5356 \end_layout
5358 \begin_layout Itemize
5359 Intercept time() from bsnes core.
5360 \end_layout
5362 \begin_layout Subsection
5363 rr0-beta14
5364 \end_layout
5366 \begin_layout Itemize
5367 Allow disabling time() interception (allow build on Mac OS X)
5368 \end_layout
5370 \begin_layout Itemize
5371 Use SDLMain on Mac OS X (make SDL not crash)
5372 \end_layout
5374 \begin_layout Itemize
5375 Disable delayed resets (just plain too buggy for now).
5376 \end_layout
5378 \begin_layout Itemize
5379 Code cleanups
5380 \end_layout
5382 \begin_layout Itemize
5383 Use 16-bit for graphics/video instead of 32-bit.
5384 \end_layout
5386 \begin_layout Itemize
5387 gui.rectangle/gui.pixel
5388 \end_layout
5390 \begin_layout Itemize
5391 gui.crosshair
5392 \end_layout
5394 \begin_layout Itemize
5395 New CSCD writer implementation.
5396 \end_layout
5398 \begin_layout Subsection
5399 rr0-beta15
5400 \end_layout
5402 \begin_layout Itemize
5403 Fix interaction of * and +.
5404 \end_layout
5406 \begin_layout Itemize
5407 Manual improvements
5408 \end_layout
5410 \begin_layout Itemize
5411 Use gettimeofday()/usleep(), these seem portable enough.
5412 \end_layout
5414 \begin_layout Itemize
5415 Move joystick axis manipulation to keymapper code.
5416 \end_layout
5418 \begin_layout Itemize
5419 Changes to how read-only works.
5420 \end_layout
5422 \begin_layout Itemize
5423 Refactor controller input code.
5424 \end_layout
5426 \begin_layout Subsection
5427 rr0-beta16
5428 \end_layout
5430 \begin_layout Itemize
5431 Fix mouseclick scale compensation.
5432 \end_layout
5434 \begin_layout Itemize
5435 Draw area boundaries correctly in SDL code.
5436 \end_layout
5438 \begin_layout Itemize
5439 gui.screenshot.
5440 \end_layout
5442 \begin_layout Itemize
5443 Fix CSCD output (buffer overrun and race condition).
5444 \end_layout
5446 \begin_layout Subsection
5447 rr0-beta17
5448 \end_layout
5450 \begin_layout Itemize
5451 JMD dumping support.
5452 \end_layout
5454 \begin_layout Itemize
5455 Allow unattended dumping to JMD.
5456 \end_layout
5458 \begin_layout Itemize
5459 Move to BSNES v083.
5460 \end_layout
5462 \begin_layout Itemize
5463 Switch back to 32-bit colors.
5464 \end_layout
5466 \begin_layout Itemize
5467 Add Lua function gui.color.
5468 \end_layout
5470 \begin_layout Itemize
5471 Use some new C++11 features in GCC 4.6.
5472 \end_layout
5474 \begin_layout Itemize
5475 Be prepared for core frequency changes.
5476 \end_layout
5478 \begin_layout Itemize
5479 Pass colors in one chunk from Lua.
5480 \end_layout
5482 \begin_layout Subsection
5483 rr0-beta18
5484 \end_layout
5486 \begin_layout Itemize
5487 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5488  memory.read_vma() and memory.find_vma().
5489 \end_layout
5491 \begin_layout Itemize
5492 Numerious documentation fixups
5493 \end_layout
5495 \begin_layout Itemize
5496 RTC time format changed
5497 \end_layout
5499 \begin_layout Itemize
5500 Reformat flags display
5501 \end_layout
5503 \begin_layout Itemize
5504 Allow lua package name to be overridden
5505 \end_layout
5507 \begin_layout Itemize
5508 SDUMP (high-quality dumping).
5509 \end_layout
5511 \begin_layout Itemize
5512 Split platform support to plugins.
5513 \end_layout
5515 \begin_layout Itemize
5516 Make all sound plugins support basic sound commands
5517 \end_layout
5519 \begin_layout Itemize
5520 Support portaudio for sound.
5521 \end_layout
5523 \begin_layout Itemize
5524 Allow disable Lua/SDL searching.
5525 \end_layout
5527 \begin_layout Itemize
5528 Upconvert colors when copying lcscreen to screen.
5529 \end_layout
5531 \begin_layout Itemize
5532 Reorganize source tree.
5533 \end_layout
5535 \begin_layout Itemize
5536 Evdev joystick support.
5537 \end_layout
5539 \begin_layout Itemize
5540 Refactor more code into generic window code.
5541 \end_layout
5543 \begin_layout Subsection
5544 rr0-beta19
5545 \end_layout
5547 \begin_layout Itemize
5548 Refactor message handling.
5549 \end_layout
5551 \begin_layout Itemize
5552 Rework makefile
5553 \end_layout
5555 \begin_layout Itemize
5556 Documentation fixes
5557 \end_layout
5559 \begin_layout Itemize
5560 Finish pending saves before load/quit.
5561 \end_layout
5563 \begin_layout Itemize
5564 Wxwidgets graphics plugin.
5565 \end_layout
5567 \begin_layout Subsection
5568 rr0-beta20
5569 \end_layout
5571 \begin_layout Itemize
5572 Get rid of win32-crap.[ch]pp.
5573 \end_layout
5575 \begin_layout Itemize
5576 Move files around a lot.
5577 \end_layout
5579 \begin_layout Itemize
5580 Get rid of need for host C++ compiler.
5581 \end_layout
5583 \begin_layout Itemize
5584 Bsnes v084 core.
5585 \end_layout
5587 \begin_layout Itemize
5588 Refactor inter-component communication.
5589 \end_layout
5591 \begin_layout Itemize
5592 Fix zero luma.
5593 \end_layout
5595 \begin_layout Itemize
5596 Fix crash on multiline aliases.
5597 \end_layout
5599 \begin_layout Itemize
5600 Load/Save settings in wxwidgets gui.
5601 \end_layout
5603 \begin_layout Subsection
5604 rr0-beta21
5605 \end_layout
5607 \begin_layout Itemize
5608 Patch problems in bsnes core
5609 \end_layout
5611 \begin_layout Itemize
5612 SNES is little-endian, not big-endian!
5613 \end_layout
5615 \begin_layout Itemize
5616 Fix memory corruption in lcscreen::load()
5617 \end_layout
5619 \begin_layout Subsection
5620 rr0-beta22
5621 \end_layout
5623 \begin_layout Itemize
5624 Fix interpretting repeat counts in rrdata loading.
5625 \end_layout
5627 \begin_layout Itemize
5628 New lua callback: on_frame()
5629 \end_layout
5631 \begin_layout Itemize
5632 Remove calls to runtosave() that aren't supposed to be there
5633 \end_layout
5635 \begin_layout Itemize
5636 Lua function: movie.read_rtc()
5637 \end_layout
5639 \begin_layout Itemize
5640 Ignore src/fonts/font.cpp
5641 \end_layout
5643 \begin_layout Itemize
5644 Fix more bsnes core problems
5645 \end_layout
5647 \begin_layout Itemize
5648 Control bsnes random seeding
5649 \end_layout
5651 \begin_layout Itemize
5652 Pause-on-end
5653 \end_layout
5655 \begin_layout Itemize
5656 Some bsnes core debugging features (state dump and state hash)
5657 \end_layout
5659 \begin_layout Itemize
5660 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5661  it was 'lsnes rr0-beta21').
5662 \end_layout
5664 \begin_layout Subsection
5665 rr0-beta23
5666 \end_layout
5668 \begin_layout Itemize
5669 Fix memory corruption due to macro/field mixup
5670 \end_layout
5672 \begin_layout Itemize
5673 search-memory update
5674 \end_layout
5676 \begin_layout Itemize
5677 Allow direct-mapped framebuffer
5678 \end_layout
5680 \begin_layout Itemize
5681 SDL: Use SDL_ANYFORMAT if possible
5682 \end_layout
5684 \begin_layout Itemize
5685 SDMP2SOX: 2s delay modes.
5686 \end_layout
5688 \begin_layout Itemize
5689 Wxwidgets: Cleanups
5690 \end_layout
5692 \begin_layout Itemize
5693 Use sed -E, not sed -r.
5694  Fixes building on Mac OS X.
5695 \end_layout
5697 \begin_layout Itemize
5698 Wxwidgets: Save jukebox on exit
5699 \end_layout
5701 \begin_layout Itemize
5702 Fix RTC if using load-movie on savestate.
5703 \end_layout
5705 \begin_layout Itemize
5706 Fix crash related to full console mode.
5707 \end_layout
5709 \begin_layout Subsection
5710 rr0-beta24
5711 \end_layout
5713 \begin_layout Itemize
5714 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5715 \end_layout
5717 \begin_layout Itemize
5718 Wxwidgets: Allow compiling on Mac OS X.
5719 \end_layout
5721 \begin_layout Itemize
5722 Use movie compare instead of movie hashing (faster save/load).
5723 \end_layout
5725 \begin_layout Itemize
5726 Lua: _SYSTEM table.
5727 \end_layout
5729 \begin_layout Subsection
5730 rr0-beta25
5731 \end_layout
5733 \begin_layout Itemize
5734 sdmp2sox: Pad soundtrack if using -l or -L.
5735 \end_layout
5737 \begin_layout Itemize
5738 sdmp2sox: Fix NTSC overscan.
5739 \end_layout
5741 \begin_layout Itemize
5742 sdmp2sox: Add AR correction mode.
5743 \end_layout
5745 \begin_layout Itemize
5746 call lua_close() when exiting.
5747 \end_layout
5749 \begin_layout Itemize
5750 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5751 \end_layout
5753 \begin_layout Subsection
5754 rr0-beta26
5755 \end_layout
5757 \begin_layout Itemize
5758 Fix IPS patching code (use bsnes core IPS patcher).
5759 \end_layout
5761 \begin_layout Itemize
5762 Implement BPS patching (using bsnes core IPS patcher).
5763 \end_layout
5765 \begin_layout Itemize
5766 Add feature to load headered ROMs.
5767 \end_layout
5769 \begin_layout Subsection
5770 rr0-beta27
5771 \end_layout
5773 \begin_layout Itemize
5774 Show command names when showing keybindings
5775 \end_layout
5777 \begin_layout Subsection
5779 \end_layout
5781 \begin_layout Itemize
5782 Fix pause-on-end to be actually controllable
5783 \end_layout
5785 \begin_layout Itemize
5786 SDL: Poll all events in queue, not just first one (fixes slowness in command
5787  typing)
5788 \end_layout
5790 \begin_layout Itemize
5791 Wxwidgets: Fix ROM loading.
5792 \end_layout
5794 \begin_layout Subsection
5795 rr1-beta0
5796 \end_layout
5798 \begin_layout Itemize
5799 Lua: Add gui.textH, gui.textV, gui.textHV
5800 \end_layout
5802 \begin_layout Itemize
5803 Fix text colors on SDL on Mac OS X
5804 \end_layout
5806 \begin_layout Itemize
5807 Mode 'F' for finished in readonly mode.
5808 \end_layout
5810 \begin_layout Itemize
5811 Fix some WS errors.
5812 \end_layout
5814 \begin_layout Itemize
5815 Reliably pause after skip poll
5816 \end_layout
5818 \begin_layout Itemize
5819 Split UI and core into their own threads
5820 \end_layout
5822 \begin_layout Subsection
5823 rr1-beta1
5824 \end_layout
5826 \begin_layout Itemize
5827 Remove leftover dummy SRAM slot
5828 \end_layout
5830 \begin_layout Itemize
5831 Fix controller numbers.
5832 \end_layout
5834 \begin_layout Subsection
5835 rr1-beta2
5836 \end_layout
5838 \begin_layout Itemize
5839 Fix lsnes-dumpavi after interface change.
5840 \end_layout
5842 \begin_layout Itemize
5843 Also give BSNES patches for v085.
5844 \end_layout
5846 \begin_layout Itemize
5847 Pack movie data in memory.
5848 \end_layout
5850 \begin_layout Subsection
5851 rr1-beta3
5852 \end_layout
5854 \begin_layout Itemize
5855 Fix framecount/length given when loading movies.
5856 \end_layout
5858 \begin_layout Itemize
5859 Controller command memory leak fixes.
5860 \end_layout
5862 \begin_layout Itemize
5863 Don't leak palette if freeing screen object.
5864 \end_layout
5866 \begin_layout Subsection
5867 rr1-beta4
5868 \end_layout
5870 \begin_layout Itemize
5871 Detect revisions.
5872 \end_layout
5874 \begin_layout Itemize
5875 Wxwidgets: Allow controlling dumper from the menu.
5876 \end_layout
5878 \begin_layout Subsection
5879 rr1-beta5
5880 \end_layout
5882 \begin_layout Itemize
5883 Rewrite parts of manual
5884 \end_layout
5886 \begin_layout Itemize
5887 Lua: Make it work with Lua 5.2.
5888 \end_layout
5890 \begin_layout Subsection
5891 rr1-beta6
5892 \end_layout
5894 \begin_layout Itemize
5895 Win32: Fix compile errors.
5896 \end_layout
5898 \begin_layout Subsection
5899 rr1-beta7
5900 \end_layout
5902 \begin_layout Itemize
5903 Refactor controller input code.
5904 \end_layout
5906 \begin_layout Itemize
5907 Fix crash when using command line on SDL / Mac OS X.
5908 \end_layout
5910 \begin_layout Subsection
5911 rr1-beta8
5912 \end_layout
5914 \begin_layout Itemize
5915 Delete core/coroutine (obsolete)
5916 \end_layout
5918 \begin_layout Itemize
5919 Lag input display by one frame.
5920 \end_layout
5922 \begin_layout Itemize
5923 Rewind movie to beginning function.
5924 \end_layout
5926 \begin_layout Itemize
5927 Fix wrong frame number reported to Lua when repainting after loadstate
5928 \end_layout
5930 \begin_layout Itemize
5931 Support UI editing of jukebox
5932 \end_layout
5934 \begin_layout Itemize
5935 Wxwidgets: Save settings on exit.
5936 \end_layout
5938 \begin_layout Itemize
5939 Support ${project} for filenames
5940 \end_layout
5942 \begin_layout Itemize
5943 SDL: Fix command history
5944 \end_layout
5946 \begin_layout Subsection
5947 rr1-beta9
5948 \end_layout
5950 \begin_layout Itemize
5951 Fix some order-of-global-ctor bugs.
5952 \end_layout
5954 \begin_layout Subsection
5955 rr1-beta10
5956 \end_layout
5958 \begin_layout Itemize
5959 Fix crashes when quitting on Win32.
5960 \end_layout
5962 \begin_layout Subsection
5963 rr1-beta11
5964 \end_layout
5966 \begin_layout Itemize
5967 EVDEV: Queue keypresses from joystick, don't send directly
5968 \end_layout
5970 \begin_layout Itemize
5971 Wxwidgets: Load-Preserve that actually works.
5972 \end_layout
5974 \begin_layout Subsection
5975 rr1-beta12
5976 \end_layout
5978 \begin_layout Itemize
5979 Wxwidgets: GUI for memory search.
5980 \end_layout
5982 \begin_layout Itemize
5983 Warn about using synchronous queue in UI callback.
5984 \end_layout
5986 \begin_layout Subsection
5987 rr1-beta13
5988 \end_layout
5990 \begin_layout Itemize
5991 Remember last saved file for each ROM
5992 \end_layout
5994 \begin_layout Itemize
5995 Support MT dumping via boost.
5996 \end_layout
5998 \begin_layout Itemize
5999 Lua: input.raw
6000 \end_layout
6002 \begin_layout Itemize
6003 Lua: input.keyhook
6004 \end_layout
6006 \begin_layout Itemize
6007 Make mouse be ordinary input instead of special-casing
6008 \end_layout
6010 \begin_layout Itemize
6011 SDL: Don't screw up commands with NUL codepoints.
6012 \end_layout
6014 \begin_layout Subsection
6015 rr1-beta14
6016 \end_layout
6018 \begin_layout Itemize
6019 Merge status panel and main window
6020 \end_layout
6022 \begin_layout Itemize
6023 True movie slot support (the rest of it)
6024 \end_layout
6026 \begin_layout Itemize
6027 SDL: Fix compilation error
6028 \end_layout
6030 \begin_layout Itemize
6031 Elminate cross calls in dump menu code.
6032 \end_layout
6034 \begin_layout Subsection
6035 rr1-beta15
6036 \end_layout
6038 \begin_layout Itemize
6039 Cancel pending saves command
6040 \end_layout
6042 \begin_layout Itemize
6043 Wxwidgets: Code refactoring
6044 \end_layout
6046 \begin_layout Itemize
6047 Wxwidgets: Fix system -> reset
6048 \end_layout
6050 \begin_layout Itemize
6051 Wxwidgets: Read watch expressions in the right thread
6052 \end_layout
6054 \begin_layout Subsection
6055 rr1-beta16
6056 \end_layout
6058 \begin_layout Itemize
6059 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6060  support that).
6061 \end_layout
6063 \begin_layout Itemize
6064 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6065 \end_layout
6067 \begin_layout Itemize
6068 Don't append trailing '-' to prefix when saving movie.
6069 \end_layout
6071 \begin_layout Itemize
6072 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6073 \end_layout
6075 \begin_layout Subsection
6077 \end_layout
6079 \begin_layout Itemize
6080 Document memory watch syntax.
6081 \end_layout
6083 \begin_layout Subsection
6084 rr1-delta1
6085 \end_layout
6087 \begin_layout Itemize
6088 Fix unattended dumping (lsnes-dumpavi)
6089 \end_layout
6091 \begin_layout Itemize
6092 Support RAW dumping
6093 \end_layout
6095 \begin_layout Itemize
6096 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6097 \end_layout
6099 \begin_layout Itemize
6100 Add option to control sample rate preturbation in AVI dumper
6101 \end_layout
6103 \begin_layout Subsection
6104 rr1-delta2
6105 \end_layout
6107 \begin_layout Itemize
6108 Wxwidgets: Fix dumper submodes
6109 \end_layout
6111 \begin_layout Itemize
6112 Set core controller types before loadstate
6113 \end_layout
6115 \begin_layout Subsection
6116 rr1-delta2epsilon1
6117 \end_layout
6119 \begin_layout Itemize
6120 Fix compiling with bsnes v086.
6121 \end_layout
6123 \begin_layout Subsection
6124 rr1-delta3
6125 \end_layout
6127 \begin_layout Itemize
6128 Don't prompt before quitting
6129 \end_layout
6131 \begin_layout Itemize
6132 Start unpaused, preserve pause/unpause over load.
6133 \end_layout
6135 \begin_layout Itemize
6136 Try to autodetect if ROM is headered.
6137 \end_layout
6139 \begin_layout Itemize
6140 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6141 \end_layout
6143 \begin_layout Itemize
6144 Allow configuring some hotkeys.
6145 \end_layout
6147 \begin_layout Subsection
6148 rr1-delta4
6149 \end_layout
6151 \begin_layout Itemize
6152 Lots of code cleanups
6153 \end_layout
6155 \begin_layout Itemize
6156 Fix JMD compression (JMD dumping was broken)
6157 \end_layout
6159 \begin_layout Itemize
6160 Don't crash if Lua C function throws an exception.
6161 \end_layout
6163 \begin_layout Itemize
6164 Support bitmap drawing in Lua.
6165 \end_layout
6167 \begin_layout Itemize
6168 Fix bsnes v085/v086 patches.
6169 \end_layout
6171 \begin_layout Itemize
6172 Improve stability on win32.
6173 \end_layout
6175 \begin_layout Subsection
6176 rr1-delta4epsilon1
6177 \end_layout
6179 \begin_layout Itemize
6180 Don't corrupt movie if movie length is integer multiple of frames per page.
6181 \end_layout
6183 \begin_layout Subsection
6184 rr1-delta5
6185 \end_layout
6187 \begin_layout Itemize
6188 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6189 \end_layout
6191 \begin_layout Itemize
6192 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6193 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6195 \end_layout
6197 \begin_layout Itemize
6198 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6199 \end_layout
6201 \begin_layout Itemize
6202 Wxwidgets: Fix broken modifiers
6203 \end_layout
6205 \begin_layout Itemize
6206 on_paint has parameter now.
6207 \end_layout
6209 \begin_layout Itemize
6210 Optional initital fill for bitmaps
6211 \end_layout
6213 \begin_layout Itemize
6214 Fix palette changing.
6215 \end_layout
6217 \begin_layout Itemize
6218 Optimize rendering a bit.
6219 \end_layout
6221 \begin_layout Itemize
6222 Bsnes v087 support.
6223 \end_layout
6225 \begin_layout Subsection
6226 rr1-delta5epsilon1
6227 \end_layout
6229 \begin_layout Itemize
6230 Movieinfo: Fix display of port #2 type.
6231 \end_layout
6233 \begin_layout Itemize
6234 Call on_input() after loadstate.
6235 \end_layout
6237 \begin_layout Subsection
6238 rr1-delta5epsilon2
6239 \end_layout
6241 \begin_layout Itemize
6242 Fix writing port2 data to movie.
6243 \end_layout
6245 \begin_layout Itemize
6246 Fix SRAM handling with Bsnes v087.
6247 \end_layout
6249 \begin_layout Subsection
6250 rr1-delta6
6251 \end_layout
6253 \begin_layout Itemize
6254 Library loading support
6255 \end_layout
6257 \begin_layout Itemize
6258 Built-in TSCC encoder
6259 \end_layout
6261 \begin_layout Itemize
6262 Hi-color (256T colors) dumping.
6263 \end_layout
6265 \begin_layout Itemize
6266 Dump over TCP/IP(v6)
6267 \end_layout
6269 \begin_layout Itemize
6270 Hidable status panel
6271 \end_layout
6273 \begin_layout Itemize
6274 Turbo toggle/hold
6275 \end_layout
6277 \begin_layout Itemize
6278 Adjustable sound volume
6279 \end_layout
6281 \begin_layout Itemize
6282 Screen scaling
6283 \end_layout
6285 \begin_layout Itemize
6286 Allow DnD into filename boxes
6287 \end_layout
6289 \begin_layout Itemize
6290 Configurable paths
6291 \end_layout
6293 \begin_layout Itemize
6294 Portaudio: Fix speaker popping at start
6295 \end_layout
6297 \begin_layout Itemize
6298 Lots of UI changes
6299 \end_layout
6301 \begin_layout Itemize
6302 Speed adjustment menu
6303 \end_layout
6305 \begin_layout Itemize
6306 Win32 joystick support
6307 \end_layout
6309 \begin_layout Itemize
6310 Lua: gui.rainbow and gui.box
6311 \end_layout
6313 \begin_layout Itemize
6314 Split key lists into classes (the key list was large!)
6315 \end_layout
6317 \begin_layout Itemize
6318 More save slots support
6319 \end_layout
6321 \begin_layout Itemize
6322 Wxwidgets (wxJoystick) joystick support
6323 \end_layout
6325 \begin_layout Subsection
6326 rr1-delta7
6327 \end_layout
6329 \begin_layout Itemize
6330 Lots of internal joystick refactoring
6331 \end_layout
6333 \begin_layout Itemize
6334 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6335 \end_layout
6337 \begin_layout Itemize
6338 Wxwidgets: Settings mode (open settings without ROM)
6339 \end_layout
6341 \begin_layout Itemize
6342 Wxwidgets: Prompt key to use option
6343 \end_layout
6345 \begin_layout Itemize
6346 Wxwidgets: Fix crash if key goes away underneath
6347 \end_layout
6349 \begin_layout Itemize
6350 Wxwidgets: Fix mouse position in presence of scaling
6351 \end_layout
6353 \begin_layout Itemize
6354 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6355 \end_layout
6357 \begin_layout Itemize
6358 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6359  seem to work well on WinXP)
6360 \end_layout
6362 \begin_layout Itemize
6363 Start paused option.
6364 \end_layout
6366 \begin_layout Subsection
6367 rr1-delta7epsilon1
6368 \end_layout
6370 \begin_layout Itemize
6371 AVI: ZMBV support
6372 \end_layout
6374 \begin_layout Itemize
6375 lsnes-dumpavi: Start Lua before starting dumper
6376 \end_layout
6378 \begin_layout Itemize
6379 AVI: Fix secondary audio in mode 4.
6380 \end_layout
6382 \begin_layout Subsection
6383 rr1-delta7epsilon2
6384 \end_layout
6386 \begin_layout Itemize
6387 AVI: Refactor ZMBV a bit.
6388 \end_layout
6390 \begin_layout Itemize
6391 Fix error reading analog values from movie file
6392 \end_layout
6394 \begin_layout Subsection
6395 rr1-delta8
6396 \end_layout
6398 \begin_layout Itemize
6399 Delayed reset support
6400 \end_layout
6402 \begin_layout Itemize
6403 Lua: memory.hash_region
6404 \end_layout
6406 \begin_layout Subsection
6407 rr1-delta8epsilon1
6408 \end_layout
6410 \begin_layout Itemize
6411 Rework the build system
6412 \end_layout
6414 \begin_layout Itemize
6415 Typing input support
6416 \end_layout
6418 \begin_layout Itemize
6419 Fix building with bsnes v086 and v087.
6420 \end_layout
6422 \begin_layout Itemize
6423 SDL: Save settings on exit
6424 \end_layout
6426 \begin_layout Itemize
6427 SDL: Command to enter command line mode with given command.
6428 \end_layout
6430 \begin_layout Itemize
6431 SDL: More advanced command editing.
6432 \end_layout
6434 \begin_layout Subsection
6435 rr1-delta9
6436 \end_layout
6438 \begin_layout Itemize
6439 wxMSW: Fix the 
6440 \begin_inset Quotes eld
6441 \end_inset
6443 arrow keys and enter don't work
6444 \begin_inset Quotes erd
6445 \end_inset
6447  problem
6448 \end_layout
6450 \begin_layout Itemize
6451 MSU-1 support
6452 \end_layout
6454 \begin_layout Itemize
6455 Show mode changes due to rewinding.
6456 \end_layout
6458 \begin_layout Itemize
6459 Unsafe rewind support
6460 \end_layout
6462 \begin_layout Itemize
6463 Fix directory transversal.
6464 \end_layout
6466 \begin_layout Subsection
6467 rr1-delta10
6468 \end_layout
6470 \begin_layout Itemize
6471 AVI: Sound mode 5 (48kHz high-quality)
6472 \end_layout
6474 \begin_layout Itemize
6475 Lua: Reset Lua VM
6476 \end_layout
6478 \begin_layout Itemize
6479 Map the SNES bus into address space
6480 \end_layout
6482 \begin_layout Itemize
6483 Fix loading memory watch files with CRLF line endings
6484 \end_layout
6486 \begin_layout Subsection
6487 rr1-delta10epsilon1
6488 \end_layout
6490 \begin_layout Itemize
6491 Map bsnes internal state into memory space
6492 \end_layout
6494 \begin_layout Itemize
6495 Fix the 
6496 \begin_inset Quotes eld
6497 \end_inset
6499 click on panel wedges the emulator
6500 \begin_inset Quotes erd
6501 \end_inset
6503  for real.
6504 \end_layout
6506 \begin_layout Itemize
6507 DnD movies/saves on the main window.
6508 \end_layout
6510 \begin_layout Subsection
6511 rr1-delta11
6512 \end_layout
6514 \begin_layout Itemize
6515 Split core bindings into own module.
6516 \end_layout
6518 \begin_layout Itemize
6519 Remember invalid settings
6520 \end_layout
6522 \begin_layout Itemize
6523 Support for modified Gambatte core for GB/GBC emulation.
6524 \end_layout
6526 \begin_layout Itemize
6527 Reload/swap ROM function
6528 \end_layout
6530 \begin_layout Subsection
6531 rr1-delta11epsilon1
6532 \end_layout
6534 \begin_layout Itemize
6535 Fix step poll function
6536 \end_layout
6538 \begin_layout Subsection
6539 rr1-delta12
6540 \end_layout
6542 \begin_layout Itemize
6543 Non-insane savestate anchoring
6544 \end_layout
6546 \begin_layout Subsection
6547 rr1-delta13
6548 \end_layout
6550 \begin_layout Itemize
6551 More Memory search methods
6552 \end_layout
6554 \begin_layout Itemize
6555 Preserve movie if loading in RO mode.
6556 \end_layout
6558 \begin_layout Itemize
6559 Fix a obscure case in timeline check
6560 \end_layout
6562 \begin_layout Itemize
6563 Revamp the entiere ROM loading code
6564 \end_layout
6566 \begin_layout Itemize
6567 Support DnD on ROMs
6568 \end_layout
6570 \begin_layout Itemize
6571 Revamp menu layout
6572 \end_layout
6574 \begin_layout Itemize
6575 Standalone hotkey config dialog
6576 \end_layout
6578 \begin_layout Itemize
6579 Show bindings in more user-friendly format
6580 \end_layout
6582 \begin_layout Subsection
6583 rr1-delta13epsilon1
6584 \end_layout
6586 \begin_layout Itemize
6587 Pipedec support
6588 \end_layout
6590 \begin_layout Itemize
6591 Fix uninitialized variables in bsnes v085
6592 \end_layout
6594 \begin_layout Subsection
6595 rr1-delta14
6596 \end_layout
6598 \begin_layout Itemize
6599 Merge gambatte core into mainline (from its own branch)
6600 \end_layout
6602 \begin_layout Itemize
6603 Wxwidgets: Show expected dump file formats
6604 \end_layout
6606 \begin_layout Itemize
6607 Memory watch: Data typing
6608 \end_layout
6610 \begin_layout Itemize
6611 lsnes internal MMIO area.
6612 \end_layout
6614 \begin_layout Itemize
6615 Wxwidgets: New memory watch editor
6616 \end_layout
6618 \begin_layout Itemize
6619 Hexadecimal memory watches
6620 \end_layout
6622 \begin_layout Itemize
6623 Wxwidgets: Monospaced panel
6624 \end_layout
6626 \begin_layout Itemize
6627 Wxwidgets: Split memory watches in panel
6628 \end_layout
6630 \begin_layout Itemize
6631 Wxwidgets: Disable VMAs in memory search
6632 \end_layout
6634 \begin_layout Itemize
6635 lsnes-dumpavi: Fix speed bug
6636 \end_layout
6638 \begin_layout Itemize
6639 Movie subtitle support
6640 \end_layout
6642 \begin_layout Itemize
6643 Fix rerecord count reporting
6644 \end_layout
6646 \begin_layout Itemize
6647 Don't trash movie when loading in readonly mode.
6648 \end_layout
6650 \begin_layout Subsection
6651 rr1-delta14epsilon1
6652 \end_layout
6654 \begin_layout Itemize
6655 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
6656 \end_layout
6658 \begin_layout Itemize
6659 Fix build on Mac OS X.
6660 \end_layout
6662 \begin_layout Itemize
6663 Lua: loopwrapper
6664 \end_layout
6666 \begin_layout Itemize
6667 Wxwidgets: Hidable messages window
6668 \end_layout
6670 \begin_layout Itemize
6671 Lua: input.joyset
6672 \end_layout
6674 \begin_layout Itemize
6675 Bsnes: Support inconsistent saves
6676 \end_layout
6678 \begin_layout Itemize
6679 Bsnes: Allow simulating saving every frame
6680 \end_layout
6682 \begin_layout Itemize
6683 Fix desync if savestate is loaded in readonly mode in certain conditions.
6684 \end_layout
6686 \begin_layout Itemize
6687 Wxwidgets: Fix save dialogs on Mac OS X.
6688 \end_layout
6690 \begin_layout Itemize
6691 Wxwidgets: Fix insane status width on Win32.
6692 \end_layout
6694 \begin_layout Itemize
6695 Wxwidgets: Fix autohold processing to be faster.
6696 \end_layout
6698 \begin_layout Itemize
6699 Wxwidgets: Allow loading ROMs and movies from commandline.
6700 \end_layout
6702 \begin_layout Subsection
6703 rr1-delta15
6704 \end_layout
6706 \begin_layout Itemize
6707 Be a bit smarter with --load
6708 \end_layout
6710 \begin_layout Itemize
6711 Rewrote higher-level parts of audio system
6712 \end_layout
6714 \begin_layout Itemize
6715 Tool to build commentary tracks
6716 \end_layout
6718 \begin_layout Itemize
6719 Lua: input.joyget
6720 \end_layout
6722 \begin_layout Itemize
6723 Gambatte: Add support for SVN358
6724 \end_layout
6726 \begin_layout Itemize
6727 Use builtin font when rendering status panel.
6728 \end_layout
6730 \begin_layout Itemize
6731 Option to detach memory watch to its own window.
6732 \end_layout
6734 \begin_layout Itemize
6735 Recent ROMs/Movies menu
6736 \end_layout
6738 \begin_layout Itemize
6739 Libao support
6740 \end_layout
6742 \begin_layout Itemize
6743 Useful lag counter for SNES games that autopoll
6744 \end_layout
6746 \begin_layout Itemize
6747 Fix buffer overflow in gambatte sound output
6748 \end_layout
6750 \begin_layout Subsection
6751 rr1-delta15epsilon1
6752 \end_layout
6754 \begin_layout Itemize
6755 Don't blow up on wxGTK if the window is hidden somehow
6756 \end_layout
6758 \begin_layout Itemize
6759 Support simultaneous drop of ROM and movie.
6760 \end_layout
6762 \begin_layout Itemize
6763 Gambatte: Don't save spurious SRAMs.
6764 \end_layout
6766 \begin_layout Itemize
6767 Make SGB ROMs actually usable.
6768 \end_layout
6770 \begin_layout Itemize
6771 Fix so that saved movies appear in recent movies.
6772 \end_layout
6774 \begin_layout Itemize
6775 Don't open multiple commentary editors at once.
6776 \end_layout
6778 \begin_layout Subsection
6779 rr1-delta15epsilon2
6780 \end_layout
6782 \begin_layout Itemize
6783 Lua: memory.readregion/memory.writeregion
6784 \end_layout
6786 \begin_layout Itemize
6787 Lua: memory.map{,s}{byte,word,dword,qword}
6788 \end_layout
6790 \begin_layout Itemize
6791 Lua: memory.map_structure
6792 \end_layout
6794 \begin_layout Itemize
6795 Lua: Fix bus_address for gambatte
6796 \end_layout
6798 \begin_layout Itemize
6799 Fix features dependent of bsnes debugger
6800 \end_layout
6802 \begin_layout Itemize
6803 Cleanup bsnes debugger logic
6804 \end_layout
6806 \begin_layout Itemize
6807 Fix resets in presence of save every frame
6808 \end_layout
6810 \begin_layout Subsection
6811 rr1-delta15epsilon3
6812 \end_layout
6814 \begin_layout Itemize
6815 Lua: input.lcid_to_pcid
6816 \end_layout
6818 \begin_layout Itemize
6819 Fix off-by-one bug with slot hashes
6820 \end_layout
6822 \begin_layout Itemize
6823 Fix crashes on certain memory watch expressions
6824 \end_layout
6826 \begin_layout Itemize
6827 Lua: memory.read_expr
6828 \end_layout
6830 \begin_layout Itemize
6831 Lua: Fix memory.read_expr on nil argument
6832 \end_layout
6834 \begin_layout Itemize
6835 Fix the code to compile on G++ 4.7
6836 \end_layout
6838 \begin_layout Itemize
6839 Change button_id to be a function pointer field, not a virtual method
6840 \end_layout
6842 \begin_layout Itemize
6843 Add bsnes patches to fix libsnes to compile on GCC 4.7
6844 \end_layout
6846 \begin_layout Itemize
6847 Gambatte: Always use legacy lag counting
6848 \end_layout
6850 \begin_layout Itemize
6851 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
6852 \end_layout
6854 \begin_layout Itemize
6855 Fix analog controllers
6856 \end_layout
6858 \begin_layout Itemize
6859 Fix autohold menus
6860 \end_layout
6862 \begin_layout Itemize
6863 Fix button symbols in input display
6864 \end_layout
6866 \begin_layout Itemize
6867 Compensate for nuts bsnes superscope/justifier handling
6868 \end_layout
6870 \begin_layout Itemize
6871 Lua: Fix bit.extract boolean handling
6872 \end_layout
6874 \begin_layout Subsection
6875 rr2-beta0
6876 \end_layout
6878 \begin_layout Itemize
6879 Split emulation cores more from the rest
6880 \end_layout
6882 \begin_layout Itemize
6883 Support having multiple emulation cores compiled at once
6884 \end_layout
6886 \begin_layout Itemize
6887 Support arbitrary number of ports (well, up to 31 anyway).
6888 \end_layout
6890 \begin_layout Itemize
6891 SNES debugger support
6892 \end_layout
6894 \begin_layout Itemize
6895 Support 16-button controllers
6896 \end_layout
6898 \begin_layout Itemize
6899 Remove old SDL front end
6900 \end_layout
6902 \begin_layout Itemize
6903 Data-driven controller buttons
6904 \end_layout
6906 \begin_layout Itemize
6907 Generate the port code from defines
6908 \end_layout
6910 \begin_layout Subsection
6911 rr2-beta1
6912 \end_layout
6914 \begin_layout Itemize
6915 Update libgambatte to SVN364
6916 \end_layout
6918 \begin_layout Itemize
6919 Get rid of partial linking (building with MXE works)
6920 \end_layout
6922 \begin_layout Itemize
6923 Load XML even without gamepack files
6924 \end_layout
6926 \begin_layout Itemize
6927 Support screen rotate & flip
6928 \end_layout
6930 \begin_layout Itemize
6931 Fix bug when changing controller key to another subkey of the same key
6932 \end_layout
6934 \begin_layout Subsection
6935 rr1-delta16
6936 \end_layout
6938 \begin_layout Itemize
6939 Stop at movie end: Don't off-by-one
6940 \end_layout
6942 \begin_layout Itemize
6943 Fix crash closing lsnes with voice playback active.
6944 \end_layout
6946 \begin_layout Itemize
6947 Import/Export OggOpus for commentary tracks
6948 \end_layout
6950 \begin_layout Itemize
6951 16-button controllers.
6952 \end_layout
6954 \begin_layout Itemize
6955 Don't show nonexistent controllers in input display
6956 \end_layout
6958 \begin_layout Itemize
6959 Set voice record/playback volume from UI
6960 \end_layout
6962 \begin_layout Itemize
6963 Patches for gambatte SVN364.
6964 \end_layout
6966 \begin_layout Itemize
6967 Load markup (if exists) even without gamepack file.
6968 \end_layout
6970 \begin_layout Itemize
6971 Screen rotation & flipping
6972 \end_layout
6974 \begin_layout Itemize
6975 Lua: Some new bit functions
6976 \end_layout
6978 \begin_layout Itemize
6979 Auto-refresh voice streams on change.
6980 \end_layout
6982 \begin_layout Itemize
6983 Auto-refresh subtitles on change & new subtitle editor.
6984 \end_layout
6986 \begin_layout Itemize
6987 Fix music volume adjustment.
6988 \end_layout
6990 \begin_layout Subsection
6991 rr2-beta2
6992 \end_layout
6994 \begin_layout Itemize
6995 Use system threads instead of platform threads
6996 \end_layout
6998 \begin_layout Itemize
6999 Cleanup build by allowing dummy and real drivers to link together.
7000 \end_layout
7002 \begin_layout Itemize
7003 Split duplex support
7004 \end_layout
7006 \begin_layout Subsection
7007 rr1-delta16epsilon1
7008 \end_layout
7010 \begin_layout Itemize
7011 Wxwidgets: Fix memory watch rendering.
7012 \end_layout
7014 \begin_layout Itemize
7015 Wxwidgets: Allow setting voice stream gain.
7016 \end_layout
7018 \begin_layout Itemize
7019 Wxwidgets: VU meters and volume adjustment.
7020 \end_layout
7022 \begin_layout Itemize
7023 Lua: Custom fonts support.
7024 \end_layout
7026 \begin_layout Itemize
7027 Lua: Fix methods stopping working when resetting Lua.
7028 \end_layout
7030 \begin_layout Itemize
7031 Fix loading standard-format movies in preserve (readonly) mode.
7032 \end_layout
7034 \begin_layout Subsection
7035 rr1-delta17
7036 \end_layout
7038 \begin_layout Itemize
7039 Primitive movie editor
7040 \end_layout
7042 \begin_layout Itemize
7043 Fix VU meter with no sound device.
7044 \end_layout
7046 \begin_layout Itemize
7047 Fix various undefined return values.
7048 \end_layout
7050 \begin_layout Itemize
7051 Show rates in VU meter window.
7052 \end_layout
7054 \begin_layout Subsection
7055 rr2-beta3
7056 \end_layout
7058 \begin_layout Itemize
7059 Lua: Render queues as objects
7060 \end_layout
7062 \begin_layout Itemize
7063 Bsnes: support hard resets
7064 \end_layout
7066 \begin_layout Itemize
7067 Dedicated sound devices dialog
7068 \end_layout
7070 \begin_layout Itemize
7071 Change the default AVI sound mode to 2 or 5.
7072 \end_layout
7074 \begin_layout Itemize
7075 Fix totally borked movie saving.
7076 \end_layout
7078 \begin_layout Itemize
7079 Portaudio: Use split duplex with different devices.
7080 \end_layout
7082 \begin_layout Itemize
7083 Fix controls with gambatte core.
7084 \end_layout
7086 \begin_layout Itemize
7087 Modify save slot set handling.
7088 \end_layout
7090 \begin_layout Itemize
7091 lsnes-dumpavi: --firmware-path.
7092 \end_layout
7094 \begin_layout Itemize
7095 Fix lots of compiler warnings.
7096 \end_layout
7098 \begin_layout Subsection
7099 rr1-delta17epsilon1
7100 \end_layout
7102 \begin_layout Itemize
7103 Commentary tool: Set nominal bit rate and limit max bit rate.
7104 \end_layout
7106 \begin_layout Itemize
7107 Lua: Unconditionally reload host memory on loadstate
7108 \end_layout
7110 \begin_layout Itemize
7111 Lua: Query bindings, manipulate aliases, create inverse bindings
7112 \end_layout
7114 \begin_layout Itemize
7115 Lua: Fix crashes with resetting VM while some types of paint requests are
7116  in flight.
7117 \end_layout
7119 \begin_layout Itemize
7120 Lua: gui.text: Clip the text properly instead of corrupting memory in some
7121  cases.
7122 \end_layout
7124 \begin_layout Itemize
7125 Save screenshot header reliably
7126 \end_layout
7128 \begin_layout Itemize
7129 Lua: Backport input.get2 and input.set2
7130 \end_layout
7132 \begin_layout Itemize
7133 Lua: New controller info functions.
7134 \end_layout
7136 \begin_layout Itemize
7137 Movie editor: Fix reset delay counters to be the right way around.
7138 \end_layout
7140 \begin_layout Itemize
7141 Lua: on_snoop2
7142 \end_layout
7144 \begin_layout Itemize
7145 Lua: on_button and input.veto_button.
7146 \end_layout
7148 \begin_layout Subsection
7149 rr2-beta4
7150 \end_layout
7152 \begin_layout Itemize
7153 Revert memory leak fix breaking input
7154 \end_layout
7156 \begin_layout Itemize
7157 Refactor Opus handling
7158 \end_layout
7160 \begin_layout Itemize
7161 Restrict member picking only to .zip files
7162 \end_layout
7164 \begin_layout Itemize
7165 Fix reading of host-endian VMAs.
7166 \end_layout
7168 \begin_layout Itemize
7169 Fix rlow and rhigh to be the right way around.
7170 \end_layout
7172 \begin_layout Itemize
7173 Lua: Don't wedge VM if callback fails with an exception
7174 \end_layout
7176 \begin_layout Itemize
7177 Refactor Ogg handling.
7178 \end_layout
7180 \begin_layout Subsection
7181 rr1-delta17epsilon2
7182 \end_layout
7184 \begin_layout Itemize
7185 Fix saving PNG screenshots on Win32.
7186 \end_layout
7188 \begin_layout Itemize
7189 Movie editor: Sweep axis.
7190 \end_layout
7192 \begin_layout Itemize
7193 Load selected slot in ro/rw/preserve/movie mode.
7194 \end_layout
7196 \begin_layout Itemize
7197 input.joyset: Preserve and invert user input.
7198 \end_layout
7200 \begin_layout Itemize
7201 Allow immediate saving at point of save (transfer saves).
7202 \end_layout
7204 \begin_layout Itemize
7205 Wxwidgets: Filter filenames in dialogs, autoappend extensions.
7206 \end_layout
7208 \begin_layout Itemize
7209 data/verysmall.font: Add missing glyph 70 (
7210 \begin_inset Quotes eld
7211 \end_inset
7214 \begin_inset Quotes erd
7215 \end_inset
7218 \end_layout
7220 \begin_layout Itemize
7221 Lua: Allow painting custom fonts with halo.
7222 \end_layout
7224 \begin_layout Itemize
7225 Fix memory value search to work on byte types.
7226 \end_layout
7228 \begin_layout Subsection
7229 rr2-beta5
7230 \end_layout
7232 \begin_layout Itemize
7233 Reject oggopus files with incomplete pregap
7234 \end_layout
7236 \begin_layout Itemize
7237 Fix multistream and ogg demuxing
7238 \end_layout
7240 \begin_layout Itemize
7241 Workaround bug with screen >1024 pixels wide.
7242 \end_layout
7244 \begin_layout Itemize
7245 Allow on_input to force/veto system controls.
7246 \end_layout
7248 \begin_layout Itemize
7249 Dedicated autohold/autofire window.
7250 \end_layout
7252 \begin_layout Itemize
7253 Support per-button autofire.
7254 \end_layout
7256 \begin_layout Itemize
7257 Fix crash on trying to frameadvance/exit with no ROM loaded.
7258 \end_layout
7260 \begin_layout Itemize
7261 Fix nonexistent controller key warnings.
7262 \end_layout
7264 \begin_layout Itemize
7265 Movie editor: Fix mouse editing (TYPE_RAXIS)
7266 \end_layout
7268 \begin_layout Itemize
7269 TAS input plugin
7270 \end_layout
7272 \begin_layout Itemize
7273 Analog passthrough.
7274 \end_layout
7276 \begin_layout Itemize
7277 Add throttle axes (TYPE_TAXIS).
7278 \end_layout
7280 \begin_layout Itemize
7281 Fix movie reading with first port having multiple controllers.
7282 \end_layout
7284 \begin_layout Itemize
7285 Move some info from status panel to statusbar.
7286 \end_layout
7288 \begin_layout Subsection
7289 rr1-delta17epsilon3
7290 \end_layout
7292 \begin_layout Itemize
7293 Fix status panel (and movie editor) flicker
7294 \end_layout
7296 \begin_layout Itemize
7297 Show effects of Lua in input display
7298 \end_layout
7300 \begin_layout Itemize
7301 Offer lsmv.backup as file filter too for load lsmv
7302 \end_layout
7304 \begin_layout Itemize
7305 Allow slowing down subframe advance 
7306 \end_layout
7308 \begin_layout Itemize
7309 Display current save slot information
7310 \end_layout
7312 \begin_layout Itemize
7313 Add snes9x fonts
7314 \end_layout
7316 \begin_layout Itemize
7317 Fix hotkeys stopping working after X-ing settings dialog
7318 \end_layout
7320 \begin_layout Itemize
7321 Movie editor: Fix bug if extending finished movie
7322 \end_layout
7324 \begin_layout Itemize
7325 Cap current_frame_first_subframe to movie size when recounting movie
7326 \end_layout
7328 \begin_layout Itemize
7329 Movie editor: Interpret ctrl+click as right click 
7330 \end_layout
7332 \begin_layout Subsection
7333 rr2-beta6
7334 \end_layout
7336 \begin_layout Itemize
7337 Autofire: Fix false status indications
7338 \end_layout
7340 \begin_layout Itemize
7341 Fix subframe counter
7342 \end_layout
7344 \begin_layout Itemize
7345 Fix print() after Lua reset
7346 \end_layout
7348 \begin_layout Itemize
7349 New settings framework
7350 \end_layout
7352 \begin_layout Itemize
7353 Remove some unused leftover stuff
7354 \end_layout
7356 \begin_layout Itemize
7357 Fix race condition causing possible crash on startup
7358 \end_layout
7360 \begin_layout Itemize
7361 Fix compiling if uint64_t and size_t are not compatible
7362 \end_layout
7364 \begin_layout Itemize
7365 Lua: Don't crash if input.[gs]et{,a} is called outside on_input
7366 \end_layout
7368 \begin_layout Subsection
7369 rr2-beta7
7370 \end_layout
7372 \begin_layout Itemize
7373 Fix bug causing crash if triple has invalid button
7374 \end_layout
7376 \end_body
7377 \end_document