1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
6 \use_default_options true
7 \maintain_unincluded_children false
9 \language_package default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
23 \default_output_format default
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
38 \paperorientation portrait
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
52 \paperpagestyle default
53 \tracking_changes false
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
97 \begin_layout Enumerate
98 SVN r320, r358 or r364
101 \begin_layout Enumerate
102 Patched with included patches
106 \begin_layout Enumerate
110 \begin_layout Enumerate
114 \begin_layout Enumerate
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
122 \begin_layout Enumerate
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
142 \begin_layout Enumerate
143 libao (libao sound only)
146 \begin_layout Enumerate
147 Lua (if Lua support is needed) version 5.1.X or 5.2.X
150 \begin_layout Enumerate
154 \begin_layout Enumerate
155 libopus (optional, for commentary track tool)
158 \begin_layout Section
162 \begin_layout Itemize
163 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
167 \begin_layout Itemize
168 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
171 \begin_layout Itemize
172 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
176 \begin_layout Itemize
177 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
178 ersion>', gambatte core)
181 \begin_layout Itemize
182 Edit options.build (or copy of that file)
185 \begin_layout Itemize
186 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
190 \begin_layout Section
194 \begin_layout Subsection
198 \begin_layout Subsubsection
199 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
202 \begin_layout Standard
206 \begin_layout Subsubsection
207 <file> (lsnes/wxwidgets)
210 \begin_layout Standard
214 \begin_layout Subsection
218 \begin_layout Subsubsection
222 \begin_layout Standard
226 \begin_layout Subsubsection
227 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
230 \begin_layout Standard
231 Load <filename> as movie or savestate file.
232 All other session options are ignored.
235 \begin_layout Subsubsection
236 --port1=<device> (lsnes/SDL, bsnes core only)
239 \begin_layout Standard
244 \begin_layout Itemize
245 none: No device connected
248 \begin_layout Itemize
249 gamepad: One gamepad (the default)
252 \begin_layout Itemize
253 multitap: Four gamepads (warning: makes most games refuse to start)
256 \begin_layout Itemize
260 \begin_layout Subsubsection
261 --port2=<type> (lsnes/SDL, bsnes core only)
264 \begin_layout Standard
269 \begin_layout Itemize
270 none: No device connected (the default)
273 \begin_layout Itemize
277 \begin_layout Itemize
278 multitap: Four gamepads.
281 \begin_layout Itemize
285 \begin_layout Itemize
286 superscope: Super Scope
289 \begin_layout Itemize
290 justifier: One justifier
293 \begin_layout Itemize
294 justifiers: Two justifiers
297 \begin_layout Subsubsection
298 --gamename=<name> (lsnes/SDL)
301 \begin_layout Standard
302 Set the name of game to <name>.
306 \begin_layout Subsubsection
307 --author=<name> (lsnes/SDL)
310 \begin_layout Standard
311 Add author with full name of <name> (no nickname).
314 \begin_layout Subsubsection
315 --author=|<name> (lsnes/SDL)
318 \begin_layout Standard
319 Add author with nickname of <name> (no full name).
322 \begin_layout Subsubsection
323 --author=<fullname>|<nickname> (lsnes/SDL)
326 \begin_layout Standard
327 Add author with full name of <fullname> and nickname of <nickname>.
330 \begin_layout Subsubsection
331 --rtc-second=<value> (lsnes/SDL)
334 \begin_layout Standard
335 Set RTC second (0 is 1st January 1970 00:00:00Z).
336 Default is 1,000,000,000.
339 \begin_layout Subsubsection
340 --rtc-subsecond=<value> (lsnes/SDL)
343 \begin_layout Standard
350 \begin_layout Subsubsection
351 --anchor-savestate=<file> (lsnes/SDL)
354 \begin_layout Standard
355 Set the anchor savestate file.
358 \begin_layout Subsubsection
359 --load=<file> (lsnes/wxwidgets)
362 \begin_layout Standard
363 After loading the ROM, load <file> as savestate/movie.
366 \begin_layout Subsection
371 \begin_layout Subsubsection
372 --run=<file> (lsnes/SDL)
375 \begin_layout Standard
376 After running main RC file, run this file.
377 If multiple are specified, these execute in order specified.
380 \begin_layout Subsubsection
381 --lua=<file> (lsnes/wxwidgets)
384 \begin_layout Standard
385 Run this Lua file on startup
388 \begin_layout Subsection
389 dump options (lsnes-dumpavi only)
392 \begin_layout Subsubsection
396 \begin_layout Standard
397 Set the dumper to use (required).
398 Use 'list' for listing of known dumpers.
401 \begin_layout Subsubsection
405 \begin_layout Standard
406 Set the mode to use (required for dumpers with multiple modes, forbidden
408 Use 'list' for known modes.
411 \begin_layout Subsubsection
415 \begin_layout Standard
418 \begin_inset Quotes eld
422 \begin_inset Quotes erd
428 \begin_layout Subsubsection
429 --option=<name>=<value>
432 \begin_layout Standard
433 Set option <name> to value <value>.
436 \begin_layout Subsubsection
440 \begin_layout Standard
441 Set number of frames to dump.
445 \begin_layout Subsubsection
449 \begin_layout Standard
450 Run specified lua script (lsnes-dumpavi does not have initialization files).
453 \begin_layout Subsubsection
454 --load-library=<library>
457 \begin_layout Standard
458 Load the specified shared object / dynamic library / dynamic link library.
461 \begin_layout Section
462 Startup file lsnes.rc
465 \begin_layout Standard
466 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
467 This file is located in:
470 \begin_layout Itemize
475 lsnes.rc (if %APPDATA% exists)
478 \begin_layout Itemize
479 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
482 \begin_layout Itemize
483 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
486 \begin_layout Itemize
487 All: ./lsnes.rc (fallback default).
490 \begin_layout Standard
491 If leading directories do not exist, attempt to create them is made.
494 \begin_layout Section
498 \begin_layout Itemize
499 Commands beginning with '*' invoke the corresponding command without alias
503 \begin_layout Itemize
504 If command starts with '+' (after possible '*'), the command is executed
505 as-is when button is pressed, and when button is released, it is executed
506 with '+' replaced by '-'.
509 \begin_layout Itemize
510 Commands without '+' execute only on negative edge (release).
513 \begin_layout Subsection
517 \begin_layout Standard
518 Settings control various aspects of emulator behaviour.
521 \begin_layout Subsubsection
522 set-setting <setting> <value>
525 \begin_layout Standard
526 Sets setting <setting> to value <value> (may be empty).
529 \begin_layout Subsubsection
530 unset-setting <setting>
533 \begin_layout Standard
534 Try to unset setting <setting> (not all settings can be unset).
537 \begin_layout Subsubsection
538 get-setting <setting>
541 \begin_layout Standard
542 Read value of setting <setting>
545 \begin_layout Subsubsection
549 \begin_layout Standard
550 Print names and values of all settings.
553 \begin_layout Subsection
557 \begin_layout Standard
558 Keybindings bind commands or aliases to keys (or pseudo-keys).
562 \begin_layout Standard
566 \begin_layout Itemize
567 Do not bind edge active (+/-) commands to keys with modifiers, that won't
571 \begin_layout Itemize
572 Names of keys and modifiers are platform-dependent.
575 \begin_layout Itemize
576 Be careful before binding pseudo-keys (such as joystick axes, buttons or
577 hats) with modifiers.
578 That may or may not work right.
581 \begin_layout Subsubsection
582 bind-key [<mod>/<modmask>] <key> <command>
585 \begin_layout Standard
586 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
587 ed list) are set as <mod> (comma-seperated list).
590 \begin_layout Standard
591 The names of keys and modifiers are platform-dependent.
594 \begin_layout Subsubsection
595 unbind-key [<mod>/<modmask>] <key>
598 \begin_layout Standard
599 Unbind command from <key> (with specified <mod> and <modmask>).
602 \begin_layout Subsubsection
603 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
604 | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
605 [plus=<val>] [tolerance=<val>]
608 \begin_layout Standard
609 Set axis parameters for axis <axis>.
612 \begin_layout Itemize
613 disabled: Disable axis
616 \begin_layout Itemize
620 \begin_layout Itemize
621 axis-inverse: Inverse axis
624 \begin_layout Itemize
625 pressure0-: Pressure sensitive.
626 Released at 0, pressed at -.
629 \begin_layout Itemize
630 pressure0+: Pressure sensitive.
631 Released at 0, pressed at +.
634 \begin_layout Itemize
635 pressure-0: Pressure sensitive.
636 Released at -, pressed at 0.
639 \begin_layout Itemize
640 pressure-+: Pressure sensitive.
641 Released at -, pressed at +.
644 \begin_layout Itemize
645 pressure+0: Pressure sensitive.
646 Released at +, pressed at 0.
649 \begin_layout Itemize
650 pressure+-: Pressure sensitive.
651 Released at +, pressed at -.
654 \begin_layout Itemize
655 minus=<val>: Calibration at extreme minus position (-32768-32767)
658 \begin_layout Itemize
659 zero=<val>: Calibration at neutral position (-32768-32767)
662 \begin_layout Itemize
663 plus=<val>: Calibration at extreme plus position (-32768-32767)
666 \begin_layout Itemize
667 tolerance=<value>: Center band tolerance (0<x<1).
668 The smaller the value, the more sensitive the control is.
671 \begin_layout Subsubsection
675 \begin_layout Standard
676 Print all key bindings in effect.
679 \begin_layout Subsection
683 \begin_layout Standard
684 Aliases bind command to sequence of commands.
685 After alias has been defined, it replaces the command it shadows.
688 \begin_layout Standard
692 \begin_layout Itemize
693 You can't alias command to itself.
696 \begin_layout Itemize
697 Aliases starting with +/- are edge active just like ordinary commands starting
701 \begin_layout Itemize
702 One command can be aliased to multiple commands.
705 \begin_layout Subsubsection
706 alias-command <command> <expansion>
709 \begin_layout Standard
710 Append <expansion> to alias <command>.
711 If alias does not already exist, it is created.
714 \begin_layout Subsubsection
715 unalias-command <command>
718 \begin_layout Standard
719 Clear alias expansion for <command>.
722 \begin_layout Subsubsection
726 \begin_layout Standard
727 Print all aliases and their expansions in effect.
730 \begin_layout Subsection
734 \begin_layout Standard
735 Run <script> as if commands were entered on the command line.
738 \begin_layout Subsection
742 \begin_layout Standard
743 Following commands control video dumping:
746 \begin_layout Subsubsection
747 start-dump <dumper> [<mode>] <prefix/filename>
750 \begin_layout Standard
751 Start dumping using dumper <dumper>.
752 If mode is present or not and if prefix or filename is present depends
753 on the dumper and dumper mode.
756 \begin_layout Standard
757 The following dumpers are available:
760 \begin_layout Itemize
761 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
765 \begin_layout Itemize
766 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
770 \begin_layout Itemize
771 Mode: cscd/pcm: CSCD video, PCM audio.
776 \begin_layout Itemize
777 INTERNAL-JMD: Internal .jmd dumper.
781 \begin_layout Itemize
785 \begin_layout Itemize
790 \begin_layout Itemize
791 INTERNAL-RAW: Internal RAW dumper.
795 \begin_layout Itemize
799 \begin_layout Itemize
803 \begin_layout Itemize
804 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
807 \begin_layout Itemize
808 Video is always upscaled to double resolution (512x448 / 512 x 478).
811 \begin_layout Itemize
812 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
817 \begin_layout Itemize
818 INTERNAL-SDMP: Internal SDMP dumper.
822 \begin_layout Itemize
823 Mode 'ms': Multi-segment.
827 \begin_layout Itemize
828 Mode 'ss': Single-segment.
833 \begin_layout Subsubsection
837 \begin_layout Standard
838 End dumping using <dumper>
841 \begin_layout Subsubsection
842 show-dumpers [<dumper>]
845 \begin_layout Standard
846 Show the list of dumpers or list of modes for <dumper>
849 \begin_layout Subsection
853 \begin_layout Standard
854 <address> may be decimal or hexadecimal (prefixed with '0x').
855 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
859 \begin_layout Standard
860 The available element <sizes> are:
863 \begin_layout Itemize
867 \begin_layout Itemize
871 \begin_layout Itemize
875 \begin_layout Itemize
879 \begin_layout Standard
880 When reading RAM and ROM, multi-byte reads/writes are big-endian.
881 When dealing with DSP memory, multi-byte reads/writes are native-endian
882 (do not use operand sizes exceeding DSP bitness, except dword is OK for
886 \begin_layout Subsubsection
887 read-<size> <address>
890 \begin_layout Standard
891 Read the value of byte in <address>.
894 \begin_layout Subsubsection
895 read-s<size> <address>
898 \begin_layout Standard
899 Read the value of signed byte in <address>.
902 \begin_layout Subsubsection
903 write-<size> <address> <value>
906 \begin_layout Standard
907 Write <value> to byte in address <address>.
910 \begin_layout Subsubsection
914 \begin_layout Standard
915 Reset the memory search
918 \begin_layout Subsubsection
922 \begin_layout Standard
923 Print number of candidates remaining
926 \begin_layout Subsubsection
930 \begin_layout Standard
931 Print all candidates remaining
934 \begin_layout Subsubsection
935 search-memory <usflag><sizeflag><op>
938 \begin_layout Standard
939 Searches memory for addresses satisfying criteria.
942 \begin_layout Standard
946 \begin_layout Itemize
950 \begin_layout Itemize
954 \begin_layout Standard
958 \begin_layout Itemize
962 \begin_layout Itemize
966 \begin_layout Itemize
970 \begin_layout Itemize
974 \begin_layout Standard
978 \begin_layout Itemize
979 lt: < previous value.
982 \begin_layout Itemize
983 le: <= previous value.
986 \begin_layout Itemize
987 eq: = previous value.
990 \begin_layout Itemize
991 ne: != previous value.
994 \begin_layout Itemize
995 ge: >= previous value.
998 \begin_layout Itemize
999 gt: > previous value.
1002 \begin_layout Subsubsection
1003 search-memory <sizeflag> <value>
1006 \begin_layout Standard
1007 Searches for addresses that currently have value <value>.
1008 <sizeflag> is as in previous command.
1011 \begin_layout Subsection
1015 \begin_layout Standard
1016 These commands are not available in lsnesrc, but are available after ROM
1020 \begin_layout Subsubsection
1024 \begin_layout Standard
1025 Quits the emulator (asking for confirmation).
1026 If /y is given, no confirmation is asked.
1029 \begin_layout Subsubsection
1033 \begin_layout Standard
1034 Toggle paused/unpaused
1037 \begin_layout Subsubsection
1041 \begin_layout Standard
1043 If the button is still held after configurable timeout expires, game unpauses
1044 for the duration frame advance is held.
1047 \begin_layout Subsubsection
1051 \begin_layout Standard
1053 If the button is still held after configurable timeout expires, game unpauses
1054 for the duration frame advance is held.
1057 \begin_layout Subsubsection
1061 \begin_layout Standard
1062 Skip to first poll in frame after current.
1065 \begin_layout Subsubsection
1069 \begin_layout Standard
1070 Reset the SNES after this frame.
1073 \begin_layout Subsubsection
1077 \begin_layout Standard
1078 Load savestate <filename> in current mode.
1081 \begin_layout Subsubsection
1082 load-state <filename>
1085 \begin_layout Standard
1086 Load savestate <filename> in readwrite mode.
1089 \begin_layout Subsubsection
1090 load-readonly <filename>
1093 \begin_layout Standard
1094 Load savestate <filename> in readonly mode.
1097 \begin_layout Subsubsection
1098 load-preserve <filename>
1101 \begin_layout Standard
1102 Load savestate <filename> in readonly mode, preserving current events.
1105 \begin_layout Subsubsection
1106 load-movie <filename>
1109 \begin_layout Standard
1110 Load savestate <filename>, ignoring save part in readonly mode.
1113 \begin_layout Subsubsection
1114 save-state <filename>
1117 \begin_layout Standard
1118 Save system state to <filename> as soon as possible.
1121 \begin_layout Subsubsection
1122 save-movie <filename>
1125 \begin_layout Standard
1126 Save movie to <filename>.
1129 \begin_layout Subsubsection
1133 \begin_layout Standard
1134 Set read-write mode.
1137 \begin_layout Subsubsection
1141 \begin_layout Standard
1145 \begin_layout Subsubsection
1149 \begin_layout Standard
1150 Toggle between read-only and read-write modes.
1153 \begin_layout Subsubsection
1157 \begin_layout Standard
1158 Set name of the game to <name>
1161 \begin_layout Subsubsection
1165 \begin_layout Standard
1166 Print the name of the game.
1169 \begin_layout Subsubsection
1173 \begin_layout Standard
1174 Adds new author <author>.
1175 If <author> does not contain '|' it is full name.
1176 If it contains '|', '|' splits the full name and nickname.
1179 \begin_layout Subsubsection
1180 edit-author <num> <author>
1183 \begin_layout Standard
1184 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1188 \begin_layout Subsubsection
1192 \begin_layout Standard
1193 Remove author in slot <num>
1196 \begin_layout Subsubsection
1200 \begin_layout Standard
1204 \begin_layout Subsubsection
1205 test-1, test-2, test-3
1208 \begin_layout Standard
1209 Internal test commands.
1213 \begin_layout Subsubsection
1214 take-screenshot <filename>
1217 \begin_layout Standard
1218 Save screenshot to <filename>.
1221 \begin_layout Subsubsection
1222 +controller<num><button>
1225 \begin_layout Standard
1226 Press button <button> on controller <num> (1-8).
1227 The following button names are known:
1230 \begin_layout Itemize
1234 \begin_layout Itemize
1238 \begin_layout Itemize
1242 \begin_layout Itemize
1246 \begin_layout Itemize
1250 \begin_layout Itemize
1254 \begin_layout Itemize
1258 \begin_layout Itemize
1262 \begin_layout Itemize
1266 \begin_layout Itemize
1270 \begin_layout Itemize
1274 \begin_layout Itemize
1278 \begin_layout Itemize
1282 \begin_layout Itemize
1286 \begin_layout Itemize
1290 \begin_layout Itemize
1294 \begin_layout Subsubsection
1295 controllerh<num><button>
1298 \begin_layout Standard
1299 Hold/unhold button <button> on controller <num> (1-8).
1300 See +controller for button names.
1303 \begin_layout Subsubsection
1304 controllerf<num><button>
1307 \begin_layout Standard
1308 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1309 See +controller for button names.
1312 \begin_layout Standard
1313 Cauntion: Does not work properly if outside frame advance.
1316 \begin_layout Subsubsection
1317 autofire (<pattern>|-)...
1320 \begin_layout Standard
1321 Set autofire pattern.
1322 Each parameter is comma-separated list of button names (in form of 1start,
1323 1A, 2B, etc..) to hold on that frame.
1324 After reaching the end of pattern, the pattern restarts from the beginning.
1327 \begin_layout Subsubsection
1331 \begin_layout Standard
1335 \begin_layout Subsection
1339 \begin_layout Subsubsection
1340 cycle-jukebox-backward
1343 \begin_layout Standard
1344 Cycle save jukebox backwards.
1347 \begin_layout Subsubsection
1348 cycle-jukebox-forward
1351 \begin_layout Standard
1352 Cycle save jukebox forwards
1355 \begin_layout Subsubsection
1359 \begin_layout Standard
1360 Do load from jukebox (current mode).
1363 \begin_layout Subsubsection
1367 \begin_layout Standard
1368 Do state save to jukebox.
1371 \begin_layout Subsection
1375 \begin_layout Standard
1376 Only available if lua support is compiled in.
1379 \begin_layout Subsubsection
1380 evaluate-lua <luacode>
1383 \begin_layout Standard
1384 Run Lua code <luacode> using built-in Lua interpretter.
1387 \begin_layout Subsubsection
1391 \begin_layout Standard
1392 Run specified lua file using built-in Lua interpretter.
1395 \begin_layout Subsubsection
1399 \begin_layout Standard
1400 Clear the Lua VM state and restore to factory defaults.
1403 \begin_layout Subsection
1407 \begin_layout Subsubsection
1408 add-watch <name> <expression>
1411 \begin_layout Standard
1412 Adds new watch (or modifies old one).
1415 \begin_layout Subsubsection
1419 \begin_layout Standard
1423 \begin_layout Subsection
1427 \begin_layout Subsubsection
1428 enable-sound <on/off>
1431 \begin_layout Standard
1432 Enable/Disable sound.
1435 \begin_layout Subsubsection
1436 set-sound-device <device>
1439 \begin_layout Standard
1440 Set sound device to <device>
1443 \begin_layout Subsubsection
1447 \begin_layout Standard
1448 Show status of sound system.
1451 \begin_layout Subsubsection
1455 \begin_layout Standard
1456 Show all available devices.
1459 \begin_layout Subsubsection
1460 set-volume <multiplier>
1463 \begin_layout Standard
1464 Set the volume multiplier to <multiplier>.
1465 1 is normal volume, and higher numbers are louder.
1468 \begin_layout Subsubsection
1469 set-volume <multiplier>%
1472 \begin_layout Standard
1473 Set the volume multiplier to <multiplier> percent.
1474 100 is normal volume, and higher numbers are louder.
1477 \begin_layout Subsubsection
1478 set-volume <multiplier>dB
1481 \begin_layout Standard
1482 Set the volume multiplier to <multiplier> dB.
1483 0 is normal volume, and higher numbers are louder.
1484 The value may be negative.
1487 \begin_layout Subsection
1491 \begin_layout Subsubsection
1495 \begin_layout Standard
1496 Reloads the main ROM image from <file>.
1499 \begin_layout Subsubsection
1500 edit-subtitle <firstframe> <length> [<text>]
1503 \begin_layout Standard
1504 Edit or delete a subtitle.
1507 \begin_layout Subsubsection
1511 \begin_layout Standard
1515 \begin_layout Subsection
1519 \begin_layout Subsubsection
1523 \begin_layout Standard
1527 \begin_layout Subsubsection
1531 \begin_layout Standard
1535 \begin_layout Subsubsection
1539 \begin_layout Standard
1543 \begin_layout Subsubsection
1544 change-timebase <id> <newbase>
1547 \begin_layout Standard
1548 Change time base of <id> to <newbase>.
1549 The time base can be given as samples (integer) or second (postfix with
1553 \begin_layout Subsubsection
1554 import-stream-opus <timebase> <file>
1557 \begin_layout Standard
1558 Import opus stream from <file>, placing it at <timebase>.
1559 This operation is lossless.
1562 \begin_layout Subsubsection
1563 import-stream-pcm <timebase> <file>
1566 \begin_layout Standard
1567 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at <timebase>.
1570 \begin_layout Subsubsection
1571 export-stream-opus <id> <file>
1574 \begin_layout Standard
1575 Export stream <id> as opus stream to <file>.
1576 This operation is lossless.
1579 \begin_layout Subsubsection
1580 export-stream-pcm <id> <file>
1583 \begin_layout Standard
1584 Export stream <id> as PCM (.sox) stream to <file>.
1588 \begin_layout Subsubsection
1589 export-superstream <file>
1592 \begin_layout Standard
1593 Export the entiere superstream as PCM (.sox) stream to <file>.
1596 \begin_layout Subsubsection
1597 load-collection <file>
1600 \begin_layout Standard
1601 Load collection (if there is existing collection, unload it) from <file>
1604 \begin_layout Subsubsection
1608 \begin_layout Standard
1612 \begin_layout Subsubsection
1616 \begin_layout Standard
1617 Tangent for recording voice for commentary track.
1618 While pressed, record a stream.
1621 \begin_layout Subsection
1622 SDL Platform commands
1625 \begin_layout Standard
1626 The following are valid on SDL platform.
1629 \begin_layout Subsubsection
1633 \begin_layout Standard
1634 Asks to press a key and then identifies that (pseudo-)key.
1637 \begin_layout Subsubsection
1641 \begin_layout Standard
1642 Toggle between windowed/fullscreen console.
1645 \begin_layout Subsubsection
1649 \begin_layout Standard
1650 Scroll messages window as far back as it goes.
1653 \begin_layout Subsubsection
1657 \begin_layout Standard
1658 Scroll messages window as far forward as it goes.
1661 \begin_layout Subsubsection
1665 \begin_layout Standard
1666 Scroll messages window back one screenful.
1669 \begin_layout Subsubsection
1673 \begin_layout Standard
1674 Scroll messages window forward one screenful.
1677 \begin_layout Subsubsection
1678 prompt-command <command>
1681 \begin_layout Standard
1682 Enter command prompt, with prompt prepopulated with specified command.
1685 \begin_layout Section
1689 \begin_layout Subsection
1693 \begin_layout Subsubsection
1697 \begin_layout Standard
1698 Set where bsnes looks for firmware files.
1700 \begin_inset Quotes eld
1704 \begin_inset Quotes erd
1710 \begin_layout Subsubsection
1714 \begin_layout Standard
1716 Numeric, range is 0.001 to
1717 \begin_inset Quotes eld
1721 \begin_inset Quotes erd
1725 Default is native framerate.
1728 \begin_layout Subsubsection
1732 \begin_layout Standard
1733 Set save compression level (integer 0-9).
1734 Default is 7 (0 is no compression).
1737 \begin_layout Subsubsection
1741 \begin_layout Standard
1742 Set the frame advance timeout in milliseconds.
1743 Numeric integer, range is 0-999999999.
1747 \begin_layout Subsubsection
1748 allow-inconsistent-saves (bsnes only)
1751 \begin_layout Standard
1752 If true, save without synchronization.
1753 Makes games seriously unstable.
1756 \begin_layout Subsubsection
1757 save-every-frame (bsnes only)
1760 \begin_layout Standard
1761 If true, simulate saving on each frame.
1762 Trades off emulation accuracy for sync stability.
1763 Also needed if the movie assumes saving on each frame for rewind.
1766 \begin_layout Subsection
1770 \begin_layout Subsubsection
1774 \begin_layout Standard
1775 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1779 \begin_layout Subsubsection
1783 \begin_layout Standard
1784 AVI dumper: Set the default left border thickness (unless lua overrides)
1790 \begin_layout Subsubsection
1794 \begin_layout Standard
1795 AVI dumper: Set the default right border thickness (unless lua overrides)
1801 \begin_layout Subsubsection
1805 \begin_layout Standard
1806 AVI dumper: Set the default top border thickness (unless lua overrides)
1812 \begin_layout Subsubsection
1816 \begin_layout Standard
1817 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1823 \begin_layout Subsubsection
1827 \begin_layout Standard
1828 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1833 \begin_layout Subsubsection
1837 \begin_layout Standard
1838 AVI dumper: Compression level (0-18).
1841 \begin_layout Itemize
1842 Compression levels 10 and above are not compatible with stock CSCD codec.
1845 \begin_layout Itemize
1846 Recomended level is 7.
1849 \begin_layout Subsubsection
1853 \begin_layout Standard
1854 AVI dumper: Set method of determining the sound rate.
1857 \begin_layout Itemize
1858 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1859 128, 176.4 and 192 kHz.
1862 \begin_layout Itemize
1863 1: Round down to nearest integer.
1866 \begin_layout Itemize
1867 2: Round up to nearest ingeter.
1870 \begin_layout Subsection
1874 \begin_layout Subsubsection
1878 \begin_layout Standard
1879 JMD dumper: Compression level (0-9).
1882 \begin_layout Subsection
1883 SDL platform settings
1886 \begin_layout Subsubsection
1887 autorepeat-first-delay
1890 \begin_layout Standard
1891 Sets the delay for first character in typematic autorepeat.
1894 \begin_layout Subsubsection
1895 autorepeat-subsequent-delay
1898 \begin_layout Standard
1899 Sets the delay for subsequent characters in typematic autorepeat.
1902 \begin_layout Section
1906 \begin_layout Subsection
1907 Core (in main table)
1910 \begin_layout Subsubsection
1914 \begin_layout Standard
1915 Print line to message console.
1918 \begin_layout Subsubsection
1919 exec(string command)
1922 \begin_layout Standard
1923 Run command as it was entered on the command line
1926 \begin_layout Subsubsection
1930 \begin_layout Standard
1932 First is time since some epoch in seconds, the second is microseconds mod
1933 10^6 since that epoch.
1936 \begin_layout Subsubsection
1940 \begin_layout Standard
1941 Returns true if emulator has finished booting, false if not (on_startup()
1942 will be issued later).
1945 \begin_layout Subsubsection
1946 set_idle_timeout(number timeout)
1949 \begin_layout Standard
1950 Set number of microseconds to block idle for.
1951 After this timeout has expired, on_idle() will be called once.
1954 \begin_layout Subsubsection
1955 set_timer_timeout(number timeout)
1958 \begin_layout Standard
1959 Set number of microseconds to block timer for.
1960 After this timeout has expired, on_timer() will be called once.
1963 \begin_layout Subsubsection
1964 bus_address(number snesaddr)
1967 \begin_layout Standard
1968 Returns virtual address corresponding to specified address on SNES bus.
1971 \begin_layout Subsubsection
1972 loopwrapper(function fun, ...)
1975 \begin_layout Standard
1976 Calls function fun with function and specified arguments.
1977 The function passed suspends execution until the function returned is called.
1978 Handy for linear flow control among multiple invocations of a hook.
1982 \begin_layout LyX-Code
1983 on_paint = loopwrapper(function(wait)
1987 \begin_layout LyX-Code
1992 \begin_layout LyX-Code
1994 \begin_inset Quotes eld
1998 \begin_inset Quotes erd
2004 \begin_layout LyX-Code
2009 \begin_layout LyX-Code
2014 \begin_layout LyX-Code
2018 \begin_layout Subsubsection
2019 list_bindings([string cmd])
2022 \begin_layout Standard
2023 Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
2024 If command is specified, the table is limited to that command.
2027 \begin_layout Subsubsection
2028 get_alias(string aname)
2031 \begin_layout Standard
2032 Get expansion of given alias.
2035 \begin_layout Subsubsection
2036 set_alias(string aname, string value)
2039 \begin_layout Standard
2040 Set expansion of given alias.
2043 \begin_layout Subsubsection
2044 create_ibind(string name, string cmd)
2047 \begin_layout Standard
2048 Return object representing inverse binding with specified name and specified
2052 \begin_layout Itemize
2053 To create press/release commands, use aliases +foo and -foo .
2056 \begin_layout Itemize
2057 Keep the returned object around.
2060 \begin_layout Subsection
2064 \begin_layout Standard
2065 Bitwise logical functions and related.
2068 \begin_layout Subsubsection
2069 bit.none(number...) / bit.bnot(number...)
2072 \begin_layout Standard
2073 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2077 \begin_layout Subsubsection
2078 bit.any(number...) / bit.bor(number...)
2081 \begin_layout Standard
2082 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2085 \begin_layout Subsubsection
2086 bit.all(number...) / bit.band(number...)
2089 \begin_layout Standard
2090 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2094 \begin_layout Subsubsection
2095 bit.parity(number...) / bit.bxor(number...)
2098 \begin_layout Standard
2099 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2103 \begin_layout Subsubsection
2104 bit.lrotate(number base[, number amount[, number bits]])
2107 \begin_layout Standard
2108 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2111 \begin_layout Subsubsection
2112 bit.rrotate(number base[, number amount[, number bits]])
2115 \begin_layout Standard
2116 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2120 \begin_layout Subsubsection
2121 bit.lshift(number base[, number amount[, number bits]])
2124 \begin_layout Standard
2125 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2126 The new bits are filled with zeroes.
2129 \begin_layout Subsubsection
2130 bit.lrshift(number base[, number amount[, number bits]])
2133 \begin_layout Standard
2134 Shift bits-bit (max 48, default 48) number logically right by amount (default
2136 The new bits are filled with zeroes.
2139 \begin_layout Subsubsection
2140 bit.arshift(number base[, number amount[, number bits]])
2143 \begin_layout Standard
2144 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2146 The new bits are shifted in with copy of the high bit.
2149 \begin_layout Subsubsection
2150 bit.extract(number base[, number bit0[, number bit1,...]])
2153 \begin_layout Standard
2154 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2157 \begin_layout Standard
2161 \begin_layout Itemize
2162 Bit numbers up to 51 should work reliably (then things start falling apart
2163 due to double precision issues).
2166 \begin_layout Itemize
2167 There are two special bit positions, true and false, standing for always
2168 set bit and always clear bit.
2171 \begin_layout Subsubsection
2172 bit.value([number bit1[, number bit2,...]])
2175 \begin_layout Standard
2176 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2178 As special value, nil argument is no-op.
2181 \begin_layout Subsubsection
2182 bit.test_any(number a, number b)
2185 \begin_layout Standard
2186 Is there a common set bit in a and b?
2189 \begin_layout Subsubsection
2190 bit.test_all(number a, number b)
2193 \begin_layout Standard
2194 Are all set bits in b also set in a?
2197 \begin_layout Subsubsection
2198 bit.popcount(number a)
2201 \begin_layout Standard
2202 Population count of a.
2205 \begin_layout Subsubsection
2206 bit.clshift(number a, number b, [number amount,[number bits]])
2209 \begin_layout Standard
2210 Does chained left shift on a, b by amount positions, assuming numbers to
2211 be of specified number of bits.
2214 \begin_layout Subsubsection
2215 bit.crshift(number a, number b, [number amount,[number bits]])
2218 \begin_layout Standard
2219 Does chained right shift on a, b by amount positions, assuming numbers to
2220 be of specified number of bits.
2223 \begin_layout Subsubsection
2224 bit.flagdecode(number a, number bits, [string on, [string off]])
2227 \begin_layout Standard
2228 Return string of length bits where ith character is ith character of on
2229 if bit i is on, otherwise ith character of off.
2230 Out of range reads give last character, or '*'/'-' if empty.
2233 \begin_layout Subsubsection
2234 bit.rflagdecode(number a, number bits, [string on, [string off]])
2237 \begin_layout Standard
2238 Like bit.flagdecode, but outputs the string in the opposite order (most significa
2242 \begin_layout Subsection
2246 \begin_layout Standard
2247 Most of these functions can only be called in on_paint and on_video callbacks.
2248 Exceptions are noted.
2251 \begin_layout Standard
2253 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2254 16-23 are the red component, bits 24-31 are alpha component (0 is fully
2255 opaque, 255 is almost transparent).
2256 -1 is the fully transparent color.
2257 Alpha values greater than 127 do work.
2260 \begin_layout Standard
2261 Origin of coordinates is at top left corner of game display area.
2262 Left and top gaps correspond to negative coordinates.
2265 \begin_layout Subsubsection
2269 \begin_layout Standard
2270 Returns 2-tuple (hresolution, vresolution).
2273 \begin_layout Subsubsection
2274 gui.<class>_gap(number gap)
2277 \begin_layout Standard
2278 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2282 \begin_layout Subsubsection
2283 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2286 \begin_layout Standard
2287 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2292 \begin_layout Itemize
2293 x: X-coordinate to start the drawing from (and x-coordinate at begining
2297 \begin_layout Itemize
2298 y: Y-coordinate to start the drawing from.
2301 \begin_layout Itemize
2302 text: The text to draw.
2305 \begin_layout Itemize
2306 fgc: Text color (default is 0xFFFFFF (white))
2309 \begin_layout Itemize
2310 bgc: Background color (default is -1 (transparent))
2313 \begin_layout Subsubsection
2314 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2317 \begin_layout Standard
2318 Like gui.text, but draw using double-width.
2321 \begin_layout Subsubsection
2322 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2325 \begin_layout Standard
2326 Like gui.text, but draw using double-height.
2329 \begin_layout Subsubsection
2330 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2333 \begin_layout Standard
2334 Like gui.text, but draw using double-width/double-height.
2337 \begin_layout Subsubsection
2338 gui.rectangle(number x, number y, number width, number height[, number thickness[
2339 , number outline[, number fill]]])
2342 \begin_layout Standard
2343 Draw rectangle on the GUI.
2347 \begin_layout Itemize
2348 x: X-coordinate of left edge.
2351 \begin_layout Itemize
2352 y: Y-coordinate of upper edge.
2355 \begin_layout Itemize
2356 width: Width of rectangle.
2359 \begin_layout Itemize
2360 height: Height of rectangle.
2363 \begin_layout Itemize
2364 thickness: Thickness of outline (default is 1).
2367 \begin_layout Itemize
2368 outline: Color of outline (default is 0xFFFFFF (white))
2371 \begin_layout Itemize
2372 fill: Color of fill (default is -1 (transparent))
2375 \begin_layout Subsubsection
2376 gui.box(number x, number y, number width, number height[, number thickness[,
2377 number outline1[,number outline2[, number fill]]]])
2380 \begin_layout Standard
2381 Draw rectangle with 3D effect on the GUI.
2385 \begin_layout Itemize
2386 x: X-coordinate of left edge.
2389 \begin_layout Itemize
2390 y: Y-coordinate of upper edge.
2393 \begin_layout Itemize
2394 width: Width of rectangle.
2397 \begin_layout Itemize
2398 height: Height of rectangle.
2401 \begin_layout Itemize
2402 thickness: Thickness of outline (default is 1).
2405 \begin_layout Itemize
2406 outline1: First color of outline (default is 0xFFFFFF (white))
2409 \begin_layout Itemize
2410 outline2: First color of outline (default is 0x808080 (dark gray))
2413 \begin_layout Itemize
2414 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2417 \begin_layout Subsubsection
2418 gui.pixel(number x, number y[, number color])
2421 \begin_layout Standard
2422 Draw one pixel on the GUI.
2426 \begin_layout Itemize
2427 x: X-coordinate of the pixel
2430 \begin_layout Itemize
2431 y: Y-coordinate of the pixel
2434 \begin_layout Itemize
2435 color: Color of the pixel (default is 0xFFFFFF (white))
2438 \begin_layout Subsubsection
2439 gui.crosshair(number x, number y[, number length[, number color]])
2442 \begin_layout Standard
2447 \begin_layout Itemize
2448 x: X-coordinate of the crosshair
2451 \begin_layout Itemize
2452 y: Y-coordinate of the crosshair
2455 \begin_layout Itemize
2456 length: Length of the crosshair lines (default 10).
2459 \begin_layout Itemize
2460 color: Color of the crosshair (default is 0xFFFFFF (white))
2463 \begin_layout Subsubsection
2464 gui.line(number x1, number y1, number x2, number y2[, number color])
2467 \begin_layout Standard
2472 \begin_layout Itemize
2473 x1: X-coordinate of one end.
2476 \begin_layout Itemize
2477 y1: Y-coordinate of one end.
2480 \begin_layout Itemize
2481 x2: X-coordinate of the other end.
2484 \begin_layout Itemize
2485 y2: Y-coordinate of the other end.
2488 \begin_layout Itemize
2489 color: Color of the line (default is 0xFFFFFF (white)).
2492 \begin_layout Subsubsection
2493 gui.circle(number x, number y, number r[, number thick[, number border[,
2497 \begin_layout Standard
2502 \begin_layout Itemize
2503 x: X-coordinate of the center
2506 \begin_layout Itemize
2507 y: Y-coordinate of the center
2510 \begin_layout Itemize
2511 r: The radius of the circle
2514 \begin_layout Itemize
2515 thick: Border thickness
2518 \begin_layout Itemize
2519 border: Border color (default is 0xFFFFFF (white))
2522 \begin_layout Itemize
2523 fill: Fill color (default is -1 (transparent)).
2526 \begin_layout Subsubsection
2527 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2530 \begin_layout Standard
2531 Draw a bitmap on screen with specified palette.
2535 \begin_layout Itemize
2536 x: X-coordinate of left edge.
2539 \begin_layout Itemize
2540 y: Y-coordinate of top edge.
2543 \begin_layout Itemize
2544 bitmap: The bitmap to draw
2547 \begin_layout Itemize
2548 palette: The palette to draw the bitmap using.
2551 \begin_layout Subsubsection
2552 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2555 \begin_layout Standard
2556 Draw a bitmap on screen.
2560 \begin_layout Itemize
2561 x: X-coordinate of left edge.
2564 \begin_layout Itemize
2565 y: Y-coordinate of top edge.
2568 \begin_layout Itemize
2569 bitmap: The bitmap to draw
2572 \begin_layout Subsubsection
2576 \begin_layout Standard
2577 Returns a new palette (initially all transparent).
2578 Can be used anywhere.
2581 \begin_layout Subsubsection
2582 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2585 \begin_layout Standard
2586 Returns a new bitmap/dbitmap.
2587 Can be used anywhere.
2591 \begin_layout Itemize
2592 w: The width of new bitmap
2595 \begin_layout Itemize
2596 h: The height of new bitmap
2599 \begin_layout Itemize
2600 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2603 \begin_layout Itemize
2604 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2607 \begin_layout Subsubsection
2608 gui.bitmap_load(string file)
2611 \begin_layout Standard
2612 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2614 Can be used anywhere.
2618 \begin_layout Itemize
2619 file: The name of file to load.
2622 \begin_layout Subsubsection
2623 gui.palette_set(palette palette, number index, number color)
2626 \begin_layout Standard
2627 Sets color in palette.
2628 Can be used anywhere.
2632 \begin_layout Itemize
2633 palette: The palette to manipulate
2636 \begin_layout Itemize
2637 index: Index of color (0-65535).
2640 \begin_layout Itemize
2641 color: The color value.
2644 \begin_layout Subsubsection
2645 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2648 \begin_layout Standard
2649 Sets specified pixel in bitmap.
2650 Can be used anywhere.
2654 \begin_layout Itemize
2655 bitmap: The bitmap to manipulate
2658 \begin_layout Itemize
2659 x: The x-coordinate of the pixel.
2662 \begin_layout Itemize
2663 y: The y-coordinate of the pixel.
2666 \begin_layout Itemize
2667 color: If bitmap is a bitmap, color index (0-65535).
2668 Otherwise color value.
2671 \begin_layout Subsubsection
2672 gui.bitmap_size(bitmap/dbitmap bitmap)
2675 \begin_layout Standard
2677 Can be used anywhere.
2681 \begin_layout Itemize
2682 bitmap: The bitmap to query.
2685 \begin_layout Standard
2686 The first return is the width, the second is the height.
2689 \begin_layout Subsubsection
2690 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2691 src, number sx, number sy, number w, number h[, number ck])
2694 \begin_layout Standard
2695 Blit a part of bitmap to another.
2696 Can be used anywhere.
2700 \begin_layout Itemize
2701 dest: Destination to blit to.
2704 \begin_layout Itemize
2705 dx: left edge of target
2708 \begin_layout Itemize
2709 dy: Top edge of target
2712 \begin_layout Itemize
2713 src: The source to blit from.
2714 Must be of the same type as destination.
2717 \begin_layout Itemize
2718 sx: left edge of source
2721 \begin_layout Itemize
2722 sy: Top edge of source
2725 \begin_layout Itemize
2729 \begin_layout Itemize
2730 h: Height of region.
2733 \begin_layout Itemize
2735 Pixels of this color are not blitted.
2739 \begin_layout Itemize
2740 If bitmaps are bitmaps, this is color index of colorkey.
2741 Values outside range 0-65535 cause no key to be used as colorkey.
2744 \begin_layout Itemize
2745 If bitmaps are dbitmaps, this color value of colorkey.
2748 \begin_layout Itemize
2749 May be absent or nil for no colorkey blit.
2753 \begin_layout Subsubsection
2757 \begin_layout Standard
2758 Request on_repaint() to happen as soon as possible.
2759 Can be used anywhere.
2762 \begin_layout Subsubsection
2763 gui.subframe_update(boolean on)
2766 \begin_layout Standard
2767 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2768 or not happen (on=false).
2769 Can be used anywhere.
2772 \begin_layout Subsubsection
2773 gui.screenshot(string filename)
2776 \begin_layout Standard
2777 Write PNG screenshot of the current frame (no drawings) to specified file.
2778 Can be used anywhere.
2781 \begin_layout Subsubsection
2782 gui.color(number r, number g, number b[, number a])
2785 \begin_layout Standard
2786 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2787 each component in scale 0-255.
2788 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2790 The default alpha is 256.
2793 \begin_layout Subsubsection
2794 gui.status(string name, string value)
2797 \begin_layout Standard
2799 \begin_inset Quotes eld
2803 \begin_inset Quotes erd
2806 to <value> in status area.
2807 Can be used anywhere.
2810 \begin_layout Subsubsection
2811 gui.rainbow(number step, number steps[, number color])
2814 \begin_layout Standard
2815 Perform hue rotation of color <color> (default bright red), by <step> steps.
2816 The number of steps per full rotation is given by absolute value of <steps>.
2819 \begin_layout Standard
2820 If <steps> is negative, the rotation will be counterclockwise.
2823 \begin_layout Subsubsection
2824 gui.screenshot(string filename)
2827 \begin_layout Standard
2828 Saves a screenshot into specified file.
2831 \begin_layout Subsubsection
2832 gui.loadfont(string filename)
2835 \begin_layout Standard
2836 Loads font from specified file (CUSTOMFONT object).
2839 \begin_layout Subsubsection
2840 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc]])
2843 \begin_layout Standard
2844 Draw string with custom font to screen.
2845 The parameters are the same as in gui.text.
2848 \begin_layout Subsection
2852 \begin_layout Standard
2854 Only available in on_input callback.
2857 \begin_layout Subsubsection
2858 input.get(number controller, number index)
2861 \begin_layout Standard
2862 Read the specified index (0-11) from specified controller (0-7).
2866 \begin_layout Itemize
2867 Uses physical controller numbering.
2868 Gamepad in port 2 is controller 4, not 1!
2871 \begin_layout Subsubsection
2872 input.set(number controller, number index, number value)
2875 \begin_layout Standard
2876 Write the specified index (0-11) from specified controller (0-7), storing
2881 \begin_layout Itemize
2882 Uses physical controller numbering.
2883 Gamepad in port 2 is controller 4, not 1!
2886 \begin_layout Subsubsection
2887 input.get2(number port, number controller, number index)
2890 \begin_layout Standard
2891 Read the specified input tuple.
2894 \begin_layout Itemize
2895 Port 0 is system port.
2898 \begin_layout Subsubsection
2899 input.set2(number port, number controller, number index, number value)
2902 \begin_layout Standard
2903 Write the specified input tuple.
2906 \begin_layout Itemize
2907 Port 0 is system port.
2910 \begin_layout Subsubsection
2911 input.lcid_to_pcid2(number lcid)
2914 \begin_layout Standard
2915 Look up physical pcid pair (port, controller) corresponding to specified
2916 logical controller (1-based).
2917 Returns nothing if controller does not exist.
2920 \begin_layout Subsubsection
2921 input.port_type(number port)
2924 \begin_layout Standard
2925 Return type of specified port.
2928 \begin_layout Subsubsection
2929 input.controller_info(number port, number controller)
2932 \begin_layout Standard
2933 Get controller info for specified controller.
2934 If controller does not exist, returns nil.
2935 Otherwise returns a table with following fields:
2938 \begin_layout Itemize
2939 type (string): Type of the controller.
2942 \begin_layout Itemize
2943 class (string): Class of the controller.
2946 \begin_layout Itemize
2947 classnum (number): Number of the controller within its class (1-based)
2950 \begin_layout Itemize
2951 lcid (number): Logical controller number of the controller.
2954 \begin_layout Itemize
2955 button_count (number): Number of buttons on controller
2958 \begin_layout Itemize
2959 buttons (array): Array of following info about each button:
2963 \begin_layout Itemize
2964 type (string): Type of button.
2966 \begin_inset Quotes eld
2970 \begin_inset Quotes erd
2974 \begin_inset Quotes eld
2978 \begin_inset Quotes erd
2982 \begin_inset Quotes eld
2986 \begin_inset Quotes erd
2990 \begin_inset Quotes eld
2994 \begin_inset Quotes erd
3000 \begin_layout Itemize
3001 name (string): Name of button.
3004 \begin_layout Itemize
3005 symbol (string): Symbol of button.
3006 Only present for type
3007 \begin_inset Quotes eld
3011 \begin_inset Quotes erd
3017 \begin_layout Itemize
3018 hidden (boolean): True if hidden button.
3023 \begin_layout Subsubsection
3027 \begin_layout Standard
3028 Signals that the button event should be vetoed.
3029 Only valid in on_button callback.
3032 \begin_layout Subsubsection
3033 input.geta(number controller)
3036 \begin_layout Standard
3037 Get input state for entiere controller.
3038 Returns 13 return values.
3041 \begin_layout Itemize
3042 1st return value: Bitmask: bit i is set if i:th index is nonzero
3045 \begin_layout Itemize
3046 2nd-13th return value: value of i:th index.
3049 \begin_layout Subsubsection
3050 input.seta(number controller, number bitmask, number args...)
3053 \begin_layout Standard
3054 Set state for entiere controller.
3055 args is up to 12 values for indices (overriding values in bitmask if specified).
3058 \begin_layout Subsubsection
3059 input.controllertype(number controller)
3062 \begin_layout Standard
3063 Get the type of controller as string.
3067 \begin_layout Itemize
3071 \begin_layout Itemize
3075 \begin_layout Itemize
3079 \begin_layout Itemize
3083 \begin_layout Subsubsection
3084 input.reset([number cycles])
3087 \begin_layout Standard
3089 If cycles is greater than zero, do delayed reset.
3090 0 (or no value) causes immediate reset.
3093 \begin_layout Itemize
3094 Only available with subframe flag false.
3097 \begin_layout Subsubsection
3101 \begin_layout Standard
3102 Returns table of tables of all available keys and axes.
3103 The first table is indexed by key name (platform-dependent!), and the inner
3104 table has the following fields:
3107 \begin_layout Itemize
3108 last_rawval: Last reported raw value for control.
3111 \begin_layout Itemize
3112 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
3113 pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
3116 \begin_layout Itemize
3117 cal_left: Minimum calibration value.
3118 Only meaningful with axis and pressure types.
3121 \begin_layout Itemize
3122 cal_center: Center calibration value.
3123 Only meaningful with axis and pressure types.
3126 \begin_layout Itemize
3127 cal_right: Maximum calibration value.
3128 Only meaningful with axis and pressure types.
3131 \begin_layout Itemize
3132 cal_tolerance: Dead zone tolerance.
3133 Only meaningful with axis and pressure types.
3136 \begin_layout Subsubsection
3137 input.keyhook(string key, boolean state)
3140 \begin_layout Standard
3141 Requests that keyhook events to be sent for key (state=true) or not sent
3145 \begin_layout Subsubsection
3146 input.joyget(number controller)
3149 \begin_layout Standard
3150 Returns table for current controls for specified controller.
3151 The names of fields vary by controller type.
3154 \begin_layout Itemize
3155 The buttons have the same name as those are referred to in other contexts
3159 \begin_layout Itemize
3161 \begin_inset Quotes eld
3165 \begin_inset Quotes erd
3169 \begin_inset Quotes eld
3173 \begin_inset Quotes erd
3179 \begin_layout Subsubsection
3180 input.joyset(number controller, table controls)
3183 \begin_layout Standard
3184 Set the the state of specified controller to values specified in specified
3188 \begin_layout Itemize
3189 nil does not change value
3192 \begin_layout Itemize
3193 true/false (buttons) and integers (axes) force value.
3196 \begin_layout Itemize
3197 string (button) inverts the input.
3200 \begin_layout Subsubsection
3201 input.lcid_to_pcid(number controller)
3204 \begin_layout Standard
3205 Return the physical index, physical port and controller number in port for
3206 specified (1-based) logical controller.
3209 \begin_layout Subsection
3213 \begin_layout Standard
3217 \begin_layout Subsubsection
3218 subtitle.byindex(number i)
3221 \begin_layout Standard
3222 Read the frame and length of ith subtitle.
3223 Returns nothing if not present.
3226 \begin_layout Subsubsection
3227 subtitle.set(number f, number l, string txt)
3230 \begin_layout Standard
3231 Set the text of subtitle.
3234 \begin_layout Subsubsection
3235 subtitle.get(number f, number l)
3238 \begin_layout Standard
3239 Get the text of subtitle.
3242 \begin_layout Subsubsection
3243 subtitle.delete(number f, number l)
3246 \begin_layout Standard
3247 Delete specified subtitle.
3250 \begin_layout Subsection
3254 \begin_layout Standard
3255 Host memory handling (extra memory saved to savestates).
3256 Host memory starts empty.
3259 \begin_layout Subsubsection
3260 hostmemory.read(number address)
3263 \begin_layout Standard
3264 Reads hostmemory slot address.
3265 Slot numbers out of range return false instead of numeric.
3268 \begin_layout Subsubsection
3269 hostmemory.write(number address, number value)
3272 \begin_layout Standard
3273 Writes hostmemory slot with 0-255.
3274 Slot numbers out of range cause extension of host memory slot space.
3277 \begin_layout Subsubsection
3278 hostmemory.readbyte(number address)
3281 \begin_layout Standard
3282 Read unsigned byte (1 element) from given address.
3283 Slots out of range return false.
3286 \begin_layout Subsubsection
3287 hostmemory.writebyte(number address, number value)
3290 \begin_layout Standard
3291 Write unsigned byte (1 element) to given slot.
3292 Slot numbers out of range cause extension.
3295 \begin_layout Subsubsection
3296 hostmemory.readsbyte(number address)
3299 \begin_layout Standard
3300 Read signed byte (1 element) from given address.
3301 Slots out of range return false.
3304 \begin_layout Subsubsection
3305 hostmemory.writesbyte(number address, number value)
3308 \begin_layout Standard
3309 Write signed byte (1 element) to given slot.
3310 Slot numbers out of range cause extension.
3313 \begin_layout Subsubsection
3314 hostmemory.readword(number address)
3317 \begin_layout Standard
3318 Read unsigned word (2 elements) from given address.
3319 Slots out of range return false.
3322 \begin_layout Subsubsection
3323 hostmemory.writeword(number address, number value)
3326 \begin_layout Standard
3327 Write unsigned word (2 elements) to given slot.
3328 Slot numbers out of range cause extension.
3331 \begin_layout Subsubsection
3332 hostmemory.readsword(number address)
3335 \begin_layout Standard
3336 Read signed word (2 elements) from given address.
3337 Slots out of range return false.
3340 \begin_layout Subsubsection
3341 hostmemory.writesword(number address, number value)
3344 \begin_layout Standard
3345 Write signed word (2 elements) to given slot.
3346 Slot numbers out of range cause extension.
3349 \begin_layout Subsubsection
3350 hostmemory.readdword(number address)
3353 \begin_layout Standard
3354 Read unsigned doubleword (4 elements) from given address.
3355 Slots out of range return false.
3358 \begin_layout Subsubsection
3359 hostmemory.writedword(number address, number value)
3362 \begin_layout Standard
3363 Write unsigned doubleword (4 elements) to given slot.
3364 Slot numbers out of range cause extension.
3367 \begin_layout Subsubsection
3368 hostmemory.readsdword(number address)
3371 \begin_layout Standard
3372 Read signed doubleword (4 elements) from given address.
3373 Slots out of range return false.
3376 \begin_layout Subsubsection
3377 hostmemory.writesdword(number address, number value)
3380 \begin_layout Standard
3381 Write signed doubleword (4 elements) to given slot.
3382 Slot numbers out of range cause extension.
3385 \begin_layout Subsubsection
3386 hostmemory.readqword(number address)
3389 \begin_layout Standard
3390 Read unsigned quadword (8 elements) from given address.
3391 Slots out of range return false.
3394 \begin_layout Subsubsection
3395 hostmemory.writeqword(number address, number value)
3398 \begin_layout Standard
3399 Write unsigned quadword (4 elements) to given slot.
3400 Slot numbers out of range cause extension.
3403 \begin_layout Subsubsection
3404 hostmemory.readsqword(number address)
3407 \begin_layout Standard
3408 Read signed quadword (8 elements) from given address.
3409 Slots out of range return false.
3412 \begin_layout Subsubsection
3413 hostmemory.writesqword(number address, number value)
3416 \begin_layout Standard
3417 Write signed quadword (8 elements) to given slot.
3418 Slot numbers out of range cause extension.
3421 \begin_layout Subsection
3425 \begin_layout Standard
3429 \begin_layout Subsubsection
3430 movie.currentframe()
3433 \begin_layout Standard
3434 Return number of current frame.
3437 \begin_layout Subsubsection
3441 \begin_layout Standard
3442 Return number of frames in movie.
3445 \begin_layout Subsubsection
3449 \begin_layout Standard
3450 Return true if in readonly mode, false if in readwrite.
3453 \begin_layout Subsubsection
3457 \begin_layout Standard
3458 Returns the current value of rerecord count.
3461 \begin_layout Subsubsection
3462 movie.set_readwrite()
3465 \begin_layout Standard
3466 Set readwrite mode (does not cause on_readwrite callback).
3469 \begin_layout Subsubsection
3470 movie.frame_subframes(number frame)
3473 \begin_layout Standard
3474 Count number of subframes in specified frame (frame numbers are 1-based)
3478 \begin_layout Subsubsection
3479 movie.read_subframes(number frame, number subframe)
3482 \begin_layout Standard
3483 Read specifed subframe in specified frame and return data as array (100
3484 elements, numbered 0-99 currently).
3487 \begin_layout Subsubsection
3491 \begin_layout Standard
3492 Returns the current value of the RTC as a pair (second, subsecond).
3495 \begin_layout Subsubsection
3496 movie.unsafe_rewind([UNSAFEREWIND state])
3499 \begin_layout Standard
3500 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3503 \begin_layout Itemize
3504 If called without argument, causes emulator to start process of setting
3505 unsafe rewind point.
3506 When this has finished, callback on_set_rewind occurs, passing the rewind
3507 state to lua script.
3510 \begin_layout Itemize
3511 If called with argument, causes emulator rewind to passed rewind point as
3513 Readwrite mode is implicitly activated.
3516 \begin_layout Standard
3517 The following warnings apply to unsafe rewinding:
3520 \begin_layout Itemize
3521 There are no safety checks against misuse (that's what
3522 \begin_inset Quotes eld
3526 \begin_inset Quotes erd
3532 \begin_layout Itemize
3533 Only call rewind from timeline rewind point was set from.
3536 \begin_layout Itemize
3537 Only call rewind from after the rewind point was set.
3540 \begin_layout Subsection
3544 \begin_layout Standard
3545 Routines for settings manipulation
3548 \begin_layout Subsubsection
3549 settings.get(string name)
3552 \begin_layout Standard
3553 Get value of setting.
3554 If setting is blank, returns false.
3555 If setting value can't be obtained, returns (nil, error message).
3558 \begin_layout Subsubsection
3559 settings.set(string name, string value)
3562 \begin_layout Standard
3563 Set value of setting.
3564 If setting can't be set, returns (nil, error message).
3567 \begin_layout Subsubsection
3568 settings.is_set(string name)
3571 \begin_layout Standard
3572 Returns if setting is set.
3573 If setting does not exist, returns (nil, error message).
3576 \begin_layout Subsubsection
3577 settings.blank(string name)
3580 \begin_layout Standard
3581 Blanks a setting and returns true.
3582 If setting can't be blanked, returns (nil, error message).
3585 \begin_layout Subsection
3589 \begin_layout Standard
3590 Contains various functions for managing memory
3593 \begin_layout Subsubsection
3597 \begin_layout Standard
3598 Returns the number of VMAs
3601 \begin_layout Subsubsection
3602 memory.read_vma(number index)
3605 \begin_layout Standard
3606 Reads the specified VMA (indices start from zero).
3607 Trying to read invalid VMA gives nil.
3608 The read VMA is table with the following fields:
3611 \begin_layout Itemize
3612 region_name (string): The readable name of the VMA
3615 \begin_layout Itemize
3616 baseaddr (number): Base address of the VMA
3619 \begin_layout Itemize
3620 lastaddr (number): Last address in the VMA.
3623 \begin_layout Itemize
3624 size (number): The size of VMA in bytes.
3627 \begin_layout Itemize
3628 readonly (boolean): True of the VMA corresponds to ROM.
3631 \begin_layout Itemize
3632 iospace (boolean): True if the VMA is I/O space.
3635 \begin_layout Itemize
3636 native_endian (boolean): True if the VMA has native endian as opposed to
3640 \begin_layout Subsubsection
3641 memory.find_vma(number address)
3644 \begin_layout Standard
3645 Finds the VMA containing specified address.
3646 Returns table in the same format as read_vma or nil if not found.
3649 \begin_layout Subsubsection
3650 memory.readbyte(number address)
3653 \begin_layout Standard
3654 Reads the specified address as unsigned byte and returns the result.
3657 \begin_layout Subsubsection
3658 memory.readsbyte(number address)
3661 \begin_layout Standard
3662 Reads the specified address as signed byte and returns the result.
3665 \begin_layout Subsubsection
3666 memory.writebyte(number address, number value)
3669 \begin_layout Standard
3670 Writes the specified value (negative values undergo 2's complement) to specified
3671 address (as a byte).
3674 \begin_layout Subsubsection
3675 memory.readword(number address)
3678 \begin_layout Standard
3679 Reads the specified address as unsigned word and returns the result.
3682 \begin_layout Subsubsection
3683 memory.readsword(number address)
3686 \begin_layout Standard
3687 Reads the specified address as signed word and returns the result.
3690 \begin_layout Subsubsection
3691 memory.writeword(number address, number value)
3694 \begin_layout Standard
3695 Writes the specified value (negative values undergo 2's complement) to specified
3696 address (as a word).
3699 \begin_layout Subsubsection
3700 memory.readdword(number address)
3703 \begin_layout Standard
3704 Reads the specified address as unsigned doubleword and returns the result.
3707 \begin_layout Subsubsection
3708 memory.readsdword(number address)
3711 \begin_layout Standard
3712 Reads the specified address as signed doubleword and returns the result.
3715 \begin_layout Subsubsection
3716 memory.writedword(number address, number value)
3719 \begin_layout Standard
3720 Writes the specified value (negative values undergo 2's complement) to specified
3721 address (as a doubleword).
3724 \begin_layout Subsubsection
3725 memory.readqword(number address)
3728 \begin_layout Standard
3729 Reads the specified address as unsigned quadword and returns the result.
3732 \begin_layout Subsubsection
3733 memory.readsqword(number address)
3736 \begin_layout Standard
3737 Reads the specified address as signed quadword and returns the result.
3740 \begin_layout Subsubsection
3741 memory.writeqword(number address, number value)
3744 \begin_layout Standard
3745 Writes the specified value (negative values undergo 2's complement) to specified
3746 address (as a quadword).
3749 \begin_layout Subsubsection
3750 memory.hash_region(number base, number size)
3753 \begin_layout Standard
3754 Hash specified number of bytes starting from specified address and return
3758 \begin_layout Subsubsection
3762 \begin_layout Standard
3763 Hash the current system state.
3764 Mainly useful for debugging savestates.
3767 \begin_layout Subsubsection
3768 memory.readregion(number base, number size)
3771 \begin_layout Standard
3772 Read a region of memory.
3775 \begin_layout Itemize
3776 Warning: If the region crosses VMA boundary, the results are undefined.
3779 \begin_layout Subsubsection
3780 memory.map<type>([number base, number size])
3783 \begin_layout Standard
3784 Returns a table mapping specified memory aperture for read/write.
3785 If parameters are omitted, entiere map space is the aperture.
3788 \begin_layout Itemize
3789 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3792 \begin_layout Subsubsection
3793 memory.writeregion(number base, number size, table data)
3796 \begin_layout Standard
3797 Write a region of memory.
3800 \begin_layout Itemize
3801 Warning: If the region crosses VMA boundary, the results are undefined.
3804 \begin_layout Subsubsection
3805 memory.map_structure()
3808 \begin_layout Standard
3809 Returns a new mapping structure (MMAP_STRUCT)
3812 \begin_layout Subsubsection
3813 MMAP_STRUCT(string key, number address, string type)
3816 \begin_layout Standard
3817 Bind key in mmap structure to specified address with specified type.
3820 \begin_layout Itemize
3821 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3824 \begin_layout Subsubsection
3825 memory.read_expr(string expr)
3828 \begin_layout Standard
3829 Evaluate specified watch expression and return result
3832 \begin_layout Subsection
3836 \begin_layout Standard
3837 Contains functions for manipulating subtitles.
3840 \begin_layout Subsubsection
3841 subtitle.byindex(number index)
3844 \begin_layout Standard
3845 Get (basetime, length) pair of specified subtitle index or nothing if index
3849 \begin_layout Subsubsection
3850 subtitle.get(number basetime, number length)
3853 \begin_layout Standard
3854 Read the specified subtitle.
3856 \begin_inset Quotes eld
3860 \begin_inset Quotes erd
3863 if the subtitle does not exist.
3866 \begin_layout Subsubsection
3867 subtitle.set(number basetime, number length, string content)
3870 \begin_layout Standard
3871 Set the specified subtitle.
3874 \begin_layout Subsubsection
3875 subtitle.deltete(number basetime, number length)
3878 \begin_layout Standard
3879 Delete the specified subtitle.
3882 \begin_layout Subsection
3886 \begin_layout Standard
3887 Contains copy of global variables from time of Lua initialization.
3891 \begin_layout Subsection
3895 \begin_layout Standard
3896 Various callbacks to Lua that can occur.
3899 \begin_layout Subsubsection
3900 Callback: on_paint(bool not_synth)
3903 \begin_layout Standard
3904 Called when screen is being painted.
3905 Any gui.* calls requiring graphic context draw on the screen.
3908 \begin_layout Standard
3909 not_synth is true if this hook is being called in response to received frame,
3913 \begin_layout Subsubsection
3914 Callback: on_video()
3917 \begin_layout Standard
3918 Called when video dump frame is being painted.
3919 Any gui.* calls requiring graphic context draw on the video.
3922 \begin_layout Subsubsection
3923 Callback: on_frame_emulated()
3926 \begin_layout Standard
3927 Called when emulating frame has completed and on_paint()/on_video() calls
3928 are about to be issued.
3931 \begin_layout Subsubsection
3932 Callback: on_frame()
3935 \begin_layout Standard
3936 Called on each starting whole frame.
3939 \begin_layout Subsubsection
3940 Callback: on_startup()
3943 \begin_layout Standard
3944 Called when the emulator is starting (lsnes.rc and --run files has been run).
3947 \begin_layout Subsubsection
3948 Callback: on_rewind()
3951 \begin_layout Standard
3952 Called when rewind movie to beginning has completed.
3955 \begin_layout Subsubsection
3956 Callback: on_pre_load(string name)
3959 \begin_layout Standard
3960 Called just before savestate/movie load occurs (note: loads are always delayed,
3961 so this occurs even when load was initiated by lua).
3964 \begin_layout Subsubsection
3965 Callback: on_err_load(string name)
3968 \begin_layout Standard
3969 Called if loadstate goes wrong.
3972 \begin_layout Subsubsection
3973 Callback: on_post_load(string name, boolean was_savestate)
3976 \begin_layout Standard
3977 Called on successful loadstate.
3978 was_savestate gives if this was a savestate or a movie.
3981 \begin_layout Subsubsection
3982 Callback: on_pre_save(string name, boolean is_savestate)
3985 \begin_layout Standard
3986 Called just before savestate save occurs (note: movie saves are synchronous
3987 and won't trigger these callbacks if called from Lua).
3990 \begin_layout Subsubsection
3991 Callback: on_err_save(string name)
3994 \begin_layout Standard
3995 Called if savestate goes wrong.
3998 \begin_layout Subsubsection
3999 Callback: on_post_save(string name, boolean is_savestate)
4002 \begin_layout Standard
4003 Called on successful savaestate.
4004 is_savestate gives if this was a savestate or a movie.
4007 \begin_layout Subsubsection
4011 \begin_layout Standard
4012 Called when emulator is shutting down.
4015 \begin_layout Subsubsection
4016 Callback: on_input(boolean subframe)
4019 \begin_layout Standard
4020 Called when emulator is just sending input to bsnes core.
4021 Warning: This is called even in readonly mode, but the results are ignored.
4024 \begin_layout Subsubsection
4025 Callback: on_reset()
4028 \begin_layout Standard
4029 Called when SNES is reset.
4032 \begin_layout Subsubsection
4033 Callback: on_readwrite()
4036 \begin_layout Standard
4037 Called when moving into readwrite mode as result of
4038 \begin_inset Quotes eld
4042 \begin_inset Quotes erd
4045 command (note: moving to rwmode by Lua won't trigger this, as per recursive
4049 \begin_layout Subsubsection
4050 Callback: on_snoop(number port, number controller, number index, number
4054 \begin_layout Standard
4055 Called each time bsnes asks for input.
4056 The value is the final value to be sent to bsnes core (readonly mode, autohold
4057 and autofire have been taken into account).
4058 Might be useful when translating movies to format suitable for console
4060 Note: There is no way to modify the value to be sent.
4063 \begin_layout Itemize
4064 Not called if callback on_snoop2 is defined.
4067 \begin_layout Subsubsection
4068 Callback: on_snoop2(number port, number controller, number index, number
4072 \begin_layout Standard
4073 Like on_snoop, but reserves port 0 for system, having first user port be
4077 \begin_layout Subsubsection
4078 Callback: on_keyhook(string keyname, table state)
4081 \begin_layout Standard
4082 Sent when key that has keyhook events requested changes state.
4083 Keyname is name of the key (group) and state is the state (same kind as
4084 table values in input.raw).
4087 \begin_layout Subsubsection
4091 \begin_layout Standard
4092 Called when requested by set_idle_timeout(), the timeout has expired and
4093 emulator is waiting.
4096 \begin_layout Subsubsection
4097 Callback: on_timer()
4100 \begin_layout Standard
4101 Called when requested by set_idle_timeout() and the timeout has expired
4102 (regardless if emulator is waiting).
4105 \begin_layout Subsubsection
4106 Callback: on_set_rewind(UNSAFEREWIND r)
4109 \begin_layout Standard
4110 Called when unsafe rewind object has been constructed.
4113 \begin_layout Subsubsection
4114 Callback: on_pre_rewind()
4117 \begin_layout Standard
4118 Called just before unsafe rewind is about to occur.
4121 \begin_layout Subsubsection
4122 Callback: on_post_rewind()
4125 \begin_layout Standard
4126 Called just after unsafe rewind has occured.
4129 \begin_layout Subsubsection
4130 Callback: on_button(number port, number controller, number index, string
4134 \begin_layout Standard
4135 Called on controller button press, with following parameters:
4138 \begin_layout Itemize
4139 port: Port number (0 is system)
4142 \begin_layout Itemize
4143 controller: Controller within port
4146 \begin_layout Itemize
4147 index: Index of button.
4150 \begin_layout Itemize
4151 type: Type of event, one of:
4155 \begin_layout Itemize
4156 \begin_inset Quotes eld
4160 \begin_inset Quotes erd
4163 : Button was pressed.
4166 \begin_layout Itemize
4167 \begin_inset Quotes eld
4171 \begin_inset Quotes erd
4174 : Button was released.
4177 \begin_layout Itemize
4178 \begin_inset Quotes eld
4182 \begin_inset Quotes erd
4188 \begin_layout Itemize
4189 \begin_inset Quotes eld
4193 \begin_inset Quotes erd
4196 : Released from hold.
4199 \begin_layout Itemize
4200 \begin_inset Quotes eld
4204 \begin_inset Quotes erd
4207 : Typing input on button.
4210 \begin_layout Itemize
4211 \begin_inset Quotes eld
4215 \begin_inset Quotes erd
4218 : Typing input undone.
4221 \begin_layout Itemize
4222 \begin_inset Quotes eld
4226 \begin_inset Quotes erd
4229 : Analog action on axis.
4233 \begin_layout Section
4237 \begin_layout Itemize
4238 The editor edits in-memory movie.
4241 \begin_layout Itemize
4242 Because past can't be edited and readwrite mode doesn't allow future, editing
4250 \begin_layout Itemize
4251 Keyboard triggers the normal hotkeys and bindings.
4254 \begin_layout Subsection
4258 \begin_layout Itemize
4259 Clicking on cell in future (indicated by lack of redish background) toggles
4260 it (if it is a button) or prompts for a value (if it is an axis)
4263 \begin_layout Itemize
4264 Dragging vertically toggles sequence of buttons or changes a sequence of
4268 \begin_layout Subsection
4269 Right button actions
4272 \begin_layout Standard
4273 The right mouse button pops up a context-sensitive menu:
4276 \begin_layout Itemize
4277 Toggle <something>: Toggle this button
4280 \begin_layout Itemize
4281 Change <something>: Change this axis value
4284 \begin_layout Itemize
4285 Insert frame after: Insert a frame after this frame
4288 \begin_layout Itemize
4289 Append frame: Append a frame to movie
4292 \begin_layout Itemize
4293 Append frames: Append specified number of frames to movie
4296 \begin_layout Itemize
4297 Delete frame: Delete this frame
4300 \begin_layout Itemize
4301 Delete subframe: Delete this subframe
4304 \begin_layout Itemize
4305 Truncate movie: Delete this subframe and everything after it.
4308 \begin_layout Itemize
4309 Scroll to frame: Prompt for a frame and scroll the display to that frame.
4312 \begin_layout Itemize
4313 Scroll to current frame: Scroll the display to current position
4316 \begin_layout Itemize
4317 Run to frame: Prompts for frame and runs the emulation to that frame.
4320 \begin_layout Itemize
4321 Change number of lines visible: Change the height of the movie display (1
4325 \begin_layout Itemize
4326 Lock scroll to playback: While playing back or rewinding movies, the display
4327 will follow if enabled.
4330 \begin_layout Section
4331 Memory watch expression syntax
4334 \begin_layout Standard
4335 Memory watch expressions are in RPN (Reverse Polish Notation).
4336 At the end of expression, the top entry on stack is taken as the final
4340 \begin_layout Standard
4344 \begin_layout Itemize
4345 Evaluation order is strictly left to right.
4348 \begin_layout Itemize
4349 a is the entry on top of stack
4352 \begin_layout Itemize
4353 b is the entry immediately below top of stack
4356 \begin_layout Itemize
4357 ; separates values to be pushed (no intermediate pop).
4360 \begin_layout Itemize
4361 After end of element, all used stack slots are popped and all results are
4365 \begin_layout Itemize
4366 When pushing multiple values, the pushes occur in order shown.
4369 \begin_layout Standard
4370 The following operators are available:
4373 \begin_layout Itemize
4377 \begin_layout Itemize
4381 \begin_layout Itemize
4385 \begin_layout Itemize
4389 \begin_layout Itemize
4393 \begin_layout Itemize
4397 \begin_layout Itemize
4398 b : read_signed_byte(a)
4401 \begin_layout Itemize
4405 \begin_layout Itemize
4406 d : read_signed_dword(a)
4409 \begin_layout Itemize
4413 \begin_layout Itemize
4415 \begin_inset Formula $\pi$
4421 \begin_layout Itemize
4422 q : read_signed_qword(a)
4425 \begin_layout Itemize
4429 \begin_layout Itemize
4433 \begin_layout Itemize
4437 \begin_layout Itemize
4441 \begin_layout Itemize
4442 w : read_signed_word(a)
4445 \begin_layout Itemize
4449 \begin_layout Itemize
4450 B : read_unsigned_byte(a)
4453 \begin_layout Itemize
4454 C<number>z : Push number <number> to stack.
4457 \begin_layout Itemize
4458 D : read_unsigned_dword(a)
4461 \begin_layout Itemize
4462 C0x<number>z : Push number <number> (hexadecimal) to stack.
4465 \begin_layout Itemize
4466 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
4470 \begin_layout Itemize
4471 Q : read_unsigned_qword(a)
4474 \begin_layout Itemize
4475 R<digit> : round a to <digit> digits.
4478 \begin_layout Itemize
4479 W : read_unsigned_word(a)
4482 \begin_layout Subsection
4486 \begin_layout Standard
4487 C0x007e0878zWC0x007e002czW-
4490 \begin_layout Enumerate
4491 Push value 0x7e0878 on top of stack (C0x007e0878z).
4494 \begin_layout Enumerate
4495 Pop the value on top of stack (0x7e0878), read word value at that address
4496 and push the result,call it x1 (W).
4499 \begin_layout Enumerate
4500 Push value 0x7e002c on top of stack (C0x007e002cz).
4503 \begin_layout Enumerate
4504 Pop the value on top of stack (0x7e002c), read word value at that address
4505 and push the result,call it x2 (W).
4508 \begin_layout Enumerate
4509 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
4513 \begin_layout Enumerate
4514 Since the expression ends, the final memory watch result is the top one
4515 on stack, which is x2 - x1.
4518 \begin_layout Section
4519 Modifier and key names:
4522 \begin_layout Subsection
4526 \begin_layout Subsubsection
4530 \begin_layout Standard
4531 Following modifier names are known:
4534 \begin_layout Itemize
4535 ctrl, lctrl, rctrl: Control keys
4538 \begin_layout Itemize
4539 alt, lalt, ralt: ALT keys.
4542 \begin_layout Itemize
4543 shift, lshift, rshift: Shift keys.
4546 \begin_layout Itemize
4547 meta, lmeta, rmeta: Meta keys.
4550 \begin_layout Itemize
4551 num, caps: Numlock/Capslock (these are sticky!)
4554 \begin_layout Itemize
4558 \begin_layout Subsubsection
4562 \begin_layout Standard
4563 Following key names are known:
4566 \begin_layout Itemize
4567 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
4568 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
4569 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
4570 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
4571 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
4572 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
4573 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
4574 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
4575 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
4576 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
4577 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
4578 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
4579 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
4580 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
4581 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
4582 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
4583 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
4584 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
4585 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
4586 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
4587 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
4588 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
4589 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
4590 break, menu, power, euro, undo
4593 \begin_layout Itemize
4594 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
4595 hardware-dependent scan code of <n> (useful to bind those keys that don't
4596 have symbolic names).
4599 \begin_layout Subsubsection
4600 Joystick pseudo-keys:
4603 \begin_layout Itemize
4604 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
4607 \begin_layout Itemize
4608 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
4611 \begin_layout Itemize
4612 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
4615 \begin_layout Itemize
4616 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
4619 \begin_layout Itemize
4620 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
4623 \begin_layout Itemize
4624 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
4625 position (axis modes axis and axis_inverse).
4628 \begin_layout Itemize
4629 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
4630 position (axis modes axis and axis_inverse).
4633 \begin_layout Itemize
4634 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
4638 \begin_layout Subsubsection
4642 \begin_layout Itemize
4643 Escape: Enter/Exit Command mode, cancel modal dialogs.
4646 \begin_layout Itemize
4647 Return (also KPEnter): Execute command, ok modal dialog.
4650 \begin_layout Itemize
4651 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
4655 \begin_layout Itemize
4656 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
4660 \begin_layout Itemize
4661 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
4664 \begin_layout Itemize
4665 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
4668 \begin_layout Itemize
4669 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
4672 \begin_layout Itemize
4673 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
4676 \begin_layout Itemize
4678 if no num lock; command mode): Delete character to right of cursor.
4681 \begin_layout Itemize
4682 Insert (also KP0 if no num lock; command mode): Toggle between insert /
4686 \begin_layout Itemize
4687 Backspace (command mode): Delete character to left of cursor.
4690 \begin_layout Itemize
4691 CTRL+LEFT (also ALT+B; command mode): Previous word.
4694 \begin_layout Itemize
4695 CTRL+RIGHT (also ALT+F; command mode): Next word.
4698 \begin_layout Itemize
4699 ALT+D (also CTRL+W; command mode): Delete word.
4702 \begin_layout Itemize
4703 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
4706 \begin_layout Subsection
4710 \begin_layout Subsubsection
4714 \begin_layout Standard
4715 Following modifier names are known:
4718 \begin_layout Itemize
4722 \begin_layout Itemize
4726 \begin_layout Itemize
4730 \begin_layout Itemize
4734 \begin_layout Itemize
4738 \begin_layout Subsubsection
4742 \begin_layout Standard
4743 Following key names are known:
4746 \begin_layout Itemize
4747 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
4748 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
4749 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
4750 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4751 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
4752 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4753 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
4754 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
4755 pause, capital, end, home, lefT, up, right, down, select, print, execute,
4756 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
4757 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
4758 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
4759 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
4760 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
4761 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
4762 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
4763 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
4764 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
4765 windows_right, windows_menu, command, special1, special2, special3, special4,
4766 special5, special6, special7, special8, special9, special10, special11,
4767 special12, special13, special14, special15, special16, special17, special18,
4768 special19, special20
4771 \begin_layout Section
4775 \begin_layout Standard
4776 Movie file is .zip archive in itself, normal ZIP archive tools work on it
4777 (note: If you recompress it, do not use compression methods other than
4778 store and deflate and especially do not use encryption of any kind).
4781 \begin_layout Subsection
4782 Detecting clean start/SRAM/Savestate
4785 \begin_layout Itemize
4787 \begin_inset Quotes eld
4791 \begin_inset Quotes erd
4794 it is savestate, otherwise:
4797 \begin_layout Itemize
4798 If file has members with names starting
4799 \begin_inset Quotes eld
4803 \begin_inset Quotes erd
4806 it is movie starting from SRAM, otherwise:
4809 \begin_layout Itemize
4810 It is movie starting from clear state.
4813 \begin_layout Subsection
4817 \begin_layout Standard
4818 Type of game ROM and region (as one line).
4822 \begin_layout Standard
4823 \begin_inset Tabular
4824 <lyxtabular version="3" rows="8" columns="3">
4825 <features tabularvalignment="middle">
4826 <column alignment="center" valignment="top" width="0">
4827 <column alignment="center" valignment="top" width="0">
4828 <column alignment="center" valignment="top" width="0">
4830 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4833 \begin_layout Plain Layout
4839 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4842 \begin_layout Plain Layout
4848 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4851 \begin_layout Plain Layout
4859 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4862 \begin_layout Plain Layout
4868 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4871 \begin_layout Plain Layout
4877 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4880 \begin_layout Plain Layout
4888 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4891 \begin_layout Plain Layout
4897 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4900 \begin_layout Plain Layout
4906 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4909 \begin_layout Plain Layout
4917 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4920 \begin_layout Plain Layout
4926 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4929 \begin_layout Plain Layout
4935 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4938 \begin_layout Plain Layout
4946 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4949 \begin_layout Plain Layout
4955 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4958 \begin_layout Plain Layout
4964 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4967 \begin_layout Plain Layout
4975 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4978 \begin_layout Plain Layout
4984 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4987 \begin_layout Plain Layout
4993 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4996 \begin_layout Plain Layout
5004 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5007 \begin_layout Plain Layout
5013 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5016 \begin_layout Plain Layout
5022 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5025 \begin_layout Plain Layout
5033 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5036 \begin_layout Plain Layout
5042 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5045 \begin_layout Plain Layout
5051 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5054 \begin_layout Plain Layout
5068 \begin_layout Standard
5072 \begin_layout Standard
5073 \begin_inset Tabular
5074 <lyxtabular version="3" rows="3" columns="2">
5075 <features tabularvalignment="middle">
5076 <column alignment="center" valignment="top" width="0">
5077 <column alignment="center" valignment="top" width="0">
5079 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5082 \begin_layout Plain Layout
5088 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5091 \begin_layout Plain Layout
5099 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5102 \begin_layout Plain Layout
5108 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5111 \begin_layout Plain Layout
5119 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5122 \begin_layout Plain Layout
5128 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5131 \begin_layout Plain Layout
5145 \begin_layout Subsection
5149 \begin_layout Standard
5150 Contains type of port #1 (as one line).
5151 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
5152 If not present, defaults to 'gamepad'.
5155 \begin_layout Subsection
5159 \begin_layout Standard
5160 Contains type of port #2 (as one line).
5161 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
5162 'justifier' and 'justifiers'.
5163 If not present, defaults to 'none'.
5166 \begin_layout Subsection
5170 \begin_layout Standard
5171 Contains name of the game (as one line).
5174 \begin_layout Subsection
5178 \begin_layout Standard
5179 Contains authors, one per line.
5180 Part before '|' is the full name, part after is the nickname.
5183 \begin_layout Subsection
5187 \begin_layout Standard
5189 \begin_inset Quotes eld
5193 \begin_inset Quotes erd
5197 Used to reject other saves.
5200 \begin_layout Subsection
5201 Member: controlsversion
5204 \begin_layout Standard
5206 \begin_inset Quotes eld
5210 \begin_inset Quotes erd
5214 Used to identify what controls are there.
5217 \begin_layout Subsection
5219 \begin_inset Quotes eld
5223 \begin_inset Quotes erd
5229 \begin_layout Standard
5230 Contains bsnes core version number (as one line).
5233 \begin_layout Subsection
5237 \begin_layout Standard
5238 Contains project ID (as one line).
5239 Used to identify if two movies are part of the same project.
5242 \begin_layout Subsection
5243 Member: {rom,slota,slotb}{,xml}.sha256
5246 \begin_layout Standard
5247 Contains SHA-256 of said ROM or ROM mapping file (as one line).
5248 Absent if corresponding file is absent.
5251 \begin_layout Subsection
5252 Member: moviesram.<name>
5255 \begin_layout Standard
5256 Raw binary startup SRAM of kind <name>.
5257 Only present in savestates and movies starting from SRAM.
5260 \begin_layout Subsection
5264 \begin_layout Standard
5265 Contains frame number (as one line) of frame movie was saved on.
5266 Only present in savestates.
5269 \begin_layout Subsection
5273 \begin_layout Standard
5274 Current value of lag counter (as one line).
5275 Only present in savestates.
5278 \begin_layout Subsection
5279 Member: pollcounters
5282 \begin_layout Standard
5283 Contains poll counters (currently 100 of them), one per line.
5284 Each line is raw poll count if DRDY is set for it.
5285 Otherwise it is negative poll count minus one.
5286 Only present in savestates.
5289 \begin_layout Subsection
5293 \begin_layout Standard
5294 Raw binary dump of host memory.
5295 Only present in savestates.
5298 \begin_layout Subsection
5302 \begin_layout Standard
5303 The raw binary savestate itself.
5304 Savestate detection uses this file, only present in savestates.
5307 \begin_layout Subsection
5311 \begin_layout Standard
5312 Screenshot of current frame.
5313 Only present in savestates.
5314 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
5316 Height of image is inferred from the width and size of data.
5319 \begin_layout Subsection
5323 \begin_layout Standard
5324 Raw binary SRAM of kind <name> at time of savestate.
5325 Only present in savestates.
5328 \begin_layout Subsection
5332 \begin_layout Standard
5333 The actual input track, one line per subframe (blank lines are skipped).
5336 \begin_layout Itemize
5337 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
5338 part of same frame as previous, otherwise it starts a new frame.
5341 \begin_layout Itemize
5342 First subframe must start a new frame.
5345 \begin_layout Standard
5346 Length of movie in frames is number of lines in input file that start a
5350 \begin_layout Subsection
5354 \begin_layout Standard
5359 \begin_layout Itemize
5360 Each line is in form <firstframe> <numframes> <text>.
5363 \begin_layout Itemize
5364 Linefeed is encoded as
5366 n, backslash is encoded as
5373 \begin_layout Subsection
5377 \begin_layout Standard
5378 Contains textual base-10 rerecord count (as one line; emulator just writes
5379 this, it doesn't read it) + 1.
5382 \begin_layout Subsection
5386 \begin_layout Standard
5387 This member stores set of load IDs.
5388 There is one load ID per rerecord (plus one corresponding to start of project).
5391 \begin_layout Itemize
5392 This member constists of concatenation of records
5395 \begin_layout Itemize
5396 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
5400 \begin_layout Itemize
5401 IDs are interpretted as 256-bit big-endian integers with warparound.
5404 \begin_layout Itemize
5405 Initial predicted ID is all zeroes.
5408 \begin_layout Standard
5409 Format of each record is:
5412 \begin_layout Itemize
5413 1 byte: Opcode byte.
5414 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
5418 \begin_layout Itemize
5419 32-prefixlen bytes of ID.
5422 \begin_layout Itemize
5423 countlen bytes of big-endian count (count).
5426 \begin_layout Standard
5427 Records are processed as follows:
5430 \begin_layout Itemize
5431 To form the first ID encoded by record, take the first prefixlen bytes predicted
5432 ID and append the read ID value to it.
5433 The result is the first ID encoded.
5436 \begin_layout Itemize
5437 If countlen is 0, record encodes 1 ID.
5440 \begin_layout Itemize
5441 If countlen is 1, record encodes 2+count IDs.
5444 \begin_layout Itemize
5445 If countlen is 2, record encodes 258+count IDs.
5448 \begin_layout Itemize
5449 If countlen is 3, record encodes 65794+count IDs.
5452 \begin_layout Itemize
5453 The new predicted ID is the next ID after last one encoded by the record.
5456 \begin_layout Standard
5457 The number of rerecords + 1 is equal to the sum of number of IDs encoded
5461 \begin_layout Subsection
5462 Member: starttime.second
5465 \begin_layout Standard
5466 Movie starting time, second part.
5467 Epoch is Unix epoch.
5468 Default is 1,000,000,000.
5471 \begin_layout Subsection
5472 Member: starttime.subsecond
5475 \begin_layout Standard
5476 Movie starting time, subsecond part.
5481 \begin_layout Subsection
5482 Member: savetime.second
5485 \begin_layout Standard
5486 Movie saving time, second part.
5487 Default is starttime.second.
5488 Only present in savestates.
5491 \begin_layout Subsection
5492 Member: savetime.subsecond
5495 \begin_layout Standard
5496 Movie saving time, subsecond part.
5497 Default is starttime.subsecond.
5498 Only present in savestates.
5501 \begin_layout Section
5502 lsvs file format (commentary tracks)
5505 \begin_layout Subsection
5509 \begin_layout Itemize
5510 Each cluster is 8kB (8192 bytes) in size.
5513 \begin_layout Itemize
5514 Cluster n starts at offset 8192*n in file.
5517 \begin_layout Itemize
5518 The following clusters are system special:
5522 \begin_layout Itemize
5523 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
5526 \begin_layout Itemize
5527 Cluster 1 (superblock)
5531 \begin_layout Subsection
5535 \begin_layout Itemize
5536 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
5540 \begin_layout Itemize
5541 This cluster table consists of 2048 4-byte big-endian integers.
5544 \begin_layout Itemize
5545 Each entry describes a cluster in 16MB supercluster, in order.
5548 \begin_layout Itemize
5549 The valid values for entries are:
5553 \begin_layout Itemize
5554 0x00000000: Free cluster
5557 \begin_layout Itemize
5558 0x00000001: Last cluster in chain.
5561 \begin_layout Itemize
5562 0xFFFFFFFF: System cluster (cluster tables and superblock)
5565 \begin_layout Itemize
5566 (anything else): Number of next cluster in chain.
5567 Must not be multiple of 2048.
5571 \begin_layout Itemize
5572 Due to limitations of the format, there can be at most 2097052 superclusters,
5573 giving maximum file size of 16TB.
5576 \begin_layout Subsection
5580 \begin_layout Itemize
5581 The stream table chain always starts in cluster 2.
5584 \begin_layout Itemize
5585 Otherwise, it follows normal chaining.
5588 \begin_layout Itemize
5589 The stream table consists of 16-byte entries:
5593 \begin_layout Itemize
5594 The first 8 bytes of entry give big-endian beginning position of stream
5595 in units of 1/48000 s.
5598 \begin_layout Itemize
5599 The next 4 bytes of entry give big-endian beginning cluster for control
5601 0 here marks the entry as not present.
5604 \begin_layout Itemize
5605 The last 4 bytes of entry give big-endian beginning cluster for codec data.
5609 \begin_layout Itemize
5610 Stream table clusters are normal clusters, following normal chaining.
5613 \begin_layout Itemize
5614 The stream begnning position is not guarenteed unique.
5615 There can be multiple streams with the same starting position in the file.
5618 \begin_layout Subsection
5622 \begin_layout Itemize
5623 The stream control data consists of entries 4 bytes each:
5627 \begin_layout Itemize
5628 The first 2 bytes of entry gives big-endian length of packet
5631 \begin_layout Itemize
5632 The next byte of entry gives audio length of packet in units of 1/400 s.
5635 \begin_layout Itemize
5636 The last byte is control byte.
5640 \begin_layout Itemize
5641 0 means this entry is not present and the control data ends.
5644 \begin_layout Itemize
5645 1 is valid control entry.
5650 \begin_layout Itemize
5651 The stream control data can also end by running into end of the readable
5656 \begin_layout Itemize
5657 This happens if there happens to be exact multiple of 2048 packets in stream
5658 and number of packets is nonzero.
5662 \begin_layout Itemize
5663 These clusters follow normal chaining.
5666 \begin_layout Subsection
5670 \begin_layout Itemize
5671 Stream codec data consists of raw Opus data packets packed back to back
5672 with nothing in between.
5675 \begin_layout Itemize
5676 Warning: Due to internal limitations, this data must reside in the first
5677 65536 superclusters (that is, the first 1TB of the file).
5680 \begin_layout Subsection
5684 \begin_layout Itemize
5685 The superblock is stored in cluster 1.
5689 \begin_layout Itemize
5690 The first 11 bytes are
5691 \begin_inset Quotes eld
5695 \begin_inset Quotes erd
5701 \begin_layout Itemize
5702 The rest are unused.
5705 \begin_layout Itemize
5706 This cluster 1 is marked as system special.
5709 \begin_layout Section
5710 Known ROM extensions
5713 \begin_layout Itemize
5714 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
5717 \begin_layout Itemize
5718 DMG cartridge ROMs: dmg, gb.
5721 \begin_layout Itemize
5722 GBC cartridge ROMs: cgb, gbc.
5725 \begin_layout Section
5729 \begin_layout Itemize
5730 The first line must be:
5731 \begin_inset Quotes eld
5735 \begin_inset Quotes erd
5741 \begin_layout Itemize
5742 There is one needed line:
5743 \begin_inset Quotes eld
5747 \begin_inset Quotes erd
5751 This sets system type to <systype>.
5752 The following system types are valid:
5756 \begin_layout Itemize
5760 \begin_layout Itemize
5761 bsx (BS-X non-slotted)
5764 \begin_layout Itemize
5765 bsxslotted (BS-X slotted)
5768 \begin_layout Itemize
5769 sufamiturbo (Sufami Turbo)
5772 \begin_layout Itemize
5773 sgb (Super Game Boy)
5776 \begin_layout Itemize
5780 \begin_layout Itemize
5781 gbc (Game Boy Color)
5784 \begin_layout Itemize
5785 gbc_gba (Game Boy Color with GBA initial register values)
5789 \begin_layout Itemize
5790 Optionally a region can be specified:
5791 \begin_inset Quotes eld
5795 \begin_inset Quotes erd
5799 The following values are valid:
5803 \begin_layout Itemize
5804 autodetect (Autodetect region: snes and sgb only)
5807 \begin_layout Itemize
5808 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
5811 \begin_layout Itemize
5812 pal (PAL: snes, sgb)
5815 \begin_layout Itemize
5816 world (World: dmg, gbc, gbc_gba)
5820 \begin_layout Itemize
5821 ROM images are loaded as:
5822 \begin_inset Quotes eld
5826 \begin_inset Quotes erd
5830 The following types are valid:
5834 \begin_layout Itemize
5835 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
5836 BIOS in bsx, bsxslotted, sufamiturbo)
5839 \begin_layout Itemize
5840 bsx (Cartridge ROM in bsx, bsxslotted)
5843 \begin_layout Itemize
5844 slot-a (Cartridge ROM in sufamiturbo)
5847 \begin_layout Itemize
5848 slot-b (Cartridge ROM in sufamiturbo)
5852 \begin_layout Itemize
5853 ROM markup can be loaded as:
5854 \begin_inset Quotes eld
5858 \begin_inset Quotes erd
5862 The types valid are the same as for ROMs.
5865 \begin_layout Itemize
5866 Patches can be loaded as
5867 \begin_inset Quotes eld
5870 patch[<offset>] <type> <file>
5871 \begin_inset Quotes erd
5875 The types are the same as for ROMs.
5879 \begin_layout Itemize
5880 Offset is given in form [+-]<number>.
5881 Usually offset is either +0 or -512.
5884 \begin_layout Itemize
5885 Default offset is +0.
5889 \begin_layout Subsection
5893 \begin_layout LyX-Code
5897 \begin_layout LyX-Code
5901 \begin_layout LyX-Code
5902 rom rom speedygonzales.sfc
5905 \begin_layout LyX-Code
5906 patch-512 rom sonicthehedgehog.ips
5909 \begin_layout Subsection
5913 \begin_layout LyX-Code
5917 \begin_layout LyX-Code
5921 \begin_layout LyX-Code
5922 rom rom supergameboy.sfc
5925 \begin_layout LyX-Code
5926 rom dmg megamanV.dmg
5929 \begin_layout Section
5930 Quick'n'dirty encode guide
5933 \begin_layout Enumerate
5934 Start the emulator and load the ROM and movie file.
5937 \begin_layout Enumerate
5938 Set large AVI option 'set-setting avi-large on'
5941 \begin_layout Enumerate
5942 Enable dumping 'dump-avi tmpdump'
5945 \begin_layout Enumerate
5946 Unpause and let it run until you want to end dumping.
5949 \begin_layout Enumerate
5950 Close the emulator (closing the window is the easiest way).
5954 \begin_layout Enumerate
5955 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5956 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5959 \begin_layout Enumerate
5960 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5963 \begin_layout Enumerate
5964 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5965 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5968 \begin_layout Enumerate
5969 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5970 Now final.mkv contains quick'n'dirty encode.
5973 \begin_layout Section
5974 Axis configurations for some gamepad types:
5977 \begin_layout Subsection
5981 \begin_layout Standard
5982 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5985 \begin_layout LyX-Code
5986 set-axis joystick0axis2 pressure-+
5989 \begin_layout LyX-Code
5990 set-axis joystick0axis5 pressure-+
5993 \begin_layout Itemize
5994 This is needed for SDL only.
5995 EVDEV sets those types correctly.
5998 \begin_layout Subsection
6000 \begin_inset Quotes eld
6004 \begin_inset Quotes erd
6010 \begin_layout Standard
6011 Axes 8-19 should be disabled.
6014 \begin_layout LyX-Code
6015 set-axis joystick0axis8 disabled
6018 \begin_layout LyX-Code
6019 set-axis joystick0axis9 disabled
6022 \begin_layout LyX-Code
6023 set-axis joystick0axis10 disabled
6026 \begin_layout LyX-Code
6027 set-axis joystick0axis11 disabled
6030 \begin_layout LyX-Code
6031 set-axis joystick0axis12 disabled
6034 \begin_layout LyX-Code
6035 set-axis joystick0axis13 disabled
6038 \begin_layout LyX-Code
6039 set-axis joystick0axis14 disabled
6042 \begin_layout LyX-Code
6043 set-axis joystick0axis15 disabled
6046 \begin_layout LyX-Code
6047 set-axis joystick0axis16 disabled
6050 \begin_layout LyX-Code
6051 set-axis joystick0axis17 disabled
6054 \begin_layout LyX-Code
6055 set-axis joystick0axis18 disabled
6058 \begin_layout LyX-Code
6059 set-axis joystick0axis19 disabled
6062 \begin_layout Section
6066 \begin_layout Subsection
6067 Problems from BSNES core:
6070 \begin_layout Itemize
6071 The whole pending save stuff.
6074 \begin_layout Itemize
6075 Lack of layer hiding.
6078 \begin_layout Itemize
6079 It is slow (especially accuracy).
6082 \begin_layout Itemize
6083 Firmwares can't be loaded from ZIP archives.
6086 \begin_layout Subsection
6090 \begin_layout Itemize
6091 Modifiers don't work with pseudo-keys (SDL, EVDEV).
6094 \begin_layout Itemize
6095 Audio for last dumped frame is not itself dumped.
6098 \begin_layout Itemize
6099 Audio in UI is pretty bad in quality if game doesn't run at full speed.
6102 \begin_layout Itemize
6103 No menus, command based interface (SDL).
6106 \begin_layout Itemize
6107 Long commands don't scroll.
6110 \begin_layout Section
6114 \begin_layout Subsection
6118 \begin_layout Itemize
6122 \begin_layout Itemize
6123 Fix dumper video corruption with levels 10-18.
6126 \begin_layout Subsection
6130 \begin_layout Itemize
6134 \begin_layout Itemize
6135 Lots of code cleanups
6138 \begin_layout Itemize
6139 Lua interface to settings
6142 \begin_layout Itemize
6143 Allow specifying AVI borders without Lua
6146 \begin_layout Itemize
6147 Fix scaling if vscale > 1 and originx > 0 (left border exists)
6150 \begin_layout Itemize
6151 on_snoop lua callback
6154 \begin_layout Itemize
6155 Faster movie loading and saving.
6158 \begin_layout Subsection
6162 \begin_layout Itemize
6166 \begin_layout Subsection
6170 \begin_layout Itemize
6174 \begin_layout Itemize
6175 Save jukebox functionality.
6178 \begin_layout Subsection
6182 \begin_layout Itemize
6183 Try to fix some nasty failing movie load edge cases
6186 \begin_layout Itemize
6187 Allow specifying scripts to run on command line.
6190 \begin_layout Subsection
6194 \begin_layout Itemize
6195 Major source code reorganization.
6198 \begin_layout Itemize
6199 Backup savestates before overwriting.
6202 \begin_layout Itemize
6203 Don't crash if loading initial state fails.
6206 \begin_layout Subsection
6210 \begin_layout Itemize
6214 \begin_layout Itemize
6215 Fix author name parsing
6218 \begin_layout Itemize
6219 Fix rerecord counting
6222 \begin_layout Itemize
6223 (SDL) Print messages to console if SDL is uninitialized
6226 \begin_layout Itemize
6227 Add movieinfo program
6230 \begin_layout Itemize
6231 Fix loading movies starting from SRAM.
6234 \begin_layout Subsection
6238 \begin_layout Itemize
6239 Add support for unattended dumping
6242 \begin_layout Itemize
6243 Fix compiling for Win32
6246 \begin_layout Itemize
6247 Don't lock up if sound can't be initialized
6250 \begin_layout Itemize
6251 Strip trailing CR from commands
6254 \begin_layout Itemize
6255 Don't try to do dubious things in global ctors (fix crash on startup)
6258 \begin_layout Subsection
6262 \begin_layout Itemize
6263 Small documentation tweaking
6266 \begin_layout Itemize
6270 \begin_layout Itemize
6271 Fix major bug in modifier matching
6274 \begin_layout Subsection
6278 \begin_layout Itemize
6279 Lots of documentation fixes
6282 \begin_layout Itemize
6283 Use dedicated callbacks for event backcomm., not commands.
6286 \begin_layout Itemize
6287 Ensure that the watchdog is not hit when executing delayed reset.
6290 \begin_layout Itemize
6291 Remove errant tab from joystick message.
6294 \begin_layout Subsection
6298 \begin_layout Itemize
6299 Make autofire operate in absolute time, not linear time
6302 \begin_layout Itemize
6303 Reinitialize controls when resuming from loadstate
6306 \begin_layout Itemize
6307 Some more code cleanups
6310 \begin_layout Itemize
6311 If Lua allocator fails, call OOM_panic()
6314 \begin_layout Itemize
6315 Byte/word/dword/qword sized host memory write/read functions.
6318 \begin_layout Itemize
6319 Dump at correct framerate if dumping interlaced NTSC (height=448).
6322 \begin_layout Subsection
6326 \begin_layout Itemize
6327 Actually include the complete source code
6330 \begin_layout Itemize
6334 \begin_layout Subsection
6338 \begin_layout Itemize
6339 Document {save,start}time.{,sub}second.
6342 \begin_layout Itemize
6343 Intercept time() from bsnes core.
6346 \begin_layout Subsection
6350 \begin_layout Itemize
6351 Allow disabling time() interception (allow build on Mac OS X)
6354 \begin_layout Itemize
6355 Use SDLMain on Mac OS X (make SDL not crash)
6358 \begin_layout Itemize
6359 Disable delayed resets (just plain too buggy for now).
6362 \begin_layout Itemize
6366 \begin_layout Itemize
6367 Use 16-bit for graphics/video instead of 32-bit.
6370 \begin_layout Itemize
6371 gui.rectangle/gui.pixel
6374 \begin_layout Itemize
6378 \begin_layout Itemize
6379 New CSCD writer implementation.
6382 \begin_layout Subsection
6386 \begin_layout Itemize
6387 Fix interaction of * and +.
6390 \begin_layout Itemize
6394 \begin_layout Itemize
6395 Use gettimeofday()/usleep(), these seem portable enough.
6398 \begin_layout Itemize
6399 Move joystick axis manipulation to keymapper code.
6402 \begin_layout Itemize
6403 Changes to how read-only works.
6406 \begin_layout Itemize
6407 Refactor controller input code.
6410 \begin_layout Subsection
6414 \begin_layout Itemize
6415 Fix mouseclick scale compensation.
6418 \begin_layout Itemize
6419 Draw area boundaries correctly in SDL code.
6422 \begin_layout Itemize
6426 \begin_layout Itemize
6427 Fix CSCD output (buffer overrun and race condition).
6430 \begin_layout Subsection
6434 \begin_layout Itemize
6435 JMD dumping support.
6438 \begin_layout Itemize
6439 Allow unattended dumping to JMD.
6442 \begin_layout Itemize
6446 \begin_layout Itemize
6447 Switch back to 32-bit colors.
6450 \begin_layout Itemize
6451 Add Lua function gui.color.
6454 \begin_layout Itemize
6455 Use some new C++11 features in GCC 4.6.
6458 \begin_layout Itemize
6459 Be prepared for core frequency changes.
6462 \begin_layout Itemize
6463 Pass colors in one chunk from Lua.
6466 \begin_layout Subsection
6470 \begin_layout Itemize
6471 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
6472 memory.read_vma() and memory.find_vma().
6475 \begin_layout Itemize
6476 Numerious documentation fixups
6479 \begin_layout Itemize
6480 RTC time format changed
6483 \begin_layout Itemize
6484 Reformat flags display
6487 \begin_layout Itemize
6488 Allow lua package name to be overridden
6491 \begin_layout Itemize
6492 SDUMP (high-quality dumping).
6495 \begin_layout Itemize
6496 Split platform support to plugins.
6499 \begin_layout Itemize
6500 Make all sound plugins support basic sound commands
6503 \begin_layout Itemize
6504 Support portaudio for sound.
6507 \begin_layout Itemize
6508 Allow disable Lua/SDL searching.
6511 \begin_layout Itemize
6512 Upconvert colors when copying lcscreen to screen.
6515 \begin_layout Itemize
6516 Reorganize source tree.
6519 \begin_layout Itemize
6520 Evdev joystick support.
6523 \begin_layout Itemize
6524 Refactor more code into generic window code.
6527 \begin_layout Subsection
6531 \begin_layout Itemize
6532 Refactor message handling.
6535 \begin_layout Itemize
6539 \begin_layout Itemize
6543 \begin_layout Itemize
6544 Finish pending saves before load/quit.
6547 \begin_layout Itemize
6548 Wxwidgets graphics plugin.
6551 \begin_layout Subsection
6555 \begin_layout Itemize
6556 Get rid of win32-crap.[ch]pp.
6559 \begin_layout Itemize
6560 Move files around a lot.
6563 \begin_layout Itemize
6564 Get rid of need for host C++ compiler.
6567 \begin_layout Itemize
6571 \begin_layout Itemize
6572 Refactor inter-component communication.
6575 \begin_layout Itemize
6579 \begin_layout Itemize
6580 Fix crash on multiline aliases.
6583 \begin_layout Itemize
6584 Load/Save settings in wxwidgets gui.
6587 \begin_layout Subsection
6591 \begin_layout Itemize
6592 Patch problems in bsnes core
6595 \begin_layout Itemize
6596 SNES is little-endian, not big-endian!
6599 \begin_layout Itemize
6600 Fix memory corruption in lcscreen::load()
6603 \begin_layout Subsection
6607 \begin_layout Itemize
6608 Fix interpretting repeat counts in rrdata loading.
6611 \begin_layout Itemize
6612 New lua callback: on_frame()
6615 \begin_layout Itemize
6616 Remove calls to runtosave() that aren't supposed to be there
6619 \begin_layout Itemize
6620 Lua function: movie.read_rtc()
6623 \begin_layout Itemize
6624 Ignore src/fonts/font.cpp
6627 \begin_layout Itemize
6628 Fix more bsnes core problems
6631 \begin_layout Itemize
6632 Control bsnes random seeding
6635 \begin_layout Itemize
6639 \begin_layout Itemize
6640 Some bsnes core debugging features (state dump and state hash)
6643 \begin_layout Itemize
6644 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
6645 it was 'lsnes rr0-beta21').
6648 \begin_layout Subsection
6652 \begin_layout Itemize
6653 Fix memory corruption due to macro/field mixup
6656 \begin_layout Itemize
6657 search-memory update
6660 \begin_layout Itemize
6661 Allow direct-mapped framebuffer
6664 \begin_layout Itemize
6665 SDL: Use SDL_ANYFORMAT if possible
6668 \begin_layout Itemize
6669 SDMP2SOX: 2s delay modes.
6672 \begin_layout Itemize
6676 \begin_layout Itemize
6677 Use sed -E, not sed -r.
6678 Fixes building on Mac OS X.
6681 \begin_layout Itemize
6682 Wxwidgets: Save jukebox on exit
6685 \begin_layout Itemize
6686 Fix RTC if using load-movie on savestate.
6689 \begin_layout Itemize
6690 Fix crash related to full console mode.
6693 \begin_layout Subsection
6697 \begin_layout Itemize
6698 Wxwidgets: Allow bringing application to foreground on Mac OS X.
6701 \begin_layout Itemize
6702 Wxwidgets: Allow compiling on Mac OS X.
6705 \begin_layout Itemize
6706 Use movie compare instead of movie hashing (faster save/load).
6709 \begin_layout Itemize
6713 \begin_layout Subsection
6717 \begin_layout Itemize
6718 sdmp2sox: Pad soundtrack if using -l or -L.
6721 \begin_layout Itemize
6722 sdmp2sox: Fix NTSC overscan.
6725 \begin_layout Itemize
6726 sdmp2sox: Add AR correction mode.
6729 \begin_layout Itemize
6730 call lua_close() when exiting.
6733 \begin_layout Itemize
6734 Fix zip_writer bug causing warnings from info-zip and error from advzip.
6737 \begin_layout Subsection
6741 \begin_layout Itemize
6742 Fix IPS patching code (use bsnes core IPS patcher).
6745 \begin_layout Itemize
6746 Implement BPS patching (using bsnes core IPS patcher).
6749 \begin_layout Itemize
6750 Add feature to load headered ROMs.
6753 \begin_layout Subsection
6757 \begin_layout Itemize
6758 Show command names when showing keybindings
6761 \begin_layout Subsection
6765 \begin_layout Itemize
6766 Fix pause-on-end to be actually controllable
6769 \begin_layout Itemize
6770 SDL: Poll all events in queue, not just first one (fixes slowness in command
6774 \begin_layout Itemize
6775 Wxwidgets: Fix ROM loading.
6778 \begin_layout Subsection
6782 \begin_layout Itemize
6783 Lua: Add gui.textH, gui.textV, gui.textHV
6786 \begin_layout Itemize
6787 Fix text colors on SDL on Mac OS X
6790 \begin_layout Itemize
6791 Mode 'F' for finished in readonly mode.
6794 \begin_layout Itemize
6798 \begin_layout Itemize
6799 Reliably pause after skip poll
6802 \begin_layout Itemize
6803 Split UI and core into their own threads
6806 \begin_layout Subsection
6810 \begin_layout Itemize
6811 Remove leftover dummy SRAM slot
6814 \begin_layout Itemize
6815 Fix controller numbers.
6818 \begin_layout Subsection
6822 \begin_layout Itemize
6823 Fix lsnes-dumpavi after interface change.
6826 \begin_layout Itemize
6827 Also give BSNES patches for v085.
6830 \begin_layout Itemize
6831 Pack movie data in memory.
6834 \begin_layout Subsection
6838 \begin_layout Itemize
6839 Fix framecount/length given when loading movies.
6842 \begin_layout Itemize
6843 Controller command memory leak fixes.
6846 \begin_layout Itemize
6847 Don't leak palette if freeing screen object.
6850 \begin_layout Subsection
6854 \begin_layout Itemize
6858 \begin_layout Itemize
6859 Wxwidgets: Allow controlling dumper from the menu.
6862 \begin_layout Subsection
6866 \begin_layout Itemize
6867 Rewrite parts of manual
6870 \begin_layout Itemize
6871 Lua: Make it work with Lua 5.2.
6874 \begin_layout Subsection
6878 \begin_layout Itemize
6879 Win32: Fix compile errors.
6882 \begin_layout Subsection
6886 \begin_layout Itemize
6887 Refactor controller input code.
6890 \begin_layout Itemize
6891 Fix crash when using command line on SDL / Mac OS X.
6894 \begin_layout Subsection
6898 \begin_layout Itemize
6899 Delete core/coroutine (obsolete)
6902 \begin_layout Itemize
6903 Lag input display by one frame.
6906 \begin_layout Itemize
6907 Rewind movie to beginning function.
6910 \begin_layout Itemize
6911 Fix wrong frame number reported to Lua when repainting after loadstate
6914 \begin_layout Itemize
6915 Support UI editing of jukebox
6918 \begin_layout Itemize
6919 Wxwidgets: Save settings on exit.
6922 \begin_layout Itemize
6923 Support ${project} for filenames
6926 \begin_layout Itemize
6927 SDL: Fix command history
6930 \begin_layout Subsection
6934 \begin_layout Itemize
6935 Fix some order-of-global-ctor bugs.
6938 \begin_layout Subsection
6942 \begin_layout Itemize
6943 Fix crashes when quitting on Win32.
6946 \begin_layout Subsection
6950 \begin_layout Itemize
6951 EVDEV: Queue keypresses from joystick, don't send directly
6954 \begin_layout Itemize
6955 Wxwidgets: Load-Preserve that actually works.
6958 \begin_layout Subsection
6962 \begin_layout Itemize
6963 Wxwidgets: GUI for memory search.
6966 \begin_layout Itemize
6967 Warn about using synchronous queue in UI callback.
6970 \begin_layout Subsection
6974 \begin_layout Itemize
6975 Remember last saved file for each ROM
6978 \begin_layout Itemize
6979 Support MT dumping via boost.
6982 \begin_layout Itemize
6986 \begin_layout Itemize
6990 \begin_layout Itemize
6991 Make mouse be ordinary input instead of special-casing
6994 \begin_layout Itemize
6995 SDL: Don't screw up commands with NUL codepoints.
6998 \begin_layout Subsection
7002 \begin_layout Itemize
7003 Merge status panel and main window
7006 \begin_layout Itemize
7007 True movie slot support (the rest of it)
7010 \begin_layout Itemize
7011 SDL: Fix compilation error
7014 \begin_layout Itemize
7015 Elminate cross calls in dump menu code.
7018 \begin_layout Subsection
7022 \begin_layout Itemize
7023 Cancel pending saves command
7026 \begin_layout Itemize
7027 Wxwidgets: Code refactoring
7030 \begin_layout Itemize
7031 Wxwidgets: Fix system -> reset
7034 \begin_layout Itemize
7035 Wxwidgets: Read watch expressions in the right thread
7038 \begin_layout Subsection
7042 \begin_layout Itemize
7043 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
7047 \begin_layout Itemize
7048 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
7051 \begin_layout Itemize
7052 Don't append trailing '-' to prefix when saving movie.
7055 \begin_layout Itemize
7056 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
7059 \begin_layout Subsection
7063 \begin_layout Itemize
7064 Document memory watch syntax.
7067 \begin_layout Subsection
7071 \begin_layout Itemize
7072 Fix unattended dumping (lsnes-dumpavi)
7075 \begin_layout Itemize
7079 \begin_layout Itemize
7080 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
7083 \begin_layout Itemize
7084 Add option to control sample rate preturbation in AVI dumper
7087 \begin_layout Subsection
7091 \begin_layout Itemize
7092 Wxwidgets: Fix dumper submodes
7095 \begin_layout Itemize
7096 Set core controller types before loadstate
7099 \begin_layout Subsection
7103 \begin_layout Itemize
7104 Fix compiling with bsnes v086.
7107 \begin_layout Subsection
7111 \begin_layout Itemize
7112 Don't prompt before quitting
7115 \begin_layout Itemize
7116 Start unpaused, preserve pause/unpause over load.
7119 \begin_layout Itemize
7120 Try to autodetect if ROM is headered.
7123 \begin_layout Itemize
7124 Wxwidgets: Only bring up ROM patching screen if specifically requested.
7127 \begin_layout Itemize
7128 Allow configuring some hotkeys.
7131 \begin_layout Subsection
7135 \begin_layout Itemize
7136 Lots of code cleanups
7139 \begin_layout Itemize
7140 Fix JMD compression (JMD dumping was broken)
7143 \begin_layout Itemize
7144 Don't crash if Lua C function throws an exception.
7147 \begin_layout Itemize
7148 Support bitmap drawing in Lua.
7151 \begin_layout Itemize
7152 Fix bsnes v085/v086 patches.
7155 \begin_layout Itemize
7156 Improve stability on win32.
7159 \begin_layout Subsection
7163 \begin_layout Itemize
7164 Don't corrupt movie if movie length is integer multiple of frames per page.
7167 \begin_layout Subsection
7171 \begin_layout Itemize
7172 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
7175 \begin_layout Itemize
7176 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
7177 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
7181 \begin_layout Itemize
7182 Wxwidgets: Fix internal focus lost (hotkeys stop working)
7185 \begin_layout Itemize
7186 Wxwidgets: Fix broken modifiers
7189 \begin_layout Itemize
7190 on_paint has parameter now.
7193 \begin_layout Itemize
7194 Optional initital fill for bitmaps
7197 \begin_layout Itemize
7198 Fix palette changing.
7201 \begin_layout Itemize
7202 Optimize rendering a bit.
7205 \begin_layout Itemize
7209 \begin_layout Subsection
7213 \begin_layout Itemize
7214 Movieinfo: Fix display of port #2 type.
7217 \begin_layout Itemize
7218 Call on_input() after loadstate.
7221 \begin_layout Subsection
7225 \begin_layout Itemize
7226 Fix writing port2 data to movie.
7229 \begin_layout Itemize
7230 Fix SRAM handling with Bsnes v087.
7233 \begin_layout Subsection
7237 \begin_layout Itemize
7238 Library loading support
7241 \begin_layout Itemize
7242 Built-in TSCC encoder
7245 \begin_layout Itemize
7246 Hi-color (256T colors) dumping.
7249 \begin_layout Itemize
7250 Dump over TCP/IP(v6)
7253 \begin_layout Itemize
7254 Hidable status panel
7257 \begin_layout Itemize
7261 \begin_layout Itemize
7262 Adjustable sound volume
7265 \begin_layout Itemize
7269 \begin_layout Itemize
7270 Allow DnD into filename boxes
7273 \begin_layout Itemize
7277 \begin_layout Itemize
7278 Portaudio: Fix speaker popping at start
7281 \begin_layout Itemize
7285 \begin_layout Itemize
7286 Speed adjustment menu
7289 \begin_layout Itemize
7290 Win32 joystick support
7293 \begin_layout Itemize
7294 Lua: gui.rainbow and gui.box
7297 \begin_layout Itemize
7298 Split key lists into classes (the key list was large!)
7301 \begin_layout Itemize
7302 More save slots support
7305 \begin_layout Itemize
7306 Wxwidgets (wxJoystick) joystick support
7309 \begin_layout Subsection
7313 \begin_layout Itemize
7314 Lots of internal joystick refactoring
7317 \begin_layout Itemize
7318 Evdev: Add mapping for BTN_TOOL_QUINTTAP
7321 \begin_layout Itemize
7322 Wxwidgets: Settings mode (open settings without ROM)
7325 \begin_layout Itemize
7326 Wxwidgets: Prompt key to use option
7329 \begin_layout Itemize
7330 Wxwidgets: Fix crash if key goes away underneath
7333 \begin_layout Itemize
7334 Wxwidgets: Fix mouse position in presence of scaling
7337 \begin_layout Itemize
7338 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
7341 \begin_layout Itemize
7342 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
7343 seem to work well on WinXP)
7346 \begin_layout Itemize
7347 Start paused option.
7350 \begin_layout Subsection
7354 \begin_layout Itemize
7358 \begin_layout Itemize
7359 lsnes-dumpavi: Start Lua before starting dumper
7362 \begin_layout Itemize
7363 AVI: Fix secondary audio in mode 4.
7366 \begin_layout Subsection
7370 \begin_layout Itemize
7371 AVI: Refactor ZMBV a bit.
7374 \begin_layout Itemize
7375 Fix error reading analog values from movie file
7378 \begin_layout Subsection
7382 \begin_layout Itemize
7383 Delayed reset support
7386 \begin_layout Itemize
7387 Lua: memory.hash_region
7390 \begin_layout Subsection
7394 \begin_layout Itemize
7395 Rework the build system
7398 \begin_layout Itemize
7399 Typing input support
7402 \begin_layout Itemize
7403 Fix building with bsnes v086 and v087.
7406 \begin_layout Itemize
7407 SDL: Save settings on exit
7410 \begin_layout Itemize
7411 SDL: Command to enter command line mode with given command.
7414 \begin_layout Itemize
7415 SDL: More advanced command editing.
7418 \begin_layout Subsection
7422 \begin_layout Itemize
7424 \begin_inset Quotes eld
7427 arrow keys and enter don't work
7428 \begin_inset Quotes erd
7434 \begin_layout Itemize
7438 \begin_layout Itemize
7439 Show mode changes due to rewinding.
7442 \begin_layout Itemize
7443 Unsafe rewind support
7446 \begin_layout Itemize
7447 Fix directory transversal.
7450 \begin_layout Subsection
7454 \begin_layout Itemize
7455 AVI: Sound mode 5 (48kHz high-quality)
7458 \begin_layout Itemize
7462 \begin_layout Itemize
7463 Map the SNES bus into address space
7466 \begin_layout Itemize
7467 Fix loading memory watch files with CRLF line endings
7470 \begin_layout Subsection
7474 \begin_layout Itemize
7475 Map bsnes internal state into memory space
7478 \begin_layout Itemize
7480 \begin_inset Quotes eld
7483 click on panel wedges the emulator
7484 \begin_inset Quotes erd
7490 \begin_layout Itemize
7491 DnD movies/saves on the main window.
7494 \begin_layout Subsection
7498 \begin_layout Itemize
7499 Split core bindings into own module.
7502 \begin_layout Itemize
7503 Remember invalid settings
7506 \begin_layout Itemize
7507 Support for modified Gambatte core for GB/GBC emulation.
7510 \begin_layout Itemize
7511 Reload/swap ROM function
7514 \begin_layout Subsection
7518 \begin_layout Itemize
7519 Fix step poll function
7522 \begin_layout Subsection
7526 \begin_layout Itemize
7527 Non-insane savestate anchoring
7530 \begin_layout Subsection
7534 \begin_layout Itemize
7535 More Memory search methods
7538 \begin_layout Itemize
7539 Preserve movie if loading in RO mode.
7542 \begin_layout Itemize
7543 Fix a obscure case in timeline check
7546 \begin_layout Itemize
7547 Revamp the entiere ROM loading code
7550 \begin_layout Itemize
7554 \begin_layout Itemize
7558 \begin_layout Itemize
7559 Standalone hotkey config dialog
7562 \begin_layout Itemize
7563 Show bindings in more user-friendly format
7566 \begin_layout Subsection
7570 \begin_layout Itemize
7574 \begin_layout Itemize
7575 Fix uninitialized variables in bsnes v085
7578 \begin_layout Subsection
7582 \begin_layout Itemize
7583 Merge gambatte core into mainline (from its own branch)
7586 \begin_layout Itemize
7587 Wxwidgets: Show expected dump file formats
7590 \begin_layout Itemize
7591 Memory watch: Data typing
7594 \begin_layout Itemize
7595 lsnes internal MMIO area.
7598 \begin_layout Itemize
7599 Wxwidgets: New memory watch editor
7602 \begin_layout Itemize
7603 Hexadecimal memory watches
7606 \begin_layout Itemize
7607 Wxwidgets: Monospaced panel
7610 \begin_layout Itemize
7611 Wxwidgets: Split memory watches in panel
7614 \begin_layout Itemize
7615 Wxwidgets: Disable VMAs in memory search
7618 \begin_layout Itemize
7619 lsnes-dumpavi: Fix speed bug
7622 \begin_layout Itemize
7623 Movie subtitle support
7626 \begin_layout Itemize
7627 Fix rerecord count reporting
7630 \begin_layout Itemize
7631 Don't trash movie when loading in readonly mode.
7634 \begin_layout Subsection
7638 \begin_layout Itemize
7639 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
7642 \begin_layout Itemize
7643 Fix build on Mac OS X.
7646 \begin_layout Itemize
7650 \begin_layout Itemize
7651 Wxwidgets: Hidable messages window
7654 \begin_layout Itemize
7658 \begin_layout Itemize
7659 Bsnes: Support inconsistent saves
7662 \begin_layout Itemize
7663 Bsnes: Allow simulating saving every frame
7666 \begin_layout Itemize
7667 Fix desync if savestate is loaded in readonly mode in certain conditions.
7670 \begin_layout Itemize
7671 Wxwidgets: Fix save dialogs on Mac OS X.
7674 \begin_layout Itemize
7675 Wxwidgets: Fix insane status width on Win32.
7678 \begin_layout Itemize
7679 Wxwidgets: Fix autohold processing to be faster.
7682 \begin_layout Itemize
7683 Wxwidgets: Allow loading ROMs and movies from commandline.
7686 \begin_layout Subsection
7690 \begin_layout Itemize
7691 Be a bit smarter with --load
7694 \begin_layout Itemize
7695 Rewrote higher-level parts of audio system
7698 \begin_layout Itemize
7699 Tool to build commentary tracks
7702 \begin_layout Itemize
7706 \begin_layout Itemize
7707 Gambatte: Add support for SVN358
7710 \begin_layout Itemize
7711 Use builtin font when rendering status panel.
7714 \begin_layout Itemize
7715 Option to detach memory watch to its own window.
7718 \begin_layout Itemize
7719 Recent ROMs/Movies menu
7722 \begin_layout Itemize
7726 \begin_layout Itemize
7727 Useful lag counter for SNES games that autopoll
7730 \begin_layout Itemize
7731 Fix buffer overflow in gambatte sound output
7734 \begin_layout Subsection
7738 \begin_layout Itemize
7739 Don't blow up on wxGTK if the window is hidden somehow
7742 \begin_layout Itemize
7743 Support simultaneous drop of ROM and movie.
7746 \begin_layout Itemize
7747 Gambatte: Don't save spurious SRAMs.
7750 \begin_layout Itemize
7751 Make SGB ROMs actually usable.
7754 \begin_layout Itemize
7755 Fix so that saved movies appear in recent movies.
7758 \begin_layout Itemize
7759 Don't open multiple commentary editors at once.
7762 \begin_layout Subsection
7766 \begin_layout Itemize
7767 Lua: memory.readregion/memory.writeregion
7770 \begin_layout Itemize
7771 Lua: memory.map{,s}{byte,word,dword,qword}
7774 \begin_layout Itemize
7775 Lua: memory.map_structure
7778 \begin_layout Itemize
7779 Lua: Fix bus_address for gambatte
7782 \begin_layout Itemize
7783 Fix features dependent of bsnes debugger
7786 \begin_layout Itemize
7787 Cleanup bsnes debugger logic
7790 \begin_layout Itemize
7791 Fix resets in presence of save every frame
7794 \begin_layout Subsection
7798 \begin_layout Itemize
7799 Lua: input.lcid_to_pcid
7802 \begin_layout Itemize
7803 Fix off-by-one bug with slot hashes
7806 \begin_layout Itemize
7807 Fix crashes on certain memory watch expressions
7810 \begin_layout Itemize
7811 Lua: memory.read_expr
7814 \begin_layout Itemize
7815 Lua: Fix memory.read_expr on nil argument
7818 \begin_layout Itemize
7819 Fix the code to compile on G++ 4.7
7822 \begin_layout Itemize
7823 Change button_id to be a function pointer field, not a virtual method
7826 \begin_layout Itemize
7827 Add bsnes patches to fix libsnes to compile on GCC 4.7
7830 \begin_layout Itemize
7831 Gambatte: Always use legacy lag counting
7834 \begin_layout Itemize
7835 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
7838 \begin_layout Itemize
7839 Fix analog controllers
7842 \begin_layout Itemize
7846 \begin_layout Itemize
7847 Fix button symbols in input display
7850 \begin_layout Itemize
7851 Compensate for nuts bsnes superscope/justifier handling
7854 \begin_layout Itemize
7855 Lua: Fix bit.extract boolean handling
7858 \begin_layout Subsection
7862 \begin_layout Itemize
7863 Stop at movie end: Don't off-by-one
7866 \begin_layout Itemize
7867 Fix crash closing lsnes with voice playback active.
7870 \begin_layout Itemize
7871 Import/Export OggOpus for commentary tracks
7874 \begin_layout Itemize
7875 16-button controllers.
7878 \begin_layout Itemize
7879 Don't show nonexistent controllers in input display
7882 \begin_layout Itemize
7883 Set voice record/playback volume from UI
7886 \begin_layout Itemize
7887 Patches for gambatte SVN364.
7890 \begin_layout Itemize
7891 Load markup (if exists) even without gamepack file.
7894 \begin_layout Itemize
7895 Screen rotation & flipping
7898 \begin_layout Itemize
7899 Lua: Some new bit functions
7902 \begin_layout Itemize
7903 Auto-refresh voice streams on change.
7906 \begin_layout Itemize
7907 Auto-refresh subtitles on change & new subtitle editor.
7910 \begin_layout Itemize
7911 Fix music volume adjustment.
7914 \begin_layout Subsection
7918 \begin_layout Itemize
7919 Wxwidgets: Fix memory watch rendering.
7922 \begin_layout Itemize
7923 Wxwidgets: Allow setting voice stream gain.
7926 \begin_layout Itemize
7927 Wxwidgets: VU meters and volume adjustment.
7930 \begin_layout Itemize
7931 Lua: Custom fonts support.
7934 \begin_layout Itemize
7935 Lua: Fix methods stopping working when resetting Lua.
7938 \begin_layout Itemize
7939 Fix loading standard-format movies in preserve (readonly) mode.
7942 \begin_layout Subsection
7946 \begin_layout Itemize
7947 Primitive movie editor
7950 \begin_layout Itemize
7951 Fix VU meter with no sound device.
7954 \begin_layout Itemize
7955 Fix various undefined return values.
7958 \begin_layout Itemize
7959 Show rates in VU meter window.
7962 \begin_layout Subsection
7966 \begin_layout Itemize
7967 Commentary tool: Set nominal bit rate and limit max bit rate.
7970 \begin_layout Itemize
7971 Lua: Unconditionally reload host memory on loadstate
7974 \begin_layout Itemize
7975 Lua: Query bindings, manipulate aliases, create inverse bindings
7978 \begin_layout Itemize
7979 Lua: Fix crashes with resetting VM while some types of paint requests are
7983 \begin_layout Itemize
7984 Lua: gui.text: Clip the text properly instead of corrupting memory in some
7988 \begin_layout Itemize
7989 Save screenshot header reliably
7992 \begin_layout Itemize
7993 Lua: Backport input.get2 and input.set2
7996 \begin_layout Itemize
7997 Lua: New controller info functions.
8000 \begin_layout Itemize
8001 Movie editor: Fix reset delay counters to be the right way around.
8004 \begin_layout Itemize
8008 \begin_layout Itemize
8009 Lua: on_button and input.veto_button.