Movie editor: Reorganize the popup menu a bit
[lsnes.git] / manual.txt
blobbe4a70edd48608e4f773cb301686d776bf08ba5a
1 1 Introduction
3 lsnes is SNES rerecording emulator based on bsnes core.
5 2 Dependencies
7 1. bsnes libsnes (for bsnes SNES core)
9   (a) v084-v087 (v084 or v085 for delayreset support)
11   (b) accuracy or compatiblity core with debugger enabled.
13   (c) Patched version (using included 7 patches)
15 2. gambatte (for gambatte core)
17   (a) SVN r320
19   (b) Patched with included patches
21 3. Zlib
23 4. boost_iostreams
25 5. boost_filesystem
27 6. boost_thread (if native std::thread is not available)
29 7. libsdl (SDL only)
31 8. sdlmain (SDL only, part of SDL)
33 9. boost_conversion (this is header-only library)
35 10. libswscale (wxwidgets graphics only)
37 11. Portaudio (portaudio sound only)
39 12. libao (libao sound only)
41 13. Lua (if Lua support is needed).
43   • Version 5.1.X or 5.2X.
45 14. G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte 
46   is unknown).
48 3 Building
50 • Copy bsnes sources (the bsnes subdirectory) to subdirectory 
51   'bsnes' (for bsnes core).
53 • Copy gambatte sources to subdirectory 'gambatte' (for gambatte 
54   core).
56 • Patch the bsnes sources with included patches (directory 
57   'bsnes-patches/<version>', bsnes core)
59 • Patch the gambatte sources with included patches (directory 
60   'gambatte-patches/<version>', gambatte core)
62 • Edit options.build (or copy of that file)
64 • Run make (passing 'OPTIONS=<filename>' if using something else 
65   than options.build).
67 4 Command line options
69 4.1 ROM options
71 4.1.1 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
73 Load <file> as ROM.
75 4.2 Session options
77 4.2.1 --pause
79 Start paused
81 4.2.2 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
83 Load <filename> as movie or savestate file. All other session 
84 options are ignored.
86 4.2.3 --port1=<device> (lsnes/SDL, bsnes core only)
88 Set type of port1. Valid values are:
90 • none: No device connected
92 • gamepad: One gamepad (the default)
94 • multitap: Four gamepads (warning: makes most games refuse to 
95   start)
97 • mouse: Mouse.
99 4.2.4 --port2=<type> (lsnes/SDL, bsnes core only)
101 Set type of port2. Valid values are:
103 • none: No device connected (the default)
105 • gamepad: One gamepad
107 • multitap: Four gamepads.
109 • mouse: Mouse
111 • superscope: Super Scope
113 • justifier: One justifier
115 • justifiers: Two justifiers
117 4.2.5 --gamename=<name> (lsnes/SDL)
119 Set the name of game to <name>. Default is blank.
121 4.2.6 --author=<name> (lsnes/SDL)
123 Add author with full name of <name> (no nickname).
125 4.2.7 --author=|<name> (lsnes/SDL)
127 Add author with nickname of <name> (no full name).
129 4.2.8 --author=<fullname>|<nickname> (lsnes/SDL)
131 Add author with full name of <fullname> and nickname of 
132 <nickname>.
134 4.2.9 --rtc-second=<value> (lsnes/SDL)
136 Set RTC second (0 is 1st January 1970 00:00:00Z). Default is 
137 1,000,000,000.
139 4.2.10 --rtc-subsecond=<value> (lsnes/SDL)
141 Set RTC subsecond. Range is 0-. Unit is CPU cycle. Default is 0.
143 4.2.11 --anchor-savestate=<file> (lsnes/SDL)
145 Set the anchor savestate file.
147 4.2.12 --load=<file> (lsnes/wxwidgets)
149 After loading the ROM, load <file> as savestate/movie.
151 4.3 Misc. options:
153 4.3.1 --run=<file> (lsnes/SDL)
155 After running main RC file, run this file. If multiple are 
156 specified, these execute in order specified.
158 4.4 dump options (lsnes-dumpavi only)
160 4.4.1 --dumper=<dumper>
162 Set the dumper to use (required). Use 'list' for listing of known 
163 dumpers.
165 4.4.2 --mode=<mode>
167 Set the mode to use (required for dumpers with multiple modes, 
168 forbidden otherwise). Use 'list' for known modes.
170 4.4.3 --prefix=<prefix>
172 Set dump prefix. Default is “avidump”.
174 4.4.4 --option=<name>=<value>
176 Set option <name> to value <value>.
178 4.4.5 --length=<length>
180 Set number of frames to dump. Mandatory.
182 4.4.6 --lua=<script>
184 Run specified lua script (lsnes-dumpavi does not have 
185 initialization files).
187 4.4.7 --load-library=<library>
189 Load the specified shared object / dynamic library / dynamic link 
190 library.
192 5 Startup file lsnes.rc
194 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as 
195 commands. This file is located in:
197 • Windows: %APPDATA%\lsnes\lsnes.rc (if %APPDATA% exists)
199 • Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME 
200   exists)
202 • Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
204 • All: ./lsnes.rc (fallback default).
206 If leading directories do not exist, attempt to create them is 
207 made.
209 6 Internal commands
211 • Commands beginning with '*' invoke the corresponding command 
212   without alias expansion.
214 • If command starts with '+' (after possible '*'), the command is 
215   executed as-is when button is pressed, and when button is 
216   released, it is executed with '+' replaced by '-'.
218 • Commands without '+' execute only on negative edge (release).
220 6.1 Settings:
222 Settings control various aspects of emulator behaviour.
224 6.1.1 set-setting <setting> <value>
226 Sets setting <setting> to value <value> (may be empty).
228 6.1.2 unset-setting <setting>
230 Try to unset setting <setting> (not all settings can be unset).
232 6.1.3 get-setting <setting>
234 Read value of setting <setting>
236 6.1.4 show-settings
238 Print names and values of all settings.
240 6.2 Keybindings
242 Keybindings bind commands or aliases to keys (or pseudo-keys). 
244 Notes:
246 • Do not bind edge active (+/-) commands to keys with modifiers, 
247   that won't work right!
249 • Names of keys and modifiers are platform-dependent.
251 • Be careful before binding pseudo-keys (such as joystick axes, 
252   buttons or hats) with modifiers. That may or may not work 
253   right.
255 6.2.1 bind-key [<mod>/<modmask>] <key> <command>
257 Bind <command> to key <key> (activating if modifiers in <modmask> 
258 (comma-seperated list) are set as <mod> (comma-seperated list).
260 The names of keys and modifiers are platform-dependent.
262 6.2.2 unbind-key [<mod>/<modmask>] <key>
264 Unbind command from <key> (with specified <mod> and <modmask>).
266 6.2.3 set-axis <axis> [disabled | axis | axis-inverse | 
267   pressure0- | pressure0+ | pressure-0 | pressure-+ | pressure+0 
268   | pressure+-] [minus=<val>] [zero=<val>] [plus=<val>] 
269   [tolerance=<val>]
271 Set axis parameters for axis <axis>.
273 • disabled: Disable axis
275 • axis: Normal axis
277 • axis-inverse: Inverse axis
279 • pressure0-: Pressure sensitive. Released at 0, pressed at -.
281 • pressure0+: Pressure sensitive. Released at 0, pressed at +.
283 • pressure-0: Pressure sensitive. Released at -, pressed at 0.
285 • pressure-+: Pressure sensitive. Released at -, pressed at +.
287 • pressure+0: Pressure sensitive. Released at +, pressed at 0.
289 • pressure+-: Pressure sensitive. Released at +, pressed at -.
291 • minus=<val>: Calibration at extreme minus position 
292   (-32768-32767)
294 • zero=<val>: Calibration at neutral position (-32768-32767)
296 • plus=<val>: Calibration at extreme plus position (-32768-32767)
298 • tolerance=<value>: Center band tolerance (0<x<1). The smaller 
299   the value, the more sensitive the control is.
301 6.2.4 show-bindings
303 Print all key bindings in effect.
305 6.3 Aliases
307 Aliases bind command to sequence of commands. After alias has 
308 been defined, it replaces the command it shadows.
310 Notes:
312 • You can't alias command to itself.
314 • Aliases starting with +/- are edge active just like ordinary 
315   commands starting with +/-.
317 • One command can be aliased to multiple commands.
319 6.3.1 alias-command <command> <expansion>
321 Append <expansion> to alias <command>. If alias does not already 
322 exist, it is created.
324 6.3.2 unalias-command <command>
326 Clear alias expansion for <command>.
328 6.3.3 show-aliases
330 Print all aliases and their expansions in effect.
332 6.4 run-script <script>
334 Run <script> as if commands were entered on the command line.
336 6.5 Video dumping
338 Following commands control video dumping:
340 6.5.1 start-dump <dumper> [<mode>] <prefix/filename>
342 Start dumping using dumper <dumper>. If mode is present or not 
343 and if prefix or filename is present depends on the dumper and 
344 dumper mode.
346 The following dumpers are available:
348 • INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
350   – Mode: uncompressed/pcm: Uncompressed video, PCM audio. Takes 
351     prefix.
353   – Mode: cscd/pcm: CSCD video, PCM audio. Takes prefix.
355 • INTERNAL-JMD: Internal .jmd dumper.
357   – Does not take mode.
359   – Takes a filename.
361 • INTERNAL-RAW: Internal RAW dumper.
363   – Does not take mode.
365   – Takes a prefix.
367   – Sound is big-endian signed 16-bit, usually at 32040.5Hz.
369   – Video is always upscaled to double resolution (512x448 / 512 
370     x 478).
372   – Video framerate is usually 322445/6448 fps for PAL and 
373     10738636/178683 fps for NTSC.
375 • INTERNAL-SDMP: Internal SDMP dumper.
377   – Mode 'ms': Multi-segment. Takes prefix.
379   – Mode 'ss': Single-segment. Takes filename.
381 6.5.2 end-dump <dumper>
383 End dumping using <dumper>
385 6.5.3 show-dumpers [<dumper>]
387 Show the list of dumpers or list of modes for <dumper>
389 6.6 Memory manipulation
391 <address> may be decimal or hexadecimal (prefixed with '0x'). 
392 <value> can be hexadecimal (prefixed with '0x'), unsigned or 
393 signed (prefixed with '-') decimal.
395 The available element <sizes> are:
397 • byte: 1 byte
399 • word: 2 bytes
401 • dword: 4 bytes
403 • qword: 8 bytes
405 When reading RAM and ROM, multi-byte reads/writes are big-endian. 
406 When dealing with DSP memory, multi-byte reads/writes are 
407 native-endian (do not use operand sizes exceeding DSP bitness, 
408 except dword is OK for 24-bit memory).
410 6.6.1 read-<size> <address>
412 Read the value of byte in <address>.
414 6.6.2 read-s<size> <address>
416 Read the value of signed byte in <address>.
418 6.6.3 write-<size> <address> <value>
420 Write <value> to byte in address <address>.
422 6.6.4 search-memory reset
424 Reset the memory search
426 6.6.5 search-memory count
428 Print number of candidates remaining
430 6.6.6 search-memory print
432 Print all candidates remaining
434 6.6.7 search-memory <usflag><sizeflag><op>
436 Searches memory for addresses satisfying criteria.
438 <usflag> can be:
440 • u: unsigned
442 • s: signed
444 <sizeflag> can be:
446 • b: byte
448 • w: word
450 • d: dword
452 • q: qword
454 <op> can be:
456 • lt: < previous value.
458 • le: <= previous value.
460 • eq: = previous value.
462 • ne: != previous value.
464 • ge: >= previous value.
466 • gt: > previous value.
468 6.6.8 search-memory <sizeflag> <value>
470 Searches for addresses that currently have value <value>. 
471 <sizeflag> is as in previous command.
473 6.7 Main commands
475 These commands are not available in lsnesrc, but are available 
476 after ROM has been loaded.
478 6.7.1 quit-emulator [/y]
480 Quits the emulator (asking for confirmation). If /y is given, no 
481 confirmation is asked.
483 6.7.2 pause-emulator
485 Toggle paused/unpaused
487 6.7.3 +advance-frame 
489 Advance frame. If the button is still held after configurable 
490 timeout expires, game unpauses for the duration frame advance is 
491 held.
493 6.7.4 +advance-poll 
495 Advance subframe. If the button is still held after configurable 
496 timeout expires, game unpauses for the duration frame advance is 
497 held.
499 6.7.5 advance-skiplag 
501 Skip to first poll in frame after current.
503 6.7.6 reset 
505 Reset the SNES after this frame.
507 6.7.7 load <filename> 
509 Load savestate <filename> in current mode.
511 6.7.8 load-state <filename> 
513 Load savestate <filename> in readwrite mode.
515 6.7.9 load-readonly <filename> 
517 Load savestate <filename> in readonly mode.
519 6.7.10 load-preserve <filename> 
521 Load savestate <filename> in readonly mode, preserving current 
522 events.
524 6.7.11 load-movie <filename> 
526 Load savestate <filename>, ignoring save part in readonly mode.
528 6.7.12 save-state <filename> 
530 Save system state to <filename> as soon as possible.
532 6.7.13 save-movie <filename> 
534 Save movie to <filename>.
536 6.7.14 set-rwmode 
538 Set read-write mode.
540 6.7.15 set-romode 
542 Set read-only mode
544 6.7.16 toggle-rwmode 
546 Toggle between read-only and read-write modes.
548 6.7.17 set-gamename <name> 
550 Set name of the game to <name>
552 6.7.18 get-gamename 
554 Print the name of the game.
556 6.7.19 add-author <author> 
558 Adds new author <author>. If <author> does not contain '|' it is 
559 full name. If it contains '|', '|' splits the full name and 
560 nickname.
562 6.7.20 edit-author <num> <author> 
564 Edit the author in slot <num> (0-based) to be <author> (see 
565 add-author for format)
567 6.7.21 remove-author <num> 
569 Remove author in slot <num>
571 6.7.22 print-authors 
573 Print authors.
575 6.7.23 test-1, test-2, test-3
577 Internal test commands. Don't use.
579 6.7.24 take-screenshot <filename> 
581 Save screenshot to <filename>.
583 6.7.25 +controller<num><button>
585 Press button <button> on controller <num> (1-8). The following 
586 button names are known:
588 • left
590 • right
592 • up
594 • down
596 • A
598 • B
600 • X
602 • Y
604 • L
606 • R
608 • select
610 • start
612 • trigger
614 • cursor
616 • pause
618 • turbo
620 6.7.26 controllerh<num><button>
622 Hold/unhold button <button> on controller <num> (1-8). See 
623 +controller for button names.
625 6.7.27 controllerf<num><button>
627 Hold/unhold button <button> on controller <num> (1-8) for the 
628 next frame. See +controller for button names.
630 Cauntion: Does not work properly if outside frame advance.
632 6.7.28 autofire (<pattern>|-)...
634 Set autofire pattern. Each parameter is comma-separated list of 
635 button names (in form of 1start, 1A, 2B, etc..) to hold on that 
636 frame. After reaching the end of pattern, the pattern restarts 
637 from the beginning.
639 6.7.29 repaint
641 Force a repaint.
643 6.8 Save jukebox 
645 6.8.1 cycle-jukebox-backward
647 Cycle save jukebox backwards.
649 6.8.2 cycle-jukebox-forward
651 Cycle save jukebox forwards
653 6.8.3 load-jukebox
655 Do load from jukebox (current mode).
657 6.8.4 save-jukebox
659 Do state save to jukebox.
661 6.9 Lua 
663 Only available if lua support is compiled in.
665 6.9.1 evaluate-lua <luacode>
667 Run Lua code <luacode> using built-in Lua interpretter.
669 6.9.2 run-lua <script>
671 Run specified lua file using built-in Lua interpretter.
673 6.9.3 reset-lua
675 Clear the Lua VM state and restore to factory defaults.
677 6.10 Memory watch
679 6.10.1 add-watch <name> <expression>
681 Adds new watch (or modifies old one).
683 6.10.2 remove-watch <name>
685 Remove a watch.
687 6.11 Sound 
689 6.11.1 enable-sound <on/off> 
691 Enable/Disable sound.
693 6.11.2 set-sound-device <device> 
695 Set sound device to <device>
697 6.11.3 show-sound-status 
699 Show status of sound system.
701 6.11.4 show-sound-devices
703 Show all available devices.
705 6.11.5 set-volume <multiplier>
707 Set the volume multiplier to <multiplier>. 1 is normal volume, 
708 and higher numbers are louder.
710 6.11.6 set-volume <multiplier>%
712 Set the volume multiplier to <multiplier> percent. 100 is normal 
713 volume, and higher numbers are louder.
715 6.11.7 set-volume <multiplier>dB
717 Set the volume multiplier to <multiplier> dB. 0 is normal volume, 
718 and higher numbers are louder. The value may be negative.
720 6.12 Misc.
722 6.12.1 reload-rom [<file>]
724 Reloads the main ROM image from <file>.
726 6.12.2 edit-subtitle <firstframe> <length> [<text>]
728 Edit or delete a subtitle.
730 6.12.3 list-subtitle
732 List subtitles.
734 6.13 Commentary track
736 6.13.1 list-streams
738 List streams
740 6.13.2 play-stream <id>
742 Play stream <id>.
744 6.13.3 delete-stream <id>
746 Delete stream <id>
748 6.13.4 change-timebase <id> <newbase>
750 Change time base of <id> to <newbase>. The time base can be given 
751 as samples (integer) or second (postfix with s).
753 6.13.5 import-stream-opus <timebase> <file>
755 Import opus stream from <file>, placing it at <timebase>. This 
756 operation is lossless.
758 6.13.6 import-stream-pcm <timebase> <file>
760 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at 
761 <timebase>.
763 6.13.7 export-stream-opus <id> <file>
765 Export stream <id> as opus stream to <file>. This operation is 
766 lossless.
768 6.13.8 export-stream-pcm <id> <file>
770 Export stream <id> as PCM (.sox) stream to <file>. 
772 6.13.9 export-superstream <file>
774 Export the entiere superstream as PCM (.sox) stream to <file>.
776 6.13.10 load-collection <file>
778 Load collection (if there is existing collection, unload it) from 
779 <file>
781 6.13.11 unload-collection
783 Unload collection.
785 6.13.12 +tangent
787 Tangent for recording voice for commentary track. While pressed, 
788 record a stream.
790 6.14 SDL Platform commands 
792 The following are valid on SDL platform.
794 6.14.1 identify-key
796 Asks to press a key and then identifies that (pseudo-)key.
798 6.14.2 toggle-console 
800 Toggle between windowed/fullscreen console.
802 6.14.3 scroll-fullup 
804 Scroll messages window as far back as it goes.
806 6.14.4 scroll-fulldown 
808 Scroll messages window as far forward as it goes.
810 6.14.5 scroll-up 
812 Scroll messages window back one screenful.
814 6.14.6 scroll-down 
816 Scroll messages window forward one screenful.
818 6.14.7 prompt-command <command>
820 Enter command prompt, with prompt prepopulated with specified 
821 command.
823 7 Settings
825 7.1 Core settings
827 7.1.1 firmwarepath
829 Set where bsnes looks for firmware files. Default is “.”.
831 7.1.2 target
833 Set the target . Numeric, range is 0.001 to “infinite”. Default 
834 is native framerate.
836 7.1.3 savecompression
838 Set save compression level (integer 0-9). Default is 7 (0 is no 
839 compression).
841 7.1.4 advance-timeout
843 Set the frame advance timeout in milliseconds. Numeric integer, 
844 range is 0-999999999. Default is 500.
846 7.1.5 allow-inconsistent-saves (bsnes only)
848 If true, save without synchronization. Makes games seriously 
849 unstable.
851 7.1.6 save-every-frame (bsnes only)
853 If true, simulate saving on each frame. Trades off emulation 
854 accuracy for sync stability. Also needed if the movie assumes 
855 saving on each frame for rewind.
857 7.2 AVI dumper settings
859 7.2.1 avi-large
861 AVI dumper: Always dump at 512x448 or 512x478 regardless of what 
862 the console outputs.
864 7.2.2 avi-left-border
866 AVI dumper: Set the default left border thickness (unless lua 
867 overrides) for dumps. Range 0-8191. Default is 0.
869 7.2.3 avi-right-border
871 AVI dumper: Set the default right border thickness (unless lua 
872 overrides) for dumps. Range 0-8191. Default is 0.
874 7.2.4 avi-top-border
876 AVI dumper: Set the default top border thickness (unless lua 
877 overrides) for dumps. Range 0-8191. Default is 0.
879 7.2.5 avi-bottom-border
881 AVI dumper: Set the default bottom border thickness (unless lua 
882 overrides) for dumps. Range 0-8191. Default is 0.
884 7.2.6 avi-maxframes
886 AVI dumper: Maximum number of frames per dump segment (0 => 
887 unlimited). Range 0-999999999. Default is 0.
889 7.2.7 avi-compresison
891 AVI dumper: Compression level (0-18).
893 • Compression levels 10 and above are not compatible with stock 
894   CSCD codec.
896 • Recomended level is 7.
898 7.2.8 avi-soundrate
900 AVI dumper: Set method of determining the sound rate.
902 • 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 
903   64, 88.2, 96, 128, 176.4 and 192 kHz.
905 • 1: Round down to nearest integer.
907 • 2: Round up to nearest ingeter.
909 7.3 JMD options
911 7.3.1 jmd-copression
913 JMD dumper: Compression level (0-9).
915 7.4 SDL platform settings
917 7.4.1 autorepeat-first-delay
919 Sets the delay for first character in typematic autorepeat.
921 7.4.2 autorepeat-subsequent-delay
923 Sets the delay for subsequent characters in typematic autorepeat.
925 8 Lua functions
927 8.1 Core (in main table)
929 8.1.1 print
931 Print line to message console.
933 8.1.2 exec(string command)
935 Run command as it was entered on the command line
937 8.1.3 utime()
939 Returns two values. First is time since some epoch in seconds, 
940 the second is microseconds mod 10^6 since that epoch.
942 8.1.4 emulator_ready()
944 Returns true if emulator has finished booting, false if not 
945 (on_startup() will be issued later).
947 8.1.5 set_idle_timeout(number timeout)
949 Set number of microseconds to block idle for. After this timeout 
950 has expired, on_idle() will be called once.
952 8.1.6 set_timer_timeout(number timeout)
954 Set number of microseconds to block timer for. After this timeout 
955 has expired, on_timer() will be called once.
957 8.1.7 bus_address(number snesaddr)
959 Returns virtual address corresponding to specified address on 
960 SNES bus.
962 8.1.8 loopwrapper(function fun, ...)
964 Calls function fun with function and specified arguments. The 
965 function passed suspends execution until the function returned is 
966 called. Handy for linear flow control among multiple invocations 
967 of a hook. Example code:
969 on_paint = loopwrapper(function(wait)
971   while true do
973     gui.text(0, 0, “Test!”);
975     wait();
977   end
979 end);
981 8.2 Table bit:
983 Bitwise logical functions and related.
985 8.2.1 bit.none(number...) / bit.bnot(number...)
987 48-bit bitwise NOT / NONE function (set bits that are set in none 
988 of the arguments).
990 8.2.2 bit.any(number...) / bit.bor(number...)
992 48-bit bitwise OR / ANY function (set bits that are set in any of 
993 the arguments).
995 8.2.3 bit.all(number...) / bit.band(number...)
997 48-bit bitwise AND / ALL function (set bits that are set in all 
998 of the arguments).
1000 8.2.4 bit.parity(number...) / bit.bxor(number...)
1002 48-bit bitwise XOR / PARITY function (set bits that are set in 
1003 odd number of the arguments).
1005 8.2.5 bit.lrotate(number base[, number amount[, number bits]])
1007 Rotate bits-bit (max 48, default 48) number left by amount 
1008 (default 1) places.
1010 8.2.6 bit.rrotate(number base[, number amount[, number bits]])
1012 Rotate bits-bit (max 48, default 48) number right by amount 
1013 (default 1) places.
1015 8.2.7 bit.lshift(number base[, number amount[, number bits]])
1017 Shift bits-bit (max 48, default 48) number left by amount 
1018 (default 1) places. The new bits are filled with zeroes.
1020 8.2.8 bit.lrshift(number base[, number amount[, number bits]])
1022 Shift bits-bit (max 48, default 48) number logically right by 
1023 amount (default 1) places. The new bits are filled with zeroes.
1025 8.2.9 bit.arshift(number base[, number amount[, number bits]])
1027 Shift bits-bit (max 48, default 48) number arithmetically right 
1028 by amount (default 1) places. The new bits are shifted in with 
1029 copy of the high bit.
1031 8.2.10 bit.extract(number base[, number bit0[, number bit1,...]])
1033 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 
1034 and so on.
1036 Notes: 
1038 • Bit numbers up to 51 should work reliably (then things start 
1039   falling apart due to double precision issues).
1041 • There are two special bit positions, true and false, standing 
1042   for always set bit and always clear bit.
1044 8.2.11 bit.value([number bit1[, number bit2,...]])
1046 Returns bitwise OR of 1 left shifted by bit1 places, 1 left 
1047 shifted by bit2 places and so on. As special value, nil argument 
1048 is no-op.
1050 8.2.12 bit.test_any(number a, number b)
1052 Is there a common set bit in a and b?
1054 8.2.13 bit.test_all(number a, number b)
1056 Are all set bits in b also set in a?
1058 8.2.14 bit.popcount(number a)
1060 Population count of a.
1062 8.2.15 bit.clshift(number a, number b, [number amount,[number 
1063   bits]])
1065 Does chained left shift on a, b by amount positions, assuming 
1066 numbers to be of specified number of bits.
1068 8.2.16 bit.crshift(number a, number b, [number amount,[number 
1069   bits]])
1071 Does chained right shift on a, b by amount positions, assuming 
1072 numbers to be of specified number of bits.
1074 8.2.17 bit.flagdecode(number a, number bits, [string on, [string 
1075   off]])
1077 Return string of length bits where ith character is ith character 
1078 of on if bit i is on, otherwise ith character of off. Out of 
1079 range reads give last character, or '*'/'-' if empty.
1081 8.2.18 bit.rflagdecode(number a, number bits, [string on, [string 
1082   off]])
1084 Like bit.flagdecode, but outputs the string in the opposite order 
1085 (most significant bit first).
1087 8.3 Table gui:
1089 Most of these functions can only be called in on_paint and 
1090 on_video callbacks. Exceptions are noted.
1092 Colors are 32-bit. Bits 0-7 are the blue component, bits 8-15 are 
1093 the green component, bits 16-23 are the red component, bits 24-31 
1094 are alpha component (0 is fully opaque, 255 is almost 
1095 transparent). -1 is the fully transparent color. Alpha values 
1096 greater than 127 do work.
1098 Origin of coordinates is at top left corner of game display area. 
1099 Left and top gaps correspond to negative coordinates.
1101 8.3.1 gui.resolution()
1103 Returns 2-tuple (hresolution, vresolution).
1105 8.3.2 gui.<class>_gap(number gap)
1107 Set the <class> (left, right, top, bottom) gap to specified value 
1108 (max gap is 8191).
1110 8.3.3 gui.text(number x, number y, string text[, number fgc[, 
1111   number bgc]])
1113 Draw specified text on the GUI (each character cell is 8 or 16 
1114 wide and 16 high). Parameters:
1116 • x: X-coordinate to start the drawing from (and x-coordinate at 
1117   begining of the lines).
1119 • y: Y-coordinate to start the drawing from.
1121 • text: The text to draw.
1123 • fgc: Text color (default is 0xFFFFFF (white))
1125 • bgc: Background color (default is -1 (transparent))
1127 8.3.4 gui.textH(number x, number y, string text[, number fgc[, 
1128   number bgc]])
1130 Like gui.text, but draw using double-width.
1132 8.3.5 gui.textV(number x, number y, string text[, number fgc[, 
1133   number bgc]])
1135 Like gui.text, but draw using double-height.
1137 8.3.6 gui.textHV(number x, number y, string text[, number fgc[, 
1138   number bgc]])
1140 Like gui.text, but draw using double-width/double-height.
1142 8.3.7 gui.rectangle(number x, number y, number width, number 
1143   height[, number thickness[, number outline[, number fill]]])
1145 Draw rectangle on the GUI. Parameters:
1147 • x: X-coordinate of left edge.
1149 • y: Y-coordinate of upper edge.
1151 • width: Width of rectangle.
1153 • height: Height of rectangle.
1155 • thickness: Thickness of outline (default is 1).
1157 • outline: Color of outline (default is 0xFFFFFF (white))
1159 • fill: Color of fill (default is -1 (transparent))
1161 8.3.8 gui.box(number x, number y, number width, number height[, 
1162   number thickness[, number outline1[,number outline2[, number 
1163   fill]]]])
1165 Draw rectangle with 3D effect on the GUI. Parameters:
1167 • x: X-coordinate of left edge.
1169 • y: Y-coordinate of upper edge.
1171 • width: Width of rectangle.
1173 • height: Height of rectangle.
1175 • thickness: Thickness of outline (default is 1).
1177 • outline1: First color of outline (default is 0xFFFFFF (white))
1179 • outline2: First color of outline (default is 0x808080 (dark 
1180   gray))
1182 • fill: Color of fill (default is 0xC0C0C0 (light grayy))
1184 8.3.9 gui.pixel(number x, number y[, number color])
1186 Draw one pixel on the GUI. Parameters:
1188 • x: X-coordinate of the pixel
1190 • y: Y-coordinate of the pixel
1192 • color: Color of the pixel (default is 0xFFFFFF (white))
1194 8.3.10 gui.crosshair(number x, number y[, number length[, number 
1195   color]])
1197 Draw a crosshair. Parameters:
1199 • x: X-coordinate of the crosshair
1201 • y: Y-coordinate of the crosshair
1203 • length: Length of the crosshair lines (default 10).
1205 • color: Color of the crosshair (default is 0xFFFFFF (white))
1207 8.3.11 gui.line(number x1, number y1, number x2, number y2[, 
1208   number color])
1210 Draw a thin line. Parameters:
1212 • x1: X-coordinate of one end.
1214 • y1: Y-coordinate of one end.
1216 • x2: X-coordinate of the other end.
1218 • y2: Y-coordinate of the other end.
1220 • color: Color of the line (default is 0xFFFFFF (white)).
1222 8.3.12 gui.circle(number x, number y, number r[, number thick[, 
1223   number border[, number fil]]])
1225 Draw a circle. Parameters.
1227 • x: X-coordinate of the center
1229 • y: Y-coordinate of the center
1231 • r: The radius of the circle
1233 • thick: Border thickness
1235 • border: Border color (default is 0xFFFFFF (white))
1237 • fill: Fill color (default is -1 (transparent)).
1239 8.3.13 gui.bitmap_draw(number x, number y, bitmap bitmap, palette 
1240   palette)
1242 Draw a bitmap on screen with specified palette. Parameters:
1244 • x: X-coordinate of left edge.
1246 • y: Y-coordinate of top edge.
1248 • bitmap: The bitmap to draw
1250 • palette: The palette to draw the bitmap using.
1252 8.3.14 gui.bitmap_draw(number x, number y, dbitmap bitmap)
1254 Draw a bitmap on screen. Parameters:
1256 • x: X-coordinate of left edge.
1258 • y: Y-coordinate of top edge.
1260 • bitmap: The bitmap to draw
1262 8.3.15 gui.palette_new()
1264 Returns a new palette (initially all transparent). Can be used 
1265 anywhere.
1267 8.3.16 gui.bitmap_new(number w, number h, boolean direct[, bool 
1268   icolor])
1270 Returns a new bitmap/dbitmap. Can be used anywhere. Parameters:
1272 • w: The width of new bitmap
1274 • h: The height of new bitmap
1276 • direct: If true, the returned bitmap is dbitmap, otherwise 
1277   bitmap.
1279 • icolor: Initital fill color (defaults to 0 on BITMAP, -1 on 
1280   DBITMAP)
1282 8.3.17 gui.bitmap_load(string file)
1284 Returns loaded bitmap/dbitmap (if bitmap, the second return value 
1285 is palette for bitmap). Can be used anywhere. Parameters:
1287 • file: The name of file to load.
1289 8.3.18 gui.palette_set(palette palette, number index, number 
1290   color)
1292 Sets color in palette. Can be used anywhere. Parameters:
1294 • palette: The palette to manipulate
1296 • index: Index of color (0-65535).
1298 • color: The color value.
1300 8.3.19 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, 
1301   number color)
1303 Sets specified pixel in bitmap. Can be used anywhere. Parameters:
1305 • bitmap: The bitmap to manipulate
1307 • x: The x-coordinate of the pixel.
1309 • y: The y-coordinate of the pixel.
1311 • color: If bitmap is a bitmap, color index (0-65535). Otherwise 
1312   color value.
1314 8.3.20 gui.bitmap_size(bitmap/dbitmap bitmap)
1316 Get size of bitmap. Can be used anywhere. Parameters:
1318 • bitmap: The bitmap to query.
1320 The first return is the width, the second is the height.
1322 8.3.21 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, 
1323   bitmap/dbitmap src, number sx, number sy, number w, number h[, 
1324   number ck])
1326 Blit a part of bitmap to another. Can be used anywhere. 
1327 Parameters:
1329 • dest: Destination to blit to.
1331 • dx: left edge of target
1333 • dy: Top edge of target
1335 • src: The source to blit from. Must be of the same type as 
1336   destination.
1338 • sx: left edge of source
1340 • sy: Top edge of source
1342 • w: Width of region
1344 • h: Height of region.
1346 • ck: Color key. Pixels of this color are not blitted.
1348   – If bitmaps are bitmaps, this is color index of colorkey. 
1349     Values outside range 0-65535 cause no key to be used as 
1350     colorkey.
1352   – If bitmaps are dbitmaps, this color value of colorkey.
1354   – May be absent or nil for no colorkey blit.
1356 8.3.22 gui.repaint()
1358 Request on_repaint() to happen as soon as possible. Can be used 
1359 anywhere.
1361 8.3.23 gui.subframe_update(boolean on)
1363 Request subframe updates (calling on_paint() on subframes) to 
1364 happen (on=true) or not happen (on=false). Can be used anywhere.
1366 8.3.24 gui.screenshot(string filename)
1368 Write PNG screenshot of the current frame (no drawings) to 
1369 specified file. Can be used anywhere.
1371 8.3.25 gui.color(number r, number g, number b[, number a])
1373 Returns color (in notation Lua scripts use) corresponding to 
1374 color (r,g,b), each component in scale 0-255. If a is specified, 
1375 that is alpha (0 is fully transparent, 256(sic) is fully opaque). 
1376 The default alpha is 256.
1378 8.3.26 gui.status(string name, string value)
1380 Set status field “L[<name>]” to <value> in status area. Can be 
1381 used anywhere.
1383 8.3.27 gui.rainbow(number step, number steps[, number color])
1385 Perform hue rotation of color <color> (default bright red), by 
1386 <step> steps. The number of steps per full rotation is given by 
1387 absolute value of <steps>.
1389 If <steps> is negative, the rotation will be counterclockwise.
1391 8.3.28 gui.screenshot(string filename)
1393 Saves a screenshot into specified file.
1395 8.3.29 gui.loadfont(string filename)
1397 Loads font from specified file (CUSTOMFONT object).
1399 8.3.30 CUSTOMFONT(number x, number y, string text[, number fgc[, 
1400   number bgc]])
1402 Draw string with custom font to screen. The parameters are the 
1403 same as in gui.text.
1405 8.4 table input
1407 Input handling. Only available in on_input callback.
1409 8.4.1 input.get(number controller, number index)
1411 Read the specified index (0-11) from specified controller (0-7). 
1412 Notes:
1414 • Uses physical controller numbering. Gamepad in port 2 is 
1415   controller 4, not 1!
1417 8.4.2 input.set(number controller, number index, number value)
1419 Write the specified index (0-11) from specified controller (0-7), 
1420 storing value. Notes:
1422 • Uses physical controller numbering. Gamepad in port 2 is 
1423   controller 4, not 1!
1425 8.4.3 input.geta(number controller)
1427 Get input state for entiere controller. Returns 13 return values.
1429 • 1st return value: Bitmask: bit i is set if i:th index is 
1430   nonzero
1432 • 2nd-13th return value: value of i:th index.
1434 8.4.4 input.seta(number controller, number bitmask, number 
1435   args...)
1437 Set state for entiere controller. args is up to 12 values for 
1438 indices (overriding values in bitmask if specified).
1440 8.4.5 input.controllertype(number controller)
1442 Get the type of controller as string. Valid values are:
1444 • gamepad
1446 • mouse
1448 • justifier
1450 • superscope
1452 8.4.6 input.reset([number cycles])
1454 Execute reset. If cycles is greater than zero, do delayed reset. 
1455 0 (or no value) causes immediate reset.
1457 • Only available with subframe flag false.
1459 8.4.7 input.raw()
1461 Returns table of tables of all available keys and axes. The first 
1462 table is indexed by key name (platform-dependent!), and the inner 
1463 table has the following fields:
1465 • last_rawval: Last reported raw value for control.
1467 • ktype: Type of key (disabled, key, mouse, axis, axis-inverse, 
1468   hat, pressure-m0, pressure-mp, pressure-0m, pressure-0p, 
1469   pressure-pm, pressure-p0).
1471 • cal_left: Minimum calibration value. Only meaningful with axis 
1472   and pressure types.
1474 • cal_center: Center calibration value. Only meaningful with axis 
1475   and pressure types.
1477 • cal_right: Maximum calibration value. Only meaningful with axis 
1478   and pressure types.
1480 • cal_tolerance: Dead zone tolerance. Only meaningful with axis 
1481   and pressure types.
1483 8.4.8 input.keyhook(string key, boolean state)
1485 Requests that keyhook events to be sent for key (state=true) or 
1486 not sent (state=false).
1488 8.4.9 input.joyget(number controller)
1490 Returns table for current controls for specified controller. The 
1491 names of fields vary by controller type.
1493 • The buttons have the same name as those are referred to in 
1494   other contexts in the emulator
1496 • The analog axes are “xaxis” and “yaxis”.
1498 8.4.10 input.joyset(number controller, table controls)
1500 Set the the state of specified controller to values specified in 
1501 specified table.
1503 8.4.11 input.lcid_to_pcid(number controller)
1505 Return the physical index, physical port and controller number in 
1506 port for specified (1-based) logical controller.
1508 8.5 Table subtitle
1510 Subtitle handling
1512 8.5.1 subtitle.byindex(number i)
1514 Read the frame and length of ith subtitle. Returns nothing if not 
1515 present.
1517 8.5.2 subtitle.set(number f, number l, string txt)
1519 Set the text of subtitle.
1521 8.5.3 subtitle.get(number f, number l)
1523 Get the text of subtitle.
1525 8.5.4 subtitle.delete(number f, number l)
1527 Delete specified subtitle.
1529 8.6 Table hostmemory
1531 Host memory handling (extra memory saved to savestates). Host 
1532 memory starts empty.
1534 8.6.1 hostmemory.read(number address)
1536 Reads hostmemory slot address. Slot numbers out of range return 
1537 false instead of numeric.
1539 8.6.2 hostmemory.write(number address, number value)
1541 Writes hostmemory slot with 0-255. Slot numbers out of range 
1542 cause extension of host memory slot space.
1544 8.6.3 hostmemory.readbyte(number address)
1546 Read unsigned byte (1 element) from given address. Slots out of 
1547 range return false.
1549 8.6.4 hostmemory.writebyte(number address, number value)
1551 Write unsigned byte (1 element) to given slot. Slot numbers out 
1552 of range cause extension.
1554 8.6.5 hostmemory.readsbyte(number address)
1556 Read signed byte (1 element) from given address. Slots out of 
1557 range return false.
1559 8.6.6 hostmemory.writesbyte(number address, number value)
1561 Write signed byte (1 element) to given slot. Slot numbers out of 
1562 range cause extension.
1564 8.6.7 hostmemory.readword(number address)
1566 Read unsigned word (2 elements) from given address. Slots out of 
1567 range return false.
1569 8.6.8 hostmemory.writeword(number address, number value)
1571 Write unsigned word (2 elements) to given slot. Slot numbers out 
1572 of range cause extension.
1574 8.6.9 hostmemory.readsword(number address)
1576 Read signed word (2 elements) from given address. Slots out of 
1577 range return false.
1579 8.6.10 hostmemory.writesword(number address, number value)
1581 Write signed word (2 elements) to given slot. Slot numbers out of 
1582 range cause extension.
1584 8.6.11 hostmemory.readdword(number address)
1586 Read unsigned doubleword (4 elements) from given address. Slots 
1587 out of range return false.
1589 8.6.12 hostmemory.writedword(number address, number value)
1591 Write unsigned doubleword (4 elements) to given slot. Slot 
1592 numbers out of range cause extension.
1594 8.6.13 hostmemory.readsdword(number address)
1596 Read signed doubleword (4 elements) from given address. Slots out 
1597 of range return false.
1599 8.6.14 hostmemory.writesdword(number address, number value)
1601 Write signed doubleword (4 elements) to given slot. Slot numbers 
1602 out of range cause extension.
1604 8.6.15 hostmemory.readqword(number address)
1606 Read unsigned quadword (8 elements) from given address. Slots out 
1607 of range return false.
1609 8.6.16 hostmemory.writeqword(number address, number value)
1611 Write unsigned quadword (4 elements) to given slot. Slot numbers 
1612 out of range cause extension.
1614 8.6.17 hostmemory.readsqword(number address)
1616 Read signed quadword (8 elements) from given address. Slots out 
1617 of range return false.
1619 8.6.18 hostmemory.writesqword(number address, number value)
1621 Write signed quadword (8 elements) to given slot. Slot numbers 
1622 out of range cause extension.
1624 8.7 Table movie
1626 Movie handling
1628 8.7.1 movie.currentframe()
1630 Return number of current frame.
1632 8.7.2 movie.framecount()
1634 Return number of frames in movie.
1636 8.7.3 movie.readonly()
1638 Return true if in readonly mode, false if in readwrite.
1640 8.7.4 movie.rerecords()
1642 Returns the current value of rerecord count.
1644 8.7.5 movie.set_readwrite()
1646 Set readwrite mode (does not cause on_readwrite callback).
1648 8.7.6 movie.frame_subframes(number frame)
1650 Count number of subframes in specified frame (frame numbers are 
1651 1-based) and return that.
1653 8.7.7 movie.read_subframe(number frame, number subframe)
1655 Read specifed subframe in specified frame and return data as 
1656 array (100 elements, numbered 0-99 currently).
1658 8.7.8 movie.read_rtc()
1660 Returns the current value of the RTC as a pair (second, 
1661 subsecond).
1663 8.7.9 movie.unsafe_rewind([UNSAFEREWIND state])
1665 Start setting point for unsafe rewind or jump to point of unsafe 
1666 rewind.
1668 • If called without argument, causes emulator to start process of 
1669   setting unsafe rewind point. When this has finished, callback 
1670   on_set_rewind occurs, passing the rewind state to lua script.
1672 • If called with argument, causes emulator rewind to passed 
1673   rewind point as soon as possible. Readwrite mode is implicitly 
1674   activated.
1676 The following warnings apply to unsafe rewinding:
1678 • There are no safety checks against misuse (that's what “unsafe” 
1679   comes from)!
1681 • Only call rewind from timeline rewind point was set from.
1683 • Only call rewind from after the rewind point was set.
1685 8.8 Table settings
1687 Routines for settings manipulation
1689 8.8.1 settings.get(string name)
1691 Get value of setting. If setting is blank, returns false. If 
1692 setting value can't be obtained, returns (nil, error message).
1694 8.8.2 settings.set(string name, string value)
1696 Set value of setting. If setting can't be set, returns (nil, 
1697 error message).
1699 8.8.3 settings.is_set(string name)
1701 Returns if setting is set. If setting does not exist, returns 
1702 (nil, error message).
1704 8.8.4 settings.blank(string name)
1706 Blanks a setting and returns true. If setting can't be blanked, 
1707 returns (nil, error message).
1709 8.9 Table memory
1711 Contains various functions for managing memory
1713 8.9.1 memory.vma_count()
1715 Returns the number of VMAs
1717 8.9.2 memory.read_vma(number index)
1719 Reads the specified VMA (indices start from zero). Trying to read 
1720 invalid VMA gives nil. The read VMA is table with the following 
1721 fields:
1723 • region_name (string): The readable name of the VMA
1725 • baseaddr (number): Base address of the VMA
1727 • lastaddr (number): Last address in the VMA.
1729 • size (number): The size of VMA in bytes.
1731 • readonly (boolean): True of the VMA corresponds to ROM.
1733 • iospace (boolean): True if the VMA is I/O space.
1735 • native_endian (boolean): True if the VMA has native endian as 
1736   opposed to little endian.
1738 8.9.3 memory.find_vma(number address)
1740 Finds the VMA containing specified address. Returns table in the 
1741 same format as read_vma or nil if not found.
1743 8.9.4 memory.readbyte(number address)
1745 Reads the specified address as unsigned byte and returns the 
1746 result.
1748 8.9.5 memory.readsbyte(number address)
1750 Reads the specified address as signed byte and returns the 
1751 result.
1753 8.9.6 memory.writebyte(number address, number value)
1755 Writes the specified value (negative values undergo 2's 
1756 complement) to specified address (as a byte).
1758 8.9.7 memory.readword(number address)
1760 Reads the specified address as unsigned word and returns the 
1761 result.
1763 8.9.8 memory.readsword(number address)
1765 Reads the specified address as signed word and returns the 
1766 result.
1768 8.9.9 memory.writeword(number address, number value)
1770 Writes the specified value (negative values undergo 2's 
1771 complement) to specified address (as a word).
1773 8.9.10 memory.readdword(number address)
1775 Reads the specified address as unsigned doubleword and returns 
1776 the result.
1778 8.9.11 memory.readsdword(number address)
1780 Reads the specified address as signed doubleword and returns the 
1781 result.
1783 8.9.12 memory.writedword(number address, number value)
1785 Writes the specified value (negative values undergo 2's 
1786 complement) to specified address (as a doubleword).
1788 8.9.13 memory.readqword(number address)
1790 Reads the specified address as unsigned quadword and returns the 
1791 result.
1793 8.9.14 memory.readsqword(number address)
1795 Reads the specified address as signed quadword and returns the 
1796 result.
1798 8.9.15 memory.writeqword(number address, number value)
1800 Writes the specified value (negative values undergo 2's 
1801 complement) to specified address (as a quadword).
1803 8.9.16 memory.hash_region(number base, number size)
1805 Hash specified number of bytes starting from specified address 
1806 and return the SHA-256.
1808 8.9.17 memory.hash_state()
1810 Hash the current system state. Mainly useful for debugging 
1811 savestates.
1813 8.9.18 memory.readregion(number base, number size)
1815 Read a region of memory.
1817 • Warning: If the region crosses VMA boundary, the results are 
1818   undefined.
1820 8.9.19 memory.map<type>([number base, number size])
1822 Returns a table mapping specified memory aperture for read/write. 
1823 If parameters are omitted, entiere map space is the aperture.
1825 • Type may be one of: byte, sbyte, word, sword, dword, sdword, 
1826   qword or sqword.
1828 8.9.20 memory.writeregion(number base, number size, table data)
1830 Write a region of memory.
1832 • Warning: If the region crosses VMA boundary, the results are 
1833   undefined.
1835 8.9.21 memory.map_structure()
1837 Returns a new mapping structure (MMAP_STRUCT)
1839 8.9.22 MMAP_STRUCT(string key, number address, string type)
1841 Bind key in mmap structure to specified address with specified 
1842 type.
1844 • Type may be one of: byte, sbyte, word, sword, dword, sdword, 
1845   qword or sqword.
1847 8.9.23 memory.read_expr(string expr)
1849 Evaluate specified watch expression and return result
1851 8.10 Table subtitle
1853 Contains functions for manipulating subtitles.
1855 8.10.1 subtitle.byindex(number index)
1857 Get (basetime, length) pair of specified subtitle index or 
1858 nothing if index isn't valid.
1860 8.10.2 subtitle.get(number basetime, number length)
1862 Read the specified subtitle. Returns “” if the subtitle does not 
1863 exist.
1865 8.10.3 subtitle.set(number basetime, number length, string 
1866   content)
1868 Set the specified subtitle.
1870 8.10.4 subtitle.deltete(number basetime, number length)
1872 Delete the specified subtitle.
1874 8.11 Table _SYSTEM
1876 Contains copy of global variables from time of Lua 
1877 initialization. Non-writeable.
1879 8.12 Callbacks
1881 Various callbacks to Lua that can occur.
1883 8.12.1 Callback: on_paint(bool not_synth)
1885 Called when screen is being painted. Any gui.* calls requiring 
1886 graphic context draw on the screen.
1888 not_synth is true if this hook is being called in response to 
1889 received frame, false otherwise.
1891 8.12.2 Callback: on_video()
1893 Called when video dump frame is being painted. Any gui.* calls 
1894 requiring graphic context draw on the video.
1896 8.12.3 Callback: on_frame_emulated()
1898 Called when emulating frame has completed and 
1899 on_paint()/on_video() calls are about to be issued.
1901 8.12.4 Callback: on_frame()
1903 Called on each starting whole frame.
1905 8.12.5 Callback: on_startup()
1907 Called when the emulator is starting (lsnes.rc and --run files 
1908 has been run).
1910 8.12.6 Callback: on_rewind()
1912 Called when rewind movie to beginning has completed.
1914 8.12.7 Callback: on_pre_load(string name)
1916 Called just before savestate/movie load occurs (note: loads are 
1917 always delayed, so this occurs even when load was initiated by 
1918 lua).
1920 8.12.8 Callback: on_err_load(string name)
1922 Called if loadstate goes wrong.
1924 8.12.9 Callback: on_post_load(string name, boolean was_savestate)
1926 Called on successful loadstate. was_savestate gives if this was a 
1927 savestate or a movie.
1929 8.12.10 Callback: on_pre_save(string name, boolean is_savestate)
1931 Called just before savestate save occurs (note: movie saves are 
1932 synchronous and won't trigger these callbacks if called from 
1933 Lua).
1935 8.12.11 Callback: on_err_save(string name)
1937 Called if savestate goes wrong.
1939 8.12.12 Callback: on_post_save(string name, boolean is_savestate)
1941 Called on successful savaestate. is_savestate gives if this was a 
1942 savestate or a movie.
1944 8.12.13 Callback: on_quit()
1946 Called when emulator is shutting down.
1948 8.12.14 Callback: on_input(boolean subframe)
1950 Called when emulator is just sending input to bsnes core. 
1951 Warning: This is called even in readonly mode, but the results 
1952 are ignored.
1954 8.12.15 Callback: on_reset()
1956 Called when SNES is reset.
1958 8.12.16 Callback: on_readwrite()
1960 Called when moving into readwrite mode as result of “set-rwmode” 
1961 command (note: moving to rwmode by Lua won't trigger this, as per 
1962 recursive entry protection).
1964 8.12.17 Callback: on_snoop(number port, number controller, number 
1965   index, number value)
1967 Called each time bsnes asks for input. The value is the final 
1968 value to be sent to bsnes core (readonly mode, autohold and 
1969 autofire have been taken into account). Might be useful when 
1970 translating movies to format suitable for console verification. 
1971 Note: There is no way to modify the value to be sent.
1973 8.12.18 Callback: on_keyhook(string keyname, table state)
1975 Sent when key that has keyhook events requested changes state. 
1976 Keyname is name of the key (group) and state is the state (same 
1977 kind as table values in input.raw).
1979 8.12.19 Callback: on_idle()
1981 Called when requested by set_idle_timeout(), the timeout has 
1982 expired and emulator is waiting.
1984 8.12.20 Callback: on_timer()
1986 Called when requested by set_idle_timeout() and the timeout has 
1987 expired (regardless if emulator is waiting).
1989 8.12.21 Callback: on_set_rewind(UNSAFEREWIND r)
1991 Called when unsafe rewind object has been constructed.
1993 8.12.22 Callback: on_pre_rewind() 
1995 Called just before unsafe rewind is about to occur.
1997 8.12.23 Callback: on_post_rewind() 
1999 Called just after unsafe rewind has occured.
2001 9 Memory watch expression syntax
2003 Memory watch expressions are in RPN (Reverse Polish Notation). At 
2004 the end of expression, the top entry on stack is taken as the 
2005 final result.
2007 Notations:
2009 • Evaluation order is strictly left to right.
2011 • a is the entry on top of stack
2013 • b is the entry immediately below top of stack
2015 • ; separates values to be pushed (no intermediate pop).
2017 • After end of element, all used stack slots are popped and all 
2018   results are pushed.
2020 • When pushing multiple values, the pushes occur in order shown.
2022 The following operators are available:
2024 • + : a + b
2026 • - : a - b
2028 • * : a * b
2030 • / : a / b
2032 • % : a % b
2034 • a : atan(a)
2036 • b : read_signed_byte(a)
2038 • c : cos(a)
2040 • d : read_signed_dword(a)
2042 • i : quotent(a / b)
2044 • p :\pi
2047 • q : read_signed_qword(a)
2049 • r : sqrt(a)
2051 • s : sin(a)
2053 • t : tan(a)
2055 • u : a; a
2057 • w : read_signed_word(a)
2059 • A : atan2(a, b)
2061 • B : read_unsigned_byte(a)
2063 • C<number>z : Push number <number> to stack.
2065 • D : read_unsigned_dword(a)
2067 • C0x<number>z : Push number <number> (hexadecimal) to stack.
2069 • Q : read_unsigned_qword(a)
2071 • R<digit> : round a to <digit> digits.
2073 • W : read_unsigned_word(a)
2075 9.1 Example:
2077 C0x007e0878zWC0x007e002czW-
2079 1. Push value 0x7e0878 on top of stack (C0x007e0878z).
2081 2. Pop the value on top of stack (0x7e0878), read word value at 
2082   that address and push the result,call it x1 (W).
2084 3. Push value 0x7e002c on top of stack (C0x007e002cz).
2086 4. Pop the value on top of stack (0x7e002c), read word value at 
2087   that address and push the result,call it x2 (W).
2089 5. Pop the two top numbers on stack, x1 and x2, substract x1 from 
2090   x2 and push x2 - x1 (-).
2092 6. Since the expression ends, the final memory watch result is 
2093   the top one on stack, which is x2 - x1.
2095 10 Modifier and key names:
2097 10.1 SDL Platform
2099 10.1.1 Modifier names
2101 Following modifier names are known:
2103 • ctrl, lctrl, rctrl: Control keys
2105 • alt, lalt, ralt: ALT keys.
2107 • shift, lshift, rshift: Shift keys.
2109 • meta, lmeta, rmeta: Meta keys.
2111 • num, caps: Numlock/Capslock (these are sticky!)
2113 • mode: Mode select.
2115 10.1.2 Key names
2117 Following key names are known:
2119 • backspace, tab, clear, return, pause, escape, space, exclaim, 
2120   quotedbl, hash, dollar, ampersand, quote, leftparen, 
2121   rightparen, asterisk, plus, comma, minus, period, slash, 0, 1, 
2122   2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals, 
2123   greater, question, at, leftbracket, backslash, rightbracket, 
2124   caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, 
2125   l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, 
2126   world_1, world_2, world_3, world_4, world_5, world_6, world_7, 
2127   world_8, world_9, world_10, world_11, world_12, world_13, 
2128   world_14, world_15, world_16, world_17, world_18, world_19, 
2129   world_20, world_21, world_22, world_23, world_24, world_25, 
2130   world_26, world_27, world_28, world_29, world_30, world_31, 
2131   world_32, world_33, world_34, world_35, world_36, world_37, 
2132   world_38, world_39, world_40, world_41, world_42, world_43, 
2133   world_44, world_45, world_46, world_47, world_48, world_49, 
2134   world_50, world_51, world_52, world_53, world_54, world_55, 
2135   world_56, world_57, world_58, world_59, world_60, world_61, 
2136   world_62, world_63, world_64, world_65, world_66, world_67, 
2137   world_68, world_69, world_70, world_71, world_72, world_73, 
2138   world_74, world_75, world_76, world_77, world_78, world_79, 
2139   world_80, world_81, world_82, world_83, world_84, world_85, 
2140   world_86, world_87, world_88, world_89, world_90, world_91, 
2141   world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, 
2142   kp4, kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, 
2143   kp_multiply, kp_minus, kp_plus, kp_enter, kp_equals, up, down, 
2144   right, left, insert, home, end, pageup, pagedown, f1, f2, f3, 
2145   f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, numlock, 
2146   capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt, lalt, 
2147   rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, 
2148   sysreq, break, menu, power, euro, undo
2150 • Names of form 'key<n>' where <n> is 0-255 are interpretted as 
2151   key having hardware-dependent scan code of <n> (useful to bind 
2152   those keys that don't have symbolic names).
2154 10.1.3 Joystick pseudo-keys:
2156 • joystick<num>button<button>: Joystick <num> (0-based) button 
2157   <button> (0-based).
2159 • joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> 
2160   (0-based) up.
2162 • joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> 
2163   (0-based) left.
2165 • joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> 
2166   (0-based) down.
2168 • joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> 
2169   (0-based) right.
2171 • joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> 
2172   negative position (axis modes axis and axis_inverse).
2174 • joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> 
2175   positive position (axis modes axis and axis_inverse).
2177 • joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> 
2178   pressure (axis modes pressure_*).
2180 10.1.4 Special buttons:
2182 • Escape: Enter/Exit Command mode, cancel modal dialogs.
2184 • Return (also KPEnter): Execute command, ok modal dialog.
2186 • Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): 
2187   Previous command in command history
2189 • Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): 
2190   Next command in command history
2192 • Home (also KP7 if no num lock, CTRL+A; command mode): Beginning 
2193   of command.
2195 • End (also KP1 if no num lock, CTRL+E; command mode): End of 
2196   command.
2198 • Left (also KP4 if no num lock, CTRL+B; command mode): Move 
2199   cursor left.
2201 • Right (also KP6 if no num lock, CTRL+F; command mode): Move 
2202   cursor right.
2204 • Delete (also KP. if no num lock; command mode): Delete 
2205   character to right of cursor.
2207 • Insert (also KP0 if no num lock; command mode): Toggle between 
2208   insert / overwrite modes.
2210 • Backspace (command mode): Delete character to left of cursor.
2212 • CTRL+LEFT (also ALT+B; command mode): Previous word.
2214 • CTRL+RIGHT (also ALT+F; command mode): Next word.
2216 • ALT+D (also CTRL+W; command mode): Delete word.
2218 • LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump 
2219   corrupted!).
2221 10.2 wxWidgets platform
2223 10.2.1 Modifier names:
2225 Following modifier names are known:
2227 • alt
2229 • ctrl
2231 • shift 
2233 • meta
2235 • cmd (Mac OS X only)
2237 10.2.2 Key names:
2239 Following key names are known:
2241 • back, tab, return, escape, space, exclaim, quotedbl, hash, 
2242   dollar, percent, ampersand, quote, leftparen, rightparen, 
2243   asterisk, plus, comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 
2244   6, 7, 8, 9, colon, semicolon, less, equals, greater, question, 
2245   at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, 
2246   u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret, 
2247   underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, 
2248   n, o, p, q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, 
2249   rightcurly, tilde, delete, start, lbutton, rbutton, cancel, 
2250   mbutton, clear, shift, alt, control, menu, pause, capital, end, 
2251   home, lefT, up, right, down, select, print, execute, snapshot, 
2252   insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, 
2253   numpad5, numpad6, numpad7, numpad8, numpad9, multiply, add, 
2254   separator, subtract, decimal, divide, f1, f2, f3, f4, f5, f6, 
2255   f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, 
2256   f20, f21, f22, f23, f24, numlock, scroll, pageup, pagedown, 
2257   numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2, 
2258   numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, 
2259   numpad_right, numpad_down, numpad_pageup, numpad_pagedown, 
2260   numpad_end, numpad_begin, numpad_insert, numpad_delete, 
2261   numpad_equal, numpad_multiply, numpad_add, numpad_separator, 
2262   numpad_subtract, numpad_decimal, numpad_divide, windows_left, 
2263   windows_right, windows_menu, command, special1, special2, 
2264   special3, special4, special5, special6, special7, special8, 
2265   special9, special10, special11, special12, special13, 
2266   special14, special15, special16, special17, special18, 
2267   special19, special20
2269 11 Movie file format
2271 Movie file is .zip archive in itself, normal ZIP archive tools 
2272 work on it (note: If you recompress it, do not use compression 
2273 methods other than store and deflate and especially do not use 
2274 encryption of any kind).
2276 11.1 Detecting clean start/SRAM/Savestate
2278 • If file has member “savestate” it is savestate, otherwise:
2280 • If file has members with names starting “moviesram.” it is 
2281   movie starting from SRAM, otherwise:
2283 • It is movie starting from clear state.
2285 11.2 Member: gametype
2287 Type of game ROM and region (as one line). Valid values are:
2290 +--------------+---------------------+--------+
2291 |    Value     |       System        | Region |
2292 +--------------+---------------------+--------+
2293 +--------------+---------------------+--------+
2294 |  snes_pal    |     Super NES       |  PAL   |
2295 +--------------+---------------------+--------+
2296 |   sgb_pal    |   Super Game Boy    |  PAL   |
2297 +--------------+---------------------+--------+
2298 |  snes_ntsc   |     Super NES       |  NTSC  |
2299 +--------------+---------------------+--------+
2300 |  sgb_ntsc    |   Super Game Boy    |  NTSC  |
2301 +--------------+---------------------+--------+
2302 |     bsx      | BS-X (non-slotted)  |  NTSC  |
2303 +--------------+---------------------+--------+
2304 | bsxslotted   |   BS-X (slotted)    |  NTSC  |
2305 +--------------+---------------------+--------+
2306 | sufamiturbo  |    Sufami Turbo     |  NTSC  |
2307 +--------------+---------------------+--------+
2310 Frame rates are:
2313 +---------+-----------------+
2314 | Region  | Framerate (fps) |
2315 +---------+-----------------+
2316 +---------+-----------------+
2317 |  PAL    |   322445/6448   |
2318 +---------+-----------------+
2319 |  NTSC   | 10738636/178683 |
2320 +---------+-----------------+
2323 11.3 Member: port1
2325 Contains type of port #1 (as one line). Valid values are 'none', 
2326 'gamepad', 'multitap' and 'mouse'. If not present, defaults to 
2327 'gamepad'.
2329 11.4 Member: port2
2331 Contains type of port #2 (as one line). Valid values are 'none', 
2332 'gamepad', 'multitap', 'mouse', 'superscope', 'justifier' and 
2333 'justifiers'. If not present, defaults to 'none'.
2335 11.5 Member: gamename
2337 Contains name of the game (as one line).
2339 11.6 Member: authors
2341 Contains authors, one per line. Part before '|' is the full name, 
2342 part after is the nickname.
2344 11.7 Member: systemid
2346 Always “lsnes-rr1” (one line). Used to reject other saves.
2348 11.8 Member: controlsversion
2350 Always “0” (one line). Used to identify what controls are there.
2352 11.9 Member: “coreversion”
2354 Contains bsnes core version number (as one line).
2356 11.10 Member: projectid
2358 Contains project ID (as one line). Used to identify if two movies 
2359 are part of the same project.
2361 11.11 Member: {rom,slota,slotb}{,xml}.sha256
2363 Contains SHA-256 of said ROM or ROM mapping file (as one line). 
2364 Absent if corresponding file is absent.
2366 11.12 Member: moviesram.<name>
2368 Raw binary startup SRAM of kind <name>. Only present in 
2369 savestates and movies starting from SRAM.
2371 11.13 Member: saveframe
2373 Contains frame number (as one line) of frame movie was saved on. 
2374 Only present in savestates.
2376 11.14 Member: lagcounter
2378 Current value of lag counter (as one line). Only present in 
2379 savestates.
2381 11.15 Member: pollcounters
2383 Contains poll counters (currently 100 of them), one per line. 
2384 Each line is raw poll count if DRDY is set for it. Otherwise it 
2385 is negative poll count minus one. Only present in savestates.
2387 11.16 Member: hostmemory
2389 Raw binary dump of host memory. Only present in savestates.
2391 11.17 Member: savestate
2393 The raw binary savestate itself. Savestate detection uses this 
2394 file, only present in savestates.
2396 11.18 Member: screenshot
2398 Screenshot of current frame. Only present in savestates. First 2 
2399 bytes are big-endian width of image, rest are 24-bit RGB image 
2400 data. Height of image is inferred from the width and size of 
2401 data.
2403 11.19 Member: sram.<name>
2405 Raw binary SRAM of kind <name> at time of savestate. Only present 
2406 in savestates.
2408 11.20 Member: input
2410 The actual input track, one line per subframe (blank lines are 
2411 skipped).
2413 • If the first byte of each line is '.', ' ', <tab> or '|', then 
2414   the line is part of same frame as previous, otherwise it starts 
2415   a new frame.
2417 • First subframe must start a new frame.
2419 Length of movie in frames is number of lines in input file that 
2420 start a new frame.
2422 11.21 Member: subtitles
2424 Subtitle track. Optional.
2426 • Each line is in form <firstframe> <numframes> <text>.
2428 • Linefeed is encoded as \n, backslash is encoded as \\.
2430 11.22 Member: rerecords
2432 Contains textual base-10 rerecord count (as one line; emulator 
2433 just writes this, it doesn't read it) + 1.
2435 11.23 Member: rrdata
2437 This member stores set of load IDs. There is one load ID per 
2438 rerecord (plus one corresponding to start of project).
2440 • This member constists of concatenation of records
2442 • Each record is 2-36 bytes long and can represent 1-16,843,009 
2443   consequtive IDs.
2445 • IDs are interpretted as 256-bit big-endian integers with 
2446   warparound.
2448 • Initial predicted ID is all zeroes.
2450 Format of each record is:
2452 • 1 byte: Opcode byte. Bits 0-4 are prefix length (prefixlen), 
2453   bits 5-6 are count length (countlen). Bit 7 is unused.
2455 • 32-prefixlen bytes of ID.
2457 • countlen bytes of big-endian count (count).
2459 Records are processed as follows:
2461 • To form the first ID encoded by record, take the first 
2462   prefixlen bytes predicted ID and append the read ID value to 
2463   it. The result is the first ID encoded.
2465 • If countlen is 0, record encodes 1 ID.
2467 • If countlen is 1, record encodes 2+count IDs.
2469 • If countlen is 2, record encodes 258+count IDs.
2471 • If countlen is 3, record encodes 65794+count IDs.
2473 • The new predicted ID is the next ID after last one encoded by 
2474   the record.
2476 The number of rerecords + 1 is equal to the sum of number of IDs 
2477 encoded by all records.
2479 11.24 Member: starttime.second
2481 Movie starting time, second part. Epoch is Unix epoch. Default is 
2482 1,000,000,000.
2484 11.25 Member: starttime.subsecond
2486 Movie starting time, subsecond part. Unit is CPU clocks. Default 
2487 is 0.
2489 11.26 Member: savetime.second
2491 Movie saving time, second part. Default is starttime.second. Only 
2492 present in savestates.
2494 11.27 Member: savetime.subsecond
2496 Movie saving time, subsecond part. Default is 
2497 starttime.subsecond. Only present in savestates.
2499 12 lsvs file format (commentary tracks)
2501 12.1 Clusters
2503 • Each cluster is 8kB (8192 bytes) in size.
2505 • Cluster n starts at offset 8192*n in file.
2507 • The following clusters are system special:
2509   – Cluster 0 and all clusters with number multiple of 2048 
2510     (cluster tables)
2512   – Cluster 1 (superblock)
2514 12.2 Cluster tables
2516 • The cluster table describing cluster n is stored in cluster n & 
2517   ~0x7FF (zero last 11 bits of n).
2519 • This cluster table consists of 2048 4-byte big-endian integers.
2521 • Each entry describes a cluster in 16MB supercluster, in order.
2523 • The valid values for entries are:
2525   – 0x00000000: Free cluster
2527   – 0x00000001: Last cluster in chain.
2529   – 0xFFFFFFFF: System cluster (cluster tables and superblock)
2531   – (anything else): Number of next cluster in chain. Must not be 
2532     multiple of 2048.
2534 • Due to limitations of the format, there can be at most 2097052 
2535   superclusters, giving maximum file size of 16TB.
2537 12.3 Stream table
2539 • The stream table chain always starts in cluster 2.
2541 • Otherwise, it follows normal chaining.
2543 • The stream table consists of 16-byte entries:
2545   – The first 8 bytes of entry give big-endian beginning position 
2546     of stream in units of 1/48000 s.
2548   – The next 4 bytes of entry give big-endian beginning cluster 
2549     for control data. 0 here marks the entry as not present.
2551   – The last 4 bytes of entry give big-endian beginning cluster 
2552     for codec data.
2554 • Stream table clusters are normal clusters, following normal 
2555   chaining.
2557 • The stream begnning position is not guarenteed unique. There 
2558   can be multiple streams with the same starting position in the 
2559   file.
2561 12.4 Stream control data
2563 • The stream control data consists of entries 4 bytes each:
2565   – The first 2 bytes of entry gives big-endian length of packet
2567   – The next byte of entry gives audio length of packet in units 
2568     of 1/400 s.
2570   – The last byte is control byte.
2572     ∗ 0 means this entry is not present and the control data 
2573       ends.
2575     ∗ 1 is valid control entry.
2577 • The stream control data can also end by running into end of the 
2578   readable chain.
2580   – This happens if there happens to be exact multiple of 2048 
2581     packets in stream and number of packets is nonzero.
2583 • These clusters follow normal chaining.
2585 12.5 Stream codec data
2587 • Stream codec data consists of raw Opus data packets packed back 
2588   to back with nothing in between.
2590 • Warning: Due to internal limitations, this data must reside in 
2591   the first 65536 superclusters (that is, the first 1TB of the 
2592   file).
2594 12.6 Superblock
2596 • The superblock is stored in cluster 1. 
2598 • The first 11 bytes are “sefs-magic”<NUL>.
2600 • The rest are unused.
2602 • This cluster 1 is marked as system special.
2604 13 Known ROM extensions
2606 • SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, 
2607   dx2, mgd, mgh.
2609 • DMG cartridge ROMs: dmg, gb.
2611 • GBC cartridge ROMs: cgb, gbc.
2613 14 Gamepack files
2615 • The first line must be: “[GAMEPACK FILE]”.
2617 • There is one needed line: “type <systype>”. This sets system 
2618   type to <systype>. The following system types are valid:
2620   – snes (SNES)
2622   – bsx (BS-X non-slotted)
2624   – bsxslotted (BS-X slotted)
2626   – sufamiturbo (Sufami Turbo)
2628   – sgb (Super Game Boy)
2630   – dmg (Game Boy)
2632   – gbc (Game Boy Color)
2634   – gbc_gba (Game Boy Color with GBA initial register values)
2636 • Optionally a region can be specified: “region <region>”. The 
2637   following values are valid:
2639   – autodetect (Autodetect region: snes and sgb only)
2641   – ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
2643   – pal (PAL: snes, sgb)
2645   – world (World: dmg, gbc, gbc_gba)
2647 • ROM images are loaded as: “rom <type> <file>”. The following 
2648   types are valid:
2650   – rom (Cartridge ROM in snes, dmg, gbc, gbc_gba. BIOS in bsx, 
2651     bsxslotted, sufamiturbo)
2653   – bsx (Cartridge ROM in bsx, bsxslotted)
2655   – slot-a (Cartridge ROM in sufamiturbo)
2657   – slot-b (Cartridge ROM in sufamiturbo)
2659 • ROM markup can be loaded as: “xml <type> <file>”. The types 
2660   valid are the same as for ROMs.
2662 • Patches can be loaded as “patch[<offset>] <type> <file>”. The 
2663   types are the same as for ROMs.
2665   – Offset is given in form [+-]<number>. Usually offset is 
2666     either +0 or -512.
2668   – Default offset is +0.
2670 14.1 Example:
2672 [GAMEPACK FILE]
2674 type snes
2676 rom rom speedygonzales.sfc
2678 patch-512 rom sonicthehedgehog.ips
2680 14.2 Example 2:
2682 [GAMEPACK FILE]
2684 type sgb
2686 rom rom supergameboy.sfc
2688 rom dmg megamanV.dmg
2690 15 Quick'n'dirty encode guide
2692 1. Start the emulator and load the ROM and movie file.
2694 2. Set large AVI option 'set-setting avi-large on'
2696 3. Enable dumping 'dump-avi tmpdump' 
2698 4. Unpause and let it run until you want to end dumping.
2700 5. Close the emulator (closing the window is the easiest way). Or 
2701   use 'end-avi'.
2703 6. For each tmpdump*.avi file created, on command prompt, do 
2704   'x264 --crf 10 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
2706 7. Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
2708 8. Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + 
2709   tmpdump_0000001.mkv + tmpdump_0000002.mkv' (list every 
2710   tmpdump_<numbers>.mkv, with + in between).
2712 9. Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'. Now 
2713   final.mkv contains quick'n'dirty encode.
2715 16 Axis configurations for some gamepad types:
2717 16.1 XBox360 controller:
2719 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be 
2720 set to pressure-+.
2722 set-axis joystick0axis2 pressure-+
2724 set-axis joystick0axis5 pressure-+
2726 • This is needed for SDL only. EVDEV sets those types correctly.
2728 16.2 PS3 “sixaxis” controller:
2730 Axes 8-19 should be disabled.
2732 set-axis joystick0axis8 disabled
2734 set-axis joystick0axis9 disabled
2736 set-axis joystick0axis10 disabled
2738 set-axis joystick0axis11 disabled
2740 set-axis joystick0axis12 disabled
2742 set-axis joystick0axis13 disabled
2744 set-axis joystick0axis14 disabled
2746 set-axis joystick0axis15 disabled
2748 set-axis joystick0axis16 disabled
2750 set-axis joystick0axis17 disabled
2752 set-axis joystick0axis18 disabled
2754 set-axis joystick0axis19 disabled
2756 17 Errata:
2758 17.1 Problems from BSNES core:
2760 • The whole pending save stuff.
2762 • Lack of layer hiding.
2764 • It is slow (especially accuracy).
2766 • Firmwares can't be loaded from ZIP archives.
2768 17.2 Other problems:
2770 • Modifiers don't work with pseudo-keys (SDL, EVDEV).
2772 • Audio for last dumped frame is not itself dumped.
2774 • Audio in UI is pretty bad in quality if game doesn't run at 
2775   full speed.
2777 • No menus, command based interface (SDL).
2779 • Long commands don't scroll.
2781 18 Changelog:
2783 18.1 rr0-beta1
2785 • Fix -Wall warnings
2787 • Fix dumper video corruption with levels 10-18.
2789 18.2 rr0-beta2
2791 • Autofire
2793 • Lots of code cleanups
2795 • Lua interface to settings
2797 • Allow specifying AVI borders without Lua
2799 • Fix scaling if vscale > 1 and originx > 0 (left border exists)
2801 • on_snoop lua callback
2803 • Faster movie loading and saving.
2805 18.3 rr0-beta3
2807 • Joystick support
2809 18.4 rr0-beta4
2811 • Fix multi-buttons
2813 • Save jukebox functionality.
2815 18.5 rr0-beta5
2817 • Try to fix some nasty failing movie load edge cases
2819 • Allow specifying scripts to run on command line.
2821 18.6 rr0-beta6
2823 • Major source code reorganization.
2825 • Backup savestates before overwriting.
2827 • Don't crash if loading initial state fails.
2829 18.7 rr0-beta7
2831 • Fix firmware lookup
2833 • Fix author name parsing
2835 • Fix rerecord counting
2837 • (SDL) Print messages to console if SDL is uninitialized
2839 • Add movieinfo program
2841 • Fix loading movies starting from SRAM.
2843 18.8 rr0-beta8
2845 • Add support for unattended dumping
2847 • Fix compiling for Win32
2849 • Don't lock up if sound can't be initialized
2851 • Strip trailing CR from commands
2853 • Don't try to do dubious things in global ctors (fix crash on 
2854   startup)
2856 18.9 rr0-beta9
2858 • Small documentation tweaking
2860 • Fix make clean
2862 • Fix major bug in modifier matching
2864 18.10 rr0-beta10
2866 • Lots of documentation fixes
2868 • Use dedicated callbacks for event backcomm., not commands.
2870 • Ensure that the watchdog is not hit when executing delayed 
2871   reset.
2873 • Remove errant tab from joystick message.
2875 18.11 rr0-beta11
2877 • Make autofire operate in absolute time, not linear time
2879 • Reinitialize controls when resuming from loadstate
2881 • Some more code cleanups
2883 • If Lua allocator fails, call OOM_panic()
2885 • Byte/word/dword/qword sized host memory write/read functions.
2887 • Dump at correct framerate if dumping interlaced NTSC 
2888   (height=448).
2890 18.12 rr0-beta12
2892 • Actually include the complete source code
2894 • Keep track of RTC
2896 18.13 rr0-beta13
2898 • Document {save,start}time.{,sub}second.
2900 • Intercept time() from bsnes core.
2902 18.14 rr0-beta14
2904 • Allow disabling time() interception (allow build on Mac OS X)
2906 • Use SDLMain on Mac OS X (make SDL not crash)
2908 • Disable delayed resets (just plain too buggy for now).
2910 • Code cleanups
2912 • Use 16-bit for graphics/video instead of 32-bit.
2914 • gui.rectangle/gui.pixel
2916 • gui.crosshair
2918 • New CSCD writer implementation.
2920 18.15 rr0-beta15
2922 • Fix interaction of * and +.
2924 • Manual improvements
2926 • Use gettimeofday()/usleep(), these seem portable enough.
2928 • Move joystick axis manipulation to keymapper code.
2930 • Changes to how read-only works.
2932 • Refactor controller input code.
2934 18.16 rr0-beta16
2936 • Fix mouseclick scale compensation.
2938 • Draw area boundaries correctly in SDL code.
2940 • gui.screenshot.
2942 • Fix CSCD output (buffer overrun and race condition).
2944 18.17 rr0-beta17
2946 • JMD dumping support.
2948 • Allow unattended dumping to JMD.
2950 • Move to BSNES v083.
2952 • Switch back to 32-bit colors.
2954 • Add Lua function gui.color.
2956 • Use some new C++11 features in GCC 4.6.
2958 • Be prepared for core frequency changes.
2960 • Pass colors in one chunk from Lua.
2962 18.18 rr0-beta18
2964 • New lua functions gui.line(), gui.status() and gui.circle(), 
2965   memory.vma_count(), memory.read_vma() and memory.find_vma().
2967 • Numerious documentation fixups
2969 • RTC time format changed
2971 • Reformat flags display
2973 • Allow lua package name to be overridden
2975 • SDUMP (high-quality dumping).
2977 • Split platform support to plugins.
2979 • Make all sound plugins support basic sound commands
2981 • Support portaudio for sound.
2983 • Allow disable Lua/SDL searching.
2985 • Upconvert colors when copying lcscreen to screen.
2987 • Reorganize source tree.
2989 • Evdev joystick support.
2991 • Refactor more code into generic window code.
2993 18.19 rr0-beta19
2995 • Refactor message handling.
2997 • Rework makefile
2999 • Documentation fixes
3001 • Finish pending saves before load/quit.
3003 • Wxwidgets graphics plugin.
3005 18.20 rr0-beta20
3007 • Get rid of win32-crap.[ch]pp.
3009 • Move files around a lot.
3011 • Get rid of need for host C++ compiler.
3013 • Bsnes v084 core.
3015 • Refactor inter-component communication.
3017 • Fix zero luma.
3019 • Fix crash on multiline aliases.
3021 • Load/Save settings in wxwidgets gui.
3023 18.21 rr0-beta21
3025 • Patch problems in bsnes core
3027 • SNES is little-endian, not big-endian!
3029 • Fix memory corruption in lcscreen::load()
3031 18.22 rr0-beta22
3033 • Fix interpretting repeat counts in rrdata loading.
3035 • New lua callback: on_frame()
3037 • Remove calls to runtosave() that aren't supposed to be there
3039 • Lua function: movie.read_rtc()
3041 • Ignore src/fonts/font.cpp
3043 • Fix more bsnes core problems
3045 • Control bsnes random seeding
3047 • Pause-on-end
3049 • Some bsnes core debugging features (state dump and state hash)
3051 • Fix titlebar version number (no, the last version wasn't 
3052   'lsnes-0-beta21', it was 'lsnes rr0-beta21').
3054 18.23 rr0-beta23
3056 • Fix memory corruption due to macro/field mixup
3058 • search-memory update
3060 • Allow direct-mapped framebuffer
3062 • SDL: Use SDL_ANYFORMAT if possible
3064 • SDMP2SOX: 2s delay modes.
3066 • Wxwidgets: Cleanups
3068 • Use sed -E, not sed -r. Fixes building on Mac OS X.
3070 • Wxwidgets: Save jukebox on exit
3072 • Fix RTC if using load-movie on savestate.
3074 • Fix crash related to full console mode.
3076 18.24 rr0-beta24
3078 • Wxwidgets: Allow bringing application to foreground on Mac OS 
3079   X.
3081 • Wxwidgets: Allow compiling on Mac OS X.
3083 • Use movie compare instead of movie hashing (faster save/load).
3085 • Lua: _SYSTEM table.
3087 18.25 rr0-beta25
3089 • sdmp2sox: Pad soundtrack if using -l or -L.
3091 • sdmp2sox: Fix NTSC overscan.
3093 • sdmp2sox: Add AR correction mode.
3095 • call lua_close() when exiting.
3097 • Fix zip_writer bug causing warnings from info-zip and error 
3098   from advzip.
3100 18.26 rr0-beta26
3102 • Fix IPS patching code (use bsnes core IPS patcher).
3104 • Implement BPS patching (using bsnes core IPS patcher).
3106 • Add feature to load headered ROMs.
3108 18.27 rr0-beta27
3110 • Show command names when showing keybindings
3112 18.28 rr0
3114 • Fix pause-on-end to be actually controllable
3116 • SDL: Poll all events in queue, not just first one (fixes 
3117   slowness in command typing)
3119 • Wxwidgets: Fix ROM loading.
3121 18.29 rr1-beta0
3123 • Lua: Add gui.textH, gui.textV, gui.textHV
3125 • Fix text colors on SDL on Mac OS X
3127 • Mode 'F' for finished in readonly mode.
3129 • Fix some WS errors.
3131 • Reliably pause after skip poll
3133 • Split UI and core into their own threads
3135 18.30 rr1-beta1
3137 • Remove leftover dummy SRAM slot
3139 • Fix controller numbers.
3141 18.31 rr1-beta2
3143 • Fix lsnes-dumpavi after interface change.
3145 • Also give BSNES patches for v085.
3147 • Pack movie data in memory.
3149 18.32 rr1-beta3
3151 • Fix framecount/length given when loading movies.
3153 • Controller command memory leak fixes.
3155 • Don't leak palette if freeing screen object.
3157 18.33 rr1-beta4
3159 • Detect revisions.
3161 • Wxwidgets: Allow controlling dumper from the menu.
3163 18.34 rr1-beta5
3165 • Rewrite parts of manual
3167 • Lua: Make it work with Lua 5.2.
3169 18.35 rr1-beta6
3171 • Win32: Fix compile errors.
3173 18.36 rr1-beta7
3175 • Refactor controller input code.
3177 • Fix crash when using command line on SDL / Mac OS X.
3179 18.37 rr1-beta8
3181 • Delete core/coroutine (obsolete)
3183 • Lag input display by one frame.
3185 • Rewind movie to beginning function.
3187 • Fix wrong frame number reported to Lua when repainting after 
3188   loadstate
3190 • Support UI editing of jukebox
3192 • Wxwidgets: Save settings on exit.
3194 • Support ${project} for filenames
3196 • SDL: Fix command history
3198 18.38 rr1-beta9
3200 • Fix some order-of-global-ctor bugs.
3202 18.39 rr1-beta10
3204 • Fix crashes when quitting on Win32.
3206 18.40 rr1-beta11
3208 • EVDEV: Queue keypresses from joystick, don't send directly
3210 • Wxwidgets: Load-Preserve that actually works.
3212 18.41 rr1-beta12
3214 • Wxwidgets: GUI for memory search.
3216 • Warn about using synchronous queue in UI callback.
3218 18.42 rr1-beta13
3220 • Remember last saved file for each ROM
3222 • Support MT dumping via boost.
3224 • Lua: input.raw
3226 • Lua: input.keyhook
3228 • Make mouse be ordinary input instead of special-casing
3230 • SDL: Don't screw up commands with NUL codepoints.
3232 18.43 rr1-beta14
3234 • Merge status panel and main window
3236 • True movie slot support (the rest of it)
3238 • SDL: Fix compilation error
3240 • Elminate cross calls in dump menu code.
3242 18.44 rr1-beta15
3244 • Cancel pending saves command
3246 • Wxwidgets: Code refactoring
3248 • Wxwidgets: Fix system -> reset
3250 • Wxwidgets: Read watch expressions in the right thread
3252 18.45 rr1-beta16
3254 • Wxwidgets: Don't prompt for member when running Lua script (Lua 
3255   doesn't support that).
3257 • Wxwidgets: 128 -> 1024 Autohold slots (in case more are 
3258   needed).
3260 • Don't append trailing '-' to prefix when saving movie.
3262 • Fix ROM/savestate handling (don't let user mismatch ROM and 
3263   savestates).
3265 18.46 rr1
3267 • Document memory watch syntax.
3269 18.47 rr1-delta1
3271 • Fix unattended dumping (lsnes-dumpavi)
3273 • Support RAW dumping
3275 • Use adv_dumper instead of the old interface in lsnes-dumpavi 
3276   (changes syntax)
3278 • Add option to control sample rate preturbation in AVI dumper
3280 18.48 rr1-delta2
3282 • Wxwidgets: Fix dumper submodes
3284 • Set core controller types before loadstate
3286 18.49 rr1-delta2epsilon1
3288 • Fix compiling with bsnes v086.
3290 18.50 rr1-delta3
3292 • Don't prompt before quitting
3294 • Start unpaused, preserve pause/unpause over load.
3296 • Try to autodetect if ROM is headered.
3298 • Wxwidgets: Only bring up ROM patching screen if specifically 
3299   requested.
3301 • Allow configuring some hotkeys.
3303 18.51 rr1-delta4
3305 • Lots of code cleanups
3307 • Fix JMD compression (JMD dumping was broken)
3309 • Don't crash if Lua C function throws an exception.
3311 • Support bitmap drawing in Lua.
3313 • Fix bsnes v085/v086 patches.
3315 • Improve stability on win32.
3317 18.52 rr1-delta4epsilon1
3319 • Don't corrupt movie if movie length is integer multiple of 
3320   frames per page.
3322 18.53 rr1-delta5
3324 • New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
3326 • New Lua functions: emulator_ready(), utime(), 
3327   set_idle_timeout(), set_timer_timeout(), bit.extract(), 
3328   bit.value(), input.geta(), input.seta() and 
3329   input.controllertype()
3331 • Wxwidgets: Fix internal focus lost (hotkeys stop working)
3333 • Wxwidgets: Fix broken modifiers
3335 • on_paint has parameter now.
3337 • Optional initital fill for bitmaps
3339 • Fix palette changing.
3341 • Optimize rendering a bit.
3343 • Bsnes v087 support.
3345 18.54 rr1-delta5epsilon1
3347 • Movieinfo: Fix display of port #2 type.
3349 • Call on_input() after loadstate.
3351 18.55 rr1-delta5epsilon2
3353 • Fix writing port2 data to movie.
3355 • Fix SRAM handling with Bsnes v087.
3357 18.56 rr1-delta6
3359 • Library loading support
3361 • Built-in TSCC encoder
3363 • Hi-color (256T colors) dumping.
3365 • Dump over TCP/IP(v6)
3367 • Hidable status panel
3369 • Turbo toggle/hold
3371 • Adjustable sound volume
3373 • Screen scaling
3375 • Allow DnD into filename boxes
3377 • Configurable paths
3379 • Portaudio: Fix speaker popping at start
3381 • Lots of UI changes
3383 • Speed adjustment menu
3385 • Win32 joystick support
3387 • Lua: gui.rainbow and gui.box
3389 • Split key lists into classes (the key list was large!)
3391 • More save slots support
3393 • Wxwidgets (wxJoystick) joystick support
3395 18.57 rr1-delta7
3397 • Lots of internal joystick refactoring
3399 • Evdev: Add mapping for BTN_TOOL_QUINTTAP
3401 • Wxwidgets: Settings mode (open settings without ROM)
3403 • Wxwidgets: Prompt key to use option
3405 • Wxwidgets: Fix crash if key goes away underneath
3407 • Wxwidgets: Fix mouse position in presence of scaling
3409 • AVI dumper: Mode 4 (high-quality resampling to common rate 
3410   using SRC)
3412 • Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree 
3413   control doesn't seem to work well on WinXP)
3415 • Start paused option.
3417 18.58 rr1-delta7epsilon1
3419 • AVI: ZMBV support
3421 • lsnes-dumpavi: Start Lua before starting dumper
3423 • AVI: Fix secondary audio in mode 4.
3425 18.59 rr1-delta7epsilon2
3427 • AVI: Refactor ZMBV a bit.
3429 • Fix error reading analog values from movie file
3431 18.60 rr1-delta8
3433 • Delayed reset support
3435 • Lua: memory.hash_region
3437 18.61 rr1-delta8epsilon1
3439 • Rework the build system
3441 • Typing input support
3443 • Fix building with bsnes v086 and v087.
3445 • SDL: Save settings on exit
3447 • SDL: Command to enter command line mode with given command.
3449 • SDL: More advanced command editing.
3451 18.62 rr1-delta9
3453 • wxMSW: Fix the “arrow keys and enter don't work” problem
3455 • MSU-1 support
3457 • Show mode changes due to rewinding.
3459 • Unsafe rewind support
3461 • Fix directory transversal.
3463 18.63 rr1-delta10
3465 • AVI: Sound mode 5 (48kHz high-quality)
3467 • Lua: Reset Lua VM
3469 • Map the SNES bus into address space
3471 • Fix loading memory watch files with CRLF line endings
3473 18.64 rr1-delta10epsilon1
3475 • Map bsnes internal state into memory space
3477 • Fix the “click on panel wedges the emulator” for real.
3479 • DnD movies/saves on the main window.
3481 18.65 rr1-delta11
3483 • Split core bindings into own module.
3485 • Remember invalid settings
3487 • Support for modified Gambatte core for GB/GBC emulation.
3489 • Reload/swap ROM function
3491 18.66 rr1-delta11epsilon1
3493 • Fix step poll function
3495 18.67 rr1-delta12
3497 • Non-insane savestate anchoring
3499 18.68 rr1-delta13
3501 • More Memory search methods
3503 • Preserve movie if loading in RO mode.
3505 • Fix a obscure case in timeline check
3507 • Revamp the entiere ROM loading code
3509 • Support DnD on ROMs
3511 • Revamp menu layout
3513 • Standalone hotkey config dialog
3515 • Show bindings in more user-friendly format
3517 18.69 rr1-delta13epsilon1
3519 • Pipedec support
3521 • Fix uninitialized variables in bsnes v085
3523 18.70 rr1-delta14
3525 • Merge gambatte core into mainline (from its own branch)
3527 • Wxwidgets: Show expected dump file formats
3529 • Memory watch: Data typing
3531 • lsnes internal MMIO area.
3533 • Wxwidgets: New memory watch editor
3535 • Hexadecimal memory watches
3537 • Wxwidgets: Monospaced panel
3539 • Wxwidgets: Split memory watches in panel
3541 • Wxwidgets: Disable VMAs in memory search
3543 • lsnes-dumpavi: Fix speed bug
3545 • Movie subtitle support
3547 • Fix rerecord count reporting
3549 • Don't trash movie when loading in readonly mode.
3551 18.71 rr1-delta14epsilon1
3553 • Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
3555 • Fix build on Mac OS X.
3557 • Lua: loopwrapper
3559 • Wxwidgets: Hidable messages window
3561 • Lua: input.joyset
3563 • Bsnes: Support inconsistent saves
3565 • Bsnes: Allow simulating saving every frame
3567 • Fix desync if savestate is loaded in readonly mode in certain 
3568   conditions.
3570 • Wxwidgets: Fix save dialogs on Mac OS X.
3572 • Wxwidgets: Fix insane status width on Win32.
3574 • Wxwidgets: Fix autohold processing to be faster.
3576 • Wxwidgets: Allow loading ROMs and movies from commandline.
3578 18.72 rr1-delta15
3580 • Be a bit smarter with --load
3582 • Rewrote higher-level parts of audio system
3584 • Tool to build commentary tracks
3586 • Lua: input.joyget
3588 • Gambatte: Add support for SVN358
3590 • Use builtin font when rendering status panel.
3592 • Option to detach memory watch to its own window.
3594 • Recent ROMs/Movies menu
3596 • Libao support
3598 • Useful lag counter for SNES games that autopoll
3600 • Fix buffer overflow in gambatte sound output
3602 18.73 rr1-delta15epsilon1
3604 • Don't blow up on wxGTK if the window is hidden somehow
3606 • Support simultaneous drop of ROM and movie.
3608 • Gambatte: Don't save spurious SRAMs.
3610 • Make SGB ROMs actually usable.
3612 • Fix so that saved movies appear in recent movies.
3614 • Don't open multiple commentary editors at once.
3616 18.74 rr1-delta15epsilon2
3618 • Lua: memory.readregion/memory.writeregion
3620 • Lua: memory.map{,s}{byte,word,dword,qword}
3622 • Lua: memory.map_structure
3624 • Lua: Fix bus_address for gambatte
3626 • Fix features dependent of bsnes debugger
3628 • Cleanup bsnes debugger logic
3630 • Fix resets in presence of save every frame
3632 18.75 rr1-delta15epsilon3
3634 • Lua: input.lcid_to_pcid
3636 • Fix off-by-one bug with slot hashes
3638 • Fix crashes on certain memory watch expressions
3640 • Lua: memory.read_expr
3642 • Lua: Fix memory.read_expr on nil argument
3644 • Fix the code to compile on G++ 4.7
3646 • Change button_id to be a function pointer field, not a virtual 
3647   method
3649 • Add bsnes patches to fix libsnes to compile on GCC 4.7
3651 • Gambatte: Always use legacy lag counting
3653 • Memory commands: Memory addresses are up to 16 hex digits, not 
3654   up to 8
3656 • Fix analog controllers
3658 • Fix autohold menus
3660 • Fix button symbols in input display
3662 • Compensate for nuts bsnes superscope/justifier handling
3664 • Lua: Fix bit.extract boolean handling
3666 18.76 rr1-delta16
3668 • Stop at movie end: Don't off-by-one
3670 • Fix crash closing lsnes with voice playback active.
3672 • Import/Export OggOpus for commentary tracks
3674 • 16-button controllers.
3676 • Don't show nonexistent controllers in input display
3678 • Set voice record/playback volume from UI
3680 • Patches for gambatte SVN364.
3682 • Load markup (if exists) even without gamepack file.
3684 • Screen rotation & flipping
3686 • Lua: Some new bit functions
3688 • Auto-refresh voice streams on change.
3690 • Auto-refresh subtitles on change & new subtitle editor.
3692 • Fix music volume adjustment.
3694 18.77 rr1-delta16epsilon1
3696 • Wxwidgets: Fix memory watch rendering.
3698 • Wxwidgets: Allow setting voice stream gain.
3700 • Wxwidgets: VU meters and volume adjustment.
3702 • Lua: Custom fonts support.
3704 • Lua: Fix methods stopping working when resetting Lua.
3706 • Fix loading standard-format movies in preserve (readonly) mode.