Merge branch 'rr1-maint'
[lsnes.git] / manual.lyx
blob47e6f27b2e819736dffb39beed49b1369257b339
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
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 (if Lua support is needed).
148 \end_layout
150 \begin_deeper
151 \begin_layout Itemize
152 Version 5.1.X or 5.2X.
153 \end_layout
155 \end_deeper
156 \begin_layout Enumerate
157 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
158 \end_layout
160 \begin_layout Section
161 Building
162 \end_layout
164 \begin_layout Itemize
165 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
166  bsnes core).
167 \end_layout
169 \begin_layout Itemize
170 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
171 \end_layout
173 \begin_layout Itemize
174 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
175 >', bsnes core)
176 \end_layout
178 \begin_layout Itemize
179 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
180 ersion>', gambatte core)
181 \end_layout
183 \begin_layout Itemize
184 Edit options.build (or copy of that file)
185 \end_layout
187 \begin_layout Itemize
188 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
190 \end_layout
192 \begin_layout Section
193 Command line options
194 \end_layout
196 \begin_layout Subsection
197 ROM options
198 \end_layout
200 \begin_layout Subsubsection
201 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
202 \end_layout
204 \begin_layout Standard
205 Load <file> as ROM.
206 \end_layout
208 \begin_layout Subsection
209 Session options
210 \end_layout
212 \begin_layout Subsubsection
213 --pause
214 \end_layout
216 \begin_layout Standard
217 Start paused
218 \end_layout
220 \begin_layout Subsubsection
221 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
222 \end_layout
224 \begin_layout Standard
225 Load <filename> as movie or savestate file.
226  All other session options are ignored.
227 \end_layout
229 \begin_layout Subsubsection
230 --port1=<device> (lsnes/SDL, bsnes core only)
231 \end_layout
233 \begin_layout Standard
234 Set type of port1.
235  Valid values are:
236 \end_layout
238 \begin_layout Itemize
239 none: No device connected
240 \end_layout
242 \begin_layout Itemize
243 gamepad: One gamepad (the default)
244 \end_layout
246 \begin_layout Itemize
247 multitap: Four gamepads (warning: makes most games refuse to start)
248 \end_layout
250 \begin_layout Itemize
251 mouse: Mouse.
252 \end_layout
254 \begin_layout Subsubsection
255 --port2=<type> (lsnes/SDL, bsnes core only)
256 \end_layout
258 \begin_layout Standard
259 Set type of port2.
260  Valid values are:
261 \end_layout
263 \begin_layout Itemize
264 none: No device connected (the default)
265 \end_layout
267 \begin_layout Itemize
268 gamepad: One gamepad
269 \end_layout
271 \begin_layout Itemize
272 multitap: Four gamepads.
273 \end_layout
275 \begin_layout Itemize
276 mouse: Mouse
277 \end_layout
279 \begin_layout Itemize
280 superscope: Super Scope
281 \end_layout
283 \begin_layout Itemize
284 justifier: One justifier
285 \end_layout
287 \begin_layout Itemize
288 justifiers: Two justifiers
289 \end_layout
291 \begin_layout Subsubsection
292 --gamename=<name> (lsnes/SDL)
293 \end_layout
295 \begin_layout Standard
296 Set the name of game to <name>.
297  Default is blank.
298 \end_layout
300 \begin_layout Subsubsection
301 --author=<name> (lsnes/SDL)
302 \end_layout
304 \begin_layout Standard
305 Add author with full name of <name> (no nickname).
306 \end_layout
308 \begin_layout Subsubsection
309 --author=|<name> (lsnes/SDL)
310 \end_layout
312 \begin_layout Standard
313 Add author with nickname of <name> (no full name).
314 \end_layout
316 \begin_layout Subsubsection
317 --author=<fullname>|<nickname> (lsnes/SDL)
318 \end_layout
320 \begin_layout Standard
321 Add author with full name of <fullname> and nickname of <nickname>.
322 \end_layout
324 \begin_layout Subsubsection
325 --rtc-second=<value> (lsnes/SDL)
326 \end_layout
328 \begin_layout Standard
329 Set RTC second (0 is 1st January 1970 00:00:00Z).
330  Default is 1,000,000,000.
331 \end_layout
333 \begin_layout Subsubsection
334 --rtc-subsecond=<value> (lsnes/SDL)
335 \end_layout
337 \begin_layout Standard
338 Set RTC subsecond.
339  Range is 0-.
340  Unit is CPU cycle.
341  Default is 0.
342 \end_layout
344 \begin_layout Subsubsection
345 --anchor-savestate=<file> (lsnes/SDL)
346 \end_layout
348 \begin_layout Standard
349 Set the anchor savestate file.
350 \end_layout
352 \begin_layout Subsubsection
353 --load=<file> (lsnes/wxwidgets)
354 \end_layout
356 \begin_layout Standard
357 After loading the ROM, load <file> as savestate/movie.
358 \end_layout
360 \begin_layout Subsection
361 Misc.
362  options:
363 \end_layout
365 \begin_layout Subsubsection
366 --run=<file> (lsnes/SDL)
367 \end_layout
369 \begin_layout Standard
370 After running main RC file, run this file.
371  If multiple are specified, these execute in order specified.
372 \end_layout
374 \begin_layout Subsection
375 dump options (lsnes-dumpavi only)
376 \end_layout
378 \begin_layout Subsubsection
379 --dumper=<dumper>
380 \end_layout
382 \begin_layout Standard
383 Set the dumper to use (required).
384  Use 'list' for listing of known dumpers.
385 \end_layout
387 \begin_layout Subsubsection
388 --mode=<mode>
389 \end_layout
391 \begin_layout Standard
392 Set the mode to use (required for dumpers with multiple modes, forbidden
393  otherwise).
394  Use 'list' for known modes.
395 \end_layout
397 \begin_layout Subsubsection
398 --prefix=<prefix>
399 \end_layout
401 \begin_layout Standard
402 Set dump prefix.
403  Default is 
404 \begin_inset Quotes eld
405 \end_inset
407 avidump
408 \begin_inset Quotes erd
409 \end_inset
412 \end_layout
414 \begin_layout Subsubsection
415 --option=<name>=<value>
416 \end_layout
418 \begin_layout Standard
419 Set option <name> to value <value>.
420 \end_layout
422 \begin_layout Subsubsection
423 --length=<length>
424 \end_layout
426 \begin_layout Standard
427 Set number of frames to dump.
428  Mandatory.
429 \end_layout
431 \begin_layout Subsubsection
432 --lua=<script>
433 \end_layout
435 \begin_layout Standard
436 Run specified lua script (lsnes-dumpavi does not have initialization files).
437 \end_layout
439 \begin_layout Subsubsection
440 --load-library=<library>
441 \end_layout
443 \begin_layout Standard
444 Load the specified shared object / dynamic library / dynamic link library.
445 \end_layout
447 \begin_layout Section
448 Startup file lsnes.rc
449 \end_layout
451 \begin_layout Standard
452 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
453  This file is located in:
454 \end_layout
456 \begin_layout Itemize
457 Windows: %APPDATA%
458 \backslash
459 lsnes
460 \backslash
461 lsnes.rc (if %APPDATA% exists)
462 \end_layout
464 \begin_layout Itemize
465 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
466 \end_layout
468 \begin_layout Itemize
469 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
470 \end_layout
472 \begin_layout Itemize
473 All: ./lsnes.rc (fallback default).
474 \end_layout
476 \begin_layout Standard
477 If leading directories do not exist, attempt to create them is made.
478 \end_layout
480 \begin_layout Section
481 Internal commands
482 \end_layout
484 \begin_layout Itemize
485 Commands beginning with '*' invoke the corresponding command without alias
486  expansion.
487 \end_layout
489 \begin_layout Itemize
490 If command starts with '+' (after possible '*'), the command is executed
491  as-is when button is pressed, and when button is released, it is executed
492  with '+' replaced by '-'.
493 \end_layout
495 \begin_layout Itemize
496 Commands without '+' execute only on negative edge (release).
497 \end_layout
499 \begin_layout Subsection
500 run-script <script>
501 \end_layout
503 \begin_layout Standard
504 Run <script> as if commands were entered on the command line.
505 \end_layout
507 \begin_layout Subsection
508 Memory manipulation
509 \end_layout
511 \begin_layout Standard
512 <address> may be decimal or hexadecimal (prefixed with '0x').
513  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
514  with '-') decimal.
515 \end_layout
517 \begin_layout Standard
518 The available element <sizes> are:
519 \end_layout
521 \begin_layout Itemize
522 byte: 1 byte
523 \end_layout
525 \begin_layout Itemize
526 word: 2 bytes
527 \end_layout
529 \begin_layout Itemize
530 dword: 4 bytes
531 \end_layout
533 \begin_layout Itemize
534 qword: 8 bytes
535 \end_layout
537 \begin_layout Standard
538 When reading RAM and ROM, multi-byte reads/writes are big-endian.
539  When dealing with DSP memory, multi-byte reads/writes are native-endian
540  (do not use operand sizes exceeding DSP bitness, except dword is OK for
541  24-bit memory).
542 \end_layout
544 \begin_layout Subsubsection
545 read-<size> <address>
546 \end_layout
548 \begin_layout Standard
549 Read the value of byte in <address>.
550 \end_layout
552 \begin_layout Subsubsection
553 read-s<size> <address>
554 \end_layout
556 \begin_layout Standard
557 Read the value of signed byte in <address>.
558 \end_layout
560 \begin_layout Subsubsection
561 write-<size> <address> <value>
562 \end_layout
564 \begin_layout Standard
565 Write <value> to byte in address <address>.
566 \end_layout
568 \begin_layout Subsection
569 Main commands
570 \end_layout
572 \begin_layout Standard
573 These commands are not available in lsnesrc, but are available after ROM
574  has been loaded.
575 \end_layout
577 \begin_layout Subsubsection
578 quit-emulator [/y]
579 \end_layout
581 \begin_layout Standard
582 Quits the emulator (asking for confirmation).
583  If /y is given, no confirmation is asked.
584 \end_layout
586 \begin_layout Subsubsection
587 pause-emulator
588 \end_layout
590 \begin_layout Standard
591 Toggle paused/unpaused
592 \end_layout
594 \begin_layout Subsubsection
595 +advance-frame 
596 \end_layout
598 \begin_layout Standard
599 Advance frame.
600  If the button is still held after configurable timeout expires, game unpauses
601  for the duration frame advance is held.
602 \end_layout
604 \begin_layout Subsubsection
605 +advance-poll 
606 \end_layout
608 \begin_layout Standard
609 Advance subframe.
610  If the button is still held after configurable timeout expires, game unpauses
611  for the duration frame advance is held.
612 \end_layout
614 \begin_layout Subsubsection
615 advance-skiplag 
616 \end_layout
618 \begin_layout Standard
619 Skip to first poll in frame after current.
620 \end_layout
622 \begin_layout Subsubsection
623 reset 
624 \end_layout
626 \begin_layout Standard
627 Reset the SNES after this frame.
628 \end_layout
630 \begin_layout Subsubsection
631 load <filename> 
632 \end_layout
634 \begin_layout Standard
635 Load savestate <filename> in current mode.
636 \end_layout
638 \begin_layout Subsubsection
639 load-state <filename> 
640 \end_layout
642 \begin_layout Standard
643 Load savestate <filename> in readwrite mode.
644 \end_layout
646 \begin_layout Subsubsection
647 load-readonly <filename> 
648 \end_layout
650 \begin_layout Standard
651 Load savestate <filename> in readonly mode.
652 \end_layout
654 \begin_layout Subsubsection
655 load-preserve <filename> 
656 \end_layout
658 \begin_layout Standard
659 Load savestate <filename> in readonly mode, preserving current events.
660 \end_layout
662 \begin_layout Subsubsection
663 load-movie <filename> 
664 \end_layout
666 \begin_layout Standard
667 Load savestate <filename>, ignoring save part in readonly mode.
668 \end_layout
670 \begin_layout Subsubsection
671 save-state <filename> 
672 \end_layout
674 \begin_layout Standard
675 Save system state to <filename> as soon as possible.
676 \end_layout
678 \begin_layout Subsubsection
679 save-movie <filename> 
680 \end_layout
682 \begin_layout Standard
683 Save movie to <filename>.
684 \end_layout
686 \begin_layout Subsubsection
687 set-rwmode 
688 \end_layout
690 \begin_layout Standard
691 Set read-write mode.
692 \end_layout
694 \begin_layout Subsubsection
695 set-romode 
696 \end_layout
698 \begin_layout Standard
699 Set read-only mode
700 \end_layout
702 \begin_layout Subsubsection
703 toggle-rwmode 
704 \end_layout
706 \begin_layout Standard
707 Toggle between read-only and read-write modes.
708 \end_layout
710 \begin_layout Subsubsection
711 test-1, test-2, test-3
712 \end_layout
714 \begin_layout Standard
715 Internal test commands.
716  Don't use.
717 \end_layout
719 \begin_layout Subsubsection
720 take-screenshot <filename> 
721 \end_layout
723 \begin_layout Standard
724 Save screenshot to <filename>.
725 \end_layout
727 \begin_layout Subsubsection
728 +controller <class>-<#>-<button>
729 \end_layout
731 \begin_layout Standard
732 Press button <button> on controller <num> of class <class>.
733 \end_layout
735 \begin_layout Itemize
736 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
737  ext0, ext1, ext2, ext3
738 \end_layout
740 \begin_layout Itemize
741 Class 'mouse': L, R
742 \end_layout
744 \begin_layout Itemize
745 Class 'superscope': trigger, cursor, turbo, pause
746 \end_layout
748 \begin_layout Itemize
749 Class 'justifier': trigger, start
750 \end_layout
752 \begin_layout Itemize
753 Class 'gb': A, B, select, start, up, down, left, right
754 \end_layout
756 \begin_layout Subsubsection
757 hold-controller <class>-<#>-<button>
758 \end_layout
760 \begin_layout Standard
761 Hold/unhold button <button> on controller <num> of class <class>.
762 \end_layout
764 \begin_layout Subsubsection
765 type-controller <class>-<#>-<button>
766 \end_layout
768 \begin_layout Standard
769 Hold/unhold button <button> on controller <num> of class <class> for the
770  next frame.
771  See +controller for button names.
772 \end_layout
774 \begin_layout Standard
775 Cauntion: Does not work properly if outside frame advance.
776 \end_layout
778 \begin_layout Subsubsection
779 designate-position <class>-<#>-analog<n>
780 \end_layout
782 \begin_layout Standard
783 Designate position for analog pair.
784  <n> is only there if there are multiple axis pairs.
785 \end_layout
787 \begin_layout Subsubsection
788 autofire (<pattern>|-)...
789 \end_layout
791 \begin_layout Standard
792 Set autofire pattern.
793  Each parameter is comma-separated list of button names to hold on that
794  frame.
795  After reaching the end of pattern, the pattern restarts from the beginning.
796 \end_layout
798 \begin_layout Subsubsection
799 repaint
800 \end_layout
802 \begin_layout Standard
803 Force a repaint.
804 \end_layout
806 \begin_layout Subsection
807 Save jukebox 
808 \end_layout
810 \begin_layout Subsubsection
811 cycle-jukebox-backward
812 \end_layout
814 \begin_layout Standard
815 Cycle save jukebox backwards.
816 \end_layout
818 \begin_layout Subsubsection
819 cycle-jukebox-forward
820 \end_layout
822 \begin_layout Standard
823 Cycle save jukebox forwards
824 \end_layout
826 \begin_layout Subsubsection
827 load-jukebox
828 \end_layout
830 \begin_layout Standard
831 Do load from jukebox (current mode).
832 \end_layout
834 \begin_layout Subsubsection
835 save-jukebox
836 \end_layout
838 \begin_layout Standard
839 Do state save to jukebox.
840 \end_layout
842 \begin_layout Subsection
843 Lua 
844 \end_layout
846 \begin_layout Standard
847 Only available if lua support is compiled in.
848 \end_layout
850 \begin_layout Subsubsection
851 evaluate-lua <luacode>
852 \end_layout
854 \begin_layout Standard
855 Run Lua code <luacode> using built-in Lua interpretter.
856 \end_layout
858 \begin_layout Subsubsection
859 run-lua <script>
860 \end_layout
862 \begin_layout Standard
863 Run specified lua file using built-in Lua interpretter.
864 \end_layout
866 \begin_layout Subsubsection
867 reset-lua
868 \end_layout
870 \begin_layout Standard
871 Clear the Lua VM state and restore to factory defaults.
872 \end_layout
874 \begin_layout Subsection
875 Memory watch
876 \end_layout
878 \begin_layout Subsubsection
879 add-watch <name> <expression>
880 \end_layout
882 \begin_layout Standard
883 Adds new watch (or modifies old one).
884 \end_layout
886 \begin_layout Subsubsection
887 remove-watch <name>
888 \end_layout
890 \begin_layout Standard
891 Remove a watch.
892 \end_layout
894 \begin_layout Subsection
895 Sound 
896 \end_layout
898 \begin_layout Subsubsection
899 enable-sound <on/off> 
900 \end_layout
902 \begin_layout Standard
903 Enable/Disable sound.
904 \end_layout
906 \begin_layout Subsubsection
907 set-volume <multiplier>
908 \end_layout
910 \begin_layout Standard
911 Set the volume multiplier to <multiplier>.
912  1 is normal volume, and higher numbers are louder.
913 \end_layout
915 \begin_layout Subsubsection
916 set-volume <multiplier>%
917 \end_layout
919 \begin_layout Standard
920 Set the volume multiplier to <multiplier> percent.
921  100 is normal volume, and higher numbers are louder.
922 \end_layout
924 \begin_layout Subsubsection
925 set-volume <multiplier>dB
926 \end_layout
928 \begin_layout Standard
929 Set the volume multiplier to <multiplier> dB.
930  0 is normal volume, and higher numbers are louder.
931  The value may be negative.
932 \end_layout
934 \begin_layout Subsection
935 Misc.
936 \end_layout
938 \begin_layout Subsubsection
939 reload-rom [<file>]
940 \end_layout
942 \begin_layout Standard
943 Reloads the main ROM image from <file>.
944 \end_layout
946 \begin_layout Subsubsection
947 +tangent
948 \end_layout
950 \begin_layout Standard
951 Tangent for recording voice for commentary track.
952  While pressed, record a stream.
953 \end_layout
955 \begin_layout Section
956 Settings
957 \end_layout
959 \begin_layout Subsection
960 Core settings
961 \end_layout
963 \begin_layout Subsubsection
964 firmwarepath
965 \end_layout
967 \begin_layout Standard
968 Set where bsnes looks for firmware files.
969  Default is 
970 \begin_inset Quotes eld
971 \end_inset
974 \begin_inset Quotes erd
975 \end_inset
978 \end_layout
980 \begin_layout Subsubsection
981 target
982 \end_layout
984 \begin_layout Standard
985 Set the target .
986  Numeric, range is 0.001 to 
987 \begin_inset Quotes eld
988 \end_inset
990 infinite
991 \begin_inset Quotes erd
992 \end_inset
995  Default is native framerate.
996 \end_layout
998 \begin_layout Subsubsection
999 savecompression
1000 \end_layout
1002 \begin_layout Standard
1003 Set save compression level (integer 0-9).
1004  Default is 7 (0 is no compression).
1005 \end_layout
1007 \begin_layout Subsubsection
1008 advance-timeout
1009 \end_layout
1011 \begin_layout Standard
1012 Set the frame advance timeout in milliseconds.
1013  Numeric integer, range is 0-999999999.
1014  Default is 500.
1015 \end_layout
1017 \begin_layout Subsubsection
1018 allow-inconsistent-saves (bsnes only)
1019 \end_layout
1021 \begin_layout Standard
1022 If true, save without synchronization.
1023  Makes games seriously unstable.
1024 \end_layout
1026 \begin_layout Subsubsection
1027 save-every-frame (bsnes only)
1028 \end_layout
1030 \begin_layout Standard
1031 If true, simulate saving on each frame.
1032  Trades off emulation accuracy for sync stability.
1033  Also needed if the movie assumes saving on each frame for rewind.
1034 \end_layout
1036 \begin_layout Subsection
1037 AVI dumper settings
1038 \end_layout
1040 \begin_layout Subsubsection
1041 avi-large
1042 \end_layout
1044 \begin_layout Standard
1045 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1046  outputs.
1047 \end_layout
1049 \begin_layout Subsubsection
1050 avi-left-border
1051 \end_layout
1053 \begin_layout Standard
1054 AVI dumper: Set the default left border thickness (unless lua overrides)
1055  for dumps.
1056  Range 0-8191.
1057  Default is 0.
1058 \end_layout
1060 \begin_layout Subsubsection
1061 avi-right-border
1062 \end_layout
1064 \begin_layout Standard
1065 AVI dumper: Set the default right border thickness (unless lua overrides)
1066  for dumps.
1067  Range 0-8191.
1068  Default is 0.
1069 \end_layout
1071 \begin_layout Subsubsection
1072 avi-top-border
1073 \end_layout
1075 \begin_layout Standard
1076 AVI dumper: Set the default top border thickness (unless lua overrides)
1077  for dumps.
1078  Range 0-8191.
1079  Default is 0.
1080 \end_layout
1082 \begin_layout Subsubsection
1083 avi-bottom-border
1084 \end_layout
1086 \begin_layout Standard
1087 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1088  for dumps.
1089  Range 0-8191.
1090  Default is 0.
1091 \end_layout
1093 \begin_layout Subsubsection
1094 avi-maxframes
1095 \end_layout
1097 \begin_layout Standard
1098 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1099  Range 0-999999999.
1100  Default is 0.
1101 \end_layout
1103 \begin_layout Subsubsection
1104 avi-compresison
1105 \end_layout
1107 \begin_layout Standard
1108 AVI dumper: Compression level (0-18).
1109 \end_layout
1111 \begin_layout Itemize
1112 Compression levels 10 and above are not compatible with stock CSCD codec.
1113 \end_layout
1115 \begin_layout Itemize
1116 Recomended level is 7.
1117 \end_layout
1119 \begin_layout Subsubsection
1120 avi-soundrate
1121 \end_layout
1123 \begin_layout Standard
1124 AVI dumper: Set method of determining the sound rate.
1125 \end_layout
1127 \begin_layout Itemize
1128 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1129  128, 176.4 and 192 kHz.
1130 \end_layout
1132 \begin_layout Itemize
1133 1: Round down to nearest integer.
1134 \end_layout
1136 \begin_layout Itemize
1137 2: Round up to nearest ingeter.
1138 \end_layout
1140 \begin_layout Subsection
1141 JMD options
1142 \end_layout
1144 \begin_layout Subsubsection
1145 jmd-copression
1146 \end_layout
1148 \begin_layout Standard
1149 JMD dumper: Compression level (0-9).
1150 \end_layout
1152 \begin_layout Subsection
1153 SDL platform settings
1154 \end_layout
1156 \begin_layout Subsubsection
1157 autorepeat-first-delay
1158 \end_layout
1160 \begin_layout Standard
1161 Sets the delay for first character in typematic autorepeat.
1162 \end_layout
1164 \begin_layout Subsubsection
1165 autorepeat-subsequent-delay
1166 \end_layout
1168 \begin_layout Standard
1169 Sets the delay for subsequent characters in typematic autorepeat.
1170 \end_layout
1172 \begin_layout Section
1173 Lua functions
1174 \end_layout
1176 \begin_layout Subsection
1177 Core (in main table)
1178 \end_layout
1180 \begin_layout Subsubsection
1181 print
1182 \end_layout
1184 \begin_layout Standard
1185 Print line to message console.
1186 \end_layout
1188 \begin_layout Subsubsection
1189 exec(string command)
1190 \end_layout
1192 \begin_layout Standard
1193 Run command as it was entered on the command line
1194 \end_layout
1196 \begin_layout Subsubsection
1197 utime()
1198 \end_layout
1200 \begin_layout Standard
1201 Returns two values.
1202  First is time since some epoch in seconds, the second is microseconds mod
1203  10^6 since that epoch.
1204 \end_layout
1206 \begin_layout Subsubsection
1207 emulator_ready()
1208 \end_layout
1210 \begin_layout Standard
1211 Returns true if emulator has finished booting, false if not (on_startup()
1212  will be issued later).
1213 \end_layout
1215 \begin_layout Subsubsection
1216 set_idle_timeout(number timeout)
1217 \end_layout
1219 \begin_layout Standard
1220 Set number of microseconds to block idle for.
1221  After this timeout has expired, on_idle() will be called once.
1222 \end_layout
1224 \begin_layout Subsubsection
1225 set_timer_timeout(number timeout)
1226 \end_layout
1228 \begin_layout Standard
1229 Set number of microseconds to block timer for.
1230  After this timeout has expired, on_timer() will be called once.
1231 \end_layout
1233 \begin_layout Subsubsection
1234 bus_address(number snesaddr)
1235 \end_layout
1237 \begin_layout Standard
1238 Returns virtual address corresponding to specified address on SNES bus.
1239 \end_layout
1241 \begin_layout Subsubsection
1242 loopwrapper(function fun, ...)
1243 \end_layout
1245 \begin_layout Standard
1246 Calls function fun with function and specified arguments.
1247  The function passed suspends execution until the function returned is called.
1248  Handy for linear flow control among multiple invocations of a hook.
1249  Example code:
1250 \end_layout
1252 \begin_layout LyX-Code
1253 on_paint = loopwrapper(function(wait)
1254 \end_layout
1256 \begin_deeper
1257 \begin_layout LyX-Code
1258 while true do
1259 \end_layout
1261 \begin_deeper
1262 \begin_layout LyX-Code
1263 gui.text(0, 0, 
1264 \begin_inset Quotes eld
1265 \end_inset
1267 Test!
1268 \begin_inset Quotes erd
1269 \end_inset
1272 \end_layout
1274 \begin_layout LyX-Code
1275 wait();
1276 \end_layout
1278 \end_deeper
1279 \begin_layout LyX-Code
1281 \end_layout
1283 \end_deeper
1284 \begin_layout LyX-Code
1285 end);
1286 \end_layout
1288 \begin_layout Subsection
1289 Table bit:
1290 \end_layout
1292 \begin_layout Standard
1293 Bitwise logical functions and related.
1294 \end_layout
1296 \begin_layout Subsubsection
1297 bit.none(number...) / bit.bnot(number...)
1298 \end_layout
1300 \begin_layout Standard
1301 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1302  arguments).
1303 \end_layout
1305 \begin_layout Subsubsection
1306 bit.any(number...) / bit.bor(number...)
1307 \end_layout
1309 \begin_layout Standard
1310 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1311 \end_layout
1313 \begin_layout Subsubsection
1314 bit.all(number...) / bit.band(number...)
1315 \end_layout
1317 \begin_layout Standard
1318 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1320 \end_layout
1322 \begin_layout Subsubsection
1323 bit.parity(number...) / bit.bxor(number...)
1324 \end_layout
1326 \begin_layout Standard
1327 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1328  of the arguments).
1329 \end_layout
1331 \begin_layout Subsubsection
1332 bit.lrotate(number base[, number amount[, number bits]])
1333 \end_layout
1335 \begin_layout Standard
1336 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1337 \end_layout
1339 \begin_layout Subsubsection
1340 bit.rrotate(number base[, number amount[, number bits]])
1341 \end_layout
1343 \begin_layout Standard
1344 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1345  places.
1346 \end_layout
1348 \begin_layout Subsubsection
1349 bit.lshift(number base[, number amount[, number bits]])
1350 \end_layout
1352 \begin_layout Standard
1353 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1354  The new bits are filled with zeroes.
1355 \end_layout
1357 \begin_layout Subsubsection
1358 bit.lrshift(number base[, number amount[, number bits]])
1359 \end_layout
1361 \begin_layout Standard
1362 Shift bits-bit (max 48, default 48) number logically right by amount (default
1363  1) places.
1364  The new bits are filled with zeroes.
1365 \end_layout
1367 \begin_layout Subsubsection
1368 bit.arshift(number base[, number amount[, number bits]])
1369 \end_layout
1371 \begin_layout Standard
1372 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1373  (default 1) places.
1374  The new bits are shifted in with copy of the high bit.
1375 \end_layout
1377 \begin_layout Subsubsection
1378 bit.extract(number base[, number bit0[, number bit1,...]])
1379 \end_layout
1381 \begin_layout Standard
1382 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1383 \end_layout
1385 \begin_layout Standard
1386 Notes: 
1387 \end_layout
1389 \begin_layout Itemize
1390 Bit numbers up to 51 should work reliably (then things start falling apart
1391  due to double precision issues).
1392 \end_layout
1394 \begin_layout Itemize
1395 There are two special bit positions, true and false, standing for always
1396  set bit and always clear bit.
1397 \end_layout
1399 \begin_layout Subsubsection
1400 bit.value([number bit1[, number bit2,...]])
1401 \end_layout
1403 \begin_layout Standard
1404 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1405  places and so on.
1406  As special value, nil argument is no-op.
1407 \end_layout
1409 \begin_layout Subsubsection
1410 bit.test_any(number a, number b)
1411 \end_layout
1413 \begin_layout Standard
1414 Returns true if bitwise and of a and b is nonzero, otherwise false.
1415 \end_layout
1417 \begin_layout Subsubsection
1418 bit.test_all(number a, number b)
1419 \end_layout
1421 \begin_layout Standard
1422 Returns true if bitwise and of a and b is equals b, otherwise false.
1423 \end_layout
1425 \begin_layout Subsubsection
1426 bit.popcount(number a)
1427 \end_layout
1429 \begin_layout Standard
1430 Returns number of set bits in a.
1431 \end_layout
1433 \begin_layout Subsubsection
1434 bit.clshift(number a, number b, [number amount,[number bits]])
1435 \end_layout
1437 \begin_layout Standard
1438 Does chained left shift on a, b by amount positions, assuming numbers to
1439  be of specified number of bits.
1440 \end_layout
1442 \begin_layout Subsubsection
1443 bit.crshift(number a, number b, [number amount,[number bits]])
1444 \end_layout
1446 \begin_layout Standard
1447 Does chained right shift on a, b by amount positions, assuming numbers to
1448  be of specified number of bits.
1449 \end_layout
1451 \begin_layout Subsubsection
1452 bit.flagdecode(number a, number bits, [string on, [string off]])
1453 \end_layout
1455 \begin_layout Standard
1456 Return string of length bits where ith character is ith character of on
1457  if bit i is on, otherwise ith character of off.
1458  Out of range reads give last character, or '*'/'-' if empty.
1459 \end_layout
1461 \begin_layout Subsubsection
1462 bit.rflagdecode(number a, number bits, [string on, [string off]])
1463 \end_layout
1465 \begin_layout Standard
1466 Like bit.flagdecode, but outputs the string in the opposite order (most significa
1467 nt bit first).
1468 \end_layout
1470 \begin_layout Subsection
1471 Table gui:
1472 \end_layout
1474 \begin_layout Standard
1475 Most of these functions can only be called in on_paint and on_video callbacks.
1476  Exceptions are noted.
1477 \end_layout
1479 \begin_layout Standard
1480 Colors are 32-bit.
1481  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1482  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1483  opaque, 255 is almost transparent).
1484  -1 is the fully transparent color.
1485  Alpha values greater than 127 do work.
1486 \end_layout
1488 \begin_layout Standard
1489 Origin of coordinates is at top left corner of game display area.
1490  Left and top gaps correspond to negative coordinates.
1491 \end_layout
1493 \begin_layout Subsubsection
1494 gui.resolution()
1495 \end_layout
1497 \begin_layout Standard
1498 Returns 2-tuple (hresolution, vresolution).
1499 \end_layout
1501 \begin_layout Subsubsection
1502 gui.<class>_gap(number gap)
1503 \end_layout
1505 \begin_layout Standard
1506 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1507  is 8191).
1508 \end_layout
1510 \begin_layout Subsubsection
1511 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1512 \end_layout
1514 \begin_layout Standard
1515 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1516  16 high).
1517  Parameters:
1518 \end_layout
1520 \begin_layout Itemize
1521 x: X-coordinate to start the drawing from (and x-coordinate at begining
1522  of the lines).
1523 \end_layout
1525 \begin_layout Itemize
1526 y: Y-coordinate to start the drawing from.
1527 \end_layout
1529 \begin_layout Itemize
1530 text: The text to draw.
1531 \end_layout
1533 \begin_layout Itemize
1534 fgc: Text color (default is 0xFFFFFF (white))
1535 \end_layout
1537 \begin_layout Itemize
1538 bgc: Background color (default is -1 (transparent))
1539 \end_layout
1541 \begin_layout Subsubsection
1542 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1543 \end_layout
1545 \begin_layout Standard
1546 Like gui.text, but draw using double-width.
1547 \end_layout
1549 \begin_layout Subsubsection
1550 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1551 \end_layout
1553 \begin_layout Standard
1554 Like gui.text, but draw using double-height.
1555 \end_layout
1557 \begin_layout Subsubsection
1558 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
1559 \end_layout
1561 \begin_layout Standard
1562 Like gui.text, but draw using double-width/double-height.
1563 \end_layout
1565 \begin_layout Subsubsection
1566 gui.rectangle(number x, number y, number width, number height[, number thickness[
1567 , number outline[, number fill]]])
1568 \end_layout
1570 \begin_layout Standard
1571 Draw rectangle on the GUI.
1572  Parameters:
1573 \end_layout
1575 \begin_layout Itemize
1576 x: X-coordinate of left edge.
1577 \end_layout
1579 \begin_layout Itemize
1580 y: Y-coordinate of upper edge.
1581 \end_layout
1583 \begin_layout Itemize
1584 width: Width of rectangle.
1585 \end_layout
1587 \begin_layout Itemize
1588 height: Height of rectangle.
1589 \end_layout
1591 \begin_layout Itemize
1592 thickness: Thickness of outline (default is 1).
1593 \end_layout
1595 \begin_layout Itemize
1596 outline: Color of outline (default is 0xFFFFFF (white))
1597 \end_layout
1599 \begin_layout Itemize
1600 fill: Color of fill (default is -1 (transparent))
1601 \end_layout
1603 \begin_layout Subsubsection
1604 gui.box(number x, number y, number width, number height[, number thickness[,
1605  number outline1[,number outline2[, number fill]]]])
1606 \end_layout
1608 \begin_layout Standard
1609 Draw rectangle with 3D effect on the GUI.
1610  Parameters:
1611 \end_layout
1613 \begin_layout Itemize
1614 x: X-coordinate of left edge.
1615 \end_layout
1617 \begin_layout Itemize
1618 y: Y-coordinate of upper edge.
1619 \end_layout
1621 \begin_layout Itemize
1622 width: Width of rectangle.
1623 \end_layout
1625 \begin_layout Itemize
1626 height: Height of rectangle.
1627 \end_layout
1629 \begin_layout Itemize
1630 thickness: Thickness of outline (default is 1).
1631 \end_layout
1633 \begin_layout Itemize
1634 outline1: First color of outline (default is 0xFFFFFF (white))
1635 \end_layout
1637 \begin_layout Itemize
1638 outline2: First color of outline (default is 0x808080 (dark gray))
1639 \end_layout
1641 \begin_layout Itemize
1642 fill: Color of fill (default is 0xC0C0C0 (light grayy))
1643 \end_layout
1645 \begin_layout Subsubsection
1646 gui.pixel(number x, number y[, number color])
1647 \end_layout
1649 \begin_layout Standard
1650 Draw one pixel on the GUI.
1651  Parameters:
1652 \end_layout
1654 \begin_layout Itemize
1655 x: X-coordinate of the pixel
1656 \end_layout
1658 \begin_layout Itemize
1659 y: Y-coordinate of the pixel
1660 \end_layout
1662 \begin_layout Itemize
1663 color: Color of the pixel (default is 0xFFFFFF (white))
1664 \end_layout
1666 \begin_layout Subsubsection
1667 gui.crosshair(number x, number y[, number length[, number color]])
1668 \end_layout
1670 \begin_layout Standard
1671 Draw a crosshair.
1672  Parameters:
1673 \end_layout
1675 \begin_layout Itemize
1676 x: X-coordinate of the crosshair
1677 \end_layout
1679 \begin_layout Itemize
1680 y: Y-coordinate of the crosshair
1681 \end_layout
1683 \begin_layout Itemize
1684 length: Length of the crosshair lines (default 10).
1685 \end_layout
1687 \begin_layout Itemize
1688 color: Color of the crosshair (default is 0xFFFFFF (white))
1689 \end_layout
1691 \begin_layout Subsubsection
1692 gui.line(number x1, number y1, number x2, number y2[, number color])
1693 \end_layout
1695 \begin_layout Standard
1696 Draw a thin line.
1697  Parameters:
1698 \end_layout
1700 \begin_layout Itemize
1701 x1: X-coordinate of one end.
1702 \end_layout
1704 \begin_layout Itemize
1705 y1: Y-coordinate of one end.
1706 \end_layout
1708 \begin_layout Itemize
1709 x2: X-coordinate of the other end.
1710 \end_layout
1712 \begin_layout Itemize
1713 y2: Y-coordinate of the other end.
1714 \end_layout
1716 \begin_layout Itemize
1717 color: Color of the line (default is 0xFFFFFF (white)).
1718 \end_layout
1720 \begin_layout Subsubsection
1721 gui.circle(number x, number y, number r[, number thick[, number border[,
1722  number fil]]])
1723 \end_layout
1725 \begin_layout Standard
1726 Draw a circle.
1727  Parameters.
1728 \end_layout
1730 \begin_layout Itemize
1731 x: X-coordinate of the center
1732 \end_layout
1734 \begin_layout Itemize
1735 y: Y-coordinate of the center
1736 \end_layout
1738 \begin_layout Itemize
1739 r: The radius of the circle
1740 \end_layout
1742 \begin_layout Itemize
1743 thick: Border thickness
1744 \end_layout
1746 \begin_layout Itemize
1747 border: Border color (default is 0xFFFFFF (white))
1748 \end_layout
1750 \begin_layout Itemize
1751 fill: Fill color (default is -1 (transparent)).
1752 \end_layout
1754 \begin_layout Subsubsection
1755 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
1756 \end_layout
1758 \begin_layout Standard
1759 Draw a bitmap on screen with specified palette.
1760  Parameters:
1761 \end_layout
1763 \begin_layout Itemize
1764 x: X-coordinate of left edge.
1765 \end_layout
1767 \begin_layout Itemize
1768 y: Y-coordinate of top edge.
1769 \end_layout
1771 \begin_layout Itemize
1772 bitmap: The bitmap to draw
1773 \end_layout
1775 \begin_layout Itemize
1776 palette: The palette to draw the bitmap using.
1777 \end_layout
1779 \begin_layout Subsubsection
1780 gui.bitmap_draw(number x, number y, dbitmap bitmap)
1781 \end_layout
1783 \begin_layout Standard
1784 Draw a bitmap on screen.
1785  Parameters:
1786 \end_layout
1788 \begin_layout Itemize
1789 x: X-coordinate of left edge.
1790 \end_layout
1792 \begin_layout Itemize
1793 y: Y-coordinate of top edge.
1794 \end_layout
1796 \begin_layout Itemize
1797 bitmap: The bitmap to draw
1798 \end_layout
1800 \begin_layout Subsubsection
1801 gui.palette_new()
1802 \end_layout
1804 \begin_layout Standard
1805 Returns a new palette (initially all transparent).
1806  Can be used anywhere.
1807 \end_layout
1809 \begin_layout Subsubsection
1810 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
1811 \end_layout
1813 \begin_layout Standard
1814 Returns a new bitmap/dbitmap.
1815  Can be used anywhere.
1816  Parameters:
1817 \end_layout
1819 \begin_layout Itemize
1820 w: The width of new bitmap
1821 \end_layout
1823 \begin_layout Itemize
1824 h: The height of new bitmap
1825 \end_layout
1827 \begin_layout Itemize
1828 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
1829 \end_layout
1831 \begin_layout Itemize
1832 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
1833 \end_layout
1835 \begin_layout Subsubsection
1836 gui.bitmap_load(string file)
1837 \end_layout
1839 \begin_layout Standard
1840 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
1841  for bitmap).
1842  Can be used anywhere.
1843  Parameters:
1844 \end_layout
1846 \begin_layout Itemize
1847 file: The name of file to load.
1848 \end_layout
1850 \begin_layout Subsubsection
1851 gui.palette_set(palette palette, number index, number color)
1852 \end_layout
1854 \begin_layout Standard
1855 Sets color in palette.
1856  Can be used anywhere.
1857  Parameters:
1858 \end_layout
1860 \begin_layout Itemize
1861 palette: The palette to manipulate
1862 \end_layout
1864 \begin_layout Itemize
1865 index: Index of color (0-65535).
1866 \end_layout
1868 \begin_layout Itemize
1869 color: The color value.
1870 \end_layout
1872 \begin_layout Subsubsection
1873 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
1874 \end_layout
1876 \begin_layout Standard
1877 Sets specified pixel in bitmap.
1878  Can be used anywhere.
1879  Parameters:
1880 \end_layout
1882 \begin_layout Itemize
1883 bitmap: The bitmap to manipulate
1884 \end_layout
1886 \begin_layout Itemize
1887 x: The x-coordinate of the pixel.
1888 \end_layout
1890 \begin_layout Itemize
1891 y: The y-coordinate of the pixel.
1892 \end_layout
1894 \begin_layout Itemize
1895 color: If bitmap is a bitmap, color index (0-65535).
1896  Otherwise color value.
1897 \end_layout
1899 \begin_layout Subsubsection
1900 gui.bitmap_size(bitmap/dbitmap bitmap)
1901 \end_layout
1903 \begin_layout Standard
1904 Get size of bitmap.
1905  Can be used anywhere.
1906  Parameters:
1907 \end_layout
1909 \begin_layout Itemize
1910 bitmap: The bitmap to query.
1911 \end_layout
1913 \begin_layout Standard
1914 The first return is the width, the second is the height.
1915 \end_layout
1917 \begin_layout Subsubsection
1918 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
1919  src, number sx, number sy, number w, number h[, number ck])
1920 \end_layout
1922 \begin_layout Standard
1923 Blit a part of bitmap to another.
1924  Can be used anywhere.
1925  Parameters:
1926 \end_layout
1928 \begin_layout Itemize
1929 dest: Destination to blit to.
1930 \end_layout
1932 \begin_layout Itemize
1933 dx: left edge of target
1934 \end_layout
1936 \begin_layout Itemize
1937 dy: Top edge of target
1938 \end_layout
1940 \begin_layout Itemize
1941 src: The source to blit from.
1942  Must be of the same type as destination.
1943 \end_layout
1945 \begin_layout Itemize
1946 sx: left edge of source
1947 \end_layout
1949 \begin_layout Itemize
1950 sy: Top edge of source
1951 \end_layout
1953 \begin_layout Itemize
1954 w: Width of region
1955 \end_layout
1957 \begin_layout Itemize
1958 h: Height of region.
1959 \end_layout
1961 \begin_layout Itemize
1962 ck: Color key.
1963  Pixels of this color are not blitted.
1964 \end_layout
1966 \begin_deeper
1967 \begin_layout Itemize
1968 If bitmaps are bitmaps, this is color index of colorkey.
1969  Values outside range 0-65535 cause no key to be used as colorkey.
1970 \end_layout
1972 \begin_layout Itemize
1973 If bitmaps are dbitmaps, this color value of colorkey.
1974 \end_layout
1976 \begin_layout Itemize
1977 May be absent or nil for no colorkey blit.
1978 \end_layout
1980 \end_deeper
1981 \begin_layout Subsubsection
1982 gui.repaint()
1983 \end_layout
1985 \begin_layout Standard
1986 Request on_repaint() to happen as soon as possible.
1987  Can be used anywhere.
1988 \end_layout
1990 \begin_layout Subsubsection
1991 gui.subframe_update(boolean on)
1992 \end_layout
1994 \begin_layout Standard
1995 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
1996  or not happen (on=false).
1997  Can be used anywhere.
1998 \end_layout
2000 \begin_layout Subsubsection
2001 gui.screenshot(string filename)
2002 \end_layout
2004 \begin_layout Standard
2005 Write PNG screenshot of the current frame (no drawings) to specified file.
2006  Can be used anywhere.
2007 \end_layout
2009 \begin_layout Subsubsection
2010 gui.color(number r, number g, number b[, number a])
2011 \end_layout
2013 \begin_layout Standard
2014 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2015  each component in scale 0-255.
2016  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2017  opaque).
2018  The default alpha is 256.
2019 \end_layout
2021 \begin_layout Subsubsection
2022 gui.status(string name, string value)
2023 \end_layout
2025 \begin_layout Standard
2026 Set status field 
2027 \begin_inset Quotes eld
2028 \end_inset
2030 L[<name>]
2031 \begin_inset Quotes erd
2032 \end_inset
2034  to <value> in status area.
2035  Can be used anywhere.
2036 \end_layout
2038 \begin_layout Subsubsection
2039 gui.rainbow(number step, number steps[, number color])
2040 \end_layout
2042 \begin_layout Standard
2043 Perform hue rotation of color <color> (default bright red), by <step> steps.
2044  The number of steps per full rotation is given by absolute value of <steps>.
2045 \end_layout
2047 \begin_layout Standard
2048 If <steps> is negative, the rotation will be counterclockwise.
2049 \end_layout
2051 \begin_layout Subsubsection
2052 gui.screenshot(string filename)
2053 \end_layout
2055 \begin_layout Standard
2056 Saves a screenshot into specified file.
2057 \end_layout
2059 \begin_layout Subsubsection
2060 gui.renderq_new(number width, number height)
2061 \end_layout
2063 \begin_layout Standard
2064 Create render queue with specified reported size and return it.
2065 \end_layout
2067 \begin_layout Subsubsection
2068 gui.renderq_clear(RENDERQUEUE queue)
2069 \end_layout
2071 \begin_layout Standard
2072 Clear specified render queue.
2073 \end_layout
2075 \begin_layout Subsubsection
2076 gui.renderq_set(RENDERQUEUE queue)
2077 \end_layout
2079 \begin_layout Standard
2080 Switch to specified render queue.
2081  Use nil as queue to switch to default queue.
2082 \end_layout
2084 \begin_layout Itemize
2085 When switched to another queue, all drawing functions work and draw there,
2086  even outside on_video/on_paint.
2087 \end_layout
2089 \begin_layout Subsubsection
2090 gui.renderq_run(RENDERQUEUE queue)
2091 \end_layout
2093 \begin_layout Standard
2094 Run specified render queue, copying the objects to current render queue.
2096 \end_layout
2098 \begin_layout Itemize
2099 Warning: Don't try to run the current render queue.
2100 \end_layout
2102 \begin_layout Subsubsection
2103 gui.loadfont(string filename)
2104 \end_layout
2106 \begin_layout Standard
2107 Loads font from specified file (CUSTOMFONT object).
2108 \end_layout
2110 \begin_layout Subsubsection
2111 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc]])
2112 \end_layout
2114 \begin_layout Standard
2115 Draw string with custom font to screen.
2116  The parameters are the same as in gui.text.
2117 \end_layout
2119 \begin_layout Subsection
2120 table input
2121 \end_layout
2123 \begin_layout Standard
2124 Input handling.
2125  Only available in on_input callback.
2126 \end_layout
2128 \begin_layout Subsubsection
2129 input.get(number controller, number index)
2130 \end_layout
2132 \begin_layout Standard
2133 Read the specified index (0-11) from specified controller (0-7).
2134  Notes:
2135 \end_layout
2137 \begin_layout Itemize
2138 Uses physical controller numbering.
2139  Gamepad in port 2 is controller 4, not 1!
2140 \end_layout
2142 \begin_layout Subsubsection
2143 input.set(number controller, number index, number value)
2144 \end_layout
2146 \begin_layout Standard
2147 Write the specified index (0-11) from specified controller (0-7), storing
2148  value.
2149  Notes:
2150 \end_layout
2152 \begin_layout Itemize
2153 Uses physical controller numbering.
2154  Gamepad in port 2 is controller 4, not 1!
2155 \end_layout
2157 \begin_layout Subsubsection
2158 input.geta(number controller)
2159 \end_layout
2161 \begin_layout Standard
2162 Get input state for entiere controller.
2163  Returns 13 return values.
2164 \end_layout
2166 \begin_layout Itemize
2167 1st return value: Bitmask: bit i is set if i:th index is nonzero
2168 \end_layout
2170 \begin_layout Itemize
2171 2nd-13th return value: value of i:th index.
2172 \end_layout
2174 \begin_layout Subsubsection
2175 input.seta(number controller, number bitmask, number args...)
2176 \end_layout
2178 \begin_layout Standard
2179 Set state for entiere controller.
2180  args is up to 12 values for indices (overriding values in bitmask if specified).
2181 \end_layout
2183 \begin_layout Subsubsection
2184 input.controllertype(number controller)
2185 \end_layout
2187 \begin_layout Standard
2188 Get the type of controller as string.
2189  Valid values are:
2190 \end_layout
2192 \begin_layout Itemize
2193 gamepad
2194 \end_layout
2196 \begin_layout Itemize
2197 mouse
2198 \end_layout
2200 \begin_layout Itemize
2201 justifier
2202 \end_layout
2204 \begin_layout Itemize
2205 superscope
2206 \end_layout
2208 \begin_layout Subsubsection
2209 input.reset([number cycles])
2210 \end_layout
2212 \begin_layout Standard
2213 Execute reset.
2214  If cycles is greater than zero, do delayed reset.
2215  0 (or no value) causes immediate reset.
2216 \end_layout
2218 \begin_layout Itemize
2219 Only available with subframe flag false.
2220 \end_layout
2222 \begin_layout Subsubsection
2223 input.raw()
2224 \end_layout
2226 \begin_layout Standard
2227 Returns table of tables of all available keys and axes.
2228  The first table is indexed by key name (platform-dependent!), and the inner
2229  table has the following fields:
2230 \end_layout
2232 \begin_layout Itemize
2233 value: Last reported value for control
2234 \end_layout
2236 \begin_deeper
2237 \begin_layout Itemize
2238 For keys: 1 for pressed, 0 for released.
2239 \end_layout
2241 \begin_layout Itemize
2242 For axes: -32767...32767.
2243 \end_layout
2245 \begin_layout Itemize
2246 For presure-sensitive buttons: 0...32767.
2247 \end_layout
2249 \begin_layout Itemize
2250 For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
2251 \end_layout
2253 \begin_layout Itemize
2254 For mouse: Coordinates relative to game area.
2255 \end_layout
2257 \end_deeper
2258 \begin_layout Itemize
2259 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2260  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2261 \end_layout
2263 \begin_layout Subsubsection
2264 input.keyhook(string key, boolean state)
2265 \end_layout
2267 \begin_layout Standard
2268 Requests that keyhook events to be sent for key (state=true) or not sent
2269  (state=false).
2270 \end_layout
2272 \begin_layout Subsubsection
2273 input.joyget(number controller)
2274 \end_layout
2276 \begin_layout Standard
2277 Returns table for current controls for specified controller.
2278  The names of fields vary by controller type.
2279 \end_layout
2281 \begin_layout Itemize
2282 The buttons have the same name as those are referred to in other contexts
2283  in the emulator
2284 \end_layout
2286 \begin_layout Itemize
2287 The analog axes are 
2288 \begin_inset Quotes eld
2289 \end_inset
2291 xaxis
2292 \begin_inset Quotes erd
2293 \end_inset
2295  and 
2296 \begin_inset Quotes eld
2297 \end_inset
2299 yaxis
2300 \begin_inset Quotes erd
2301 \end_inset
2304 \end_layout
2306 \begin_layout Subsubsection
2307 input.joyset(number controller, table controls)
2308 \end_layout
2310 \begin_layout Standard
2311 Set the the state of specified controller to values specified in specified
2312  table.
2313 \end_layout
2315 \begin_layout Subsubsection
2316 input.lcid_to_pcid(number controller)
2317 \end_layout
2319 \begin_layout Standard
2320 Return the physical index, physical port and controller number in port for
2321  specified (1-based) logical controller.
2322 \end_layout
2324 \begin_layout Subsection
2325 Table keyboard
2326 \end_layout
2328 \begin_layout Standard
2329 Various keybinding-related functions
2330 \end_layout
2332 \begin_layout Subsubsection
2333 keyboard.bind(string mod, string mask, string key, string cmd)
2334 \end_layout
2336 \begin_layout Standard
2337 Bind specified key with specified modifers to specified command.
2338 \end_layout
2340 \begin_layout Subsubsection
2341 keyboard.unbind(string mod, string mask, string key)
2342 \end_layout
2344 \begin_layout Standard
2345 Unbind specified key with specified modifers.
2346 \end_layout
2348 \begin_layout Subsubsection
2349 keyboard.alias(string alias, string expansion)
2350 \end_layout
2352 \begin_layout Standard
2353 Set expansion of given command.
2354 \end_layout
2356 \begin_layout Subsection
2357 Table subtitle
2358 \end_layout
2360 \begin_layout Standard
2361 Subtitle handling
2362 \end_layout
2364 \begin_layout Subsubsection
2365 subtitle.byindex(number i)
2366 \end_layout
2368 \begin_layout Standard
2369 Read the frame and length of ith subtitle.
2370  Returns nothing if not present.
2371 \end_layout
2373 \begin_layout Subsubsection
2374 subtitle.set(number f, number l, string txt)
2375 \end_layout
2377 \begin_layout Standard
2378 Set the text of subtitle.
2379 \end_layout
2381 \begin_layout Subsubsection
2382 subtitle.get(number f, number l)
2383 \end_layout
2385 \begin_layout Standard
2386 Get the text of subtitle.
2387 \end_layout
2389 \begin_layout Subsubsection
2390 subtitle.delete(number f, number l)
2391 \end_layout
2393 \begin_layout Standard
2394 Delete specified subtitle.
2395 \end_layout
2397 \begin_layout Subsection
2398 Table hostmemory
2399 \end_layout
2401 \begin_layout Standard
2402 Host memory handling (extra memory saved to savestates).
2403  Host memory starts empty.
2404 \end_layout
2406 \begin_layout Subsubsection
2407 hostmemory.read(number address)
2408 \end_layout
2410 \begin_layout Standard
2411 Reads hostmemory slot address.
2412  Slot numbers out of range return false instead of numeric.
2413 \end_layout
2415 \begin_layout Subsubsection
2416 hostmemory.write(number address, number value)
2417 \end_layout
2419 \begin_layout Standard
2420 Writes hostmemory slot with 0-255.
2421  Slot numbers out of range cause extension of host memory slot space.
2422 \end_layout
2424 \begin_layout Subsubsection
2425 hostmemory.readbyte(number address)
2426 \end_layout
2428 \begin_layout Standard
2429 Read unsigned byte (1 element) from given address.
2430  Slots out of range return false.
2431 \end_layout
2433 \begin_layout Subsubsection
2434 hostmemory.writebyte(number address, number value)
2435 \end_layout
2437 \begin_layout Standard
2438 Write unsigned byte (1 element) to given slot.
2439  Slot numbers out of range cause extension.
2440 \end_layout
2442 \begin_layout Subsubsection
2443 hostmemory.readsbyte(number address)
2444 \end_layout
2446 \begin_layout Standard
2447 Read signed byte (1 element) from given address.
2448  Slots out of range return false.
2449 \end_layout
2451 \begin_layout Subsubsection
2452 hostmemory.writesbyte(number address, number value)
2453 \end_layout
2455 \begin_layout Standard
2456 Write signed byte (1 element) to given slot.
2457  Slot numbers out of range cause extension.
2458 \end_layout
2460 \begin_layout Subsubsection
2461 hostmemory.readword(number address)
2462 \end_layout
2464 \begin_layout Standard
2465 Read unsigned word (2 elements) from given address.
2466  Slots out of range return false.
2467 \end_layout
2469 \begin_layout Subsubsection
2470 hostmemory.writeword(number address, number value)
2471 \end_layout
2473 \begin_layout Standard
2474 Write unsigned word (2 elements) to given slot.
2475  Slot numbers out of range cause extension.
2476 \end_layout
2478 \begin_layout Subsubsection
2479 hostmemory.readsword(number address)
2480 \end_layout
2482 \begin_layout Standard
2483 Read signed word (2 elements) from given address.
2484  Slots out of range return false.
2485 \end_layout
2487 \begin_layout Subsubsection
2488 hostmemory.writesword(number address, number value)
2489 \end_layout
2491 \begin_layout Standard
2492 Write signed word (2 elements) to given slot.
2493  Slot numbers out of range cause extension.
2494 \end_layout
2496 \begin_layout Subsubsection
2497 hostmemory.readdword(number address)
2498 \end_layout
2500 \begin_layout Standard
2501 Read unsigned doubleword (4 elements) from given address.
2502  Slots out of range return false.
2503 \end_layout
2505 \begin_layout Subsubsection
2506 hostmemory.writedword(number address, number value)
2507 \end_layout
2509 \begin_layout Standard
2510 Write unsigned doubleword (4 elements) to given slot.
2511  Slot numbers out of range cause extension.
2512 \end_layout
2514 \begin_layout Subsubsection
2515 hostmemory.readsdword(number address)
2516 \end_layout
2518 \begin_layout Standard
2519 Read signed doubleword (4 elements) from given address.
2520  Slots out of range return false.
2521 \end_layout
2523 \begin_layout Subsubsection
2524 hostmemory.writesdword(number address, number value)
2525 \end_layout
2527 \begin_layout Standard
2528 Write signed doubleword (4 elements) to given slot.
2529  Slot numbers out of range cause extension.
2530 \end_layout
2532 \begin_layout Subsubsection
2533 hostmemory.readqword(number address)
2534 \end_layout
2536 \begin_layout Standard
2537 Read unsigned quadword (8 elements) from given address.
2538  Slots out of range return false.
2539 \end_layout
2541 \begin_layout Subsubsection
2542 hostmemory.writeqword(number address, number value)
2543 \end_layout
2545 \begin_layout Standard
2546 Write unsigned quadword (4 elements) to given slot.
2547  Slot numbers out of range cause extension.
2548 \end_layout
2550 \begin_layout Subsubsection
2551 hostmemory.readsqword(number address)
2552 \end_layout
2554 \begin_layout Standard
2555 Read signed quadword (8 elements) from given address.
2556  Slots out of range return false.
2557 \end_layout
2559 \begin_layout Subsubsection
2560 hostmemory.writesqword(number address, number value)
2561 \end_layout
2563 \begin_layout Standard
2564 Write signed quadword (8 elements) to given slot.
2565  Slot numbers out of range cause extension.
2566 \end_layout
2568 \begin_layout Subsection
2569 Table movie
2570 \end_layout
2572 \begin_layout Standard
2573 Movie handling
2574 \end_layout
2576 \begin_layout Subsubsection
2577 movie.currentframe()
2578 \end_layout
2580 \begin_layout Standard
2581 Return number of current frame.
2582 \end_layout
2584 \begin_layout Subsubsection
2585 movie.framecount()
2586 \end_layout
2588 \begin_layout Standard
2589 Return number of frames in movie.
2590 \end_layout
2592 \begin_layout Subsubsection
2593 movie.readonly()
2594 \end_layout
2596 \begin_layout Standard
2597 Return true if in readonly mode, false if in readwrite.
2598 \end_layout
2600 \begin_layout Subsubsection
2601 movie.rerecords()
2602 \end_layout
2604 \begin_layout Standard
2605 Returns the current value of rerecord count.
2606 \end_layout
2608 \begin_layout Subsubsection
2609 movie.set_readwrite()
2610 \end_layout
2612 \begin_layout Standard
2613 Set readwrite mode (does not cause on_readwrite callback).
2614 \end_layout
2616 \begin_layout Subsubsection
2617 movie.frame_subframes(number frame)
2618 \end_layout
2620 \begin_layout Standard
2621 Count number of subframes in specified frame (frame numbers are 1-based)
2622  and return that.
2623 \end_layout
2625 \begin_layout Subsubsection
2626 movie.read_subframe(number frame, number subframe)
2627 \end_layout
2629 \begin_layout Standard
2630 Read specifed subframe in specified frame and return data as array (100
2631  elements, numbered 0-99 currently).
2632 \end_layout
2634 \begin_layout Subsubsection
2635 movie.read_rtc()
2636 \end_layout
2638 \begin_layout Standard
2639 Returns the current value of the RTC as a pair (second, subsecond).
2640 \end_layout
2642 \begin_layout Subsubsection
2643 movie.unsafe_rewind([UNSAFEREWIND state])
2644 \end_layout
2646 \begin_layout Standard
2647 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2648 \end_layout
2650 \begin_layout Itemize
2651 If called without argument, causes emulator to start process of setting
2652  unsafe rewind point.
2653  When this has finished, callback on_set_rewind occurs, passing the rewind
2654  state to lua script.
2655 \end_layout
2657 \begin_layout Itemize
2658 If called with argument, causes emulator rewind to passed rewind point as
2659  soon as possible.
2660  Readwrite mode is implicitly activated.
2661 \end_layout
2663 \begin_layout Standard
2664 The following warnings apply to unsafe rewinding:
2665 \end_layout
2667 \begin_layout Itemize
2668 There are no safety checks against misuse (that's what 
2669 \begin_inset Quotes eld
2670 \end_inset
2672 unsafe
2673 \begin_inset Quotes erd
2674 \end_inset
2676  comes from)!
2677 \end_layout
2679 \begin_layout Itemize
2680 Only call rewind from timeline rewind point was set from.
2681 \end_layout
2683 \begin_layout Itemize
2684 Only call rewind from after the rewind point was set.
2685 \end_layout
2687 \begin_layout Subsection
2688 Table settings
2689 \end_layout
2691 \begin_layout Standard
2692 Routines for settings manipulation
2693 \end_layout
2695 \begin_layout Subsubsection
2696 settings.get(string name)
2697 \end_layout
2699 \begin_layout Standard
2700 Get value of setting.
2701  If setting is blank, returns false.
2702  If setting value can't be obtained, returns (nil, error message).
2703 \end_layout
2705 \begin_layout Subsubsection
2706 settings.set(string name, string value)
2707 \end_layout
2709 \begin_layout Standard
2710 Set value of setting.
2711  If setting can't be set, returns (nil, error message).
2712 \end_layout
2714 \begin_layout Subsubsection
2715 settings.is_set(string name)
2716 \end_layout
2718 \begin_layout Standard
2719 Returns if setting is set.
2720  If setting does not exist, returns (nil, error message).
2721 \end_layout
2723 \begin_layout Subsubsection
2724 settings.blank(string name)
2725 \end_layout
2727 \begin_layout Standard
2728 Blanks a setting and returns true.
2729  If setting can't be blanked, returns (nil, error message).
2730 \end_layout
2732 \begin_layout Subsection
2733 Table memory
2734 \end_layout
2736 \begin_layout Standard
2737 Contains various functions for managing memory
2738 \end_layout
2740 \begin_layout Subsubsection
2741 memory.vma_count()
2742 \end_layout
2744 \begin_layout Standard
2745 Returns the number of VMAs
2746 \end_layout
2748 \begin_layout Subsubsection
2749 memory.read_vma(number index)
2750 \end_layout
2752 \begin_layout Standard
2753 Reads the specified VMA (indices start from zero).
2754  Trying to read invalid VMA gives nil.
2755  The read VMA is table with the following fields:
2756 \end_layout
2758 \begin_layout Itemize
2759 region_name (string): The readable name of the VMA
2760 \end_layout
2762 \begin_layout Itemize
2763 baseaddr (number): Base address of the VMA
2764 \end_layout
2766 \begin_layout Itemize
2767 lastaddr (number): Last address in the VMA.
2768 \end_layout
2770 \begin_layout Itemize
2771 size (number): The size of VMA in bytes.
2772 \end_layout
2774 \begin_layout Itemize
2775 readonly (boolean): True of the VMA corresponds to ROM.
2776 \end_layout
2778 \begin_layout Itemize
2779 iospace (boolean): True if the VMA is I/O space.
2780 \end_layout
2782 \begin_layout Itemize
2783 native_endian (boolean): True if the VMA has native endian as opposed to
2784  little endian.
2785 \end_layout
2787 \begin_layout Subsubsection
2788 memory.find_vma(number address)
2789 \end_layout
2791 \begin_layout Standard
2792 Finds the VMA containing specified address.
2793  Returns table in the same format as read_vma or nil if not found.
2794 \end_layout
2796 \begin_layout Subsubsection
2797 memory.readbyte(number address)
2798 \end_layout
2800 \begin_layout Standard
2801 Reads the specified address as unsigned byte and returns the result.
2802 \end_layout
2804 \begin_layout Subsubsection
2805 memory.readsbyte(number address)
2806 \end_layout
2808 \begin_layout Standard
2809 Reads the specified address as signed byte and returns the result.
2810 \end_layout
2812 \begin_layout Subsubsection
2813 memory.writebyte(number address, number value)
2814 \end_layout
2816 \begin_layout Standard
2817 Writes the specified value (negative values undergo 2's complement) to specified
2818  address (as a byte).
2819 \end_layout
2821 \begin_layout Subsubsection
2822 memory.readword(number address)
2823 \end_layout
2825 \begin_layout Standard
2826 Reads the specified address as unsigned word and returns the result.
2827 \end_layout
2829 \begin_layout Subsubsection
2830 memory.readsword(number address)
2831 \end_layout
2833 \begin_layout Standard
2834 Reads the specified address as signed word and returns the result.
2835 \end_layout
2837 \begin_layout Subsubsection
2838 memory.writeword(number address, number value)
2839 \end_layout
2841 \begin_layout Standard
2842 Writes the specified value (negative values undergo 2's complement) to specified
2843  address (as a word).
2844 \end_layout
2846 \begin_layout Subsubsection
2847 memory.readdword(number address)
2848 \end_layout
2850 \begin_layout Standard
2851 Reads the specified address as unsigned doubleword and returns the result.
2852 \end_layout
2854 \begin_layout Subsubsection
2855 memory.readsdword(number address)
2856 \end_layout
2858 \begin_layout Standard
2859 Reads the specified address as signed doubleword and returns the result.
2860 \end_layout
2862 \begin_layout Subsubsection
2863 memory.writedword(number address, number value)
2864 \end_layout
2866 \begin_layout Standard
2867 Writes the specified value (negative values undergo 2's complement) to specified
2868  address (as a doubleword).
2869 \end_layout
2871 \begin_layout Subsubsection
2872 memory.readqword(number address)
2873 \end_layout
2875 \begin_layout Standard
2876 Reads the specified address as unsigned quadword and returns the result.
2877 \end_layout
2879 \begin_layout Subsubsection
2880 memory.readsqword(number address)
2881 \end_layout
2883 \begin_layout Standard
2884 Reads the specified address as signed quadword and returns the result.
2885 \end_layout
2887 \begin_layout Subsubsection
2888 memory.writeqword(number address, number value)
2889 \end_layout
2891 \begin_layout Standard
2892 Writes the specified value (negative values undergo 2's complement) to specified
2893  address (as a quadword).
2894 \end_layout
2896 \begin_layout Subsubsection
2897 memory.hash_region(number base, number size)
2898 \end_layout
2900 \begin_layout Standard
2901 Hash specified number of bytes starting from specified address and return
2902  the SHA-256.
2903 \end_layout
2905 \begin_layout Subsubsection
2906 memory.hash_state()
2907 \end_layout
2909 \begin_layout Standard
2910 Hash the current system state.
2911  Mainly useful for debugging savestates.
2912 \end_layout
2914 \begin_layout Subsubsection
2915 memory.readregion(number base, number size)
2916 \end_layout
2918 \begin_layout Standard
2919 Read a region of memory.
2920 \end_layout
2922 \begin_layout Itemize
2923 Warning: If the region crosses VMA boundary, the results are undefined.
2924 \end_layout
2926 \begin_layout Subsubsection
2927 memory.map<type>([number base, number size])
2928 \end_layout
2930 \begin_layout Standard
2931 Returns a table mapping specified memory aperture for read/write.
2932  If parameters are omitted, entiere map space is the aperture.
2933 \end_layout
2935 \begin_layout Itemize
2936 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2937 \end_layout
2939 \begin_layout Subsubsection
2940 memory.writeregion(number base, number size, table data)
2941 \end_layout
2943 \begin_layout Standard
2944 Write a region of memory.
2945 \end_layout
2947 \begin_layout Itemize
2948 Warning: If the region crosses VMA boundary, the results are undefined.
2949 \end_layout
2951 \begin_layout Subsubsection
2952 memory.map_structure()
2953 \end_layout
2955 \begin_layout Standard
2956 Returns a new mapping structure (MMAP_STRUCT)
2957 \end_layout
2959 \begin_layout Subsubsection
2960 MMAP_STRUCT(string key, number address, string type)
2961 \end_layout
2963 \begin_layout Standard
2964 Bind key in mmap structure to specified address with specified type.
2965 \end_layout
2967 \begin_layout Itemize
2968 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2969 \end_layout
2971 \begin_layout Subsubsection
2972 memory.read_expr(string expr)
2973 \end_layout
2975 \begin_layout Standard
2976 Evaluate specified watch expression and return result
2977 \end_layout
2979 \begin_layout Subsection
2980 Table subtitle
2981 \end_layout
2983 \begin_layout Standard
2984 Contains functions for manipulating subtitles.
2985 \end_layout
2987 \begin_layout Subsubsection
2988 subtitle.byindex(number index)
2989 \end_layout
2991 \begin_layout Standard
2992 Get (basetime, length) pair of specified subtitle index or nothing if index
2993  isn't valid.
2994 \end_layout
2996 \begin_layout Subsubsection
2997 subtitle.get(number basetime, number length)
2998 \end_layout
3000 \begin_layout Standard
3001 Read the specified subtitle.
3002  Returns 
3003 \begin_inset Quotes eld
3004 \end_inset
3007 \begin_inset Quotes erd
3008 \end_inset
3010  if the subtitle does not exist.
3011 \end_layout
3013 \begin_layout Subsubsection
3014 subtitle.set(number basetime, number length, string content)
3015 \end_layout
3017 \begin_layout Standard
3018 Set the specified subtitle.
3019 \end_layout
3021 \begin_layout Subsubsection
3022 subtitle.deltete(number basetime, number length)
3023 \end_layout
3025 \begin_layout Standard
3026 Delete the specified subtitle.
3027 \end_layout
3029 \begin_layout Subsection
3030 Table _SYSTEM
3031 \end_layout
3033 \begin_layout Standard
3034 Contains copy of global variables from time of Lua initialization.
3035  Non-writeable.
3036 \end_layout
3038 \begin_layout Subsection
3039 Callbacks
3040 \end_layout
3042 \begin_layout Standard
3043 Various callbacks to Lua that can occur.
3044 \end_layout
3046 \begin_layout Subsubsection
3047 Callback: on_paint(bool not_synth)
3048 \end_layout
3050 \begin_layout Standard
3051 Called when screen is being painted.
3052  Any gui.* calls requiring graphic context draw on the screen.
3053 \end_layout
3055 \begin_layout Standard
3056 not_synth is true if this hook is being called in response to received frame,
3057  false otherwise.
3058 \end_layout
3060 \begin_layout Subsubsection
3061 Callback: on_video()
3062 \end_layout
3064 \begin_layout Standard
3065 Called when video dump frame is being painted.
3066  Any gui.* calls requiring graphic context draw on the video.
3067 \end_layout
3069 \begin_layout Subsubsection
3070 Callback: on_frame_emulated()
3071 \end_layout
3073 \begin_layout Standard
3074 Called when emulating frame has completed and on_paint()/on_video() calls
3075  are about to be issued.
3076 \end_layout
3078 \begin_layout Subsubsection
3079 Callback: on_frame()
3080 \end_layout
3082 \begin_layout Standard
3083 Called on each starting whole frame.
3084 \end_layout
3086 \begin_layout Subsubsection
3087 Callback: on_startup()
3088 \end_layout
3090 \begin_layout Standard
3091 Called when the emulator is starting (lsnes.rc and --run files has been run).
3092 \end_layout
3094 \begin_layout Subsubsection
3095 Callback: on_rewind()
3096 \end_layout
3098 \begin_layout Standard
3099 Called when rewind movie to beginning has completed.
3100 \end_layout
3102 \begin_layout Subsubsection
3103 Callback: on_pre_load(string name)
3104 \end_layout
3106 \begin_layout Standard
3107 Called just before savestate/movie load occurs (note: loads are always delayed,
3108  so this occurs even when load was initiated by lua).
3109 \end_layout
3111 \begin_layout Subsubsection
3112 Callback: on_err_load(string name)
3113 \end_layout
3115 \begin_layout Standard
3116 Called if loadstate goes wrong.
3117 \end_layout
3119 \begin_layout Subsubsection
3120 Callback: on_post_load(string name, boolean was_savestate)
3121 \end_layout
3123 \begin_layout Standard
3124 Called on successful loadstate.
3125  was_savestate gives if this was a savestate or a movie.
3126 \end_layout
3128 \begin_layout Subsubsection
3129 Callback: on_pre_save(string name, boolean is_savestate)
3130 \end_layout
3132 \begin_layout Standard
3133 Called just before savestate save occurs (note: movie saves are synchronous
3134  and won't trigger these callbacks if called from Lua).
3135 \end_layout
3137 \begin_layout Subsubsection
3138 Callback: on_err_save(string name)
3139 \end_layout
3141 \begin_layout Standard
3142 Called if savestate goes wrong.
3143 \end_layout
3145 \begin_layout Subsubsection
3146 Callback: on_post_save(string name, boolean is_savestate)
3147 \end_layout
3149 \begin_layout Standard
3150 Called on successful savaestate.
3151  is_savestate gives if this was a savestate or a movie.
3152 \end_layout
3154 \begin_layout Subsubsection
3155 Callback: on_quit()
3156 \end_layout
3158 \begin_layout Standard
3159 Called when emulator is shutting down.
3160 \end_layout
3162 \begin_layout Subsubsection
3163 Callback: on_input(boolean subframe)
3164 \end_layout
3166 \begin_layout Standard
3167 Called when emulator is just sending input to bsnes core.
3168  Warning: This is called even in readonly mode, but the results are ignored.
3169 \end_layout
3171 \begin_layout Subsubsection
3172 Callback: on_reset()
3173 \end_layout
3175 \begin_layout Standard
3176 Called when SNES is reset.
3177 \end_layout
3179 \begin_layout Subsubsection
3180 Callback: on_readwrite()
3181 \end_layout
3183 \begin_layout Standard
3184 Called when moving into readwrite mode as result of 
3185 \begin_inset Quotes eld
3186 \end_inset
3188 set-rwmode
3189 \begin_inset Quotes erd
3190 \end_inset
3192  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3193  entry protection).
3194 \end_layout
3196 \begin_layout Subsubsection
3197 Callback: on_snoop(number port, number controller, number index, number
3198  value)
3199 \end_layout
3201 \begin_layout Standard
3202 Called each time bsnes asks for input.
3203  The value is the final value to be sent to bsnes core (readonly mode, autohold
3204  and autofire have been taken into account).
3205  Might be useful when translating movies to format suitable for console
3206  verification.
3207  Note: There is no way to modify the value to be sent.
3208 \end_layout
3210 \begin_layout Subsubsection
3211 Callback: on_keyhook(string keyname, table state)
3212 \end_layout
3214 \begin_layout Standard
3215 Sent when key that has keyhook events requested changes state.
3216  Keyname is name of the key (group) and state is the state (same kind as
3217  table values in input.raw).
3218 \end_layout
3220 \begin_layout Subsubsection
3221 Callback: on_idle()
3222 \end_layout
3224 \begin_layout Standard
3225 Called when requested by set_idle_timeout(), the timeout has expired and
3226  emulator is waiting.
3227 \end_layout
3229 \begin_layout Subsubsection
3230 Callback: on_timer()
3231 \end_layout
3233 \begin_layout Standard
3234 Called when requested by set_idle_timeout() and the timeout has expired
3235  (regardless if emulator is waiting).
3236 \end_layout
3238 \begin_layout Subsubsection
3239 Callback: on_set_rewind(UNSAFEREWIND r)
3240 \end_layout
3242 \begin_layout Standard
3243 Called when unsafe rewind object has been constructed.
3244 \end_layout
3246 \begin_layout Subsubsection
3247 Callback: on_pre_rewind() 
3248 \end_layout
3250 \begin_layout Standard
3251 Called just before unsafe rewind is about to occur.
3252 \end_layout
3254 \begin_layout Subsubsection
3255 Callback: on_post_rewind() 
3256 \end_layout
3258 \begin_layout Standard
3259 Called just after unsafe rewind has occured.
3260 \end_layout
3262 \begin_layout Section
3263 Memory watch expression syntax
3264 \end_layout
3266 \begin_layout Standard
3267 Memory watch expressions are in RPN (Reverse Polish Notation).
3268  At the end of expression, the top entry on stack is taken as the final
3269  result.
3270 \end_layout
3272 \begin_layout Standard
3273 Notations:
3274 \end_layout
3276 \begin_layout Itemize
3277 Evaluation order is strictly left to right.
3278 \end_layout
3280 \begin_layout Itemize
3281 a is the entry on top of stack
3282 \end_layout
3284 \begin_layout Itemize
3285 b is the entry immediately below top of stack
3286 \end_layout
3288 \begin_layout Itemize
3289 ; separates values to be pushed (no intermediate pop).
3290 \end_layout
3292 \begin_layout Itemize
3293 After end of element, all used stack slots are popped and all results are
3294  pushed.
3295 \end_layout
3297 \begin_layout Itemize
3298 When pushing multiple values, the pushes occur in order shown.
3299 \end_layout
3301 \begin_layout Standard
3302 The following operators are available:
3303 \end_layout
3305 \begin_layout Itemize
3306 + : a + b
3307 \end_layout
3309 \begin_layout Itemize
3310 - : a - b
3311 \end_layout
3313 \begin_layout Itemize
3314 * : a * b
3315 \end_layout
3317 \begin_layout Itemize
3318 / : a / b
3319 \end_layout
3321 \begin_layout Itemize
3322 % : a % b
3323 \end_layout
3325 \begin_layout Itemize
3326 a : atan(a)
3327 \end_layout
3329 \begin_layout Itemize
3330 b : read_signed_byte(a)
3331 \end_layout
3333 \begin_layout Itemize
3334 c : cos(a)
3335 \end_layout
3337 \begin_layout Itemize
3338 d : read_signed_dword(a)
3339 \end_layout
3341 \begin_layout Itemize
3342 i : quotent(a / b)
3343 \end_layout
3345 \begin_layout Itemize
3346 p :
3347 \begin_inset Formula $\pi$
3348 \end_inset
3351 \end_layout
3353 \begin_layout Itemize
3354 q : read_signed_qword(a)
3355 \end_layout
3357 \begin_layout Itemize
3358 r : sqrt(a)
3359 \end_layout
3361 \begin_layout Itemize
3362 s : sin(a)
3363 \end_layout
3365 \begin_layout Itemize
3366 t : tan(a)
3367 \end_layout
3369 \begin_layout Itemize
3370 u : a; a
3371 \end_layout
3373 \begin_layout Itemize
3374 w : read_signed_word(a)
3375 \end_layout
3377 \begin_layout Itemize
3378 A : atan2(a, b)
3379 \end_layout
3381 \begin_layout Itemize
3382 B : read_unsigned_byte(a)
3383 \end_layout
3385 \begin_layout Itemize
3386 C<number>z : Push number <number> to stack.
3387 \end_layout
3389 \begin_layout Itemize
3390 D : read_unsigned_dword(a)
3391 \end_layout
3393 \begin_layout Itemize
3394 C0x<number>z : Push number <number> (hexadecimal) to stack.
3395 \end_layout
3397 \begin_layout Itemize
3398 Q : read_unsigned_qword(a)
3399 \end_layout
3401 \begin_layout Itemize
3402 R<digit> : round a to <digit> digits.
3403 \end_layout
3405 \begin_layout Itemize
3406 W : read_unsigned_word(a)
3407 \end_layout
3409 \begin_layout Subsection
3410 Example:
3411 \end_layout
3413 \begin_layout Standard
3414 C0x007e0878zWC0x007e002czW-
3415 \end_layout
3417 \begin_layout Enumerate
3418 Push value 0x7e0878 on top of stack (C0x007e0878z).
3419 \end_layout
3421 \begin_layout Enumerate
3422 Pop the value on top of stack (0x7e0878), read word value at that address
3423  and push the result,call it x1 (W).
3424 \end_layout
3426 \begin_layout Enumerate
3427 Push value 0x7e002c on top of stack (C0x007e002cz).
3428 \end_layout
3430 \begin_layout Enumerate
3431 Pop the value on top of stack (0x7e002c), read word value at that address
3432  and push the result,call it x2 (W).
3433 \end_layout
3435 \begin_layout Enumerate
3436 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3437  x2 - x1 (-).
3438 \end_layout
3440 \begin_layout Enumerate
3441 Since the expression ends, the final memory watch result is the top one
3442  on stack, which is x2 - x1.
3443 \end_layout
3445 \begin_layout Section
3446 Modifier and key names:
3447 \end_layout
3449 \begin_layout Subsection
3450 SDL Platform
3451 \end_layout
3453 \begin_layout Subsubsection
3454 Modifier names
3455 \end_layout
3457 \begin_layout Standard
3458 Following modifier names are known:
3459 \end_layout
3461 \begin_layout Itemize
3462 ctrl, lctrl, rctrl: Control keys
3463 \end_layout
3465 \begin_layout Itemize
3466 alt, lalt, ralt: ALT keys.
3467 \end_layout
3469 \begin_layout Itemize
3470 shift, lshift, rshift: Shift keys.
3471 \end_layout
3473 \begin_layout Itemize
3474 meta, lmeta, rmeta: Meta keys.
3475 \end_layout
3477 \begin_layout Itemize
3478 num, caps: Numlock/Capslock (these are sticky!)
3479 \end_layout
3481 \begin_layout Itemize
3482 mode: Mode select.
3483 \end_layout
3485 \begin_layout Subsubsection
3486 Key names
3487 \end_layout
3489 \begin_layout Standard
3490 Following key names are known:
3491 \end_layout
3493 \begin_layout Itemize
3494 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3495  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3496  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3497  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3498  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3499  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3500  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3501  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3502  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3503  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3504  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3505  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3506  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3507  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3508  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3509  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3510  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3511  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3512  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3513  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3514  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3515  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3516  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3517  break, menu, power, euro, undo
3518 \end_layout
3520 \begin_layout Itemize
3521 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3522  hardware-dependent scan code of <n> (useful to bind those keys that don't
3523  have symbolic names).
3524 \end_layout
3526 \begin_layout Subsubsection
3527 Joystick pseudo-keys:
3528 \end_layout
3530 \begin_layout Itemize
3531 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3532 \end_layout
3534 \begin_layout Itemize
3535 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3536 \end_layout
3538 \begin_layout Itemize
3539 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3540 \end_layout
3542 \begin_layout Itemize
3543 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3544 \end_layout
3546 \begin_layout Itemize
3547 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3548 \end_layout
3550 \begin_layout Itemize
3551 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3552  position (axis modes axis and axis_inverse).
3553 \end_layout
3555 \begin_layout Itemize
3556 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3557  position (axis modes axis and axis_inverse).
3558 \end_layout
3560 \begin_layout Itemize
3561 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3562  modes pressure_*).
3563 \end_layout
3565 \begin_layout Subsubsection
3566 Special buttons:
3567 \end_layout
3569 \begin_layout Itemize
3570 Escape: Enter/Exit Command mode, cancel modal dialogs.
3571 \end_layout
3573 \begin_layout Itemize
3574 Return (also KPEnter): Execute command, ok modal dialog.
3575 \end_layout
3577 \begin_layout Itemize
3578 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3579  in command history
3580 \end_layout
3582 \begin_layout Itemize
3583 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3584  in command history
3585 \end_layout
3587 \begin_layout Itemize
3588 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3589 \end_layout
3591 \begin_layout Itemize
3592 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3593 \end_layout
3595 \begin_layout Itemize
3596 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3597 \end_layout
3599 \begin_layout Itemize
3600 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3601 \end_layout
3603 \begin_layout Itemize
3604 Delete (also KP.
3605  if no num lock; command mode): Delete character to right of cursor.
3606 \end_layout
3608 \begin_layout Itemize
3609 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3610  overwrite modes.
3611 \end_layout
3613 \begin_layout Itemize
3614 Backspace (command mode): Delete character to left of cursor.
3615 \end_layout
3617 \begin_layout Itemize
3618 CTRL+LEFT (also ALT+B; command mode): Previous word.
3619 \end_layout
3621 \begin_layout Itemize
3622 CTRL+RIGHT (also ALT+F; command mode): Next word.
3623 \end_layout
3625 \begin_layout Itemize
3626 ALT+D (also CTRL+W; command mode): Delete word.
3627 \end_layout
3629 \begin_layout Itemize
3630 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3631 \end_layout
3633 \begin_layout Subsection
3634 wxWidgets platform
3635 \end_layout
3637 \begin_layout Subsubsection
3638 Modifier names:
3639 \end_layout
3641 \begin_layout Standard
3642 Following modifier names are known:
3643 \end_layout
3645 \begin_layout Itemize
3647 \end_layout
3649 \begin_layout Itemize
3650 ctrl
3651 \end_layout
3653 \begin_layout Itemize
3654 shift 
3655 \end_layout
3657 \begin_layout Itemize
3658 meta
3659 \end_layout
3661 \begin_layout Itemize
3662 cmd (Mac OS X only)
3663 \end_layout
3665 \begin_layout Subsubsection
3666 Key names:
3667 \end_layout
3669 \begin_layout Standard
3670 Following key names are known:
3671 \end_layout
3673 \begin_layout Itemize
3674 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3675  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3676  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3677  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3678  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3679  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3680  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3681  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3682  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3683  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3684  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3685  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3686  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3687  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3688  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3689  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3690  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3691  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3692  windows_right, windows_menu, command, special1, special2, special3, special4,
3693  special5, special6, special7, special8, special9, special10, special11,
3694  special12, special13, special14, special15, special16, special17, special18,
3695  special19, special20
3696 \end_layout
3698 \begin_layout Section
3699 Movie file format
3700 \end_layout
3702 \begin_layout Standard
3703 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3704  (note: If you recompress it, do not use compression methods other than
3705  store and deflate and especially do not use encryption of any kind).
3706 \end_layout
3708 \begin_layout Subsection
3709 Detecting clean start/SRAM/Savestate
3710 \end_layout
3712 \begin_layout Itemize
3713 If file has member 
3714 \begin_inset Quotes eld
3715 \end_inset
3717 savestate
3718 \begin_inset Quotes erd
3719 \end_inset
3721  it is savestate, otherwise:
3722 \end_layout
3724 \begin_layout Itemize
3725 If file has members with names starting 
3726 \begin_inset Quotes eld
3727 \end_inset
3729 moviesram.
3730 \begin_inset Quotes erd
3731 \end_inset
3733  it is movie starting from SRAM, otherwise:
3734 \end_layout
3736 \begin_layout Itemize
3737 It is movie starting from clear state.
3738 \end_layout
3740 \begin_layout Subsection
3741 Member: gametype
3742 \end_layout
3744 \begin_layout Standard
3745 Type of game ROM and region (as one line).
3746  Valid values are:
3747 \end_layout
3749 \begin_layout Standard
3750 \begin_inset Tabular
3751 <lyxtabular version="3" rows="8" columns="3">
3752 <features tabularvalignment="middle">
3753 <column alignment="center" valignment="top" width="0">
3754 <column alignment="center" valignment="top" width="0">
3755 <column alignment="center" valignment="top" width="0">
3756 <row>
3757 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3758 \begin_inset Text
3760 \begin_layout Plain Layout
3761 Value
3762 \end_layout
3764 \end_inset
3765 </cell>
3766 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3767 \begin_inset Text
3769 \begin_layout Plain Layout
3770 System
3771 \end_layout
3773 \end_inset
3774 </cell>
3775 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3776 \begin_inset Text
3778 \begin_layout Plain Layout
3779 Region
3780 \end_layout
3782 \end_inset
3783 </cell>
3784 </row>
3785 <row>
3786 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3787 \begin_inset Text
3789 \begin_layout Plain Layout
3790 snes_pal
3791 \end_layout
3793 \end_inset
3794 </cell>
3795 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3796 \begin_inset Text
3798 \begin_layout Plain Layout
3799 Super NES
3800 \end_layout
3802 \end_inset
3803 </cell>
3804 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3805 \begin_inset Text
3807 \begin_layout Plain Layout
3809 \end_layout
3811 \end_inset
3812 </cell>
3813 </row>
3814 <row>
3815 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3816 \begin_inset Text
3818 \begin_layout Plain Layout
3819 sgb_pal
3820 \end_layout
3822 \end_inset
3823 </cell>
3824 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3825 \begin_inset Text
3827 \begin_layout Plain Layout
3828 Super Game Boy
3829 \end_layout
3831 \end_inset
3832 </cell>
3833 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3834 \begin_inset Text
3836 \begin_layout Plain Layout
3838 \end_layout
3840 \end_inset
3841 </cell>
3842 </row>
3843 <row>
3844 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3845 \begin_inset Text
3847 \begin_layout Plain Layout
3848 snes_ntsc
3849 \end_layout
3851 \end_inset
3852 </cell>
3853 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3854 \begin_inset Text
3856 \begin_layout Plain Layout
3857 Super NES
3858 \end_layout
3860 \end_inset
3861 </cell>
3862 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3863 \begin_inset Text
3865 \begin_layout Plain Layout
3866 NTSC
3867 \end_layout
3869 \end_inset
3870 </cell>
3871 </row>
3872 <row>
3873 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3874 \begin_inset Text
3876 \begin_layout Plain Layout
3877 sgb_ntsc
3878 \end_layout
3880 \end_inset
3881 </cell>
3882 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3883 \begin_inset Text
3885 \begin_layout Plain Layout
3886 Super Game Boy
3887 \end_layout
3889 \end_inset
3890 </cell>
3891 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3892 \begin_inset Text
3894 \begin_layout Plain Layout
3895 NTSC
3896 \end_layout
3898 \end_inset
3899 </cell>
3900 </row>
3901 <row>
3902 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3903 \begin_inset Text
3905 \begin_layout Plain Layout
3907 \end_layout
3909 \end_inset
3910 </cell>
3911 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3912 \begin_inset Text
3914 \begin_layout Plain Layout
3915 BS-X (non-slotted)
3916 \end_layout
3918 \end_inset
3919 </cell>
3920 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3921 \begin_inset Text
3923 \begin_layout Plain Layout
3924 NTSC
3925 \end_layout
3927 \end_inset
3928 </cell>
3929 </row>
3930 <row>
3931 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3932 \begin_inset Text
3934 \begin_layout Plain Layout
3935 bsxslotted
3936 \end_layout
3938 \end_inset
3939 </cell>
3940 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3941 \begin_inset Text
3943 \begin_layout Plain Layout
3944 BS-X (slotted)
3945 \end_layout
3947 \end_inset
3948 </cell>
3949 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3950 \begin_inset Text
3952 \begin_layout Plain Layout
3953 NTSC
3954 \end_layout
3956 \end_inset
3957 </cell>
3958 </row>
3959 <row>
3960 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3961 \begin_inset Text
3963 \begin_layout Plain Layout
3964 sufamiturbo
3965 \end_layout
3967 \end_inset
3968 </cell>
3969 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3970 \begin_inset Text
3972 \begin_layout Plain Layout
3973 Sufami Turbo
3974 \end_layout
3976 \end_inset
3977 </cell>
3978 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3979 \begin_inset Text
3981 \begin_layout Plain Layout
3982 NTSC
3983 \end_layout
3985 \end_inset
3986 </cell>
3987 </row>
3988 </lyxtabular>
3990 \end_inset
3993 \end_layout
3995 \begin_layout Standard
3996 Frame rates are:
3997 \end_layout
3999 \begin_layout Standard
4000 \begin_inset Tabular
4001 <lyxtabular version="3" rows="3" columns="2">
4002 <features tabularvalignment="middle">
4003 <column alignment="center" valignment="top" width="0">
4004 <column alignment="center" valignment="top" width="0">
4005 <row>
4006 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4007 \begin_inset Text
4009 \begin_layout Plain Layout
4010 Region
4011 \end_layout
4013 \end_inset
4014 </cell>
4015 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4016 \begin_inset Text
4018 \begin_layout Plain Layout
4019 Framerate (fps)
4020 \end_layout
4022 \end_inset
4023 </cell>
4024 </row>
4025 <row>
4026 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4027 \begin_inset Text
4029 \begin_layout Plain Layout
4031 \end_layout
4033 \end_inset
4034 </cell>
4035 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4036 \begin_inset Text
4038 \begin_layout Plain Layout
4039 322445/6448
4040 \end_layout
4042 \end_inset
4043 </cell>
4044 </row>
4045 <row>
4046 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4047 \begin_inset Text
4049 \begin_layout Plain Layout
4050 NTSC
4051 \end_layout
4053 \end_inset
4054 </cell>
4055 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4056 \begin_inset Text
4058 \begin_layout Plain Layout
4059 10738636/178683
4060 \end_layout
4062 \end_inset
4063 </cell>
4064 </row>
4065 </lyxtabular>
4067 \end_inset
4070 \end_layout
4072 \begin_layout Subsection
4073 Member: port1
4074 \end_layout
4076 \begin_layout Standard
4077 Contains type of port #1 (as one line).
4078  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4079  If not present, defaults to 'gamepad'.
4080 \end_layout
4082 \begin_layout Subsection
4083 Member: port2
4084 \end_layout
4086 \begin_layout Standard
4087 Contains type of port #2 (as one line).
4088  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4089  'justifier' and 'justifiers'.
4090  If not present, defaults to 'none'.
4091 \end_layout
4093 \begin_layout Subsection
4094 Member: gamename
4095 \end_layout
4097 \begin_layout Standard
4098 Contains name of the game (as one line).
4099 \end_layout
4101 \begin_layout Subsection
4102 Member: authors
4103 \end_layout
4105 \begin_layout Standard
4106 Contains authors, one per line.
4107  Part before '|' is the full name, part after is the nickname.
4108 \end_layout
4110 \begin_layout Subsection
4111 Member: systemid
4112 \end_layout
4114 \begin_layout Standard
4115 Always 
4116 \begin_inset Quotes eld
4117 \end_inset
4119 lsnes-rr1
4120 \begin_inset Quotes erd
4121 \end_inset
4123  (one line).
4124  Used to reject other saves.
4125 \end_layout
4127 \begin_layout Subsection
4128 Member: controlsversion
4129 \end_layout
4131 \begin_layout Standard
4132 Always 
4133 \begin_inset Quotes eld
4134 \end_inset
4137 \begin_inset Quotes erd
4138 \end_inset
4140  (one line).
4141  Used to identify what controls are there.
4142 \end_layout
4144 \begin_layout Subsection
4145 Member: 
4146 \begin_inset Quotes eld
4147 \end_inset
4149 coreversion
4150 \begin_inset Quotes erd
4151 \end_inset
4154 \end_layout
4156 \begin_layout Standard
4157 Contains bsnes core version number (as one line).
4158 \end_layout
4160 \begin_layout Subsection
4161 Member: projectid
4162 \end_layout
4164 \begin_layout Standard
4165 Contains project ID (as one line).
4166  Used to identify if two movies are part of the same project.
4167 \end_layout
4169 \begin_layout Subsection
4170 Member: {rom,slota,slotb}{,xml}.sha256
4171 \end_layout
4173 \begin_layout Standard
4174 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4175  Absent if corresponding file is absent.
4176 \end_layout
4178 \begin_layout Subsection
4179 Member: moviesram.<name>
4180 \end_layout
4182 \begin_layout Standard
4183 Raw binary startup SRAM of kind <name>.
4184  Only present in savestates and movies starting from SRAM.
4185 \end_layout
4187 \begin_layout Subsection
4188 Member: saveframe
4189 \end_layout
4191 \begin_layout Standard
4192 Contains frame number (as one line) of frame movie was saved on.
4193  Only present in savestates.
4194 \end_layout
4196 \begin_layout Subsection
4197 Member: lagcounter
4198 \end_layout
4200 \begin_layout Standard
4201 Current value of lag counter (as one line).
4202  Only present in savestates.
4203 \end_layout
4205 \begin_layout Subsection
4206 Member: pollcounters
4207 \end_layout
4209 \begin_layout Standard
4210 Contains poll counters (currently 100 of them), one per line.
4211  Each line is raw poll count if DRDY is set for it.
4212  Otherwise it is negative poll count minus one.
4213  Only present in savestates.
4214 \end_layout
4216 \begin_layout Subsection
4217 Member: hostmemory
4218 \end_layout
4220 \begin_layout Standard
4221 Raw binary dump of host memory.
4222  Only present in savestates.
4223 \end_layout
4225 \begin_layout Subsection
4226 Member: savestate
4227 \end_layout
4229 \begin_layout Standard
4230 The raw binary savestate itself.
4231  Savestate detection uses this file, only present in savestates.
4232 \end_layout
4234 \begin_layout Subsection
4235 Member: screenshot
4236 \end_layout
4238 \begin_layout Standard
4239 Screenshot of current frame.
4240  Only present in savestates.
4241  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4242  data.
4243  Height of image is inferred from the width and size of data.
4244 \end_layout
4246 \begin_layout Subsection
4247 Member: sram.<name>
4248 \end_layout
4250 \begin_layout Standard
4251 Raw binary SRAM of kind <name> at time of savestate.
4252  Only present in savestates.
4253 \end_layout
4255 \begin_layout Subsection
4256 Member: input
4257 \end_layout
4259 \begin_layout Standard
4260 The actual input track, one line per subframe (blank lines are skipped).
4261 \end_layout
4263 \begin_layout Itemize
4264 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4265  part of same frame as previous, otherwise it starts a new frame.
4266 \end_layout
4268 \begin_layout Itemize
4269 First subframe must start a new frame.
4270 \end_layout
4272 \begin_layout Standard
4273 Length of movie in frames is number of lines in input file that start a
4274  new frame.
4275 \end_layout
4277 \begin_layout Subsection
4278 Member: subtitles
4279 \end_layout
4281 \begin_layout Standard
4282 Subtitle track.
4283  Optional.
4284 \end_layout
4286 \begin_layout Itemize
4287 Each line is in form <firstframe> <numframes> <text>.
4288 \end_layout
4290 \begin_layout Itemize
4291 Linefeed is encoded as 
4292 \backslash
4293 n, backslash is encoded as 
4294 \backslash
4296 \backslash
4298 \end_layout
4300 \begin_layout Subsection
4301 Member: rerecords
4302 \end_layout
4304 \begin_layout Standard
4305 Contains textual base-10 rerecord count (as one line; emulator just writes
4306  this, it doesn't read it) + 1.
4307 \end_layout
4309 \begin_layout Subsection
4310 Member: rrdata
4311 \end_layout
4313 \begin_layout Standard
4314 This member stores set of load IDs.
4315  There is one load ID per rerecord (plus one corresponding to start of project).
4316 \end_layout
4318 \begin_layout Itemize
4319 This member constists of concatenation of records
4320 \end_layout
4322 \begin_layout Itemize
4323 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4324  IDs.
4325 \end_layout
4327 \begin_layout Itemize
4328 IDs are interpretted as 256-bit big-endian integers with warparound.
4329 \end_layout
4331 \begin_layout Itemize
4332 Initial predicted ID is all zeroes.
4333 \end_layout
4335 \begin_layout Standard
4336 Format of each record is:
4337 \end_layout
4339 \begin_layout Itemize
4340 1 byte: Opcode byte.
4341  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4342  Bit 7 is unused.
4343 \end_layout
4345 \begin_layout Itemize
4346 32-prefixlen bytes of ID.
4347 \end_layout
4349 \begin_layout Itemize
4350 countlen bytes of big-endian count (count).
4351 \end_layout
4353 \begin_layout Standard
4354 Records are processed as follows:
4355 \end_layout
4357 \begin_layout Itemize
4358 To form the first ID encoded by record, take the first prefixlen bytes predicted
4359  ID and append the read ID value to it.
4360  The result is the first ID encoded.
4361 \end_layout
4363 \begin_layout Itemize
4364 If countlen is 0, record encodes 1 ID.
4365 \end_layout
4367 \begin_layout Itemize
4368 If countlen is 1, record encodes 2+count IDs.
4369 \end_layout
4371 \begin_layout Itemize
4372 If countlen is 2, record encodes 258+count IDs.
4373 \end_layout
4375 \begin_layout Itemize
4376 If countlen is 3, record encodes 65794+count IDs.
4377 \end_layout
4379 \begin_layout Itemize
4380 The new predicted ID is the next ID after last one encoded by the record.
4381 \end_layout
4383 \begin_layout Standard
4384 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4385  by all records.
4386 \end_layout
4388 \begin_layout Subsection
4389 Member: starttime.second
4390 \end_layout
4392 \begin_layout Standard
4393 Movie starting time, second part.
4394  Epoch is Unix epoch.
4395  Default is 1,000,000,000.
4396 \end_layout
4398 \begin_layout Subsection
4399 Member: starttime.subsecond
4400 \end_layout
4402 \begin_layout Standard
4403 Movie starting time, subsecond part.
4404  Unit is CPU clocks.
4405  Default is 0.
4406 \end_layout
4408 \begin_layout Subsection
4409 Member: savetime.second
4410 \end_layout
4412 \begin_layout Standard
4413 Movie saving time, second part.
4414  Default is starttime.second.
4415  Only present in savestates.
4416 \end_layout
4418 \begin_layout Subsection
4419 Member: savetime.subsecond
4420 \end_layout
4422 \begin_layout Standard
4423 Movie saving time, subsecond part.
4424  Default is starttime.subsecond.
4425  Only present in savestates.
4426 \end_layout
4428 \begin_layout Section
4429 lsvs file format (commentary tracks)
4430 \end_layout
4432 \begin_layout Subsection
4433 Clusters
4434 \end_layout
4436 \begin_layout Itemize
4437 Each cluster is 8kB (8192 bytes) in size.
4438 \end_layout
4440 \begin_layout Itemize
4441 Cluster n starts at offset 8192*n in file.
4442 \end_layout
4444 \begin_layout Itemize
4445 The following clusters are system special:
4446 \end_layout
4448 \begin_deeper
4449 \begin_layout Itemize
4450 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4451 \end_layout
4453 \begin_layout Itemize
4454 Cluster 1 (superblock)
4455 \end_layout
4457 \end_deeper
4458 \begin_layout Subsection
4459 Cluster tables
4460 \end_layout
4462 \begin_layout Itemize
4463 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4464  last 11 bits of n).
4465 \end_layout
4467 \begin_layout Itemize
4468 This cluster table consists of 2048 4-byte big-endian integers.
4469 \end_layout
4471 \begin_layout Itemize
4472 Each entry describes a cluster in 16MB supercluster, in order.
4473 \end_layout
4475 \begin_layout Itemize
4476 The valid values for entries are:
4477 \end_layout
4479 \begin_deeper
4480 \begin_layout Itemize
4481 0x00000000: Free cluster
4482 \end_layout
4484 \begin_layout Itemize
4485 0x00000001: Last cluster in chain.
4486 \end_layout
4488 \begin_layout Itemize
4489 0xFFFFFFFF: System cluster (cluster tables and superblock)
4490 \end_layout
4492 \begin_layout Itemize
4493 (anything else): Number of next cluster in chain.
4494  Must not be multiple of 2048.
4495 \end_layout
4497 \end_deeper
4498 \begin_layout Itemize
4499 Due to limitations of the format, there can be at most 2097052 superclusters,
4500  giving maximum file size of 16TB.
4501 \end_layout
4503 \begin_layout Subsection
4504 Stream table
4505 \end_layout
4507 \begin_layout Itemize
4508 The stream table chain always starts in cluster 2.
4509 \end_layout
4511 \begin_layout Itemize
4512 Otherwise, it follows normal chaining.
4513 \end_layout
4515 \begin_layout Itemize
4516 The stream table consists of 16-byte entries:
4517 \end_layout
4519 \begin_deeper
4520 \begin_layout Itemize
4521 The first 8 bytes of entry give big-endian beginning position of stream
4522  in units of 1/48000 s.
4523 \end_layout
4525 \begin_layout Itemize
4526 The next 4 bytes of entry give big-endian beginning cluster for control
4527  data.
4528  0 here marks the entry as not present.
4529 \end_layout
4531 \begin_layout Itemize
4532 The last 4 bytes of entry give big-endian beginning cluster for codec data.
4533 \end_layout
4535 \end_deeper
4536 \begin_layout Itemize
4537 Stream table clusters are normal clusters, following normal chaining.
4538 \end_layout
4540 \begin_layout Itemize
4541 The stream begnning position is not guarenteed unique.
4542  There can be multiple streams with the same starting position in the file.
4543 \end_layout
4545 \begin_layout Subsection
4546 Stream control data
4547 \end_layout
4549 \begin_layout Itemize
4550 The stream control data consists of entries 4 bytes each:
4551 \end_layout
4553 \begin_deeper
4554 \begin_layout Itemize
4555 The first 2 bytes of entry gives big-endian length of packet
4556 \end_layout
4558 \begin_layout Itemize
4559 The next byte of entry gives audio length of packet in units of 1/400 s.
4560 \end_layout
4562 \begin_layout Itemize
4563 The last byte is control byte.
4564 \end_layout
4566 \begin_deeper
4567 \begin_layout Itemize
4568 0 means this entry is not present and the control data ends.
4569 \end_layout
4571 \begin_layout Itemize
4572 1 is valid control entry.
4573 \end_layout
4575 \end_deeper
4576 \end_deeper
4577 \begin_layout Itemize
4578 The stream control data can also end by running into end of the readable
4579  chain.
4580 \end_layout
4582 \begin_deeper
4583 \begin_layout Itemize
4584 This happens if there happens to be exact multiple of 2048 packets in stream
4585  and number of packets is nonzero.
4586 \end_layout
4588 \end_deeper
4589 \begin_layout Itemize
4590 These clusters follow normal chaining.
4591 \end_layout
4593 \begin_layout Subsection
4594 Stream codec data
4595 \end_layout
4597 \begin_layout Itemize
4598 Stream codec data consists of raw Opus data packets packed back to back
4599  with nothing in between.
4600 \end_layout
4602 \begin_layout Itemize
4603 Warning: Due to internal limitations, this data must reside in the first
4604  65536 superclusters (that is, the first 1TB of the file).
4605 \end_layout
4607 \begin_layout Subsection
4608 Superblock
4609 \end_layout
4611 \begin_layout Itemize
4612 The superblock is stored in cluster 1.
4614 \end_layout
4616 \begin_layout Itemize
4617 The first 11 bytes are 
4618 \begin_inset Quotes eld
4619 \end_inset
4621 sefs-magic
4622 \begin_inset Quotes erd
4623 \end_inset
4625 <NUL>.
4626 \end_layout
4628 \begin_layout Itemize
4629 The rest are unused.
4630 \end_layout
4632 \begin_layout Itemize
4633 This cluster 1 is marked as system special.
4634 \end_layout
4636 \begin_layout Section
4637 Known ROM extensions
4638 \end_layout
4640 \begin_layout Itemize
4641 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4642 \end_layout
4644 \begin_layout Itemize
4645 DMG cartridge ROMs: dmg, gb.
4646 \end_layout
4648 \begin_layout Itemize
4649 GBC cartridge ROMs: cgb, gbc.
4650 \end_layout
4652 \begin_layout Section
4653 Gamepack files
4654 \end_layout
4656 \begin_layout Itemize
4657 The first line must be: 
4658 \begin_inset Quotes eld
4659 \end_inset
4661 [GAMEPACK FILE]
4662 \begin_inset Quotes erd
4663 \end_inset
4666 \end_layout
4668 \begin_layout Itemize
4669 There is one needed line: 
4670 \begin_inset Quotes eld
4671 \end_inset
4673 type <systype>
4674 \begin_inset Quotes erd
4675 \end_inset
4678  This sets system type to <systype>.
4679  The following system types are valid:
4680 \end_layout
4682 \begin_deeper
4683 \begin_layout Itemize
4684 snes (SNES)
4685 \end_layout
4687 \begin_layout Itemize
4688 bsx (BS-X non-slotted)
4689 \end_layout
4691 \begin_layout Itemize
4692 bsxslotted (BS-X slotted)
4693 \end_layout
4695 \begin_layout Itemize
4696 sufamiturbo (Sufami Turbo)
4697 \end_layout
4699 \begin_layout Itemize
4700 sgb (Super Game Boy)
4701 \end_layout
4703 \begin_layout Itemize
4704 dmg (Game Boy)
4705 \end_layout
4707 \begin_layout Itemize
4708 gbc (Game Boy Color)
4709 \end_layout
4711 \begin_layout Itemize
4712 gbc_gba (Game Boy Color with GBA initial register values)
4713 \end_layout
4715 \end_deeper
4716 \begin_layout Itemize
4717 Optionally a region can be specified: 
4718 \begin_inset Quotes eld
4719 \end_inset
4721 region <region>
4722 \begin_inset Quotes erd
4723 \end_inset
4726  The following values are valid:
4727 \end_layout
4729 \begin_deeper
4730 \begin_layout Itemize
4731 autodetect (Autodetect region: snes and sgb only)
4732 \end_layout
4734 \begin_layout Itemize
4735 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4736 \end_layout
4738 \begin_layout Itemize
4739 pal (PAL: snes, sgb)
4740 \end_layout
4742 \begin_layout Itemize
4743 world (World: dmg, gbc, gbc_gba)
4744 \end_layout
4746 \end_deeper
4747 \begin_layout Itemize
4748 ROM images are loaded as: 
4749 \begin_inset Quotes eld
4750 \end_inset
4752 rom <type> <file>
4753 \begin_inset Quotes erd
4754 \end_inset
4757  The following types are valid:
4758 \end_layout
4760 \begin_deeper
4761 \begin_layout Itemize
4762 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4763  BIOS in bsx, bsxslotted, sufamiturbo)
4764 \end_layout
4766 \begin_layout Itemize
4767 bsx (Cartridge ROM in bsx, bsxslotted)
4768 \end_layout
4770 \begin_layout Itemize
4771 slot-a (Cartridge ROM in sufamiturbo)
4772 \end_layout
4774 \begin_layout Itemize
4775 slot-b (Cartridge ROM in sufamiturbo)
4776 \end_layout
4778 \end_deeper
4779 \begin_layout Itemize
4780 ROM markup can be loaded as: 
4781 \begin_inset Quotes eld
4782 \end_inset
4784 xml <type> <file>
4785 \begin_inset Quotes erd
4786 \end_inset
4789  The types valid are the same as for ROMs.
4790 \end_layout
4792 \begin_layout Itemize
4793 Patches can be loaded as 
4794 \begin_inset Quotes eld
4795 \end_inset
4797 patch[<offset>] <type> <file>
4798 \begin_inset Quotes erd
4799 \end_inset
4802  The types are the same as for ROMs.
4803 \end_layout
4805 \begin_deeper
4806 \begin_layout Itemize
4807 Offset is given in form [+-]<number>.
4808  Usually offset is either +0 or -512.
4809 \end_layout
4811 \begin_layout Itemize
4812 Default offset is +0.
4813 \end_layout
4815 \end_deeper
4816 \begin_layout Subsection
4817 Example:
4818 \end_layout
4820 \begin_layout LyX-Code
4821 [GAMEPACK FILE]
4822 \end_layout
4824 \begin_layout LyX-Code
4825 type snes
4826 \end_layout
4828 \begin_layout LyX-Code
4829 rom rom speedygonzales.sfc
4830 \end_layout
4832 \begin_layout LyX-Code
4833 patch-512 rom sonicthehedgehog.ips
4834 \end_layout
4836 \begin_layout Subsection
4837 Example 2:
4838 \end_layout
4840 \begin_layout LyX-Code
4841 [GAMEPACK FILE]
4842 \end_layout
4844 \begin_layout LyX-Code
4845 type sgb
4846 \end_layout
4848 \begin_layout LyX-Code
4849 rom rom supergameboy.sfc
4850 \end_layout
4852 \begin_layout LyX-Code
4853 rom dmg megamanV.dmg
4854 \end_layout
4856 \begin_layout Section
4857 Quick'n'dirty encode guide
4858 \end_layout
4860 \begin_layout Enumerate
4861 Start the emulator and load the ROM and movie file.
4862 \end_layout
4864 \begin_layout Enumerate
4865 Set large AVI option 'set-setting avi-large on'
4866 \end_layout
4868 \begin_layout Enumerate
4869 Enable dumping 'dump-avi tmpdump' 
4870 \end_layout
4872 \begin_layout Enumerate
4873 Unpause and let it run until you want to end dumping.
4874 \end_layout
4876 \begin_layout Enumerate
4877 Close the emulator (closing the window is the easiest way).
4878  Or use 'end-avi'.
4879 \end_layout
4881 \begin_layout Enumerate
4882 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4883  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4884 \end_layout
4886 \begin_layout Enumerate
4887 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4888 \end_layout
4890 \begin_layout Enumerate
4891 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4892  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4893 \end_layout
4895 \begin_layout Enumerate
4896 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4897  Now final.mkv contains quick'n'dirty encode.
4898 \end_layout
4900 \begin_layout Section
4901 Axis configurations for some gamepad types:
4902 \end_layout
4904 \begin_layout Subsection
4905 XBox360 controller:
4906 \end_layout
4908 \begin_layout Standard
4909 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4910 \end_layout
4912 \begin_layout LyX-Code
4913 set-axis joystick0axis2 pressure-+
4914 \end_layout
4916 \begin_layout LyX-Code
4917 set-axis joystick0axis5 pressure-+
4918 \end_layout
4920 \begin_layout Itemize
4921 This is needed for SDL only.
4922  EVDEV sets those types correctly.
4923 \end_layout
4925 \begin_layout Subsection
4926 PS3 
4927 \begin_inset Quotes eld
4928 \end_inset
4930 sixaxis
4931 \begin_inset Quotes erd
4932 \end_inset
4934  controller:
4935 \end_layout
4937 \begin_layout Standard
4938 Axes 8-19 should be disabled.
4939 \end_layout
4941 \begin_layout LyX-Code
4942 set-axis joystick0axis8 disabled
4943 \end_layout
4945 \begin_layout LyX-Code
4946 set-axis joystick0axis9 disabled
4947 \end_layout
4949 \begin_layout LyX-Code
4950 set-axis joystick0axis10 disabled
4951 \end_layout
4953 \begin_layout LyX-Code
4954 set-axis joystick0axis11 disabled
4955 \end_layout
4957 \begin_layout LyX-Code
4958 set-axis joystick0axis12 disabled
4959 \end_layout
4961 \begin_layout LyX-Code
4962 set-axis joystick0axis13 disabled
4963 \end_layout
4965 \begin_layout LyX-Code
4966 set-axis joystick0axis14 disabled
4967 \end_layout
4969 \begin_layout LyX-Code
4970 set-axis joystick0axis15 disabled
4971 \end_layout
4973 \begin_layout LyX-Code
4974 set-axis joystick0axis16 disabled
4975 \end_layout
4977 \begin_layout LyX-Code
4978 set-axis joystick0axis17 disabled
4979 \end_layout
4981 \begin_layout LyX-Code
4982 set-axis joystick0axis18 disabled
4983 \end_layout
4985 \begin_layout LyX-Code
4986 set-axis joystick0axis19 disabled
4987 \end_layout
4989 \begin_layout Section
4990 Errata:
4991 \end_layout
4993 \begin_layout Subsection
4994 Problems from BSNES core:
4995 \end_layout
4997 \begin_layout Itemize
4998 The whole pending save stuff.
4999 \end_layout
5001 \begin_layout Itemize
5002 Lack of layer hiding.
5003 \end_layout
5005 \begin_layout Itemize
5006 It is slow (especially accuracy).
5007 \end_layout
5009 \begin_layout Itemize
5010 Firmwares can't be loaded from ZIP archives.
5011 \end_layout
5013 \begin_layout Subsection
5014 Other problems:
5015 \end_layout
5017 \begin_layout Itemize
5018 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5019 \end_layout
5021 \begin_layout Itemize
5022 Audio for last dumped frame is not itself dumped.
5023 \end_layout
5025 \begin_layout Itemize
5026 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5027 \end_layout
5029 \begin_layout Itemize
5030 No menus, command based interface (SDL).
5031 \end_layout
5033 \begin_layout Itemize
5034 Long commands don't scroll.
5035 \end_layout
5037 \begin_layout Section
5038 Changelog:
5039 \end_layout
5041 \begin_layout Subsection
5042 rr0-beta1
5043 \end_layout
5045 \begin_layout Itemize
5046 Fix -Wall warnings
5047 \end_layout
5049 \begin_layout Itemize
5050 Fix dumper video corruption with levels 10-18.
5051 \end_layout
5053 \begin_layout Subsection
5054 rr0-beta2
5055 \end_layout
5057 \begin_layout Itemize
5058 Autofire
5059 \end_layout
5061 \begin_layout Itemize
5062 Lots of code cleanups
5063 \end_layout
5065 \begin_layout Itemize
5066 Lua interface to settings
5067 \end_layout
5069 \begin_layout Itemize
5070 Allow specifying AVI borders without Lua
5071 \end_layout
5073 \begin_layout Itemize
5074 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5075 \end_layout
5077 \begin_layout Itemize
5078 on_snoop lua callback
5079 \end_layout
5081 \begin_layout Itemize
5082 Faster movie loading and saving.
5083 \end_layout
5085 \begin_layout Subsection
5086 rr0-beta3
5087 \end_layout
5089 \begin_layout Itemize
5090 Joystick support
5091 \end_layout
5093 \begin_layout Subsection
5094 rr0-beta4
5095 \end_layout
5097 \begin_layout Itemize
5098 Fix multi-buttons
5099 \end_layout
5101 \begin_layout Itemize
5102 Save jukebox functionality.
5103 \end_layout
5105 \begin_layout Subsection
5106 rr0-beta5
5107 \end_layout
5109 \begin_layout Itemize
5110 Try to fix some nasty failing movie load edge cases
5111 \end_layout
5113 \begin_layout Itemize
5114 Allow specifying scripts to run on command line.
5115 \end_layout
5117 \begin_layout Subsection
5118 rr0-beta6
5119 \end_layout
5121 \begin_layout Itemize
5122 Major source code reorganization.
5123 \end_layout
5125 \begin_layout Itemize
5126 Backup savestates before overwriting.
5127 \end_layout
5129 \begin_layout Itemize
5130 Don't crash if loading initial state fails.
5131 \end_layout
5133 \begin_layout Subsection
5134 rr0-beta7
5135 \end_layout
5137 \begin_layout Itemize
5138 Fix firmware lookup
5139 \end_layout
5141 \begin_layout Itemize
5142 Fix author name parsing
5143 \end_layout
5145 \begin_layout Itemize
5146 Fix rerecord counting
5147 \end_layout
5149 \begin_layout Itemize
5150 (SDL) Print messages to console if SDL is uninitialized
5151 \end_layout
5153 \begin_layout Itemize
5154 Add movieinfo program
5155 \end_layout
5157 \begin_layout Itemize
5158 Fix loading movies starting from SRAM.
5159 \end_layout
5161 \begin_layout Subsection
5162 rr0-beta8
5163 \end_layout
5165 \begin_layout Itemize
5166 Add support for unattended dumping
5167 \end_layout
5169 \begin_layout Itemize
5170 Fix compiling for Win32
5171 \end_layout
5173 \begin_layout Itemize
5174 Don't lock up if sound can't be initialized
5175 \end_layout
5177 \begin_layout Itemize
5178 Strip trailing CR from commands
5179 \end_layout
5181 \begin_layout Itemize
5182 Don't try to do dubious things in global ctors (fix crash on startup)
5183 \end_layout
5185 \begin_layout Subsection
5186 rr0-beta9
5187 \end_layout
5189 \begin_layout Itemize
5190 Small documentation tweaking
5191 \end_layout
5193 \begin_layout Itemize
5194 Fix make clean
5195 \end_layout
5197 \begin_layout Itemize
5198 Fix major bug in modifier matching
5199 \end_layout
5201 \begin_layout Subsection
5202 rr0-beta10
5203 \end_layout
5205 \begin_layout Itemize
5206 Lots of documentation fixes
5207 \end_layout
5209 \begin_layout Itemize
5210 Use dedicated callbacks for event backcomm., not commands.
5211 \end_layout
5213 \begin_layout Itemize
5214 Ensure that the watchdog is not hit when executing delayed reset.
5215 \end_layout
5217 \begin_layout Itemize
5218 Remove errant tab from joystick message.
5219 \end_layout
5221 \begin_layout Subsection
5222 rr0-beta11
5223 \end_layout
5225 \begin_layout Itemize
5226 Make autofire operate in absolute time, not linear time
5227 \end_layout
5229 \begin_layout Itemize
5230 Reinitialize controls when resuming from loadstate
5231 \end_layout
5233 \begin_layout Itemize
5234 Some more code cleanups
5235 \end_layout
5237 \begin_layout Itemize
5238 If Lua allocator fails, call OOM_panic()
5239 \end_layout
5241 \begin_layout Itemize
5242 Byte/word/dword/qword sized host memory write/read functions.
5243 \end_layout
5245 \begin_layout Itemize
5246 Dump at correct framerate if dumping interlaced NTSC (height=448).
5247 \end_layout
5249 \begin_layout Subsection
5250 rr0-beta12
5251 \end_layout
5253 \begin_layout Itemize
5254 Actually include the complete source code
5255 \end_layout
5257 \begin_layout Itemize
5258 Keep track of RTC
5259 \end_layout
5261 \begin_layout Subsection
5262 rr0-beta13
5263 \end_layout
5265 \begin_layout Itemize
5266 Document {save,start}time.{,sub}second.
5267 \end_layout
5269 \begin_layout Itemize
5270 Intercept time() from bsnes core.
5271 \end_layout
5273 \begin_layout Subsection
5274 rr0-beta14
5275 \end_layout
5277 \begin_layout Itemize
5278 Allow disabling time() interception (allow build on Mac OS X)
5279 \end_layout
5281 \begin_layout Itemize
5282 Use SDLMain on Mac OS X (make SDL not crash)
5283 \end_layout
5285 \begin_layout Itemize
5286 Disable delayed resets (just plain too buggy for now).
5287 \end_layout
5289 \begin_layout Itemize
5290 Code cleanups
5291 \end_layout
5293 \begin_layout Itemize
5294 Use 16-bit for graphics/video instead of 32-bit.
5295 \end_layout
5297 \begin_layout Itemize
5298 gui.rectangle/gui.pixel
5299 \end_layout
5301 \begin_layout Itemize
5302 gui.crosshair
5303 \end_layout
5305 \begin_layout Itemize
5306 New CSCD writer implementation.
5307 \end_layout
5309 \begin_layout Subsection
5310 rr0-beta15
5311 \end_layout
5313 \begin_layout Itemize
5314 Fix interaction of * and +.
5315 \end_layout
5317 \begin_layout Itemize
5318 Manual improvements
5319 \end_layout
5321 \begin_layout Itemize
5322 Use gettimeofday()/usleep(), these seem portable enough.
5323 \end_layout
5325 \begin_layout Itemize
5326 Move joystick axis manipulation to keymapper code.
5327 \end_layout
5329 \begin_layout Itemize
5330 Changes to how read-only works.
5331 \end_layout
5333 \begin_layout Itemize
5334 Refactor controller input code.
5335 \end_layout
5337 \begin_layout Subsection
5338 rr0-beta16
5339 \end_layout
5341 \begin_layout Itemize
5342 Fix mouseclick scale compensation.
5343 \end_layout
5345 \begin_layout Itemize
5346 Draw area boundaries correctly in SDL code.
5347 \end_layout
5349 \begin_layout Itemize
5350 gui.screenshot.
5351 \end_layout
5353 \begin_layout Itemize
5354 Fix CSCD output (buffer overrun and race condition).
5355 \end_layout
5357 \begin_layout Subsection
5358 rr0-beta17
5359 \end_layout
5361 \begin_layout Itemize
5362 JMD dumping support.
5363 \end_layout
5365 \begin_layout Itemize
5366 Allow unattended dumping to JMD.
5367 \end_layout
5369 \begin_layout Itemize
5370 Move to BSNES v083.
5371 \end_layout
5373 \begin_layout Itemize
5374 Switch back to 32-bit colors.
5375 \end_layout
5377 \begin_layout Itemize
5378 Add Lua function gui.color.
5379 \end_layout
5381 \begin_layout Itemize
5382 Use some new C++11 features in GCC 4.6.
5383 \end_layout
5385 \begin_layout Itemize
5386 Be prepared for core frequency changes.
5387 \end_layout
5389 \begin_layout Itemize
5390 Pass colors in one chunk from Lua.
5391 \end_layout
5393 \begin_layout Subsection
5394 rr0-beta18
5395 \end_layout
5397 \begin_layout Itemize
5398 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5399  memory.read_vma() and memory.find_vma().
5400 \end_layout
5402 \begin_layout Itemize
5403 Numerious documentation fixups
5404 \end_layout
5406 \begin_layout Itemize
5407 RTC time format changed
5408 \end_layout
5410 \begin_layout Itemize
5411 Reformat flags display
5412 \end_layout
5414 \begin_layout Itemize
5415 Allow lua package name to be overridden
5416 \end_layout
5418 \begin_layout Itemize
5419 SDUMP (high-quality dumping).
5420 \end_layout
5422 \begin_layout Itemize
5423 Split platform support to plugins.
5424 \end_layout
5426 \begin_layout Itemize
5427 Make all sound plugins support basic sound commands
5428 \end_layout
5430 \begin_layout Itemize
5431 Support portaudio for sound.
5432 \end_layout
5434 \begin_layout Itemize
5435 Allow disable Lua/SDL searching.
5436 \end_layout
5438 \begin_layout Itemize
5439 Upconvert colors when copying lcscreen to screen.
5440 \end_layout
5442 \begin_layout Itemize
5443 Reorganize source tree.
5444 \end_layout
5446 \begin_layout Itemize
5447 Evdev joystick support.
5448 \end_layout
5450 \begin_layout Itemize
5451 Refactor more code into generic window code.
5452 \end_layout
5454 \begin_layout Subsection
5455 rr0-beta19
5456 \end_layout
5458 \begin_layout Itemize
5459 Refactor message handling.
5460 \end_layout
5462 \begin_layout Itemize
5463 Rework makefile
5464 \end_layout
5466 \begin_layout Itemize
5467 Documentation fixes
5468 \end_layout
5470 \begin_layout Itemize
5471 Finish pending saves before load/quit.
5472 \end_layout
5474 \begin_layout Itemize
5475 Wxwidgets graphics plugin.
5476 \end_layout
5478 \begin_layout Subsection
5479 rr0-beta20
5480 \end_layout
5482 \begin_layout Itemize
5483 Get rid of win32-crap.[ch]pp.
5484 \end_layout
5486 \begin_layout Itemize
5487 Move files around a lot.
5488 \end_layout
5490 \begin_layout Itemize
5491 Get rid of need for host C++ compiler.
5492 \end_layout
5494 \begin_layout Itemize
5495 Bsnes v084 core.
5496 \end_layout
5498 \begin_layout Itemize
5499 Refactor inter-component communication.
5500 \end_layout
5502 \begin_layout Itemize
5503 Fix zero luma.
5504 \end_layout
5506 \begin_layout Itemize
5507 Fix crash on multiline aliases.
5508 \end_layout
5510 \begin_layout Itemize
5511 Load/Save settings in wxwidgets gui.
5512 \end_layout
5514 \begin_layout Subsection
5515 rr0-beta21
5516 \end_layout
5518 \begin_layout Itemize
5519 Patch problems in bsnes core
5520 \end_layout
5522 \begin_layout Itemize
5523 SNES is little-endian, not big-endian!
5524 \end_layout
5526 \begin_layout Itemize
5527 Fix memory corruption in lcscreen::load()
5528 \end_layout
5530 \begin_layout Subsection
5531 rr0-beta22
5532 \end_layout
5534 \begin_layout Itemize
5535 Fix interpretting repeat counts in rrdata loading.
5536 \end_layout
5538 \begin_layout Itemize
5539 New lua callback: on_frame()
5540 \end_layout
5542 \begin_layout Itemize
5543 Remove calls to runtosave() that aren't supposed to be there
5544 \end_layout
5546 \begin_layout Itemize
5547 Lua function: movie.read_rtc()
5548 \end_layout
5550 \begin_layout Itemize
5551 Ignore src/fonts/font.cpp
5552 \end_layout
5554 \begin_layout Itemize
5555 Fix more bsnes core problems
5556 \end_layout
5558 \begin_layout Itemize
5559 Control bsnes random seeding
5560 \end_layout
5562 \begin_layout Itemize
5563 Pause-on-end
5564 \end_layout
5566 \begin_layout Itemize
5567 Some bsnes core debugging features (state dump and state hash)
5568 \end_layout
5570 \begin_layout Itemize
5571 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5572  it was 'lsnes rr0-beta21').
5573 \end_layout
5575 \begin_layout Subsection
5576 rr0-beta23
5577 \end_layout
5579 \begin_layout Itemize
5580 Fix memory corruption due to macro/field mixup
5581 \end_layout
5583 \begin_layout Itemize
5584 search-memory update
5585 \end_layout
5587 \begin_layout Itemize
5588 Allow direct-mapped framebuffer
5589 \end_layout
5591 \begin_layout Itemize
5592 SDL: Use SDL_ANYFORMAT if possible
5593 \end_layout
5595 \begin_layout Itemize
5596 SDMP2SOX: 2s delay modes.
5597 \end_layout
5599 \begin_layout Itemize
5600 Wxwidgets: Cleanups
5601 \end_layout
5603 \begin_layout Itemize
5604 Use sed -E, not sed -r.
5605  Fixes building on Mac OS X.
5606 \end_layout
5608 \begin_layout Itemize
5609 Wxwidgets: Save jukebox on exit
5610 \end_layout
5612 \begin_layout Itemize
5613 Fix RTC if using load-movie on savestate.
5614 \end_layout
5616 \begin_layout Itemize
5617 Fix crash related to full console mode.
5618 \end_layout
5620 \begin_layout Subsection
5621 rr0-beta24
5622 \end_layout
5624 \begin_layout Itemize
5625 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5626 \end_layout
5628 \begin_layout Itemize
5629 Wxwidgets: Allow compiling on Mac OS X.
5630 \end_layout
5632 \begin_layout Itemize
5633 Use movie compare instead of movie hashing (faster save/load).
5634 \end_layout
5636 \begin_layout Itemize
5637 Lua: _SYSTEM table.
5638 \end_layout
5640 \begin_layout Subsection
5641 rr0-beta25
5642 \end_layout
5644 \begin_layout Itemize
5645 sdmp2sox: Pad soundtrack if using -l or -L.
5646 \end_layout
5648 \begin_layout Itemize
5649 sdmp2sox: Fix NTSC overscan.
5650 \end_layout
5652 \begin_layout Itemize
5653 sdmp2sox: Add AR correction mode.
5654 \end_layout
5656 \begin_layout Itemize
5657 call lua_close() when exiting.
5658 \end_layout
5660 \begin_layout Itemize
5661 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5662 \end_layout
5664 \begin_layout Subsection
5665 rr0-beta26
5666 \end_layout
5668 \begin_layout Itemize
5669 Fix IPS patching code (use bsnes core IPS patcher).
5670 \end_layout
5672 \begin_layout Itemize
5673 Implement BPS patching (using bsnes core IPS patcher).
5674 \end_layout
5676 \begin_layout Itemize
5677 Add feature to load headered ROMs.
5678 \end_layout
5680 \begin_layout Subsection
5681 rr0-beta27
5682 \end_layout
5684 \begin_layout Itemize
5685 Show command names when showing keybindings
5686 \end_layout
5688 \begin_layout Subsection
5690 \end_layout
5692 \begin_layout Itemize
5693 Fix pause-on-end to be actually controllable
5694 \end_layout
5696 \begin_layout Itemize
5697 SDL: Poll all events in queue, not just first one (fixes slowness in command
5698  typing)
5699 \end_layout
5701 \begin_layout Itemize
5702 Wxwidgets: Fix ROM loading.
5703 \end_layout
5705 \begin_layout Subsection
5706 rr1-beta0
5707 \end_layout
5709 \begin_layout Itemize
5710 Lua: Add gui.textH, gui.textV, gui.textHV
5711 \end_layout
5713 \begin_layout Itemize
5714 Fix text colors on SDL on Mac OS X
5715 \end_layout
5717 \begin_layout Itemize
5718 Mode 'F' for finished in readonly mode.
5719 \end_layout
5721 \begin_layout Itemize
5722 Fix some WS errors.
5723 \end_layout
5725 \begin_layout Itemize
5726 Reliably pause after skip poll
5727 \end_layout
5729 \begin_layout Itemize
5730 Split UI and core into their own threads
5731 \end_layout
5733 \begin_layout Subsection
5734 rr1-beta1
5735 \end_layout
5737 \begin_layout Itemize
5738 Remove leftover dummy SRAM slot
5739 \end_layout
5741 \begin_layout Itemize
5742 Fix controller numbers.
5743 \end_layout
5745 \begin_layout Subsection
5746 rr1-beta2
5747 \end_layout
5749 \begin_layout Itemize
5750 Fix lsnes-dumpavi after interface change.
5751 \end_layout
5753 \begin_layout Itemize
5754 Also give BSNES patches for v085.
5755 \end_layout
5757 \begin_layout Itemize
5758 Pack movie data in memory.
5759 \end_layout
5761 \begin_layout Subsection
5762 rr1-beta3
5763 \end_layout
5765 \begin_layout Itemize
5766 Fix framecount/length given when loading movies.
5767 \end_layout
5769 \begin_layout Itemize
5770 Controller command memory leak fixes.
5771 \end_layout
5773 \begin_layout Itemize
5774 Don't leak palette if freeing screen object.
5775 \end_layout
5777 \begin_layout Subsection
5778 rr1-beta4
5779 \end_layout
5781 \begin_layout Itemize
5782 Detect revisions.
5783 \end_layout
5785 \begin_layout Itemize
5786 Wxwidgets: Allow controlling dumper from the menu.
5787 \end_layout
5789 \begin_layout Subsection
5790 rr1-beta5
5791 \end_layout
5793 \begin_layout Itemize
5794 Rewrite parts of manual
5795 \end_layout
5797 \begin_layout Itemize
5798 Lua: Make it work with Lua 5.2.
5799 \end_layout
5801 \begin_layout Subsection
5802 rr1-beta6
5803 \end_layout
5805 \begin_layout Itemize
5806 Win32: Fix compile errors.
5807 \end_layout
5809 \begin_layout Subsection
5810 rr1-beta7
5811 \end_layout
5813 \begin_layout Itemize
5814 Refactor controller input code.
5815 \end_layout
5817 \begin_layout Itemize
5818 Fix crash when using command line on SDL / Mac OS X.
5819 \end_layout
5821 \begin_layout Subsection
5822 rr1-beta8
5823 \end_layout
5825 \begin_layout Itemize
5826 Delete core/coroutine (obsolete)
5827 \end_layout
5829 \begin_layout Itemize
5830 Lag input display by one frame.
5831 \end_layout
5833 \begin_layout Itemize
5834 Rewind movie to beginning function.
5835 \end_layout
5837 \begin_layout Itemize
5838 Fix wrong frame number reported to Lua when repainting after loadstate
5839 \end_layout
5841 \begin_layout Itemize
5842 Support UI editing of jukebox
5843 \end_layout
5845 \begin_layout Itemize
5846 Wxwidgets: Save settings on exit.
5847 \end_layout
5849 \begin_layout Itemize
5850 Support ${project} for filenames
5851 \end_layout
5853 \begin_layout Itemize
5854 SDL: Fix command history
5855 \end_layout
5857 \begin_layout Subsection
5858 rr1-beta9
5859 \end_layout
5861 \begin_layout Itemize
5862 Fix some order-of-global-ctor bugs.
5863 \end_layout
5865 \begin_layout Subsection
5866 rr1-beta10
5867 \end_layout
5869 \begin_layout Itemize
5870 Fix crashes when quitting on Win32.
5871 \end_layout
5873 \begin_layout Subsection
5874 rr1-beta11
5875 \end_layout
5877 \begin_layout Itemize
5878 EVDEV: Queue keypresses from joystick, don't send directly
5879 \end_layout
5881 \begin_layout Itemize
5882 Wxwidgets: Load-Preserve that actually works.
5883 \end_layout
5885 \begin_layout Subsection
5886 rr1-beta12
5887 \end_layout
5889 \begin_layout Itemize
5890 Wxwidgets: GUI for memory search.
5891 \end_layout
5893 \begin_layout Itemize
5894 Warn about using synchronous queue in UI callback.
5895 \end_layout
5897 \begin_layout Subsection
5898 rr1-beta13
5899 \end_layout
5901 \begin_layout Itemize
5902 Remember last saved file for each ROM
5903 \end_layout
5905 \begin_layout Itemize
5906 Support MT dumping via boost.
5907 \end_layout
5909 \begin_layout Itemize
5910 Lua: input.raw
5911 \end_layout
5913 \begin_layout Itemize
5914 Lua: input.keyhook
5915 \end_layout
5917 \begin_layout Itemize
5918 Make mouse be ordinary input instead of special-casing
5919 \end_layout
5921 \begin_layout Itemize
5922 SDL: Don't screw up commands with NUL codepoints.
5923 \end_layout
5925 \begin_layout Subsection
5926 rr1-beta14
5927 \end_layout
5929 \begin_layout Itemize
5930 Merge status panel and main window
5931 \end_layout
5933 \begin_layout Itemize
5934 True movie slot support (the rest of it)
5935 \end_layout
5937 \begin_layout Itemize
5938 SDL: Fix compilation error
5939 \end_layout
5941 \begin_layout Itemize
5942 Elminate cross calls in dump menu code.
5943 \end_layout
5945 \begin_layout Subsection
5946 rr1-beta15
5947 \end_layout
5949 \begin_layout Itemize
5950 Cancel pending saves command
5951 \end_layout
5953 \begin_layout Itemize
5954 Wxwidgets: Code refactoring
5955 \end_layout
5957 \begin_layout Itemize
5958 Wxwidgets: Fix system -> reset
5959 \end_layout
5961 \begin_layout Itemize
5962 Wxwidgets: Read watch expressions in the right thread
5963 \end_layout
5965 \begin_layout Subsection
5966 rr1-beta16
5967 \end_layout
5969 \begin_layout Itemize
5970 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5971  support that).
5972 \end_layout
5974 \begin_layout Itemize
5975 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5976 \end_layout
5978 \begin_layout Itemize
5979 Don't append trailing '-' to prefix when saving movie.
5980 \end_layout
5982 \begin_layout Itemize
5983 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5984 \end_layout
5986 \begin_layout Subsection
5988 \end_layout
5990 \begin_layout Itemize
5991 Document memory watch syntax.
5992 \end_layout
5994 \begin_layout Subsection
5995 rr1-delta1
5996 \end_layout
5998 \begin_layout Itemize
5999 Fix unattended dumping (lsnes-dumpavi)
6000 \end_layout
6002 \begin_layout Itemize
6003 Support RAW dumping
6004 \end_layout
6006 \begin_layout Itemize
6007 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6008 \end_layout
6010 \begin_layout Itemize
6011 Add option to control sample rate preturbation in AVI dumper
6012 \end_layout
6014 \begin_layout Subsection
6015 rr1-delta2
6016 \end_layout
6018 \begin_layout Itemize
6019 Wxwidgets: Fix dumper submodes
6020 \end_layout
6022 \begin_layout Itemize
6023 Set core controller types before loadstate
6024 \end_layout
6026 \begin_layout Subsection
6027 rr1-delta2epsilon1
6028 \end_layout
6030 \begin_layout Itemize
6031 Fix compiling with bsnes v086.
6032 \end_layout
6034 \begin_layout Subsection
6035 rr1-delta3
6036 \end_layout
6038 \begin_layout Itemize
6039 Don't prompt before quitting
6040 \end_layout
6042 \begin_layout Itemize
6043 Start unpaused, preserve pause/unpause over load.
6044 \end_layout
6046 \begin_layout Itemize
6047 Try to autodetect if ROM is headered.
6048 \end_layout
6050 \begin_layout Itemize
6051 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6052 \end_layout
6054 \begin_layout Itemize
6055 Allow configuring some hotkeys.
6056 \end_layout
6058 \begin_layout Subsection
6059 rr1-delta4
6060 \end_layout
6062 \begin_layout Itemize
6063 Lots of code cleanups
6064 \end_layout
6066 \begin_layout Itemize
6067 Fix JMD compression (JMD dumping was broken)
6068 \end_layout
6070 \begin_layout Itemize
6071 Don't crash if Lua C function throws an exception.
6072 \end_layout
6074 \begin_layout Itemize
6075 Support bitmap drawing in Lua.
6076 \end_layout
6078 \begin_layout Itemize
6079 Fix bsnes v085/v086 patches.
6080 \end_layout
6082 \begin_layout Itemize
6083 Improve stability on win32.
6084 \end_layout
6086 \begin_layout Subsection
6087 rr1-delta4epsilon1
6088 \end_layout
6090 \begin_layout Itemize
6091 Don't corrupt movie if movie length is integer multiple of frames per page.
6092 \end_layout
6094 \begin_layout Subsection
6095 rr1-delta5
6096 \end_layout
6098 \begin_layout Itemize
6099 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6100 \end_layout
6102 \begin_layout Itemize
6103 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6104 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6106 \end_layout
6108 \begin_layout Itemize
6109 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6110 \end_layout
6112 \begin_layout Itemize
6113 Wxwidgets: Fix broken modifiers
6114 \end_layout
6116 \begin_layout Itemize
6117 on_paint has parameter now.
6118 \end_layout
6120 \begin_layout Itemize
6121 Optional initital fill for bitmaps
6122 \end_layout
6124 \begin_layout Itemize
6125 Fix palette changing.
6126 \end_layout
6128 \begin_layout Itemize
6129 Optimize rendering a bit.
6130 \end_layout
6132 \begin_layout Itemize
6133 Bsnes v087 support.
6134 \end_layout
6136 \begin_layout Subsection
6137 rr1-delta5epsilon1
6138 \end_layout
6140 \begin_layout Itemize
6141 Movieinfo: Fix display of port #2 type.
6142 \end_layout
6144 \begin_layout Itemize
6145 Call on_input() after loadstate.
6146 \end_layout
6148 \begin_layout Subsection
6149 rr1-delta5epsilon2
6150 \end_layout
6152 \begin_layout Itemize
6153 Fix writing port2 data to movie.
6154 \end_layout
6156 \begin_layout Itemize
6157 Fix SRAM handling with Bsnes v087.
6158 \end_layout
6160 \begin_layout Subsection
6161 rr1-delta6
6162 \end_layout
6164 \begin_layout Itemize
6165 Library loading support
6166 \end_layout
6168 \begin_layout Itemize
6169 Built-in TSCC encoder
6170 \end_layout
6172 \begin_layout Itemize
6173 Hi-color (256T colors) dumping.
6174 \end_layout
6176 \begin_layout Itemize
6177 Dump over TCP/IP(v6)
6178 \end_layout
6180 \begin_layout Itemize
6181 Hidable status panel
6182 \end_layout
6184 \begin_layout Itemize
6185 Turbo toggle/hold
6186 \end_layout
6188 \begin_layout Itemize
6189 Adjustable sound volume
6190 \end_layout
6192 \begin_layout Itemize
6193 Screen scaling
6194 \end_layout
6196 \begin_layout Itemize
6197 Allow DnD into filename boxes
6198 \end_layout
6200 \begin_layout Itemize
6201 Configurable paths
6202 \end_layout
6204 \begin_layout Itemize
6205 Portaudio: Fix speaker popping at start
6206 \end_layout
6208 \begin_layout Itemize
6209 Lots of UI changes
6210 \end_layout
6212 \begin_layout Itemize
6213 Speed adjustment menu
6214 \end_layout
6216 \begin_layout Itemize
6217 Win32 joystick support
6218 \end_layout
6220 \begin_layout Itemize
6221 Lua: gui.rainbow and gui.box
6222 \end_layout
6224 \begin_layout Itemize
6225 Split key lists into classes (the key list was large!)
6226 \end_layout
6228 \begin_layout Itemize
6229 More save slots support
6230 \end_layout
6232 \begin_layout Itemize
6233 Wxwidgets (wxJoystick) joystick support
6234 \end_layout
6236 \begin_layout Subsection
6237 rr1-delta7
6238 \end_layout
6240 \begin_layout Itemize
6241 Lots of internal joystick refactoring
6242 \end_layout
6244 \begin_layout Itemize
6245 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6246 \end_layout
6248 \begin_layout Itemize
6249 Wxwidgets: Settings mode (open settings without ROM)
6250 \end_layout
6252 \begin_layout Itemize
6253 Wxwidgets: Prompt key to use option
6254 \end_layout
6256 \begin_layout Itemize
6257 Wxwidgets: Fix crash if key goes away underneath
6258 \end_layout
6260 \begin_layout Itemize
6261 Wxwidgets: Fix mouse position in presence of scaling
6262 \end_layout
6264 \begin_layout Itemize
6265 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6266 \end_layout
6268 \begin_layout Itemize
6269 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6270  seem to work well on WinXP)
6271 \end_layout
6273 \begin_layout Itemize
6274 Start paused option.
6275 \end_layout
6277 \begin_layout Subsection
6278 rr1-delta7epsilon1
6279 \end_layout
6281 \begin_layout Itemize
6282 AVI: ZMBV support
6283 \end_layout
6285 \begin_layout Itemize
6286 lsnes-dumpavi: Start Lua before starting dumper
6287 \end_layout
6289 \begin_layout Itemize
6290 AVI: Fix secondary audio in mode 4.
6291 \end_layout
6293 \begin_layout Subsection
6294 rr1-delta7epsilon2
6295 \end_layout
6297 \begin_layout Itemize
6298 AVI: Refactor ZMBV a bit.
6299 \end_layout
6301 \begin_layout Itemize
6302 Fix error reading analog values from movie file
6303 \end_layout
6305 \begin_layout Subsection
6306 rr1-delta8
6307 \end_layout
6309 \begin_layout Itemize
6310 Delayed reset support
6311 \end_layout
6313 \begin_layout Itemize
6314 Lua: memory.hash_region
6315 \end_layout
6317 \begin_layout Subsection
6318 rr1-delta8epsilon1
6319 \end_layout
6321 \begin_layout Itemize
6322 Rework the build system
6323 \end_layout
6325 \begin_layout Itemize
6326 Typing input support
6327 \end_layout
6329 \begin_layout Itemize
6330 Fix building with bsnes v086 and v087.
6331 \end_layout
6333 \begin_layout Itemize
6334 SDL: Save settings on exit
6335 \end_layout
6337 \begin_layout Itemize
6338 SDL: Command to enter command line mode with given command.
6339 \end_layout
6341 \begin_layout Itemize
6342 SDL: More advanced command editing.
6343 \end_layout
6345 \begin_layout Subsection
6346 rr1-delta9
6347 \end_layout
6349 \begin_layout Itemize
6350 wxMSW: Fix the 
6351 \begin_inset Quotes eld
6352 \end_inset
6354 arrow keys and enter don't work
6355 \begin_inset Quotes erd
6356 \end_inset
6358  problem
6359 \end_layout
6361 \begin_layout Itemize
6362 MSU-1 support
6363 \end_layout
6365 \begin_layout Itemize
6366 Show mode changes due to rewinding.
6367 \end_layout
6369 \begin_layout Itemize
6370 Unsafe rewind support
6371 \end_layout
6373 \begin_layout Itemize
6374 Fix directory transversal.
6375 \end_layout
6377 \begin_layout Subsection
6378 rr1-delta10
6379 \end_layout
6381 \begin_layout Itemize
6382 AVI: Sound mode 5 (48kHz high-quality)
6383 \end_layout
6385 \begin_layout Itemize
6386 Lua: Reset Lua VM
6387 \end_layout
6389 \begin_layout Itemize
6390 Map the SNES bus into address space
6391 \end_layout
6393 \begin_layout Itemize
6394 Fix loading memory watch files with CRLF line endings
6395 \end_layout
6397 \begin_layout Subsection
6398 rr1-delta10epsilon1
6399 \end_layout
6401 \begin_layout Itemize
6402 Map bsnes internal state into memory space
6403 \end_layout
6405 \begin_layout Itemize
6406 Fix the 
6407 \begin_inset Quotes eld
6408 \end_inset
6410 click on panel wedges the emulator
6411 \begin_inset Quotes erd
6412 \end_inset
6414  for real.
6415 \end_layout
6417 \begin_layout Itemize
6418 DnD movies/saves on the main window.
6419 \end_layout
6421 \begin_layout Subsection
6422 rr1-delta11
6423 \end_layout
6425 \begin_layout Itemize
6426 Split core bindings into own module.
6427 \end_layout
6429 \begin_layout Itemize
6430 Remember invalid settings
6431 \end_layout
6433 \begin_layout Itemize
6434 Support for modified Gambatte core for GB/GBC emulation.
6435 \end_layout
6437 \begin_layout Itemize
6438 Reload/swap ROM function
6439 \end_layout
6441 \begin_layout Subsection
6442 rr1-delta11epsilon1
6443 \end_layout
6445 \begin_layout Itemize
6446 Fix step poll function
6447 \end_layout
6449 \begin_layout Subsection
6450 rr1-delta12
6451 \end_layout
6453 \begin_layout Itemize
6454 Non-insane savestate anchoring
6455 \end_layout
6457 \begin_layout Subsection
6458 rr1-delta13
6459 \end_layout
6461 \begin_layout Itemize
6462 More Memory search methods
6463 \end_layout
6465 \begin_layout Itemize
6466 Preserve movie if loading in RO mode.
6467 \end_layout
6469 \begin_layout Itemize
6470 Fix a obscure case in timeline check
6471 \end_layout
6473 \begin_layout Itemize
6474 Revamp the entiere ROM loading code
6475 \end_layout
6477 \begin_layout Itemize
6478 Support DnD on ROMs
6479 \end_layout
6481 \begin_layout Itemize
6482 Revamp menu layout
6483 \end_layout
6485 \begin_layout Itemize
6486 Standalone hotkey config dialog
6487 \end_layout
6489 \begin_layout Itemize
6490 Show bindings in more user-friendly format
6491 \end_layout
6493 \begin_layout Subsection
6494 rr1-delta13epsilon1
6495 \end_layout
6497 \begin_layout Itemize
6498 Pipedec support
6499 \end_layout
6501 \begin_layout Itemize
6502 Fix uninitialized variables in bsnes v085
6503 \end_layout
6505 \begin_layout Subsection
6506 rr1-delta14
6507 \end_layout
6509 \begin_layout Itemize
6510 Merge gambatte core into mainline (from its own branch)
6511 \end_layout
6513 \begin_layout Itemize
6514 Wxwidgets: Show expected dump file formats
6515 \end_layout
6517 \begin_layout Itemize
6518 Memory watch: Data typing
6519 \end_layout
6521 \begin_layout Itemize
6522 lsnes internal MMIO area.
6523 \end_layout
6525 \begin_layout Itemize
6526 Wxwidgets: New memory watch editor
6527 \end_layout
6529 \begin_layout Itemize
6530 Hexadecimal memory watches
6531 \end_layout
6533 \begin_layout Itemize
6534 Wxwidgets: Monospaced panel
6535 \end_layout
6537 \begin_layout Itemize
6538 Wxwidgets: Split memory watches in panel
6539 \end_layout
6541 \begin_layout Itemize
6542 Wxwidgets: Disable VMAs in memory search
6543 \end_layout
6545 \begin_layout Itemize
6546 lsnes-dumpavi: Fix speed bug
6547 \end_layout
6549 \begin_layout Itemize
6550 Movie subtitle support
6551 \end_layout
6553 \begin_layout Itemize
6554 Fix rerecord count reporting
6555 \end_layout
6557 \begin_layout Itemize
6558 Don't trash movie when loading in readonly mode.
6559 \end_layout
6561 \begin_layout Subsection
6562 rr1-delta14epsilon1
6563 \end_layout
6565 \begin_layout Itemize
6566 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
6567 \end_layout
6569 \begin_layout Itemize
6570 Fix build on Mac OS X.
6571 \end_layout
6573 \begin_layout Itemize
6574 Lua: loopwrapper
6575 \end_layout
6577 \begin_layout Itemize
6578 Wxwidgets: Hidable messages window
6579 \end_layout
6581 \begin_layout Itemize
6582 Lua: input.joyset
6583 \end_layout
6585 \begin_layout Itemize
6586 Bsnes: Support inconsistent saves
6587 \end_layout
6589 \begin_layout Itemize
6590 Bsnes: Allow simulating saving every frame
6591 \end_layout
6593 \begin_layout Itemize
6594 Fix desync if savestate is loaded in readonly mode in certain conditions.
6595 \end_layout
6597 \begin_layout Itemize
6598 Wxwidgets: Fix save dialogs on Mac OS X.
6599 \end_layout
6601 \begin_layout Itemize
6602 Wxwidgets: Fix insane status width on Win32.
6603 \end_layout
6605 \begin_layout Itemize
6606 Wxwidgets: Fix autohold processing to be faster.
6607 \end_layout
6609 \begin_layout Itemize
6610 Wxwidgets: Allow loading ROMs and movies from commandline.
6611 \end_layout
6613 \begin_layout Subsection
6614 rr1-delta15
6615 \end_layout
6617 \begin_layout Itemize
6618 Be a bit smarter with --load
6619 \end_layout
6621 \begin_layout Itemize
6622 Rewrote higher-level parts of audio system
6623 \end_layout
6625 \begin_layout Itemize
6626 Tool to build commentary tracks
6627 \end_layout
6629 \begin_layout Itemize
6630 Lua: input.joyget
6631 \end_layout
6633 \begin_layout Itemize
6634 Gambatte: Add support for SVN358
6635 \end_layout
6637 \begin_layout Itemize
6638 Use builtin font when rendering status panel.
6639 \end_layout
6641 \begin_layout Itemize
6642 Option to detach memory watch to its own window.
6643 \end_layout
6645 \begin_layout Itemize
6646 Recent ROMs/Movies menu
6647 \end_layout
6649 \begin_layout Itemize
6650 Libao support
6651 \end_layout
6653 \begin_layout Itemize
6654 Useful lag counter for SNES games that autopoll
6655 \end_layout
6657 \begin_layout Itemize
6658 Fix buffer overflow in gambatte sound output
6659 \end_layout
6661 \begin_layout Subsection
6662 rr1-delta15epsilon1
6663 \end_layout
6665 \begin_layout Itemize
6666 Don't blow up on wxGTK if the window is hidden somehow
6667 \end_layout
6669 \begin_layout Itemize
6670 Support simultaneous drop of ROM and movie.
6671 \end_layout
6673 \begin_layout Itemize
6674 Gambatte: Don't save spurious SRAMs.
6675 \end_layout
6677 \begin_layout Itemize
6678 Make SGB ROMs actually usable.
6679 \end_layout
6681 \begin_layout Itemize
6682 Fix so that saved movies appear in recent movies.
6683 \end_layout
6685 \begin_layout Itemize
6686 Don't open multiple commentary editors at once.
6687 \end_layout
6689 \begin_layout Subsection
6690 rr1-delta15epsilon2
6691 \end_layout
6693 \begin_layout Itemize
6694 Lua: memory.readregion/memory.writeregion
6695 \end_layout
6697 \begin_layout Itemize
6698 Lua: memory.map{,s}{byte,word,dword,qword}
6699 \end_layout
6701 \begin_layout Itemize
6702 Lua: memory.map_structure
6703 \end_layout
6705 \begin_layout Itemize
6706 Lua: Fix bus_address for gambatte
6707 \end_layout
6709 \begin_layout Itemize
6710 Fix features dependent of bsnes debugger
6711 \end_layout
6713 \begin_layout Itemize
6714 Cleanup bsnes debugger logic
6715 \end_layout
6717 \begin_layout Itemize
6718 Fix resets in presence of save every frame
6719 \end_layout
6721 \begin_layout Subsection
6722 rr1-delta15epsilon3
6723 \end_layout
6725 \begin_layout Itemize
6726 Lua: input.lcid_to_pcid
6727 \end_layout
6729 \begin_layout Itemize
6730 Fix off-by-one bug with slot hashes
6731 \end_layout
6733 \begin_layout Itemize
6734 Fix crashes on certain memory watch expressions
6735 \end_layout
6737 \begin_layout Itemize
6738 Lua: memory.read_expr
6739 \end_layout
6741 \begin_layout Itemize
6742 Lua: Fix memory.read_expr on nil argument
6743 \end_layout
6745 \begin_layout Itemize
6746 Fix the code to compile on G++ 4.7
6747 \end_layout
6749 \begin_layout Itemize
6750 Change button_id to be a function pointer field, not a virtual method
6751 \end_layout
6753 \begin_layout Itemize
6754 Add bsnes patches to fix libsnes to compile on GCC 4.7
6755 \end_layout
6757 \begin_layout Itemize
6758 Gambatte: Always use legacy lag counting
6759 \end_layout
6761 \begin_layout Itemize
6762 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
6763 \end_layout
6765 \begin_layout Itemize
6766 Fix analog controllers
6767 \end_layout
6769 \begin_layout Itemize
6770 Fix autohold menus
6771 \end_layout
6773 \begin_layout Itemize
6774 Fix button symbols in input display
6775 \end_layout
6777 \begin_layout Itemize
6778 Compensate for nuts bsnes superscope/justifier handling
6779 \end_layout
6781 \begin_layout Itemize
6782 Lua: Fix bit.extract boolean handling
6783 \end_layout
6785 \begin_layout Subsection
6786 rr2-beta0
6787 \end_layout
6789 \begin_layout Itemize
6790 Split emulation cores more from the rest
6791 \end_layout
6793 \begin_layout Itemize
6794 Support having multiple emulation cores compiled at once
6795 \end_layout
6797 \begin_layout Itemize
6798 Support arbitrary number of ports (well, up to 31 anyway).
6799 \end_layout
6801 \begin_layout Itemize
6802 SNES debugger support
6803 \end_layout
6805 \begin_layout Itemize
6806 Support 16-button controllers
6807 \end_layout
6809 \begin_layout Itemize
6810 Remove old SDL front end
6811 \end_layout
6813 \begin_layout Itemize
6814 Data-driven controller buttons
6815 \end_layout
6817 \begin_layout Itemize
6818 Generate the port code from defines
6819 \end_layout
6821 \begin_layout Subsection
6822 rr2-beta1
6823 \end_layout
6825 \begin_layout Itemize
6826 Update libgambatte to SVN364
6827 \end_layout
6829 \begin_layout Itemize
6830 Get rid of partial linking (building with MXE works)
6831 \end_layout
6833 \begin_layout Itemize
6834 Load XML even without gamepack files
6835 \end_layout
6837 \begin_layout Itemize
6838 Support screen rotate & flip
6839 \end_layout
6841 \begin_layout Itemize
6842 Fix bug when changing controller key to another subkey of the same key
6843 \end_layout
6845 \begin_layout Subsection
6846 rr1-delta16
6847 \end_layout
6849 \begin_layout Itemize
6850 Stop at movie end: Don't off-by-one
6851 \end_layout
6853 \begin_layout Itemize
6854 Fix crash closing lsnes with voice playback active.
6855 \end_layout
6857 \begin_layout Itemize
6858 Import/Export OggOpus for commentary tracks
6859 \end_layout
6861 \begin_layout Itemize
6862 16-button controllers.
6863 \end_layout
6865 \begin_layout Itemize
6866 Don't show nonexistent controllers in input display
6867 \end_layout
6869 \begin_layout Itemize
6870 Set voice record/playback volume from UI
6871 \end_layout
6873 \begin_layout Itemize
6874 Patches for gambatte SVN364.
6875 \end_layout
6877 \begin_layout Itemize
6878 Load markup (if exists) even without gamepack file.
6879 \end_layout
6881 \begin_layout Itemize
6882 Screen rotation & flipping
6883 \end_layout
6885 \begin_layout Itemize
6886 Lua: Some new bit functions
6887 \end_layout
6889 \begin_layout Itemize
6890 Auto-refresh voice streams on change.
6891 \end_layout
6893 \begin_layout Itemize
6894 Auto-refresh subtitles on change & new subtitle editor.
6895 \end_layout
6897 \begin_layout Itemize
6898 Fix music volume adjustment.
6899 \end_layout
6901 \begin_layout Subsection
6902 rr2-beta2
6903 \end_layout
6905 \begin_layout Itemize
6906 Use system threads instead of platform threads
6907 \end_layout
6909 \begin_layout Itemize
6910 Cleanup build by allowing dummy and real drivers to link together.
6911 \end_layout
6913 \begin_layout Itemize
6914 Split duplex support
6915 \end_layout
6917 \end_body
6918 \end_document