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 Synonym for evaluate-lua.
1395 \begin_layout Subsubsection
1399 \begin_layout Standard
1400 Run specified lua file using built-in Lua interpretter.
1403 \begin_layout Subsubsection
1407 \begin_layout Standard
1408 Clear the Lua VM state and restore to factory defaults.
1411 \begin_layout Subsection
1415 \begin_layout Subsubsection
1416 add-watch <name> <expression>
1419 \begin_layout Standard
1420 Adds new watch (or modifies old one).
1423 \begin_layout Subsubsection
1427 \begin_layout Standard
1431 \begin_layout Subsection
1435 \begin_layout Subsubsection
1436 enable-sound <on/off>
1439 \begin_layout Standard
1440 Enable/Disable sound.
1443 \begin_layout Subsubsection
1444 set-sound-device <device>
1447 \begin_layout Standard
1448 Set sound device to <device>
1451 \begin_layout Subsubsection
1455 \begin_layout Standard
1456 Show status of sound system.
1459 \begin_layout Subsubsection
1463 \begin_layout Standard
1464 Show all available devices.
1467 \begin_layout Subsubsection
1468 set-volume <multiplier>
1471 \begin_layout Standard
1472 Set the volume multiplier to <multiplier>.
1473 1 is normal volume, and higher numbers are louder.
1476 \begin_layout Subsubsection
1477 set-volume <multiplier>%
1480 \begin_layout Standard
1481 Set the volume multiplier to <multiplier> percent.
1482 100 is normal volume, and higher numbers are louder.
1485 \begin_layout Subsubsection
1486 set-volume <multiplier>dB
1489 \begin_layout Standard
1490 Set the volume multiplier to <multiplier> dB.
1491 0 is normal volume, and higher numbers are louder.
1492 The value may be negative.
1495 \begin_layout Subsection
1499 \begin_layout Subsubsection
1503 \begin_layout Standard
1504 Reloads the main ROM image from <file>.
1507 \begin_layout Subsubsection
1508 edit-subtitle <firstframe> <length> [<text>]
1511 \begin_layout Standard
1512 Edit or delete a subtitle.
1515 \begin_layout Subsubsection
1519 \begin_layout Standard
1523 \begin_layout Subsection
1527 \begin_layout Subsubsection
1531 \begin_layout Standard
1535 \begin_layout Subsubsection
1539 \begin_layout Standard
1543 \begin_layout Subsubsection
1547 \begin_layout Standard
1551 \begin_layout Subsubsection
1552 change-timebase <id> <newbase>
1555 \begin_layout Standard
1556 Change time base of <id> to <newbase>.
1557 The time base can be given as samples (integer) or second (postfix with
1561 \begin_layout Subsubsection
1562 import-stream-opus <timebase> <file>
1565 \begin_layout Standard
1566 Import opus stream from <file>, placing it at <timebase>.
1567 This operation is lossless.
1570 \begin_layout Subsubsection
1571 import-stream-pcm <timebase> <file>
1574 \begin_layout Standard
1575 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at <timebase>.
1578 \begin_layout Subsubsection
1579 export-stream-opus <id> <file>
1582 \begin_layout Standard
1583 Export stream <id> as opus stream to <file>.
1584 This operation is lossless.
1587 \begin_layout Subsubsection
1588 export-stream-pcm <id> <file>
1591 \begin_layout Standard
1592 Export stream <id> as PCM (.sox) stream to <file>.
1596 \begin_layout Subsubsection
1597 export-superstream <file>
1600 \begin_layout Standard
1601 Export the entiere superstream as PCM (.sox) stream to <file>.
1604 \begin_layout Subsubsection
1605 load-collection <file>
1608 \begin_layout Standard
1609 Load collection (if there is existing collection, unload it) from <file>
1612 \begin_layout Subsubsection
1616 \begin_layout Standard
1620 \begin_layout Subsubsection
1624 \begin_layout Standard
1625 Tangent for recording voice for commentary track.
1626 While pressed, record a stream.
1629 \begin_layout Subsection
1630 SDL Platform commands
1633 \begin_layout Standard
1634 The following are valid on SDL platform.
1637 \begin_layout Subsubsection
1641 \begin_layout Standard
1642 Asks to press a key and then identifies that (pseudo-)key.
1645 \begin_layout Subsubsection
1649 \begin_layout Standard
1650 Toggle between windowed/fullscreen console.
1653 \begin_layout Subsubsection
1657 \begin_layout Standard
1658 Scroll messages window as far back as it goes.
1661 \begin_layout Subsubsection
1665 \begin_layout Standard
1666 Scroll messages window as far forward as it goes.
1669 \begin_layout Subsubsection
1673 \begin_layout Standard
1674 Scroll messages window back one screenful.
1677 \begin_layout Subsubsection
1681 \begin_layout Standard
1682 Scroll messages window forward one screenful.
1685 \begin_layout Subsubsection
1686 prompt-command <command>
1689 \begin_layout Standard
1690 Enter command prompt, with prompt prepopulated with specified command.
1693 \begin_layout Section
1697 \begin_layout Subsection
1701 \begin_layout Subsubsection
1705 \begin_layout Standard
1706 Set where bsnes looks for firmware files.
1708 \begin_inset Quotes eld
1712 \begin_inset Quotes erd
1718 \begin_layout Subsubsection
1722 \begin_layout Standard
1724 Numeric, range is 0.001 to
1725 \begin_inset Quotes eld
1729 \begin_inset Quotes erd
1733 Default is native framerate.
1736 \begin_layout Subsubsection
1740 \begin_layout Standard
1741 Set save compression level (integer 0-9).
1742 Default is 7 (0 is no compression).
1745 \begin_layout Subsubsection
1749 \begin_layout Standard
1750 Set the frame advance timeout in milliseconds.
1751 Numeric integer, range is 0-999999999.
1755 \begin_layout Subsubsection
1756 advance-subframe-timeout
1759 \begin_layout Standard
1760 Subframe advance timeout in milliseconds.
1764 \begin_layout Subsubsection
1765 save-every-frame (bsnes only)
1768 \begin_layout Standard
1769 If true, simulate saving on each frame.
1770 Trades off emulation accuracy for sync stability.
1771 Also needed if the movie assumes saving on each frame for rewind.
1774 \begin_layout Subsection
1778 \begin_layout Subsubsection
1782 \begin_layout Standard
1783 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1787 \begin_layout Subsubsection
1791 \begin_layout Standard
1792 AVI dumper: Set the default left border thickness (unless lua overrides)
1798 \begin_layout Subsubsection
1802 \begin_layout Standard
1803 AVI dumper: Set the default right border thickness (unless lua overrides)
1809 \begin_layout Subsubsection
1813 \begin_layout Standard
1814 AVI dumper: Set the default top border thickness (unless lua overrides)
1820 \begin_layout Subsubsection
1824 \begin_layout Standard
1825 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1831 \begin_layout Subsubsection
1835 \begin_layout Standard
1836 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1841 \begin_layout Subsubsection
1845 \begin_layout Standard
1846 AVI dumper: Compression level (0-18).
1849 \begin_layout Itemize
1850 Compression levels 10 and above are not compatible with stock CSCD codec.
1853 \begin_layout Itemize
1854 Recomended level is 7.
1857 \begin_layout Subsubsection
1861 \begin_layout Standard
1862 AVI dumper: Set method of determining the sound rate.
1865 \begin_layout Itemize
1866 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1867 128, 176.4 and 192 kHz.
1870 \begin_layout Itemize
1871 1: Round down to nearest integer.
1874 \begin_layout Itemize
1875 2: Round up to nearest ingeter.
1878 \begin_layout Subsection
1882 \begin_layout Subsubsection
1886 \begin_layout Standard
1887 JMD dumper: Compression level (0-9).
1890 \begin_layout Subsection
1891 SDL platform settings
1894 \begin_layout Subsubsection
1895 autorepeat-first-delay
1898 \begin_layout Standard
1899 Sets the delay for first character in typematic autorepeat.
1902 \begin_layout Subsubsection
1903 autorepeat-subsequent-delay
1906 \begin_layout Standard
1907 Sets the delay for subsequent characters in typematic autorepeat.
1910 \begin_layout Section
1914 \begin_layout Subsection
1915 Core (in main table)
1918 \begin_layout Subsubsection
1922 \begin_layout Standard
1923 Print line to message console.
1926 \begin_layout Subsubsection
1930 \begin_layout Standard
1931 Convert arbitrary lua value into a string (using same conversions as print)
1932 and return the result.
1935 \begin_layout Subsubsection
1936 exec(string command)
1939 \begin_layout Standard
1940 Run command as it was entered on the command line
1943 \begin_layout Subsubsection
1947 \begin_layout Standard
1949 First is time since some epoch in seconds, the second is microseconds mod
1950 10^6 since that epoch.
1953 \begin_layout Subsubsection
1957 \begin_layout Standard
1958 Returns true if emulator has finished booting, false if not (on_startup()
1959 will be issued later).
1962 \begin_layout Subsubsection
1963 set_idle_timeout(number timeout)
1966 \begin_layout Standard
1967 Set number of microseconds to block idle for.
1968 After this timeout has expired, on_idle() will be called once.
1971 \begin_layout Subsubsection
1972 set_timer_timeout(number timeout)
1975 \begin_layout Standard
1976 Set number of microseconds to block timer for.
1977 After this timeout has expired, on_timer() will be called once.
1980 \begin_layout Subsubsection
1981 bus_address(number snesaddr)
1984 \begin_layout Standard
1985 Returns virtual address corresponding to specified address on SNES bus.
1988 \begin_layout Subsubsection
1989 loopwrapper(function fun, ...)
1992 \begin_layout Standard
1993 Calls function fun with function and specified arguments.
1994 The function passed suspends execution until the function returned is called.
1995 Handy for linear flow control among multiple invocations of a hook.
1999 \begin_layout LyX-Code
2000 on_paint = loopwrapper(function(wait)
2004 \begin_layout LyX-Code
2009 \begin_layout LyX-Code
2011 \begin_inset Quotes eld
2015 \begin_inset Quotes erd
2021 \begin_layout LyX-Code
2026 \begin_layout LyX-Code
2031 \begin_layout LyX-Code
2035 \begin_layout Subsubsection
2036 list_bindings([string cmd])
2039 \begin_layout Standard
2040 Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
2041 If command is specified, the table is limited to that command.
2044 \begin_layout Subsubsection
2045 get_alias(string aname)
2048 \begin_layout Standard
2049 Get expansion of given alias.
2052 \begin_layout Subsubsection
2053 set_alias(string aname, string value)
2056 \begin_layout Standard
2057 Set expansion of given alias.
2060 \begin_layout Subsubsection
2061 create_ibind(string name, string cmd)
2064 \begin_layout Standard
2065 Return object representing inverse binding with specified name and specified
2069 \begin_layout Itemize
2070 To create press/release commands, use aliases +foo and -foo .
2073 \begin_layout Itemize
2074 Keep the returned object around.
2077 \begin_layout Subsection
2081 \begin_layout Standard
2082 Bitwise logical functions and related.
2085 \begin_layout Subsubsection
2086 bit.none(number...) / bit.bnot(number...)
2089 \begin_layout Standard
2090 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2094 \begin_layout Subsubsection
2095 bit.any(number...) / bit.bor(number...)
2098 \begin_layout Standard
2099 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2102 \begin_layout Subsubsection
2103 bit.all(number...) / bit.band(number...)
2106 \begin_layout Standard
2107 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2111 \begin_layout Subsubsection
2112 bit.parity(number...) / bit.bxor(number...)
2115 \begin_layout Standard
2116 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2120 \begin_layout Subsubsection
2121 bit.lrotate(number base[, number amount[, number bits]])
2124 \begin_layout Standard
2125 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2128 \begin_layout Subsubsection
2129 bit.rrotate(number base[, number amount[, number bits]])
2132 \begin_layout Standard
2133 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2137 \begin_layout Subsubsection
2138 bit.lshift(number base[, number amount[, number bits]])
2141 \begin_layout Standard
2142 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2143 The new bits are filled with zeroes.
2146 \begin_layout Subsubsection
2147 bit.lrshift(number base[, number amount[, number bits]])
2150 \begin_layout Standard
2151 Shift bits-bit (max 48, default 48) number logically right by amount (default
2153 The new bits are filled with zeroes.
2156 \begin_layout Subsubsection
2157 bit.arshift(number base[, number amount[, number bits]])
2160 \begin_layout Standard
2161 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2163 The new bits are shifted in with copy of the high bit.
2166 \begin_layout Subsubsection
2167 bit.extract(number base[, number bit0[, number bit1,...]])
2170 \begin_layout Standard
2171 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2174 \begin_layout Standard
2178 \begin_layout Itemize
2179 Bit numbers up to 51 should work reliably (then things start falling apart
2180 due to double precision issues).
2183 \begin_layout Itemize
2184 There are two special bit positions, true and false, standing for always
2185 set bit and always clear bit.
2188 \begin_layout Subsubsection
2189 bit.value([number bit1[, number bit2,...]])
2192 \begin_layout Standard
2193 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2195 As special value, nil argument is no-op.
2198 \begin_layout Subsubsection
2199 bit.test_any(number a, number b)
2202 \begin_layout Standard
2203 Is there a common set bit in a and b?
2206 \begin_layout Subsubsection
2207 bit.test_all(number a, number b)
2210 \begin_layout Standard
2211 Are all set bits in b also set in a?
2214 \begin_layout Subsubsection
2215 bit.popcount(number a)
2218 \begin_layout Standard
2219 Population count of a.
2222 \begin_layout Subsubsection
2223 bit.clshift(number a, number b, [number amount,[number bits]])
2226 \begin_layout Standard
2227 Does chained left shift on a, b by amount positions, assuming numbers to
2228 be of specified number of bits.
2231 \begin_layout Subsubsection
2232 bit.crshift(number a, number b, [number amount,[number bits]])
2235 \begin_layout Standard
2236 Does chained right shift on a, b by amount positions, assuming numbers to
2237 be of specified number of bits.
2240 \begin_layout Subsubsection
2241 bit.flagdecode(number a, number bits, [string on, [string off]])
2244 \begin_layout Standard
2245 Return string of length bits where ith character is ith character of on
2246 if bit i is on, otherwise ith character of off.
2247 Out of range reads give last character, or '*'/'-' if empty.
2250 \begin_layout Subsubsection
2251 bit.rflagdecode(number a, number bits, [string on, [string off]])
2254 \begin_layout Standard
2255 Like bit.flagdecode, but outputs the string in the opposite order (most significa
2259 \begin_layout Subsection
2263 \begin_layout Standard
2264 Most of these functions can only be called in on_paint and on_video callbacks.
2265 Exceptions are noted.
2268 \begin_layout Standard
2270 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2271 16-23 are the red component, bits 24-31 are alpha component (0 is fully
2272 opaque, 255 is almost transparent).
2273 -1 is the fully transparent color.
2274 Alpha values greater than 127 do work.
2277 \begin_layout Standard
2278 Origin of coordinates is at top left corner of game display area.
2279 Left and top gaps correspond to negative coordinates.
2282 \begin_layout Subsubsection
2286 \begin_layout Standard
2287 Returns 2-tuple (hresolution, vresolution).
2290 \begin_layout Subsubsection
2291 gui.<class>_gap(number gap)
2294 \begin_layout Standard
2295 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2297 If successful, old gap is returned.
2300 \begin_layout Subsubsection
2301 gui.delta_<class>_gap(number gap)
2304 \begin_layout Standard
2305 Increase the <class> (left, right, top, bottom) gap by specified value (max
2306 gap is 8191) and return the old gap (returns nothing on error).
2309 \begin_layout Subsubsection
2310 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2313 \begin_layout Standard
2314 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2319 \begin_layout Itemize
2320 x: X-coordinate to start the drawing from (and x-coordinate at begining
2324 \begin_layout Itemize
2325 y: Y-coordinate to start the drawing from.
2328 \begin_layout Itemize
2329 text: The text to draw.
2332 \begin_layout Itemize
2333 fgc: Text color (default is 0xFFFFFF (white))
2336 \begin_layout Itemize
2337 bgc: Background color (default is -1 (transparent))
2340 \begin_layout Subsubsection
2341 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2344 \begin_layout Standard
2345 Like gui.text, but draw using double-width.
2348 \begin_layout Subsubsection
2349 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2352 \begin_layout Standard
2353 Like gui.text, but draw using double-height.
2356 \begin_layout Subsubsection
2357 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2360 \begin_layout Standard
2361 Like gui.text, but draw using double-width/double-height.
2364 \begin_layout Subsubsection
2365 gui.rectangle(number x, number y, number width, number height[, number thickness[
2366 , number outline[, number fill]]])
2369 \begin_layout Standard
2370 Draw rectangle on the GUI.
2374 \begin_layout Itemize
2375 x: X-coordinate of left edge.
2378 \begin_layout Itemize
2379 y: Y-coordinate of upper edge.
2382 \begin_layout Itemize
2383 width: Width of rectangle.
2386 \begin_layout Itemize
2387 height: Height of rectangle.
2390 \begin_layout Itemize
2391 thickness: Thickness of outline (default is 1).
2394 \begin_layout Itemize
2395 outline: Color of outline (default is 0xFFFFFF (white))
2398 \begin_layout Itemize
2399 fill: Color of fill (default is -1 (transparent))
2402 \begin_layout Subsubsection
2403 gui.box(number x, number y, number width, number height[, number thickness[,
2404 number outline1[,number outline2[, number fill]]]])
2407 \begin_layout Standard
2408 Draw rectangle with 3D effect on the GUI.
2412 \begin_layout Itemize
2413 x: X-coordinate of left edge.
2416 \begin_layout Itemize
2417 y: Y-coordinate of upper edge.
2420 \begin_layout Itemize
2421 width: Width of rectangle.
2424 \begin_layout Itemize
2425 height: Height of rectangle.
2428 \begin_layout Itemize
2429 thickness: Thickness of outline (default is 1).
2432 \begin_layout Itemize
2433 outline1: First color of outline (default is 0xFFFFFF (white))
2436 \begin_layout Itemize
2437 outline2: First color of outline (default is 0x808080 (dark gray))
2440 \begin_layout Itemize
2441 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2444 \begin_layout Subsubsection
2445 gui.pixel(number x, number y[, number color])
2448 \begin_layout Standard
2449 Draw one pixel on the GUI.
2453 \begin_layout Itemize
2454 x: X-coordinate of the pixel
2457 \begin_layout Itemize
2458 y: Y-coordinate of the pixel
2461 \begin_layout Itemize
2462 color: Color of the pixel (default is 0xFFFFFF (white))
2465 \begin_layout Subsubsection
2466 gui.crosshair(number x, number y[, number length[, number color]])
2469 \begin_layout Standard
2474 \begin_layout Itemize
2475 x: X-coordinate of the crosshair
2478 \begin_layout Itemize
2479 y: Y-coordinate of the crosshair
2482 \begin_layout Itemize
2483 length: Length of the crosshair lines (default 10).
2486 \begin_layout Itemize
2487 color: Color of the crosshair (default is 0xFFFFFF (white))
2490 \begin_layout Subsubsection
2491 gui.line(number x1, number y1, number x2, number y2[, number color])
2494 \begin_layout Standard
2499 \begin_layout Itemize
2500 x1: X-coordinate of one end.
2503 \begin_layout Itemize
2504 y1: Y-coordinate of one end.
2507 \begin_layout Itemize
2508 x2: X-coordinate of the other end.
2511 \begin_layout Itemize
2512 y2: Y-coordinate of the other end.
2515 \begin_layout Itemize
2516 color: Color of the line (default is 0xFFFFFF (white)).
2519 \begin_layout Subsubsection
2520 gui.circle(number x, number y, number r[, number thick[, number border[,
2524 \begin_layout Standard
2529 \begin_layout Itemize
2530 x: X-coordinate of the center
2533 \begin_layout Itemize
2534 y: Y-coordinate of the center
2537 \begin_layout Itemize
2538 r: The radius of the circle
2541 \begin_layout Itemize
2542 thick: Border thickness
2545 \begin_layout Itemize
2546 border: Border color (default is 0xFFFFFF (white))
2549 \begin_layout Itemize
2550 fill: Fill color (default is -1 (transparent)).
2553 \begin_layout Subsubsection
2554 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2557 \begin_layout Standard
2558 Draw a bitmap on screen with specified palette.
2562 \begin_layout Itemize
2563 x: X-coordinate of left edge.
2566 \begin_layout Itemize
2567 y: Y-coordinate of top edge.
2570 \begin_layout Itemize
2571 bitmap: The bitmap to draw
2574 \begin_layout Itemize
2575 palette: The palette to draw the bitmap using.
2578 \begin_layout Subsubsection
2579 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2582 \begin_layout Standard
2583 Draw a bitmap on screen.
2587 \begin_layout Itemize
2588 x: X-coordinate of left edge.
2591 \begin_layout Itemize
2592 y: Y-coordinate of top edge.
2595 \begin_layout Itemize
2596 bitmap: The bitmap to draw
2599 \begin_layout Subsubsection
2603 \begin_layout Standard
2604 Returns a new palette (initially all transparent).
2605 Can be used anywhere.
2608 \begin_layout Subsubsection
2609 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2612 \begin_layout Standard
2613 Returns a new bitmap/dbitmap.
2614 Can be used anywhere.
2618 \begin_layout Itemize
2619 w: The width of new bitmap
2622 \begin_layout Itemize
2623 h: The height of new bitmap
2626 \begin_layout Itemize
2627 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2630 \begin_layout Itemize
2631 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2634 \begin_layout Subsubsection
2635 gui.bitmap_load(string file)
2638 \begin_layout Standard
2639 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2641 Can be used anywhere.
2645 \begin_layout Itemize
2646 file: The name of file to load.
2649 \begin_layout Subsubsection
2650 gui.palette_set(palette palette, number index, number color)
2653 \begin_layout Standard
2654 Sets color in palette.
2655 Can be used anywhere.
2659 \begin_layout Itemize
2660 palette: The palette to manipulate
2663 \begin_layout Itemize
2664 index: Index of color (0-65535).
2667 \begin_layout Itemize
2668 color: The color value.
2671 \begin_layout Subsubsection
2672 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2675 \begin_layout Standard
2676 Sets specified pixel in bitmap.
2677 Can be used anywhere.
2681 \begin_layout Itemize
2682 bitmap: The bitmap to manipulate
2685 \begin_layout Itemize
2686 x: The x-coordinate of the pixel.
2689 \begin_layout Itemize
2690 y: The y-coordinate of the pixel.
2693 \begin_layout Itemize
2694 color: If bitmap is a bitmap, color index (0-65535).
2695 Otherwise color value.
2698 \begin_layout Subsubsection
2699 gui.bitmap_size(bitmap/dbitmap bitmap)
2702 \begin_layout Standard
2704 Can be used anywhere.
2708 \begin_layout Itemize
2709 bitmap: The bitmap to query.
2712 \begin_layout Standard
2713 The first return is the width, the second is the height.
2716 \begin_layout Subsubsection
2717 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2718 src, [palette pal, ]number sx, number sy, number w, number h[, number ck])
2721 \begin_layout Standard
2722 Blit a part of bitmap to another.
2723 Can be used anywhere.
2727 \begin_layout Itemize
2728 dest: Destination to blit to.
2731 \begin_layout Itemize
2732 dx: left edge of target
2735 \begin_layout Itemize
2736 dy: Top edge of target
2739 \begin_layout Itemize
2740 src: The source to blit from.
2741 If destination is paletted, must be paletted.
2744 \begin_layout Itemize
2748 Only present if src is paletted, but dest is not.
2751 \begin_layout Itemize
2752 sx: left edge of source
2755 \begin_layout Itemize
2756 sy: Top edge of source
2759 \begin_layout Itemize
2763 \begin_layout Itemize
2764 h: Height of region.
2767 \begin_layout Itemize
2769 Pixels of this color are not blitted.
2773 \begin_layout Itemize
2774 If bitmaps are bitmaps, this is color index of colorkey.
2775 Values outside range 0-65535 cause no key to be used as colorkey.
2778 \begin_layout Itemize
2779 If bitmaps are dbitmaps, this color value of colorkey.
2782 \begin_layout Itemize
2783 May be absent or nil for no colorkey blit.
2787 \begin_layout Subsubsection
2788 gui.bitmap_load_png(string filename)
2791 \begin_layout Standard
2792 Load a bitmap from PNG file.
2796 \begin_layout Itemize
2797 filename: The name of file to load the bitmap frame.
2800 \begin_layout Standard
2804 \begin_layout Itemize
2805 If the PNG is of color type 3 (PALETTE), returns two value.
2806 First is BITMAP containing the image data from the PNG and second is PALETTE
2807 containg the palette data from the PNG.
2810 \begin_layout Itemize
2811 For color types 0 (GRAY), 2 (RGB), 4 (GRAY_ALPHA) and 6 (RGBA), returns
2812 one DBITMAP containg the image data loaded from the PNG.
2815 \begin_layout Subsubsection
2816 gui.bitmap_load_pal(string filename)
2819 \begin_layout Standard
2820 Load a palette from file.
2824 \begin_layout Itemize
2825 filename: The name of the file.
2828 \begin_layout Standard
2829 The kinds of lines supported
2832 \begin_layout Itemize
2833 Blank or just whitespace: Ignored
2836 \begin_layout Itemize
2837 First non-whitespace is '#': Ignored
2840 \begin_layout Itemize
2841 <r> <g> <b>: Fully opaque color with specified RGB values (0-255)
2844 \begin_layout Itemize
2845 <r> <g> <b> <a>: Color with specified RGB values (0-255) and specified alpha
2846 (0-256, 0 being fully transparent and 256 fully opaque).
2849 \begin_layout Itemize
2850 transparent: Fully transparent color
2853 \begin_layout Subsubsection
2854 gui.bitmap_load_str(string content)
2857 \begin_layout Standard
2858 Like gui.bitmap_load, but reads the specified string directly as content.
2861 \begin_layout Subsubsection
2862 gui.bitmap_load_png_str(string base64content)
2865 \begin_layout Standard
2866 Like gui.bitmap_load_png, but reads the specified string (as base64-encoded)
2867 directly as content.
2870 \begin_layout Subsubsection
2871 gui.bitmap_load_pal_str(string content)
2874 \begin_layout Standard
2875 Like gui.bitmap_load_pal, but reads the specified string directly as content.
2878 \begin_layout Subsubsection
2882 \begin_layout Standard
2883 Request on_repaint() to happen as soon as possible.
2884 Can be used anywhere.
2887 \begin_layout Subsubsection
2888 gui.subframe_update(boolean on)
2891 \begin_layout Standard
2892 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2893 or not happen (on=false).
2894 Can be used anywhere.
2897 \begin_layout Subsubsection
2898 gui.screenshot(string filename)
2901 \begin_layout Standard
2902 Write PNG screenshot of the current frame (no drawings) to specified file.
2903 Can be used anywhere.
2906 \begin_layout Subsubsection
2907 gui.color(number r, number g, number b[, number a])
2910 \begin_layout Standard
2911 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2912 each component in scale 0-255.
2913 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2915 The default alpha is 256.
2918 \begin_layout Subsubsection
2919 gui.status(string name, string value)
2922 \begin_layout Standard
2924 \begin_inset Quotes eld
2928 \begin_inset Quotes erd
2931 to <value> in status area.
2932 Can be used anywhere.
2935 \begin_layout Subsubsection
2936 gui.rainbow(number step, number steps[, number color])
2939 \begin_layout Standard
2940 Perform hue rotation of color <color> (default bright red), by <step> steps.
2941 The number of steps per full rotation is given by absolute value of <steps>.
2944 \begin_layout Standard
2945 If <steps> is negative, the rotation will be counterclockwise.
2948 \begin_layout Subsubsection
2949 gui.screenshot(string filename)
2952 \begin_layout Standard
2953 Saves a screenshot into specified file.
2956 \begin_layout Subsubsection
2957 gui.loadfont(string filename)
2960 \begin_layout Standard
2961 Loads font from specified file (CUSTOMFONT object).
2964 \begin_layout Subsubsection
2965 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc[, number
2969 \begin_layout Standard
2970 Draw string with custom font to screen.
2971 The parameters are the same as in gui.text, except hlc is the halo color
2972 (default is no halo).
2976 \begin_layout Subsubsection
2977 gui.arrow(number x, number y, number length, number headwidth, number direction[,
2978 boolean fill[, number color[, number width[, number hthicknes]]]]
2981 \begin_layout Standard
2986 \begin_layout Itemize
2987 x: The x-coordinate of arrow tip.
2990 \begin_layout Itemize
2991 y: The y-coordinate of arrow tip.
2994 \begin_layout Itemize
2995 length: Length of arrow tail
2998 \begin_layout Itemize
2999 headwidth: Width of arrow head.
3003 \begin_layout Itemize
3004 direction: Direction of arrow.
3006 Each unit is 45 degree rotation counterclockwise.
3009 \begin_layout Itemize
3010 fill: If true, fill the arrow head (hthickness is ignored).
3011 Default is not to fill.
3014 \begin_layout Itemize
3015 color: Color of arrow (default white).
3018 \begin_layout Itemize
3019 width: Width of arrow tail.
3024 \begin_layout Itemize
3025 hthickness: Thickness of arrow head.
3026 Default is the same as tail width.
3029 \begin_layout Subsubsection
3030 gui.tilemap(number w, number h, number bw, number bh)
3033 \begin_layout Standard
3034 Create a new tilemap.
3038 \begin_layout Itemize
3039 w: The width of tilemap in tiles
3042 \begin_layout Itemize
3043 h: The height of tilemap in tiles
3046 \begin_layout Itemize
3047 bw: Width of each tile.
3050 \begin_layout Itemize
3051 bh: Height of each tile.
3054 \begin_layout Subsubsection
3055 TILEMAP:draw(number x, number y[, number x0[, number y0[, number w[, number
3059 \begin_layout Standard
3064 \begin_layout Itemize
3065 x: The x-position of upper left corner on screen.
3068 \begin_layout Itemize
3069 y: The y-position of upper left corner on screen.
3072 \begin_layout Itemize
3073 x0: The tilemap x coordinate corresponding to upper left corner of draw
3078 \begin_layout Itemize
3079 y0: The tilemap y coordinate corresponding to upper left corner of draw
3084 \begin_layout Itemize
3085 w: The width of draw area in pixels.
3086 Default: Width of whole tilemap.
3089 \begin_layout Itemize
3090 h: The width of draw area in pixels.
3091 Default: Height of whole tilemap.
3094 \begin_layout Subsubsection
3095 TILEMAP:set(number x, number y[, bitmap/dbitmap b, palette p])
3098 \begin_layout Standard
3099 Set a tile in tilemap.
3103 \begin_layout Itemize
3104 x: The x-position of tile to set.
3107 \begin_layout Itemize
3108 y: The y-position of tile to set.
3111 \begin_layout Itemize
3112 b: The bitmap to set.
3113 If nil, that cell is transparent.
3116 \begin_layout Itemize
3118 Only if <b> is bitmap.
3121 \begin_layout Subsubsection
3122 TILEMAP:get(number x, number y)
3125 \begin_layout Standard
3126 Get tile in tilemap (nil, dbitmap or bitmap/palette).
3130 \begin_layout Itemize
3131 x: The x-position of tile to get.
3134 \begin_layout Itemize
3135 y: The y-position of tile to get.
3138 \begin_layout Subsubsection
3142 \begin_layout Standard
3143 Return size of tilemap in tiles (width, height).
3146 \begin_layout Subsubsection
3150 \begin_layout Standard
3151 Return size of tilemap cells in pixels (width, height).
3154 \begin_layout Subsubsection
3155 TILEMAP:scroll(number ox, number oy[, number x[, number y[, number w[, number
3156 h[, boolean circx[, boolean circy]]]]]])
3159 \begin_layout Standard
3160 Scrolls tilemap tiles.
3164 \begin_layout Itemize
3165 ox: Number of tiles to scroll in x-direction.
3168 \begin_layout Itemize
3169 oy: Number of tiles to scroll in y-direction.
3172 \begin_layout Itemize
3173 x: Left edge of scroll window.
3177 \begin_layout Itemize
3178 y: Upper edge of scroll window.
3182 \begin_layout Itemize
3183 w: Width of scroll window.
3184 Default: Width of tilemap.
3187 \begin_layout Itemize
3188 h: Height of scroll window.
3189 Default: Height of tilemap.
3192 \begin_layout Itemize
3193 circx: If true, do circular rotation instead of shift in x-direction.
3196 \begin_layout Itemize
3197 circy: If true, do circular rotation instead of shift in y-direction.
3200 \begin_layout Subsection
3204 \begin_layout Standard
3206 Only available in on_input callback.
3209 \begin_layout Subsubsection
3210 input.get(number controller, number index)
3213 \begin_layout Standard
3214 Read the specified index (0-11) from specified controller (0-7).
3218 \begin_layout Itemize
3219 Uses physical controller numbering.
3220 Gamepad in port 2 is controller 4, not 1!
3223 \begin_layout Subsubsection
3224 input.set(number controller, number index, number value)
3227 \begin_layout Standard
3228 Write the specified index (0-11) from specified controller (0-7), storing
3233 \begin_layout Itemize
3234 Uses physical controller numbering.
3235 Gamepad in port 2 is controller 4, not 1!
3238 \begin_layout Subsubsection
3239 input.get2(number port, number controller, number index)
3242 \begin_layout Standard
3243 Read the specified input tuple.
3246 \begin_layout Itemize
3247 Port 0 is system port.
3250 \begin_layout Subsubsection
3251 input.set2(number port, number controller, number index, number value)
3254 \begin_layout Standard
3255 Write the specified input tuple.
3258 \begin_layout Itemize
3259 Port 0 is system port.
3262 \begin_layout Subsubsection
3263 input.lcid_to_pcid2(number lcid)
3266 \begin_layout Standard
3267 Look up physical pcid pair (port, controller) corresponding to specified
3268 logical controller (1-based).
3269 Returns nothing if controller does not exist.
3272 \begin_layout Subsubsection
3273 input.port_type(number port)
3276 \begin_layout Standard
3277 Return type of specified port.
3280 \begin_layout Subsubsection
3281 input.controller_info(number port, number controller)
3284 \begin_layout Standard
3285 Get controller info for specified controller.
3286 If controller does not exist, returns nil.
3287 Otherwise returns a table with following fields:
3290 \begin_layout Itemize
3291 type (string): Type of the controller.
3294 \begin_layout Itemize
3295 class (string): Class of the controller.
3298 \begin_layout Itemize
3299 classnum (number): Number of the controller within its class (1-based)
3302 \begin_layout Itemize
3303 lcid (number): Logical controller number of the controller.
3306 \begin_layout Itemize
3307 button_count (number): Number of buttons on controller
3310 \begin_layout Itemize
3311 buttons (array): Array of following info about each button:
3315 \begin_layout Itemize
3316 type (string): Type of button.
3318 \begin_inset Quotes eld
3322 \begin_inset Quotes erd
3326 \begin_inset Quotes eld
3330 \begin_inset Quotes erd
3334 \begin_inset Quotes eld
3338 \begin_inset Quotes erd
3342 \begin_inset Quotes eld
3346 \begin_inset Quotes erd
3352 \begin_layout Itemize
3353 name (string): Name of button.
3356 \begin_layout Itemize
3357 symbol (string): Symbol of button.
3358 Only present for type
3359 \begin_inset Quotes eld
3363 \begin_inset Quotes erd
3369 \begin_layout Itemize
3370 hidden (boolean): True if hidden button.
3375 \begin_layout Subsubsection
3379 \begin_layout Standard
3380 Signals that the button event should be vetoed.
3381 Only valid in on_button callback.
3384 \begin_layout Subsubsection
3385 input.geta(number controller)
3388 \begin_layout Standard
3389 Get input state for entiere controller.
3390 Returns 13 return values.
3393 \begin_layout Itemize
3394 1st return value: Bitmask: bit i is set if i:th index is nonzero
3397 \begin_layout Itemize
3398 2nd-13th return value: value of i:th index.
3401 \begin_layout Subsubsection
3402 input.seta(number controller, number bitmask, number args...)
3405 \begin_layout Standard
3406 Set state for entiere controller.
3407 args is up to 12 values for indices (overriding values in bitmask if specified).
3410 \begin_layout Subsubsection
3411 input.controllertype(number controller)
3414 \begin_layout Standard
3415 Get the type of controller as string.
3419 \begin_layout Itemize
3423 \begin_layout Itemize
3427 \begin_layout Itemize
3431 \begin_layout Itemize
3435 \begin_layout Subsubsection
3436 input.reset([number cycles])
3439 \begin_layout Standard
3441 If cycles is greater than zero, do delayed reset.
3442 0 (or no value) causes immediate reset.
3445 \begin_layout Itemize
3446 Only available with subframe flag false.
3449 \begin_layout Subsubsection
3453 \begin_layout Standard
3454 Returns table of tables of all available keys and axes.
3455 The first table is indexed by key name (platform-dependent!), and the inner
3456 table has the following fields:
3459 \begin_layout Itemize
3460 last_rawval: Last reported raw value for control.
3463 \begin_layout Itemize
3464 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
3465 pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
3468 \begin_layout Itemize
3469 cal_left: Minimum calibration value.
3470 Only meaningful with axis and pressure types.
3473 \begin_layout Itemize
3474 cal_center: Center calibration value.
3475 Only meaningful with axis and pressure types.
3478 \begin_layout Itemize
3479 cal_right: Maximum calibration value.
3480 Only meaningful with axis and pressure types.
3483 \begin_layout Itemize
3484 cal_tolerance: Dead zone tolerance.
3485 Only meaningful with axis and pressure types.
3488 \begin_layout Subsubsection
3489 input.keyhook(string key, boolean state)
3492 \begin_layout Standard
3493 Requests that keyhook events to be sent for key (state=true) or not sent
3497 \begin_layout Subsubsection
3498 input.joyget(number controller)
3501 \begin_layout Standard
3502 Returns table for current controls for specified controller.
3503 The names of fields vary by controller type.
3506 \begin_layout Itemize
3507 The buttons have the same name as those are referred to in other contexts
3511 \begin_layout Itemize
3513 \begin_inset Quotes eld
3517 \begin_inset Quotes erd
3521 \begin_inset Quotes eld
3525 \begin_inset Quotes erd
3531 \begin_layout Subsubsection
3532 input.joyset(number controller, table controls)
3535 \begin_layout Standard
3536 Set the the state of specified controller to values specified in specified
3540 \begin_layout Itemize
3541 nil does not change value
3544 \begin_layout Itemize
3545 true/false (buttons) and integers (axes) force value.
3548 \begin_layout Itemize
3549 string (button) inverts the input.
3552 \begin_layout Subsubsection
3553 input.lcid_to_pcid(number controller)
3556 \begin_layout Standard
3557 Return the physical index, physical port and controller number in port for
3558 specified (1-based) logical controller.
3561 \begin_layout Subsection
3565 \begin_layout Standard
3569 \begin_layout Subsubsection
3570 subtitle.byindex(number i)
3573 \begin_layout Standard
3574 Read the frame and length of ith subtitle.
3575 Returns nothing if not present.
3578 \begin_layout Subsubsection
3579 subtitle.set(number f, number l, string txt)
3582 \begin_layout Standard
3583 Set the text of subtitle.
3586 \begin_layout Subsubsection
3587 subtitle.get(number f, number l)
3590 \begin_layout Standard
3591 Get the text of subtitle.
3594 \begin_layout Subsubsection
3595 subtitle.delete(number f, number l)
3598 \begin_layout Standard
3599 Delete specified subtitle.
3602 \begin_layout Subsection
3606 \begin_layout Standard
3607 Host memory handling (extra memory saved to savestates).
3608 Host memory starts empty.
3611 \begin_layout Subsubsection
3612 hostmemory.read(number address)
3615 \begin_layout Standard
3616 Reads hostmemory slot address.
3617 Slot numbers out of range return false instead of numeric.
3620 \begin_layout Subsubsection
3621 hostmemory.write(number address, number value)
3624 \begin_layout Standard
3625 Writes hostmemory slot with 0-255.
3626 Slot numbers out of range cause extension of host memory slot space.
3629 \begin_layout Subsubsection
3630 hostmemory.readbyte(number address)
3633 \begin_layout Standard
3634 Read unsigned byte (1 element) from given address.
3635 Slots out of range return false.
3638 \begin_layout Subsubsection
3639 hostmemory.writebyte(number address, number value)
3642 \begin_layout Standard
3643 Write unsigned byte (1 element) to given slot.
3644 Slot numbers out of range cause extension.
3647 \begin_layout Subsubsection
3648 hostmemory.readsbyte(number address)
3651 \begin_layout Standard
3652 Read signed byte (1 element) from given address.
3653 Slots out of range return false.
3656 \begin_layout Subsubsection
3657 hostmemory.writesbyte(number address, number value)
3660 \begin_layout Standard
3661 Write signed byte (1 element) to given slot.
3662 Slot numbers out of range cause extension.
3665 \begin_layout Subsubsection
3666 hostmemory.readword(number address)
3669 \begin_layout Standard
3670 Read unsigned word (2 elements) from given address.
3671 Slots out of range return false.
3674 \begin_layout Subsubsection
3675 hostmemory.writeword(number address, number value)
3678 \begin_layout Standard
3679 Write unsigned word (2 elements) to given slot.
3680 Slot numbers out of range cause extension.
3683 \begin_layout Subsubsection
3684 hostmemory.readsword(number address)
3687 \begin_layout Standard
3688 Read signed word (2 elements) from given address.
3689 Slots out of range return false.
3692 \begin_layout Subsubsection
3693 hostmemory.writesword(number address, number value)
3696 \begin_layout Standard
3697 Write signed word (2 elements) to given slot.
3698 Slot numbers out of range cause extension.
3701 \begin_layout Subsubsection
3702 hostmemory.readdword(number address)
3705 \begin_layout Standard
3706 Read unsigned doubleword (4 elements) from given address.
3707 Slots out of range return false.
3710 \begin_layout Subsubsection
3711 hostmemory.writedword(number address, number value)
3714 \begin_layout Standard
3715 Write unsigned doubleword (4 elements) to given slot.
3716 Slot numbers out of range cause extension.
3719 \begin_layout Subsubsection
3720 hostmemory.readsdword(number address)
3723 \begin_layout Standard
3724 Read signed doubleword (4 elements) from given address.
3725 Slots out of range return false.
3728 \begin_layout Subsubsection
3729 hostmemory.writesdword(number address, number value)
3732 \begin_layout Standard
3733 Write signed doubleword (4 elements) to given slot.
3734 Slot numbers out of range cause extension.
3737 \begin_layout Subsubsection
3738 hostmemory.readqword(number address)
3741 \begin_layout Standard
3742 Read unsigned quadword (8 elements) from given address.
3743 Slots out of range return false.
3746 \begin_layout Subsubsection
3747 hostmemory.writeqword(number address, number value)
3750 \begin_layout Standard
3751 Write unsigned quadword (4 elements) to given slot.
3752 Slot numbers out of range cause extension.
3755 \begin_layout Subsubsection
3756 hostmemory.readsqword(number address)
3759 \begin_layout Standard
3760 Read signed quadword (8 elements) from given address.
3761 Slots out of range return false.
3764 \begin_layout Subsubsection
3765 hostmemory.writesqword(number address, number value)
3768 \begin_layout Standard
3769 Write signed quadword (8 elements) to given slot.
3770 Slot numbers out of range cause extension.
3773 \begin_layout Subsection
3777 \begin_layout Standard
3781 \begin_layout Subsubsection
3782 movie.currentframe()
3785 \begin_layout Standard
3786 Return number of current frame.
3789 \begin_layout Subsubsection
3793 \begin_layout Standard
3794 Return number of frames in movie.
3797 \begin_layout Subsubsection
3801 \begin_layout Standard
3802 Return true if in readonly mode, false if in readwrite.
3805 \begin_layout Subsubsection
3809 \begin_layout Standard
3810 Returns the current value of rerecord count.
3813 \begin_layout Subsubsection
3814 movie.set_readwrite()
3817 \begin_layout Standard
3818 Set readwrite mode (does not cause on_readwrite callback).
3821 \begin_layout Subsubsection
3822 movie.frame_subframes(number frame)
3825 \begin_layout Standard
3826 Count number of subframes in specified frame (frame numbers are 1-based)
3830 \begin_layout Subsubsection
3831 movie.read_subframes(number frame, number subframe)
3834 \begin_layout Standard
3835 Read specifed subframe in specified frame and return data as array (100
3836 elements, numbered 0-99 currently).
3839 \begin_layout Subsubsection
3843 \begin_layout Standard
3844 Returns the current value of the RTC as a pair (second, subsecond).
3847 \begin_layout Subsubsection
3848 movie.unsafe_rewind([UNSAFEREWIND state])
3851 \begin_layout Standard
3852 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3855 \begin_layout Itemize
3856 If called without argument, causes emulator to start process of setting
3857 unsafe rewind point.
3858 When this has finished, callback on_set_rewind occurs, passing the rewind
3859 state to lua script.
3862 \begin_layout Itemize
3863 If called with argument, causes emulator rewind to passed rewind point as
3865 Readwrite mode is implicitly activated.
3868 \begin_layout Standard
3869 The following warnings apply to unsafe rewinding:
3872 \begin_layout Itemize
3873 There are no safety checks against misuse (that's what
3874 \begin_inset Quotes eld
3878 \begin_inset Quotes erd
3884 \begin_layout Itemize
3885 Only call rewind from timeline rewind point was set from.
3888 \begin_layout Itemize
3889 Only call rewind from after the rewind point was set.
3892 \begin_layout Subsubsection
3893 movie.copy_movie([INPUTMOVIE movie])
3896 \begin_layout Standard
3897 Copies specified movie (if none or nil, the active movie) as new movie object
3901 \begin_layout Standard
3902 Also available as method in INPUTFRAME.
3905 \begin_layout Subsubsection
3906 movie.get_frame([INPUTMOVIE movie,] number frame)
3909 \begin_layout Standard
3910 Get INPUTFRAME object corresponding to specified frame in specified movie.
3913 \begin_layout Standard
3914 Also available as method in INPUTFRAME.
3917 \begin_layout Subsubsection
3918 movie.set_frame([INPUTMOVIE movie,] number frame, INPUTFRAME data)
3921 \begin_layout Standard
3922 Set data in specified frame.
3923 Note: Past can't be edited in active movie.
3926 \begin_layout Standard
3927 Also available as method in INPUTFRAME.
3930 \begin_layout Subsubsection
3931 movie.get_size([INPUTMOVIE movie])
3934 \begin_layout Standard
3935 Return number of subframes in specified movie.
3938 \begin_layout Standard
3939 Also available as method in INPUTFRAME.
3942 \begin_layout Subsubsection
3943 movie.count_frames([INPUTMOVIE movie])
3946 \begin_layout Standard
3947 Return number of frames in movie.
3950 \begin_layout Standard
3951 Also available as method in INPUTFRAME.
3954 \begin_layout Subsubsection
3955 movie.find_frame([INPUTMOVIE movie], number frame)
3958 \begin_layout Standard
3959 Returns starting subframe of given frame (frame numbers are 1-based).
3960 Returns -1 if frame number is bad.
3963 \begin_layout Standard
3964 Also available as method in INPUTFRAME.
3967 \begin_layout Subsubsection
3968 movie.blank_frame([INPUTMOVIE movie])
3971 \begin_layout Standard
3972 Return blank INPUTFRAME with frame type from specified movie.
3975 \begin_layout Standard
3976 Also available as method in INPUTFRAME.
3979 \begin_layout Subsubsection
3980 movie.append_frames([INPUTMOVIE movie,] number frames)
3983 \begin_layout Standard
3984 Append specified number of frames.
3987 \begin_layout Standard
3988 Also available as method in INPUTFRAME.
3991 \begin_layout Subsubsection
3992 movie.append_frame([INPUTMOVIE movie,] INPUTFRAME frame)
3995 \begin_layout Standard
3996 Append specified frame.
3997 Past of current movie can't be edited.
4000 \begin_layout Standard
4001 Also available as method in INPUTFRAME.
4004 \begin_layout Subsubsection
4005 movie.truncate([INPUTMOVIE movie,] number frames)
4008 \begin_layout Standard
4009 Truncate the specified movie to specified number of frames.
4012 \begin_layout Standard
4013 Also available as method in INPUTFRAME.
4016 \begin_layout Subsubsection
4017 movie.edit([INPUTMOVIE movie,] number frame, number port, number controller,
4018 number control, number/bool value)
4021 \begin_layout Standard
4022 Change specified control in specified frame in specified movie.
4023 Past can't be edited in active movie.
4026 \begin_layout Standard
4027 Also available as method in INPUTFRAME.
4030 \begin_layout Subsubsection
4031 movie.copy_frames2([INPUTMOVIE dstmov,] number dst, [INPUTMOVIE srcmov,]
4032 number src, number count)
4035 \begin_layout Standard
4036 Copy specified number of frames between two movies.
4037 The copy proceeeds in forward direction.
4040 \begin_layout Subsubsection
4041 movie.copy_frames([INPUTMOVIE mov,] number dst, number src, number count,
4045 \begin_layout Standard
4046 Copy specified number of frames from one point in movie to another.
4047 If backwards is true, the copy will be done backwards.
4050 \begin_layout Standard
4051 Also available as method in INPUTFRAME.
4054 \begin_layout Subsubsection
4055 movie.serialize([INPUTMOVIE movie,] string filename, bool binary)
4058 \begin_layout Standard
4059 Serialize given movie into file.
4060 If binary is true, binary format (more compact and much faster) is used.
4063 \begin_layout Standard
4064 Also available as method in INPUTFRAME.
4067 \begin_layout Subsubsection
4068 movie.unserialize(INPUTFRAME template, string filename, bool binary)
4071 \begin_layout Standard
4072 Unserialize movie from file.
4073 The given frame is used as template to decide the frame type.
4074 If binary is true, binary format is decoded (much faster).
4077 \begin_layout Standard
4078 Also available as method in INPUTFRAME.
4081 \begin_layout Subsubsection
4082 movie.current_first_subframe()
4085 \begin_layout Standard
4086 Returns first subframe in current frame.
4089 \begin_layout Subsubsection
4090 movie.pollcounter(number port, number controller, number control)
4093 \begin_layout Standard
4094 Returns number of times the specified control has been polled this frame.
4097 \begin_layout Subsubsection
4098 INPUTFRAME::get_button(number port, number controller, number control)
4101 \begin_layout Standard
4102 Returns state of given button as boolean.
4105 \begin_layout Subsubsection
4106 INPUTFRAME::get_axis(number port, number controller, number control)
4109 \begin_layout Standard
4110 Returns state of given axis as number.
4113 \begin_layout Subsubsection
4114 INPUTFRAME::set_button(number port, number controller, number control, number/bo
4118 \begin_layout Standard
4119 Set the given button/axis to given value.
4122 \begin_layout Subsubsection
4123 INPUTFRAME::set_axis(number port, number controller, number control)
4126 \begin_layout Standard
4130 \begin_layout Subsubsection
4131 INPUTFRAME::serialize()
4134 \begin_layout Standard
4135 Return string representation of frame.
4138 \begin_layout Subsubsection
4139 INPUTFRAME::unserialize(string data)
4142 \begin_layout Standard
4143 Set current frame from given data.
4146 \begin_layout Subsubsection
4147 INPUTFRAME::get_stride()
4150 \begin_layout Standard
4151 Return number of bytes needed to store the input frame.
4152 Mainly useful for some debugging.
4155 \begin_layout Subsection
4159 \begin_layout Standard
4160 Routines for settings manipulation
4163 \begin_layout Subsubsection
4164 settings.get(string name)
4167 \begin_layout Standard
4168 Get value of setting.
4169 If setting is blank, returns false.
4170 If setting value can't be obtained, returns (nil, error message).
4173 \begin_layout Subsubsection
4174 settings.set(string name, string value)
4177 \begin_layout Standard
4178 Set value of setting.
4179 If setting can't be set, returns (nil, error message).
4182 \begin_layout Subsubsection
4183 settings.is_set(string name)
4186 \begin_layout Standard
4187 Returns if setting is set.
4188 If setting does not exist, returns (nil, error message).
4191 \begin_layout Subsubsection
4192 settings.blank(string name)
4195 \begin_layout Standard
4196 Blanks a setting and returns true.
4197 If setting can't be blanked, returns (nil, error message).
4200 \begin_layout Subsection
4204 \begin_layout Standard
4205 Contains various functions for managing memory
4208 \begin_layout Subsubsection
4212 \begin_layout Standard
4213 Returns the number of VMAs
4216 \begin_layout Subsubsection
4217 memory.read_vma(number index)
4220 \begin_layout Standard
4221 Reads the specified VMA (indices start from zero).
4222 Trying to read invalid VMA gives nil.
4223 The read VMA is table with the following fields:
4226 \begin_layout Itemize
4227 region_name (string): The readable name of the VMA
4230 \begin_layout Itemize
4231 baseaddr (number): Base address of the VMA
4234 \begin_layout Itemize
4235 lastaddr (number): Last address in the VMA.
4238 \begin_layout Itemize
4239 size (number): The size of VMA in bytes.
4242 \begin_layout Itemize
4243 readonly (boolean): True of the VMA corresponds to ROM.
4246 \begin_layout Itemize
4247 iospace (boolean): True if the VMA is I/O space.
4250 \begin_layout Itemize
4251 native_endian (boolean): True if the VMA has native endian as opposed to
4255 \begin_layout Subsubsection
4256 memory.find_vma(number address)
4259 \begin_layout Standard
4260 Finds the VMA containing specified address.
4261 Returns table in the same format as read_vma or nil if not found.
4264 \begin_layout Subsubsection
4265 memory.readbyte(number address)
4268 \begin_layout Standard
4269 Reads the specified address as unsigned byte and returns the result.
4272 \begin_layout Subsubsection
4273 memory.readsbyte(number address)
4276 \begin_layout Standard
4277 Reads the specified address as signed byte and returns the result.
4280 \begin_layout Subsubsection
4281 memory.writebyte(number address, number value)
4284 \begin_layout Standard
4285 Writes the specified value (negative values undergo 2's complement) to specified
4286 address (as a byte).
4289 \begin_layout Subsubsection
4290 memory.readword(number address)
4293 \begin_layout Standard
4294 Reads the specified address as unsigned word and returns the result.
4297 \begin_layout Subsubsection
4298 memory.readsword(number address)
4301 \begin_layout Standard
4302 Reads the specified address as signed word and returns the result.
4305 \begin_layout Subsubsection
4306 memory.writeword(number address, number value)
4309 \begin_layout Standard
4310 Writes the specified value (negative values undergo 2's complement) to specified
4311 address (as a word).
4314 \begin_layout Subsubsection
4315 memory.readdword(number address)
4318 \begin_layout Standard
4319 Reads the specified address as unsigned doubleword and returns the result.
4322 \begin_layout Subsubsection
4323 memory.readsdword(number address)
4326 \begin_layout Standard
4327 Reads the specified address as signed doubleword and returns the result.
4330 \begin_layout Subsubsection
4331 memory.writedword(number address, number value)
4334 \begin_layout Standard
4335 Writes the specified value (negative values undergo 2's complement) to specified
4336 address (as a doubleword).
4339 \begin_layout Subsubsection
4340 memory.readqword(number address)
4343 \begin_layout Standard
4344 Reads the specified address as unsigned quadword and returns the result.
4347 \begin_layout Subsubsection
4348 memory.readsqword(number address)
4351 \begin_layout Standard
4352 Reads the specified address as signed quadword and returns the result.
4355 \begin_layout Subsubsection
4356 memory.writeqword(number address, number value)
4359 \begin_layout Standard
4360 Writes the specified value (negative values undergo 2's complement) to specified
4361 address (as a quadword).
4364 \begin_layout Subsubsection
4365 memory.hash_region(number base, number size)
4368 \begin_layout Standard
4369 Hash specified number of bytes starting from specified address and return
4373 \begin_layout Subsubsection
4377 \begin_layout Standard
4378 Hash the current system state.
4379 Mainly useful for debugging savestates.
4382 \begin_layout Subsubsection
4383 memory.readregion(number base, number size)
4386 \begin_layout Standard
4387 Read a region of memory.
4390 \begin_layout Itemize
4391 Warning: If the region crosses VMA boundary, the results are undefined.
4394 \begin_layout Subsubsection
4395 memory.map<type>([number base, number size])
4398 \begin_layout Standard
4399 Returns a table mapping specified memory aperture for read/write.
4400 If parameters are omitted, entiere map space is the aperture.
4403 \begin_layout Itemize
4404 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
4407 \begin_layout Subsubsection
4408 memory.writeregion(number base, number size, table data)
4411 \begin_layout Standard
4412 Write a region of memory.
4415 \begin_layout Itemize
4416 Warning: If the region crosses VMA boundary, the results are undefined.
4419 \begin_layout Subsubsection
4420 memory.map_structure()
4423 \begin_layout Standard
4424 Returns a new mapping structure (MMAP_STRUCT)
4427 \begin_layout Subsubsection
4428 MMAP_STRUCT(string key, number address, string type)
4431 \begin_layout Standard
4432 Bind key in mmap structure to specified address with specified type.
4435 \begin_layout Itemize
4436 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
4439 \begin_layout Subsubsection
4440 memory.read_expr(string expr)
4443 \begin_layout Standard
4444 Evaluate specified watch expression and return result
4447 \begin_layout Subsection
4451 \begin_layout Standard
4452 Contains functions for manipulating subtitles.
4455 \begin_layout Subsubsection
4456 subtitle.byindex(number index)
4459 \begin_layout Standard
4460 Get (basetime, length) pair of specified subtitle index or nothing if index
4464 \begin_layout Subsubsection
4465 subtitle.get(number basetime, number length)
4468 \begin_layout Standard
4469 Read the specified subtitle.
4471 \begin_inset Quotes eld
4475 \begin_inset Quotes erd
4478 if the subtitle does not exist.
4481 \begin_layout Subsubsection
4482 subtitle.set(number basetime, number length, string content)
4485 \begin_layout Standard
4486 Set the specified subtitle.
4489 \begin_layout Subsubsection
4490 subtitle.deltete(number basetime, number length)
4493 \begin_layout Standard
4494 Delete the specified subtitle.
4497 \begin_layout Subsection
4501 \begin_layout Standard
4502 Contains copy of global variables from time of Lua initialization.
4506 \begin_layout Subsection
4510 \begin_layout Standard
4511 Various callbacks to Lua that can occur.
4514 \begin_layout Subsubsection
4515 Callback: on_paint(bool not_synth)
4518 \begin_layout Standard
4519 Called when screen is being painted.
4520 Any gui.* calls requiring graphic context draw on the screen.
4523 \begin_layout Standard
4524 not_synth is true if this hook is being called in response to received frame,
4528 \begin_layout Subsubsection
4529 Callback: on_video()
4532 \begin_layout Standard
4533 Called when video dump frame is being painted.
4534 Any gui.* calls requiring graphic context draw on the video.
4537 \begin_layout Subsubsection
4538 Callback: on_frame_emulated()
4541 \begin_layout Standard
4542 Called when emulating frame has completed and on_paint()/on_video() calls
4543 are about to be issued.
4546 \begin_layout Subsubsection
4547 Callback: on_frame()
4550 \begin_layout Standard
4551 Called on each starting whole frame.
4554 \begin_layout Subsubsection
4555 Callback: on_startup()
4558 \begin_layout Standard
4559 Called when the emulator is starting (lsnes.rc and --run files has been run).
4562 \begin_layout Subsubsection
4563 Callback: on_rewind()
4566 \begin_layout Standard
4567 Called when rewind movie to beginning has completed.
4570 \begin_layout Subsubsection
4571 Callback: on_pre_load(string name)
4574 \begin_layout Standard
4575 Called just before savestate/movie load occurs (note: loads are always delayed,
4576 so this occurs even when load was initiated by lua).
4579 \begin_layout Subsubsection
4580 Callback: on_err_load(string name)
4583 \begin_layout Standard
4584 Called if loadstate goes wrong.
4587 \begin_layout Subsubsection
4588 Callback: on_post_load(string name, boolean was_savestate)
4591 \begin_layout Standard
4592 Called on successful loadstate.
4593 was_savestate gives if this was a savestate or a movie.
4596 \begin_layout Subsubsection
4597 Callback: on_pre_save(string name, boolean is_savestate)
4600 \begin_layout Standard
4601 Called just before savestate save occurs (note: movie saves are synchronous
4602 and won't trigger these callbacks if called from Lua).
4605 \begin_layout Subsubsection
4606 Callback: on_err_save(string name)
4609 \begin_layout Standard
4610 Called if savestate goes wrong.
4613 \begin_layout Subsubsection
4614 Callback: on_post_save(string name, boolean is_savestate)
4617 \begin_layout Standard
4618 Called on successful savaestate.
4619 is_savestate gives if this was a savestate or a movie.
4622 \begin_layout Subsubsection
4626 \begin_layout Standard
4627 Called when emulator is shutting down.
4630 \begin_layout Subsubsection
4631 Callback: on_input(boolean subframe)
4634 \begin_layout Standard
4635 Called when emulator is just sending input to bsnes core.
4636 Warning: This is called even in readonly mode, but the results are ignored.
4639 \begin_layout Subsubsection
4640 Callback: on_reset()
4643 \begin_layout Standard
4644 Called when SNES is reset.
4647 \begin_layout Subsubsection
4648 Callback: on_readwrite()
4651 \begin_layout Standard
4652 Called when moving into readwrite mode as result of
4653 \begin_inset Quotes eld
4657 \begin_inset Quotes erd
4660 command (note: moving to rwmode by Lua won't trigger this, as per recursive
4664 \begin_layout Subsubsection
4665 Callback: on_snoop(number port, number controller, number index, number
4669 \begin_layout Standard
4670 Called each time bsnes asks for input.
4671 The value is the final value to be sent to bsnes core (readonly mode, autohold
4672 and autofire have been taken into account).
4673 Might be useful when translating movies to format suitable for console
4675 Note: There is no way to modify the value to be sent.
4678 \begin_layout Itemize
4679 Not called if callback on_snoop2 is defined.
4682 \begin_layout Subsubsection
4683 Callback: on_snoop2(number port, number controller, number index, number
4687 \begin_layout Standard
4688 Like on_snoop, but reserves port 0 for system, having first user port be
4692 \begin_layout Subsubsection
4693 Callback: on_keyhook(string keyname, table state)
4696 \begin_layout Standard
4697 Sent when key that has keyhook events requested changes state.
4698 Keyname is name of the key (group) and state is the state (same kind as
4699 table values in input.raw).
4702 \begin_layout Subsubsection
4706 \begin_layout Standard
4707 Called when requested by set_idle_timeout(), the timeout has expired and
4708 emulator is waiting.
4711 \begin_layout Subsubsection
4712 Callback: on_timer()
4715 \begin_layout Standard
4716 Called when requested by set_idle_timeout() and the timeout has expired
4717 (regardless if emulator is waiting).
4720 \begin_layout Subsubsection
4721 Callback: on_set_rewind(UNSAFEREWIND r)
4724 \begin_layout Standard
4725 Called when unsafe rewind object has been constructed.
4728 \begin_layout Subsubsection
4729 Callback: on_pre_rewind()
4732 \begin_layout Standard
4733 Called just before unsafe rewind is about to occur.
4736 \begin_layout Subsubsection
4737 Callback: on_post_rewind()
4740 \begin_layout Standard
4741 Called just after unsafe rewind has occured.
4744 \begin_layout Subsubsection
4745 Callback: on_button(number port, number controller, number index, string
4749 \begin_layout Standard
4750 Called on controller button press, with following parameters:
4753 \begin_layout Itemize
4754 port: Port number (0 is system)
4757 \begin_layout Itemize
4758 controller: Controller within port
4761 \begin_layout Itemize
4762 index: Index of button.
4765 \begin_layout Itemize
4766 type: Type of event, one of:
4770 \begin_layout Itemize
4771 \begin_inset Quotes eld
4775 \begin_inset Quotes erd
4778 : Button was pressed.
4781 \begin_layout Itemize
4782 \begin_inset Quotes eld
4786 \begin_inset Quotes erd
4789 : Button was released.
4792 \begin_layout Itemize
4793 \begin_inset Quotes eld
4797 \begin_inset Quotes erd
4803 \begin_layout Itemize
4804 \begin_inset Quotes eld
4808 \begin_inset Quotes erd
4811 : Released from hold.
4814 \begin_layout Itemize
4815 \begin_inset Quotes eld
4819 \begin_inset Quotes erd
4822 : Typing input on button.
4825 \begin_layout Itemize
4826 \begin_inset Quotes eld
4830 \begin_inset Quotes erd
4833 : Typing input undone.
4836 \begin_layout Itemize
4837 \begin_inset Quotes eld
4841 \begin_inset Quotes erd
4844 : Analog action on axis.
4848 \begin_layout Subsubsection
4849 Callback: on_movie_lost(STRING kind)
4852 \begin_layout Standard
4853 Called just before something would happen that could lose movie data.
4857 \begin_layout Itemize
4858 readwrite: Switching to readwrite mode.
4861 \begin_layout Itemize
4862 reload: ROM is being reloaded in readwrite mode.
4865 \begin_layout Itemize
4866 load: New movie is being loaded.
4869 \begin_layout Itemize
4870 unsaferewind: Unsafe rewind is happening.
4873 \begin_layout Section
4877 \begin_layout Itemize
4878 The editor edits in-memory movie.
4881 \begin_layout Itemize
4882 Because past can't be edited and readwrite mode doesn't allow future, editing
4890 \begin_layout Itemize
4891 Keyboard triggers the normal hotkeys and bindings.
4894 \begin_layout Subsection
4898 \begin_layout Itemize
4899 Clicking on cell in future (indicated by lack of redish background) toggles
4900 it (if it is a button) or prompts for a value (if it is an axis)
4903 \begin_layout Itemize
4904 Dragging vertically toggles sequence of buttons or changes a sequence of
4908 \begin_layout Subsection
4909 Right button actions
4912 \begin_layout Standard
4913 The right mouse button pops up a context-sensitive menu:
4916 \begin_layout Itemize
4917 Toggle <something>: Toggle this button
4920 \begin_layout Itemize
4921 Change <something>: Change this axis value
4924 \begin_layout Itemize
4925 Insert frame after: Insert a frame after this frame
4928 \begin_layout Itemize
4929 Append frame: Append a frame to movie
4932 \begin_layout Itemize
4933 Append frames: Append specified number of frames to movie
4936 \begin_layout Itemize
4937 Delete frame: Delete this frame
4940 \begin_layout Itemize
4941 Delete subframe: Delete this subframe
4944 \begin_layout Itemize
4945 Truncate movie: Delete this subframe and everything after it.
4948 \begin_layout Itemize
4949 Scroll to frame: Prompt for a frame and scroll the display to that frame.
4952 \begin_layout Itemize
4953 Scroll to current frame: Scroll the display to current position
4956 \begin_layout Itemize
4957 Run to frame: Prompts for frame and runs the emulation to that frame.
4960 \begin_layout Itemize
4961 Change number of lines visible: Change the height of the movie display (1
4965 \begin_layout Itemize
4966 Lock scroll to playback: While playing back or rewinding movies, the display
4967 will follow if enabled.
4970 \begin_layout Section
4971 Memory watch expression syntax
4974 \begin_layout Standard
4975 Memory watch expressions are in RPN (Reverse Polish Notation).
4976 At the end of expression, the top entry on stack is taken as the final
4980 \begin_layout Standard
4984 \begin_layout Itemize
4985 Evaluation order is strictly left to right.
4988 \begin_layout Itemize
4989 a is the entry on top of stack
4992 \begin_layout Itemize
4993 b is the entry immediately below top of stack
4996 \begin_layout Itemize
4997 ; separates values to be pushed (no intermediate pop).
5000 \begin_layout Itemize
5001 After end of element, all used stack slots are popped and all results are
5005 \begin_layout Itemize
5006 When pushing multiple values, the pushes occur in order shown.
5009 \begin_layout Standard
5010 The following operators are available:
5013 \begin_layout Itemize
5017 \begin_layout Itemize
5021 \begin_layout Itemize
5025 \begin_layout Itemize
5029 \begin_layout Itemize
5033 \begin_layout Itemize
5037 \begin_layout Itemize
5038 b : read_signed_byte(a)
5041 \begin_layout Itemize
5045 \begin_layout Itemize
5046 d : read_signed_dword(a)
5049 \begin_layout Itemize
5053 \begin_layout Itemize
5055 \begin_inset Formula $\pi$
5061 \begin_layout Itemize
5062 q : read_signed_qword(a)
5065 \begin_layout Itemize
5069 \begin_layout Itemize
5073 \begin_layout Itemize
5077 \begin_layout Itemize
5081 \begin_layout Itemize
5082 w : read_signed_word(a)
5085 \begin_layout Itemize
5089 \begin_layout Itemize
5090 B : read_unsigned_byte(a)
5093 \begin_layout Itemize
5094 C<number>z : Push number <number> to stack.
5097 \begin_layout Itemize
5098 D : read_unsigned_dword(a)
5101 \begin_layout Itemize
5102 C0x<number>z : Push number <number> (hexadecimal) to stack.
5105 \begin_layout Itemize
5106 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
5110 \begin_layout Itemize
5111 Q : read_unsigned_qword(a)
5114 \begin_layout Itemize
5115 R<digit> : round a to <digit> digits.
5118 \begin_layout Itemize
5119 W : read_unsigned_word(a)
5122 \begin_layout Subsection
5126 \begin_layout Standard
5127 C0x007e0878zWC0x007e002czW-
5130 \begin_layout Enumerate
5131 Push value 0x7e0878 on top of stack (C0x007e0878z).
5134 \begin_layout Enumerate
5135 Pop the value on top of stack (0x7e0878), read word value at that address
5136 and push the result,call it x1 (W).
5139 \begin_layout Enumerate
5140 Push value 0x7e002c on top of stack (C0x007e002cz).
5143 \begin_layout Enumerate
5144 Pop the value on top of stack (0x7e002c), read word value at that address
5145 and push the result,call it x2 (W).
5148 \begin_layout Enumerate
5149 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
5153 \begin_layout Enumerate
5154 Since the expression ends, the final memory watch result is the top one
5155 on stack, which is x2 - x1.
5158 \begin_layout Section
5159 Modifier and key names:
5162 \begin_layout Subsection
5166 \begin_layout Subsubsection
5170 \begin_layout Standard
5171 Following modifier names are known:
5174 \begin_layout Itemize
5175 ctrl, lctrl, rctrl: Control keys
5178 \begin_layout Itemize
5179 alt, lalt, ralt: ALT keys.
5182 \begin_layout Itemize
5183 shift, lshift, rshift: Shift keys.
5186 \begin_layout Itemize
5187 meta, lmeta, rmeta: Meta keys.
5190 \begin_layout Itemize
5191 num, caps: Numlock/Capslock (these are sticky!)
5194 \begin_layout Itemize
5198 \begin_layout Subsubsection
5202 \begin_layout Standard
5203 Following key names are known:
5206 \begin_layout Itemize
5207 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
5208 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
5209 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
5210 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
5211 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
5212 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
5213 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
5214 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
5215 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
5216 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
5217 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
5218 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
5219 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
5220 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
5221 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
5222 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
5223 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
5224 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
5225 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
5226 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
5227 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
5228 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
5229 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
5230 break, menu, power, euro, undo
5233 \begin_layout Itemize
5234 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
5235 hardware-dependent scan code of <n> (useful to bind those keys that don't
5236 have symbolic names).
5239 \begin_layout Subsubsection
5240 Joystick pseudo-keys:
5243 \begin_layout Itemize
5244 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
5247 \begin_layout Itemize
5248 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
5251 \begin_layout Itemize
5252 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
5255 \begin_layout Itemize
5256 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
5259 \begin_layout Itemize
5260 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
5263 \begin_layout Itemize
5264 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
5265 position (axis modes axis and axis_inverse).
5268 \begin_layout Itemize
5269 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
5270 position (axis modes axis and axis_inverse).
5273 \begin_layout Itemize
5274 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
5278 \begin_layout Subsubsection
5282 \begin_layout Itemize
5283 Escape: Enter/Exit Command mode, cancel modal dialogs.
5286 \begin_layout Itemize
5287 Return (also KPEnter): Execute command, ok modal dialog.
5290 \begin_layout Itemize
5291 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
5295 \begin_layout Itemize
5296 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
5300 \begin_layout Itemize
5301 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
5304 \begin_layout Itemize
5305 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
5308 \begin_layout Itemize
5309 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
5312 \begin_layout Itemize
5313 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
5316 \begin_layout Itemize
5318 if no num lock; command mode): Delete character to right of cursor.
5321 \begin_layout Itemize
5322 Insert (also KP0 if no num lock; command mode): Toggle between insert /
5326 \begin_layout Itemize
5327 Backspace (command mode): Delete character to left of cursor.
5330 \begin_layout Itemize
5331 CTRL+LEFT (also ALT+B; command mode): Previous word.
5334 \begin_layout Itemize
5335 CTRL+RIGHT (also ALT+F; command mode): Next word.
5338 \begin_layout Itemize
5339 ALT+D (also CTRL+W; command mode): Delete word.
5342 \begin_layout Itemize
5343 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
5346 \begin_layout Subsection
5350 \begin_layout Subsubsection
5354 \begin_layout Standard
5355 Following modifier names are known:
5358 \begin_layout Itemize
5362 \begin_layout Itemize
5366 \begin_layout Itemize
5370 \begin_layout Itemize
5374 \begin_layout Itemize
5378 \begin_layout Subsubsection
5382 \begin_layout Standard
5383 Following key names are known:
5386 \begin_layout Itemize
5387 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
5388 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
5389 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
5390 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
5391 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
5392 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
5393 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
5394 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
5395 pause, capital, end, home, lefT, up, right, down, select, print, execute,
5396 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
5397 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
5398 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
5399 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
5400 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
5401 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
5402 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
5403 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
5404 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
5405 windows_right, windows_menu, command, special1, special2, special3, special4,
5406 special5, special6, special7, special8, special9, special10, special11,
5407 special12, special13, special14, special15, special16, special17, special18,
5408 special19, special20
5411 \begin_layout Section
5415 \begin_layout Standard
5416 Movie file is .zip archive in itself, normal ZIP archive tools work on it
5417 (note: If you recompress it, do not use compression methods other than
5418 store and deflate and especially do not use encryption of any kind).
5421 \begin_layout Subsection
5422 Detecting clean start/SRAM/Savestate
5425 \begin_layout Itemize
5427 \begin_inset Quotes eld
5431 \begin_inset Quotes erd
5434 it is savestate, otherwise:
5437 \begin_layout Itemize
5438 If file has members with names starting
5439 \begin_inset Quotes eld
5443 \begin_inset Quotes erd
5446 it is movie starting from SRAM, otherwise:
5449 \begin_layout Itemize
5450 It is movie starting from clear state.
5453 \begin_layout Subsection
5457 \begin_layout Standard
5458 Type of game ROM and region (as one line).
5462 \begin_layout Standard
5463 \begin_inset Tabular
5464 <lyxtabular version="3" rows="8" columns="3">
5465 <features tabularvalignment="middle">
5466 <column alignment="center" valignment="top" width="0">
5467 <column alignment="center" valignment="top" width="0">
5468 <column alignment="center" valignment="top" width="0">
5470 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5473 \begin_layout Plain Layout
5479 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5482 \begin_layout Plain Layout
5488 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5491 \begin_layout Plain Layout
5499 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5502 \begin_layout Plain Layout
5508 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5511 \begin_layout Plain Layout
5517 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5520 \begin_layout Plain Layout
5528 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5531 \begin_layout Plain Layout
5537 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5540 \begin_layout Plain Layout
5546 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5549 \begin_layout Plain Layout
5557 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5560 \begin_layout Plain Layout
5566 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5569 \begin_layout Plain Layout
5575 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5578 \begin_layout Plain Layout
5586 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5589 \begin_layout Plain Layout
5595 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5598 \begin_layout Plain Layout
5604 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5607 \begin_layout Plain Layout
5615 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5618 \begin_layout Plain Layout
5624 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5627 \begin_layout Plain Layout
5633 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5636 \begin_layout Plain Layout
5644 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5647 \begin_layout Plain Layout
5653 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5656 \begin_layout Plain Layout
5662 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5665 \begin_layout Plain Layout
5673 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5676 \begin_layout Plain Layout
5682 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5685 \begin_layout Plain Layout
5691 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5694 \begin_layout Plain Layout
5708 \begin_layout Standard
5712 \begin_layout Standard
5713 \begin_inset Tabular
5714 <lyxtabular version="3" rows="3" columns="2">
5715 <features tabularvalignment="middle">
5716 <column alignment="center" valignment="top" width="0">
5717 <column alignment="center" valignment="top" width="0">
5719 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5722 \begin_layout Plain Layout
5728 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5731 \begin_layout Plain Layout
5739 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5742 \begin_layout Plain Layout
5748 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5751 \begin_layout Plain Layout
5759 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5762 \begin_layout Plain Layout
5768 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5771 \begin_layout Plain Layout
5785 \begin_layout Subsection
5789 \begin_layout Standard
5790 Contains type of port #1 (as one line).
5791 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
5792 If not present, defaults to 'gamepad'.
5795 \begin_layout Subsection
5799 \begin_layout Standard
5800 Contains type of port #2 (as one line).
5801 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
5802 'justifier' and 'justifiers'.
5803 If not present, defaults to 'none'.
5806 \begin_layout Subsection
5810 \begin_layout Standard
5811 Contains name of the game (as one line).
5814 \begin_layout Subsection
5818 \begin_layout Standard
5819 Contains authors, one per line.
5820 Part before '|' is the full name, part after is the nickname.
5823 \begin_layout Subsection
5827 \begin_layout Standard
5829 \begin_inset Quotes eld
5833 \begin_inset Quotes erd
5837 Used to reject other saves.
5840 \begin_layout Subsection
5841 Member: controlsversion
5844 \begin_layout Standard
5846 \begin_inset Quotes eld
5850 \begin_inset Quotes erd
5854 Used to identify what controls are there.
5857 \begin_layout Subsection
5859 \begin_inset Quotes eld
5863 \begin_inset Quotes erd
5869 \begin_layout Standard
5870 Contains bsnes core version number (as one line).
5873 \begin_layout Subsection
5877 \begin_layout Standard
5878 Contains project ID (as one line).
5879 Used to identify if two movies are part of the same project.
5882 \begin_layout Subsection
5883 Member: {rom,slota,slotb}{,xml}.sha256
5886 \begin_layout Standard
5887 Contains SHA-256 of said ROM or ROM mapping file (as one line).
5888 Absent if corresponding file is absent.
5891 \begin_layout Subsection
5892 Member: moviesram.<name>
5895 \begin_layout Standard
5896 Raw binary startup SRAM of kind <name>.
5897 Only present in savestates and movies starting from SRAM.
5900 \begin_layout Subsection
5904 \begin_layout Standard
5905 Contains frame number (as one line) of frame movie was saved on.
5906 Only present in savestates.
5909 \begin_layout Subsection
5913 \begin_layout Standard
5914 Current value of lag counter (as one line).
5915 Only present in savestates.
5918 \begin_layout Subsection
5919 Member: pollcounters
5922 \begin_layout Standard
5923 Contains poll counters (currently 100 of them), one per line.
5924 Each line is raw poll count if DRDY is set for it.
5925 Otherwise it is negative poll count minus one.
5926 Only present in savestates.
5929 \begin_layout Subsection
5933 \begin_layout Standard
5934 Raw binary dump of host memory.
5935 Only present in savestates.
5938 \begin_layout Subsection
5942 \begin_layout Standard
5943 The raw binary savestate itself.
5944 Savestate detection uses this file, only present in savestates.
5947 \begin_layout Subsection
5951 \begin_layout Standard
5952 Screenshot of current frame.
5953 Only present in savestates.
5954 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
5956 Height of image is inferred from the width and size of data.
5959 \begin_layout Subsection
5963 \begin_layout Standard
5964 Raw binary SRAM of kind <name> at time of savestate.
5965 Only present in savestates.
5968 \begin_layout Subsection
5972 \begin_layout Standard
5973 The actual input track, one line per subframe (blank lines are skipped).
5976 \begin_layout Itemize
5977 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
5978 part of same frame as previous, otherwise it starts a new frame.
5981 \begin_layout Itemize
5982 First subframe must start a new frame.
5985 \begin_layout Standard
5986 Length of movie in frames is number of lines in input file that start a
5990 \begin_layout Subsection
5994 \begin_layout Standard
5999 \begin_layout Itemize
6000 Each line is in form <firstframe> <numframes> <text>.
6003 \begin_layout Itemize
6004 Linefeed is encoded as
6006 n, backslash is encoded as
6013 \begin_layout Subsection
6017 \begin_layout Standard
6018 Contains textual base-10 rerecord count (as one line; emulator just writes
6019 this, it doesn't read it) + 1.
6022 \begin_layout Subsection
6026 \begin_layout Standard
6027 This member stores set of load IDs.
6028 There is one load ID per rerecord (plus one corresponding to start of project).
6031 \begin_layout Itemize
6032 This member constists of concatenation of records
6035 \begin_layout Itemize
6036 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
6040 \begin_layout Itemize
6041 IDs are interpretted as 256-bit big-endian integers with warparound.
6044 \begin_layout Itemize
6045 Initial predicted ID is all zeroes.
6048 \begin_layout Standard
6049 Format of each record is:
6052 \begin_layout Itemize
6053 1 byte: Opcode byte.
6054 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
6058 \begin_layout Itemize
6059 32-prefixlen bytes of ID.
6062 \begin_layout Itemize
6063 countlen bytes of big-endian count (count).
6066 \begin_layout Standard
6067 Records are processed as follows:
6070 \begin_layout Itemize
6071 To form the first ID encoded by record, take the first prefixlen bytes predicted
6072 ID and append the read ID value to it.
6073 The result is the first ID encoded.
6076 \begin_layout Itemize
6077 If countlen is 0, record encodes 1 ID.
6080 \begin_layout Itemize
6081 If countlen is 1, record encodes 2+count IDs.
6084 \begin_layout Itemize
6085 If countlen is 2, record encodes 258+count IDs.
6088 \begin_layout Itemize
6089 If countlen is 3, record encodes 65794+count IDs.
6092 \begin_layout Itemize
6093 The new predicted ID is the next ID after last one encoded by the record.
6096 \begin_layout Standard
6097 The number of rerecords + 1 is equal to the sum of number of IDs encoded
6101 \begin_layout Subsection
6102 Member: starttime.second
6105 \begin_layout Standard
6106 Movie starting time, second part.
6107 Epoch is Unix epoch.
6108 Default is 1,000,000,000.
6111 \begin_layout Subsection
6112 Member: starttime.subsecond
6115 \begin_layout Standard
6116 Movie starting time, subsecond part.
6121 \begin_layout Subsection
6122 Member: savetime.second
6125 \begin_layout Standard
6126 Movie saving time, second part.
6127 Default is starttime.second.
6128 Only present in savestates.
6131 \begin_layout Subsection
6132 Member: savetime.subsecond
6135 \begin_layout Standard
6136 Movie saving time, subsecond part.
6137 Default is starttime.subsecond.
6138 Only present in savestates.
6141 \begin_layout Section
6142 lsvs file format (commentary tracks)
6145 \begin_layout Subsection
6149 \begin_layout Itemize
6150 Each cluster is 8kB (8192 bytes) in size.
6153 \begin_layout Itemize
6154 Cluster n starts at offset 8192*n in file.
6157 \begin_layout Itemize
6158 The following clusters are system special:
6162 \begin_layout Itemize
6163 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
6166 \begin_layout Itemize
6167 Cluster 1 (superblock)
6171 \begin_layout Subsection
6175 \begin_layout Itemize
6176 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
6180 \begin_layout Itemize
6181 This cluster table consists of 2048 4-byte big-endian integers.
6184 \begin_layout Itemize
6185 Each entry describes a cluster in 16MB supercluster, in order.
6188 \begin_layout Itemize
6189 The valid values for entries are:
6193 \begin_layout Itemize
6194 0x00000000: Free cluster
6197 \begin_layout Itemize
6198 0x00000001: Last cluster in chain.
6201 \begin_layout Itemize
6202 0xFFFFFFFF: System cluster (cluster tables and superblock)
6205 \begin_layout Itemize
6206 (anything else): Number of next cluster in chain.
6207 Must not be multiple of 2048.
6211 \begin_layout Itemize
6212 Due to limitations of the format, there can be at most 2097052 superclusters,
6213 giving maximum file size of 16TB.
6216 \begin_layout Subsection
6220 \begin_layout Itemize
6221 The stream table chain always starts in cluster 2.
6224 \begin_layout Itemize
6225 Otherwise, it follows normal chaining.
6228 \begin_layout Itemize
6229 The stream table consists of 16-byte entries:
6233 \begin_layout Itemize
6234 The first 8 bytes of entry give big-endian beginning position of stream
6235 in units of 1/48000 s.
6238 \begin_layout Itemize
6239 The next 4 bytes of entry give big-endian beginning cluster for control
6241 0 here marks the entry as not present.
6244 \begin_layout Itemize
6245 The last 4 bytes of entry give big-endian beginning cluster for codec data.
6249 \begin_layout Itemize
6250 Stream table clusters are normal clusters, following normal chaining.
6253 \begin_layout Itemize
6254 The stream begnning position is not guarenteed unique.
6255 There can be multiple streams with the same starting position in the file.
6258 \begin_layout Subsection
6262 \begin_layout Itemize
6263 The stream control data consists of entries 4 bytes each:
6267 \begin_layout Itemize
6268 The first 2 bytes of entry gives big-endian length of packet
6271 \begin_layout Itemize
6272 The next byte of entry gives audio length of packet in units of 1/400 s.
6275 \begin_layout Itemize
6276 The last byte is control byte.
6280 \begin_layout Itemize
6281 0 means this entry is not present and the control data ends.
6284 \begin_layout Itemize
6285 1 is valid control entry.
6290 \begin_layout Itemize
6291 The stream control data can also end by running into end of the readable
6296 \begin_layout Itemize
6297 This happens if there happens to be exact multiple of 2048 packets in stream
6298 and number of packets is nonzero.
6302 \begin_layout Itemize
6303 These clusters follow normal chaining.
6306 \begin_layout Subsection
6310 \begin_layout Itemize
6311 Stream codec data consists of raw Opus data packets packed back to back
6312 with nothing in between.
6315 \begin_layout Itemize
6316 Warning: Due to internal limitations, this data must reside in the first
6317 65536 superclusters (that is, the first 1TB of the file).
6320 \begin_layout Subsection
6324 \begin_layout Itemize
6325 The superblock is stored in cluster 1.
6329 \begin_layout Itemize
6330 The first 11 bytes are
6331 \begin_inset Quotes eld
6335 \begin_inset Quotes erd
6341 \begin_layout Itemize
6342 The rest are unused.
6345 \begin_layout Itemize
6346 This cluster 1 is marked as system special.
6349 \begin_layout Section
6350 Known ROM extensions
6353 \begin_layout Itemize
6354 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
6357 \begin_layout Itemize
6358 DMG cartridge ROMs: dmg, gb.
6361 \begin_layout Itemize
6362 GBC cartridge ROMs: cgb, gbc.
6365 \begin_layout Section
6369 \begin_layout Itemize
6370 The first line must be:
6371 \begin_inset Quotes eld
6375 \begin_inset Quotes erd
6381 \begin_layout Itemize
6382 There is one needed line:
6383 \begin_inset Quotes eld
6387 \begin_inset Quotes erd
6391 This sets system type to <systype>.
6392 The following system types are valid:
6396 \begin_layout Itemize
6400 \begin_layout Itemize
6401 bsx (BS-X non-slotted)
6404 \begin_layout Itemize
6405 bsxslotted (BS-X slotted)
6408 \begin_layout Itemize
6409 sufamiturbo (Sufami Turbo)
6412 \begin_layout Itemize
6413 sgb (Super Game Boy)
6416 \begin_layout Itemize
6420 \begin_layout Itemize
6421 gbc (Game Boy Color)
6424 \begin_layout Itemize
6425 gbc_gba (Game Boy Color with GBA initial register values)
6429 \begin_layout Itemize
6430 Optionally a region can be specified:
6431 \begin_inset Quotes eld
6435 \begin_inset Quotes erd
6439 The following values are valid:
6443 \begin_layout Itemize
6444 autodetect (Autodetect region: snes and sgb only)
6447 \begin_layout Itemize
6448 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
6451 \begin_layout Itemize
6452 pal (PAL: snes, sgb)
6455 \begin_layout Itemize
6456 world (World: dmg, gbc, gbc_gba)
6460 \begin_layout Itemize
6461 ROM images are loaded as:
6462 \begin_inset Quotes eld
6466 \begin_inset Quotes erd
6470 The following types are valid:
6474 \begin_layout Itemize
6475 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
6476 BIOS in bsx, bsxslotted, sufamiturbo)
6479 \begin_layout Itemize
6480 bsx (Cartridge ROM in bsx, bsxslotted)
6483 \begin_layout Itemize
6484 slot-a (Cartridge ROM in sufamiturbo)
6487 \begin_layout Itemize
6488 slot-b (Cartridge ROM in sufamiturbo)
6492 \begin_layout Itemize
6493 ROM markup can be loaded as:
6494 \begin_inset Quotes eld
6498 \begin_inset Quotes erd
6502 The types valid are the same as for ROMs.
6505 \begin_layout Itemize
6506 Patches can be loaded as
6507 \begin_inset Quotes eld
6510 patch[<offset>] <type> <file>
6511 \begin_inset Quotes erd
6515 The types are the same as for ROMs.
6519 \begin_layout Itemize
6520 Offset is given in form [+-]<number>.
6521 Usually offset is either +0 or -512.
6524 \begin_layout Itemize
6525 Default offset is +0.
6529 \begin_layout Subsection
6533 \begin_layout LyX-Code
6537 \begin_layout LyX-Code
6541 \begin_layout LyX-Code
6542 rom rom speedygonzales.sfc
6545 \begin_layout LyX-Code
6546 patch-512 rom sonicthehedgehog.ips
6549 \begin_layout Subsection
6553 \begin_layout LyX-Code
6557 \begin_layout LyX-Code
6561 \begin_layout LyX-Code
6562 rom rom supergameboy.sfc
6565 \begin_layout LyX-Code
6566 rom dmg megamanV.dmg
6569 \begin_layout Section
6570 Quick'n'dirty encode guide
6573 \begin_layout Enumerate
6574 Start the emulator and load the ROM and movie file.
6577 \begin_layout Enumerate
6578 Set large AVI option 'set-setting avi-large on'
6581 \begin_layout Enumerate
6582 Enable dumping 'dump-avi tmpdump'
6585 \begin_layout Enumerate
6586 Unpause and let it run until you want to end dumping.
6589 \begin_layout Enumerate
6590 Close the emulator (closing the window is the easiest way).
6594 \begin_layout Enumerate
6595 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
6596 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
6599 \begin_layout Enumerate
6600 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
6603 \begin_layout Enumerate
6604 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
6605 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
6608 \begin_layout Enumerate
6609 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
6610 Now final.mkv contains quick'n'dirty encode.
6613 \begin_layout Section
6614 Axis configurations for some gamepad types:
6617 \begin_layout Subsection
6621 \begin_layout Standard
6622 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
6625 \begin_layout LyX-Code
6626 set-axis joystick0axis2 pressure-+
6629 \begin_layout LyX-Code
6630 set-axis joystick0axis5 pressure-+
6633 \begin_layout Itemize
6634 This is needed for SDL only.
6635 EVDEV sets those types correctly.
6638 \begin_layout Subsection
6640 \begin_inset Quotes eld
6644 \begin_inset Quotes erd
6650 \begin_layout Standard
6651 Axes 8-19 should be disabled.
6654 \begin_layout LyX-Code
6655 set-axis joystick0axis8 disabled
6658 \begin_layout LyX-Code
6659 set-axis joystick0axis9 disabled
6662 \begin_layout LyX-Code
6663 set-axis joystick0axis10 disabled
6666 \begin_layout LyX-Code
6667 set-axis joystick0axis11 disabled
6670 \begin_layout LyX-Code
6671 set-axis joystick0axis12 disabled
6674 \begin_layout LyX-Code
6675 set-axis joystick0axis13 disabled
6678 \begin_layout LyX-Code
6679 set-axis joystick0axis14 disabled
6682 \begin_layout LyX-Code
6683 set-axis joystick0axis15 disabled
6686 \begin_layout LyX-Code
6687 set-axis joystick0axis16 disabled
6690 \begin_layout LyX-Code
6691 set-axis joystick0axis17 disabled
6694 \begin_layout LyX-Code
6695 set-axis joystick0axis18 disabled
6698 \begin_layout LyX-Code
6699 set-axis joystick0axis19 disabled
6702 \begin_layout Section
6706 \begin_layout Subsection
6707 Problems from BSNES core:
6710 \begin_layout Itemize
6711 The whole pending save stuff.
6714 \begin_layout Itemize
6715 Lack of layer hiding.
6718 \begin_layout Itemize
6719 It is slow (especially accuracy).
6722 \begin_layout Itemize
6723 Firmwares can't be loaded from ZIP archives.
6726 \begin_layout Subsection
6730 \begin_layout Itemize
6731 Modifiers don't work with pseudo-keys (SDL, EVDEV).
6734 \begin_layout Itemize
6735 Audio for last dumped frame is not itself dumped.
6738 \begin_layout Itemize
6739 Audio in UI is pretty bad in quality if game doesn't run at full speed.
6742 \begin_layout Itemize
6743 No menus, command based interface (SDL).
6746 \begin_layout Itemize
6747 Long commands don't scroll.
6750 \begin_layout Section
6754 \begin_layout Subsection
6758 \begin_layout Itemize
6762 \begin_layout Itemize
6763 Fix dumper video corruption with levels 10-18.
6766 \begin_layout Subsection
6770 \begin_layout Itemize
6774 \begin_layout Itemize
6775 Lots of code cleanups
6778 \begin_layout Itemize
6779 Lua interface to settings
6782 \begin_layout Itemize
6783 Allow specifying AVI borders without Lua
6786 \begin_layout Itemize
6787 Fix scaling if vscale > 1 and originx > 0 (left border exists)
6790 \begin_layout Itemize
6791 on_snoop lua callback
6794 \begin_layout Itemize
6795 Faster movie loading and saving.
6798 \begin_layout Subsection
6802 \begin_layout Itemize
6806 \begin_layout Subsection
6810 \begin_layout Itemize
6814 \begin_layout Itemize
6815 Save jukebox functionality.
6818 \begin_layout Subsection
6822 \begin_layout Itemize
6823 Try to fix some nasty failing movie load edge cases
6826 \begin_layout Itemize
6827 Allow specifying scripts to run on command line.
6830 \begin_layout Subsection
6834 \begin_layout Itemize
6835 Major source code reorganization.
6838 \begin_layout Itemize
6839 Backup savestates before overwriting.
6842 \begin_layout Itemize
6843 Don't crash if loading initial state fails.
6846 \begin_layout Subsection
6850 \begin_layout Itemize
6854 \begin_layout Itemize
6855 Fix author name parsing
6858 \begin_layout Itemize
6859 Fix rerecord counting
6862 \begin_layout Itemize
6863 (SDL) Print messages to console if SDL is uninitialized
6866 \begin_layout Itemize
6867 Add movieinfo program
6870 \begin_layout Itemize
6871 Fix loading movies starting from SRAM.
6874 \begin_layout Subsection
6878 \begin_layout Itemize
6879 Add support for unattended dumping
6882 \begin_layout Itemize
6883 Fix compiling for Win32
6886 \begin_layout Itemize
6887 Don't lock up if sound can't be initialized
6890 \begin_layout Itemize
6891 Strip trailing CR from commands
6894 \begin_layout Itemize
6895 Don't try to do dubious things in global ctors (fix crash on startup)
6898 \begin_layout Subsection
6902 \begin_layout Itemize
6903 Small documentation tweaking
6906 \begin_layout Itemize
6910 \begin_layout Itemize
6911 Fix major bug in modifier matching
6914 \begin_layout Subsection
6918 \begin_layout Itemize
6919 Lots of documentation fixes
6922 \begin_layout Itemize
6923 Use dedicated callbacks for event backcomm., not commands.
6926 \begin_layout Itemize
6927 Ensure that the watchdog is not hit when executing delayed reset.
6930 \begin_layout Itemize
6931 Remove errant tab from joystick message.
6934 \begin_layout Subsection
6938 \begin_layout Itemize
6939 Make autofire operate in absolute time, not linear time
6942 \begin_layout Itemize
6943 Reinitialize controls when resuming from loadstate
6946 \begin_layout Itemize
6947 Some more code cleanups
6950 \begin_layout Itemize
6951 If Lua allocator fails, call OOM_panic()
6954 \begin_layout Itemize
6955 Byte/word/dword/qword sized host memory write/read functions.
6958 \begin_layout Itemize
6959 Dump at correct framerate if dumping interlaced NTSC (height=448).
6962 \begin_layout Subsection
6966 \begin_layout Itemize
6967 Actually include the complete source code
6970 \begin_layout Itemize
6974 \begin_layout Subsection
6978 \begin_layout Itemize
6979 Document {save,start}time.{,sub}second.
6982 \begin_layout Itemize
6983 Intercept time() from bsnes core.
6986 \begin_layout Subsection
6990 \begin_layout Itemize
6991 Allow disabling time() interception (allow build on Mac OS X)
6994 \begin_layout Itemize
6995 Use SDLMain on Mac OS X (make SDL not crash)
6998 \begin_layout Itemize
6999 Disable delayed resets (just plain too buggy for now).
7002 \begin_layout Itemize
7006 \begin_layout Itemize
7007 Use 16-bit for graphics/video instead of 32-bit.
7010 \begin_layout Itemize
7011 gui.rectangle/gui.pixel
7014 \begin_layout Itemize
7018 \begin_layout Itemize
7019 New CSCD writer implementation.
7022 \begin_layout Subsection
7026 \begin_layout Itemize
7027 Fix interaction of * and +.
7030 \begin_layout Itemize
7034 \begin_layout Itemize
7035 Use gettimeofday()/usleep(), these seem portable enough.
7038 \begin_layout Itemize
7039 Move joystick axis manipulation to keymapper code.
7042 \begin_layout Itemize
7043 Changes to how read-only works.
7046 \begin_layout Itemize
7047 Refactor controller input code.
7050 \begin_layout Subsection
7054 \begin_layout Itemize
7055 Fix mouseclick scale compensation.
7058 \begin_layout Itemize
7059 Draw area boundaries correctly in SDL code.
7062 \begin_layout Itemize
7066 \begin_layout Itemize
7067 Fix CSCD output (buffer overrun and race condition).
7070 \begin_layout Subsection
7074 \begin_layout Itemize
7075 JMD dumping support.
7078 \begin_layout Itemize
7079 Allow unattended dumping to JMD.
7082 \begin_layout Itemize
7086 \begin_layout Itemize
7087 Switch back to 32-bit colors.
7090 \begin_layout Itemize
7091 Add Lua function gui.color.
7094 \begin_layout Itemize
7095 Use some new C++11 features in GCC 4.6.
7098 \begin_layout Itemize
7099 Be prepared for core frequency changes.
7102 \begin_layout Itemize
7103 Pass colors in one chunk from Lua.
7106 \begin_layout Subsection
7110 \begin_layout Itemize
7111 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
7112 memory.read_vma() and memory.find_vma().
7115 \begin_layout Itemize
7116 Numerious documentation fixups
7119 \begin_layout Itemize
7120 RTC time format changed
7123 \begin_layout Itemize
7124 Reformat flags display
7127 \begin_layout Itemize
7128 Allow lua package name to be overridden
7131 \begin_layout Itemize
7132 SDUMP (high-quality dumping).
7135 \begin_layout Itemize
7136 Split platform support to plugins.
7139 \begin_layout Itemize
7140 Make all sound plugins support basic sound commands
7143 \begin_layout Itemize
7144 Support portaudio for sound.
7147 \begin_layout Itemize
7148 Allow disable Lua/SDL searching.
7151 \begin_layout Itemize
7152 Upconvert colors when copying lcscreen to screen.
7155 \begin_layout Itemize
7156 Reorganize source tree.
7159 \begin_layout Itemize
7160 Evdev joystick support.
7163 \begin_layout Itemize
7164 Refactor more code into generic window code.
7167 \begin_layout Subsection
7171 \begin_layout Itemize
7172 Refactor message handling.
7175 \begin_layout Itemize
7179 \begin_layout Itemize
7183 \begin_layout Itemize
7184 Finish pending saves before load/quit.
7187 \begin_layout Itemize
7188 Wxwidgets graphics plugin.
7191 \begin_layout Subsection
7195 \begin_layout Itemize
7196 Get rid of win32-crap.[ch]pp.
7199 \begin_layout Itemize
7200 Move files around a lot.
7203 \begin_layout Itemize
7204 Get rid of need for host C++ compiler.
7207 \begin_layout Itemize
7211 \begin_layout Itemize
7212 Refactor inter-component communication.
7215 \begin_layout Itemize
7219 \begin_layout Itemize
7220 Fix crash on multiline aliases.
7223 \begin_layout Itemize
7224 Load/Save settings in wxwidgets gui.
7227 \begin_layout Subsection
7231 \begin_layout Itemize
7232 Patch problems in bsnes core
7235 \begin_layout Itemize
7236 SNES is little-endian, not big-endian!
7239 \begin_layout Itemize
7240 Fix memory corruption in lcscreen::load()
7243 \begin_layout Subsection
7247 \begin_layout Itemize
7248 Fix interpretting repeat counts in rrdata loading.
7251 \begin_layout Itemize
7252 New lua callback: on_frame()
7255 \begin_layout Itemize
7256 Remove calls to runtosave() that aren't supposed to be there
7259 \begin_layout Itemize
7260 Lua function: movie.read_rtc()
7263 \begin_layout Itemize
7264 Ignore src/fonts/font.cpp
7267 \begin_layout Itemize
7268 Fix more bsnes core problems
7271 \begin_layout Itemize
7272 Control bsnes random seeding
7275 \begin_layout Itemize
7279 \begin_layout Itemize
7280 Some bsnes core debugging features (state dump and state hash)
7283 \begin_layout Itemize
7284 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
7285 it was 'lsnes rr0-beta21').
7288 \begin_layout Subsection
7292 \begin_layout Itemize
7293 Fix memory corruption due to macro/field mixup
7296 \begin_layout Itemize
7297 search-memory update
7300 \begin_layout Itemize
7301 Allow direct-mapped framebuffer
7304 \begin_layout Itemize
7305 SDL: Use SDL_ANYFORMAT if possible
7308 \begin_layout Itemize
7309 SDMP2SOX: 2s delay modes.
7312 \begin_layout Itemize
7316 \begin_layout Itemize
7317 Use sed -E, not sed -r.
7318 Fixes building on Mac OS X.
7321 \begin_layout Itemize
7322 Wxwidgets: Save jukebox on exit
7325 \begin_layout Itemize
7326 Fix RTC if using load-movie on savestate.
7329 \begin_layout Itemize
7330 Fix crash related to full console mode.
7333 \begin_layout Subsection
7337 \begin_layout Itemize
7338 Wxwidgets: Allow bringing application to foreground on Mac OS X.
7341 \begin_layout Itemize
7342 Wxwidgets: Allow compiling on Mac OS X.
7345 \begin_layout Itemize
7346 Use movie compare instead of movie hashing (faster save/load).
7349 \begin_layout Itemize
7353 \begin_layout Subsection
7357 \begin_layout Itemize
7358 sdmp2sox: Pad soundtrack if using -l or -L.
7361 \begin_layout Itemize
7362 sdmp2sox: Fix NTSC overscan.
7365 \begin_layout Itemize
7366 sdmp2sox: Add AR correction mode.
7369 \begin_layout Itemize
7370 call lua_close() when exiting.
7373 \begin_layout Itemize
7374 Fix zip_writer bug causing warnings from info-zip and error from advzip.
7377 \begin_layout Subsection
7381 \begin_layout Itemize
7382 Fix IPS patching code (use bsnes core IPS patcher).
7385 \begin_layout Itemize
7386 Implement BPS patching (using bsnes core IPS patcher).
7389 \begin_layout Itemize
7390 Add feature to load headered ROMs.
7393 \begin_layout Subsection
7397 \begin_layout Itemize
7398 Show command names when showing keybindings
7401 \begin_layout Subsection
7405 \begin_layout Itemize
7406 Fix pause-on-end to be actually controllable
7409 \begin_layout Itemize
7410 SDL: Poll all events in queue, not just first one (fixes slowness in command
7414 \begin_layout Itemize
7415 Wxwidgets: Fix ROM loading.
7418 \begin_layout Subsection
7422 \begin_layout Itemize
7423 Lua: Add gui.textH, gui.textV, gui.textHV
7426 \begin_layout Itemize
7427 Fix text colors on SDL on Mac OS X
7430 \begin_layout Itemize
7431 Mode 'F' for finished in readonly mode.
7434 \begin_layout Itemize
7438 \begin_layout Itemize
7439 Reliably pause after skip poll
7442 \begin_layout Itemize
7443 Split UI and core into their own threads
7446 \begin_layout Subsection
7450 \begin_layout Itemize
7451 Remove leftover dummy SRAM slot
7454 \begin_layout Itemize
7455 Fix controller numbers.
7458 \begin_layout Subsection
7462 \begin_layout Itemize
7463 Fix lsnes-dumpavi after interface change.
7466 \begin_layout Itemize
7467 Also give BSNES patches for v085.
7470 \begin_layout Itemize
7471 Pack movie data in memory.
7474 \begin_layout Subsection
7478 \begin_layout Itemize
7479 Fix framecount/length given when loading movies.
7482 \begin_layout Itemize
7483 Controller command memory leak fixes.
7486 \begin_layout Itemize
7487 Don't leak palette if freeing screen object.
7490 \begin_layout Subsection
7494 \begin_layout Itemize
7498 \begin_layout Itemize
7499 Wxwidgets: Allow controlling dumper from the menu.
7502 \begin_layout Subsection
7506 \begin_layout Itemize
7507 Rewrite parts of manual
7510 \begin_layout Itemize
7511 Lua: Make it work with Lua 5.2.
7514 \begin_layout Subsection
7518 \begin_layout Itemize
7519 Win32: Fix compile errors.
7522 \begin_layout Subsection
7526 \begin_layout Itemize
7527 Refactor controller input code.
7530 \begin_layout Itemize
7531 Fix crash when using command line on SDL / Mac OS X.
7534 \begin_layout Subsection
7538 \begin_layout Itemize
7539 Delete core/coroutine (obsolete)
7542 \begin_layout Itemize
7543 Lag input display by one frame.
7546 \begin_layout Itemize
7547 Rewind movie to beginning function.
7550 \begin_layout Itemize
7551 Fix wrong frame number reported to Lua when repainting after loadstate
7554 \begin_layout Itemize
7555 Support UI editing of jukebox
7558 \begin_layout Itemize
7559 Wxwidgets: Save settings on exit.
7562 \begin_layout Itemize
7563 Support ${project} for filenames
7566 \begin_layout Itemize
7567 SDL: Fix command history
7570 \begin_layout Subsection
7574 \begin_layout Itemize
7575 Fix some order-of-global-ctor bugs.
7578 \begin_layout Subsection
7582 \begin_layout Itemize
7583 Fix crashes when quitting on Win32.
7586 \begin_layout Subsection
7590 \begin_layout Itemize
7591 EVDEV: Queue keypresses from joystick, don't send directly
7594 \begin_layout Itemize
7595 Wxwidgets: Load-Preserve that actually works.
7598 \begin_layout Subsection
7602 \begin_layout Itemize
7603 Wxwidgets: GUI for memory search.
7606 \begin_layout Itemize
7607 Warn about using synchronous queue in UI callback.
7610 \begin_layout Subsection
7614 \begin_layout Itemize
7615 Remember last saved file for each ROM
7618 \begin_layout Itemize
7619 Support MT dumping via boost.
7622 \begin_layout Itemize
7626 \begin_layout Itemize
7630 \begin_layout Itemize
7631 Make mouse be ordinary input instead of special-casing
7634 \begin_layout Itemize
7635 SDL: Don't screw up commands with NUL codepoints.
7638 \begin_layout Subsection
7642 \begin_layout Itemize
7643 Merge status panel and main window
7646 \begin_layout Itemize
7647 True movie slot support (the rest of it)
7650 \begin_layout Itemize
7651 SDL: Fix compilation error
7654 \begin_layout Itemize
7655 Elminate cross calls in dump menu code.
7658 \begin_layout Subsection
7662 \begin_layout Itemize
7663 Cancel pending saves command
7666 \begin_layout Itemize
7667 Wxwidgets: Code refactoring
7670 \begin_layout Itemize
7671 Wxwidgets: Fix system -> reset
7674 \begin_layout Itemize
7675 Wxwidgets: Read watch expressions in the right thread
7678 \begin_layout Subsection
7682 \begin_layout Itemize
7683 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
7687 \begin_layout Itemize
7688 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
7691 \begin_layout Itemize
7692 Don't append trailing '-' to prefix when saving movie.
7695 \begin_layout Itemize
7696 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
7699 \begin_layout Subsection
7703 \begin_layout Itemize
7704 Document memory watch syntax.
7707 \begin_layout Subsection
7711 \begin_layout Itemize
7712 Fix unattended dumping (lsnes-dumpavi)
7715 \begin_layout Itemize
7719 \begin_layout Itemize
7720 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
7723 \begin_layout Itemize
7724 Add option to control sample rate preturbation in AVI dumper
7727 \begin_layout Subsection
7731 \begin_layout Itemize
7732 Wxwidgets: Fix dumper submodes
7735 \begin_layout Itemize
7736 Set core controller types before loadstate
7739 \begin_layout Subsection
7743 \begin_layout Itemize
7744 Fix compiling with bsnes v086.
7747 \begin_layout Subsection
7751 \begin_layout Itemize
7752 Don't prompt before quitting
7755 \begin_layout Itemize
7756 Start unpaused, preserve pause/unpause over load.
7759 \begin_layout Itemize
7760 Try to autodetect if ROM is headered.
7763 \begin_layout Itemize
7764 Wxwidgets: Only bring up ROM patching screen if specifically requested.
7767 \begin_layout Itemize
7768 Allow configuring some hotkeys.
7771 \begin_layout Subsection
7775 \begin_layout Itemize
7776 Lots of code cleanups
7779 \begin_layout Itemize
7780 Fix JMD compression (JMD dumping was broken)
7783 \begin_layout Itemize
7784 Don't crash if Lua C function throws an exception.
7787 \begin_layout Itemize
7788 Support bitmap drawing in Lua.
7791 \begin_layout Itemize
7792 Fix bsnes v085/v086 patches.
7795 \begin_layout Itemize
7796 Improve stability on win32.
7799 \begin_layout Subsection
7803 \begin_layout Itemize
7804 Don't corrupt movie if movie length is integer multiple of frames per page.
7807 \begin_layout Subsection
7811 \begin_layout Itemize
7812 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
7815 \begin_layout Itemize
7816 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
7817 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
7821 \begin_layout Itemize
7822 Wxwidgets: Fix internal focus lost (hotkeys stop working)
7825 \begin_layout Itemize
7826 Wxwidgets: Fix broken modifiers
7829 \begin_layout Itemize
7830 on_paint has parameter now.
7833 \begin_layout Itemize
7834 Optional initital fill for bitmaps
7837 \begin_layout Itemize
7838 Fix palette changing.
7841 \begin_layout Itemize
7842 Optimize rendering a bit.
7845 \begin_layout Itemize
7849 \begin_layout Subsection
7853 \begin_layout Itemize
7854 Movieinfo: Fix display of port #2 type.
7857 \begin_layout Itemize
7858 Call on_input() after loadstate.
7861 \begin_layout Subsection
7865 \begin_layout Itemize
7866 Fix writing port2 data to movie.
7869 \begin_layout Itemize
7870 Fix SRAM handling with Bsnes v087.
7873 \begin_layout Subsection
7877 \begin_layout Itemize
7878 Library loading support
7881 \begin_layout Itemize
7882 Built-in TSCC encoder
7885 \begin_layout Itemize
7886 Hi-color (256T colors) dumping.
7889 \begin_layout Itemize
7890 Dump over TCP/IP(v6)
7893 \begin_layout Itemize
7894 Hidable status panel
7897 \begin_layout Itemize
7901 \begin_layout Itemize
7902 Adjustable sound volume
7905 \begin_layout Itemize
7909 \begin_layout Itemize
7910 Allow DnD into filename boxes
7913 \begin_layout Itemize
7917 \begin_layout Itemize
7918 Portaudio: Fix speaker popping at start
7921 \begin_layout Itemize
7925 \begin_layout Itemize
7926 Speed adjustment menu
7929 \begin_layout Itemize
7930 Win32 joystick support
7933 \begin_layout Itemize
7934 Lua: gui.rainbow and gui.box
7937 \begin_layout Itemize
7938 Split key lists into classes (the key list was large!)
7941 \begin_layout Itemize
7942 More save slots support
7945 \begin_layout Itemize
7946 Wxwidgets (wxJoystick) joystick support
7949 \begin_layout Subsection
7953 \begin_layout Itemize
7954 Lots of internal joystick refactoring
7957 \begin_layout Itemize
7958 Evdev: Add mapping for BTN_TOOL_QUINTTAP
7961 \begin_layout Itemize
7962 Wxwidgets: Settings mode (open settings without ROM)
7965 \begin_layout Itemize
7966 Wxwidgets: Prompt key to use option
7969 \begin_layout Itemize
7970 Wxwidgets: Fix crash if key goes away underneath
7973 \begin_layout Itemize
7974 Wxwidgets: Fix mouse position in presence of scaling
7977 \begin_layout Itemize
7978 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
7981 \begin_layout Itemize
7982 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
7983 seem to work well on WinXP)
7986 \begin_layout Itemize
7987 Start paused option.
7990 \begin_layout Subsection
7994 \begin_layout Itemize
7998 \begin_layout Itemize
7999 lsnes-dumpavi: Start Lua before starting dumper
8002 \begin_layout Itemize
8003 AVI: Fix secondary audio in mode 4.
8006 \begin_layout Subsection
8010 \begin_layout Itemize
8011 AVI: Refactor ZMBV a bit.
8014 \begin_layout Itemize
8015 Fix error reading analog values from movie file
8018 \begin_layout Subsection
8022 \begin_layout Itemize
8023 Delayed reset support
8026 \begin_layout Itemize
8027 Lua: memory.hash_region
8030 \begin_layout Subsection
8034 \begin_layout Itemize
8035 Rework the build system
8038 \begin_layout Itemize
8039 Typing input support
8042 \begin_layout Itemize
8043 Fix building with bsnes v086 and v087.
8046 \begin_layout Itemize
8047 SDL: Save settings on exit
8050 \begin_layout Itemize
8051 SDL: Command to enter command line mode with given command.
8054 \begin_layout Itemize
8055 SDL: More advanced command editing.
8058 \begin_layout Subsection
8062 \begin_layout Itemize
8064 \begin_inset Quotes eld
8067 arrow keys and enter don't work
8068 \begin_inset Quotes erd
8074 \begin_layout Itemize
8078 \begin_layout Itemize
8079 Show mode changes due to rewinding.
8082 \begin_layout Itemize
8083 Unsafe rewind support
8086 \begin_layout Itemize
8087 Fix directory transversal.
8090 \begin_layout Subsection
8094 \begin_layout Itemize
8095 AVI: Sound mode 5 (48kHz high-quality)
8098 \begin_layout Itemize
8102 \begin_layout Itemize
8103 Map the SNES bus into address space
8106 \begin_layout Itemize
8107 Fix loading memory watch files with CRLF line endings
8110 \begin_layout Subsection
8114 \begin_layout Itemize
8115 Map bsnes internal state into memory space
8118 \begin_layout Itemize
8120 \begin_inset Quotes eld
8123 click on panel wedges the emulator
8124 \begin_inset Quotes erd
8130 \begin_layout Itemize
8131 DnD movies/saves on the main window.
8134 \begin_layout Subsection
8138 \begin_layout Itemize
8139 Split core bindings into own module.
8142 \begin_layout Itemize
8143 Remember invalid settings
8146 \begin_layout Itemize
8147 Support for modified Gambatte core for GB/GBC emulation.
8150 \begin_layout Itemize
8151 Reload/swap ROM function
8154 \begin_layout Subsection
8158 \begin_layout Itemize
8159 Fix step poll function
8162 \begin_layout Subsection
8166 \begin_layout Itemize
8167 Non-insane savestate anchoring
8170 \begin_layout Subsection
8174 \begin_layout Itemize
8175 More Memory search methods
8178 \begin_layout Itemize
8179 Preserve movie if loading in RO mode.
8182 \begin_layout Itemize
8183 Fix a obscure case in timeline check
8186 \begin_layout Itemize
8187 Revamp the entiere ROM loading code
8190 \begin_layout Itemize
8194 \begin_layout Itemize
8198 \begin_layout Itemize
8199 Standalone hotkey config dialog
8202 \begin_layout Itemize
8203 Show bindings in more user-friendly format
8206 \begin_layout Subsection
8210 \begin_layout Itemize
8214 \begin_layout Itemize
8215 Fix uninitialized variables in bsnes v085
8218 \begin_layout Subsection
8222 \begin_layout Itemize
8223 Merge gambatte core into mainline (from its own branch)
8226 \begin_layout Itemize
8227 Wxwidgets: Show expected dump file formats
8230 \begin_layout Itemize
8231 Memory watch: Data typing
8234 \begin_layout Itemize
8235 lsnes internal MMIO area.
8238 \begin_layout Itemize
8239 Wxwidgets: New memory watch editor
8242 \begin_layout Itemize
8243 Hexadecimal memory watches
8246 \begin_layout Itemize
8247 Wxwidgets: Monospaced panel
8250 \begin_layout Itemize
8251 Wxwidgets: Split memory watches in panel
8254 \begin_layout Itemize
8255 Wxwidgets: Disable VMAs in memory search
8258 \begin_layout Itemize
8259 lsnes-dumpavi: Fix speed bug
8262 \begin_layout Itemize
8263 Movie subtitle support
8266 \begin_layout Itemize
8267 Fix rerecord count reporting
8270 \begin_layout Itemize
8271 Don't trash movie when loading in readonly mode.
8274 \begin_layout Subsection
8278 \begin_layout Itemize
8279 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
8282 \begin_layout Itemize
8283 Fix build on Mac OS X.
8286 \begin_layout Itemize
8290 \begin_layout Itemize
8291 Wxwidgets: Hidable messages window
8294 \begin_layout Itemize
8298 \begin_layout Itemize
8299 Bsnes: Support inconsistent saves
8302 \begin_layout Itemize
8303 Bsnes: Allow simulating saving every frame
8306 \begin_layout Itemize
8307 Fix desync if savestate is loaded in readonly mode in certain conditions.
8310 \begin_layout Itemize
8311 Wxwidgets: Fix save dialogs on Mac OS X.
8314 \begin_layout Itemize
8315 Wxwidgets: Fix insane status width on Win32.
8318 \begin_layout Itemize
8319 Wxwidgets: Fix autohold processing to be faster.
8322 \begin_layout Itemize
8323 Wxwidgets: Allow loading ROMs and movies from commandline.
8326 \begin_layout Subsection
8330 \begin_layout Itemize
8331 Be a bit smarter with --load
8334 \begin_layout Itemize
8335 Rewrote higher-level parts of audio system
8338 \begin_layout Itemize
8339 Tool to build commentary tracks
8342 \begin_layout Itemize
8346 \begin_layout Itemize
8347 Gambatte: Add support for SVN358
8350 \begin_layout Itemize
8351 Use builtin font when rendering status panel.
8354 \begin_layout Itemize
8355 Option to detach memory watch to its own window.
8358 \begin_layout Itemize
8359 Recent ROMs/Movies menu
8362 \begin_layout Itemize
8366 \begin_layout Itemize
8367 Useful lag counter for SNES games that autopoll
8370 \begin_layout Itemize
8371 Fix buffer overflow in gambatte sound output
8374 \begin_layout Subsection
8378 \begin_layout Itemize
8379 Don't blow up on wxGTK if the window is hidden somehow
8382 \begin_layout Itemize
8383 Support simultaneous drop of ROM and movie.
8386 \begin_layout Itemize
8387 Gambatte: Don't save spurious SRAMs.
8390 \begin_layout Itemize
8391 Make SGB ROMs actually usable.
8394 \begin_layout Itemize
8395 Fix so that saved movies appear in recent movies.
8398 \begin_layout Itemize
8399 Don't open multiple commentary editors at once.
8402 \begin_layout Subsection
8406 \begin_layout Itemize
8407 Lua: memory.readregion/memory.writeregion
8410 \begin_layout Itemize
8411 Lua: memory.map{,s}{byte,word,dword,qword}
8414 \begin_layout Itemize
8415 Lua: memory.map_structure
8418 \begin_layout Itemize
8419 Lua: Fix bus_address for gambatte
8422 \begin_layout Itemize
8423 Fix features dependent of bsnes debugger
8426 \begin_layout Itemize
8427 Cleanup bsnes debugger logic
8430 \begin_layout Itemize
8431 Fix resets in presence of save every frame
8434 \begin_layout Subsection
8438 \begin_layout Itemize
8439 Lua: input.lcid_to_pcid
8442 \begin_layout Itemize
8443 Fix off-by-one bug with slot hashes
8446 \begin_layout Itemize
8447 Fix crashes on certain memory watch expressions
8450 \begin_layout Itemize
8451 Lua: memory.read_expr
8454 \begin_layout Itemize
8455 Lua: Fix memory.read_expr on nil argument
8458 \begin_layout Itemize
8459 Fix the code to compile on G++ 4.7
8462 \begin_layout Itemize
8463 Change button_id to be a function pointer field, not a virtual method
8466 \begin_layout Itemize
8467 Add bsnes patches to fix libsnes to compile on GCC 4.7
8470 \begin_layout Itemize
8471 Gambatte: Always use legacy lag counting
8474 \begin_layout Itemize
8475 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
8478 \begin_layout Itemize
8479 Fix analog controllers
8482 \begin_layout Itemize
8486 \begin_layout Itemize
8487 Fix button symbols in input display
8490 \begin_layout Itemize
8491 Compensate for nuts bsnes superscope/justifier handling
8494 \begin_layout Itemize
8495 Lua: Fix bit.extract boolean handling
8498 \begin_layout Subsection
8502 \begin_layout Itemize
8503 Stop at movie end: Don't off-by-one
8506 \begin_layout Itemize
8507 Fix crash closing lsnes with voice playback active.
8510 \begin_layout Itemize
8511 Import/Export OggOpus for commentary tracks
8514 \begin_layout Itemize
8515 16-button controllers.
8518 \begin_layout Itemize
8519 Don't show nonexistent controllers in input display
8522 \begin_layout Itemize
8523 Set voice record/playback volume from UI
8526 \begin_layout Itemize
8527 Patches for gambatte SVN364.
8530 \begin_layout Itemize
8531 Load markup (if exists) even without gamepack file.
8534 \begin_layout Itemize
8535 Screen rotation & flipping
8538 \begin_layout Itemize
8539 Lua: Some new bit functions
8542 \begin_layout Itemize
8543 Auto-refresh voice streams on change.
8546 \begin_layout Itemize
8547 Auto-refresh subtitles on change & new subtitle editor.
8550 \begin_layout Itemize
8551 Fix music volume adjustment.
8554 \begin_layout Subsection
8558 \begin_layout Itemize
8559 Wxwidgets: Fix memory watch rendering.
8562 \begin_layout Itemize
8563 Wxwidgets: Allow setting voice stream gain.
8566 \begin_layout Itemize
8567 Wxwidgets: VU meters and volume adjustment.
8570 \begin_layout Itemize
8571 Lua: Custom fonts support.
8574 \begin_layout Itemize
8575 Lua: Fix methods stopping working when resetting Lua.
8578 \begin_layout Itemize
8579 Fix loading standard-format movies in preserve (readonly) mode.
8582 \begin_layout Subsection
8586 \begin_layout Itemize
8587 Primitive movie editor
8590 \begin_layout Itemize
8591 Fix VU meter with no sound device.
8594 \begin_layout Itemize
8595 Fix various undefined return values.
8598 \begin_layout Itemize
8599 Show rates in VU meter window.
8602 \begin_layout Subsection
8606 \begin_layout Itemize
8607 Commentary tool: Set nominal bit rate and limit max bit rate.
8610 \begin_layout Itemize
8611 Lua: Unconditionally reload host memory on loadstate
8614 \begin_layout Itemize
8615 Lua: Query bindings, manipulate aliases, create inverse bindings
8618 \begin_layout Itemize
8619 Lua: Fix crashes with resetting VM while some types of paint requests are
8623 \begin_layout Itemize
8624 Lua: gui.text: Clip the text properly instead of corrupting memory in some
8628 \begin_layout Itemize
8629 Save screenshot header reliably
8632 \begin_layout Itemize
8633 Lua: Backport input.get2 and input.set2
8636 \begin_layout Itemize
8637 Lua: New controller info functions.
8640 \begin_layout Itemize
8641 Movie editor: Fix reset delay counters to be the right way around.
8644 \begin_layout Itemize
8648 \begin_layout Itemize
8649 Lua: on_button and input.veto_button.
8652 \begin_layout Subsection
8656 \begin_layout Itemize
8657 Fix saving PNG screenshots on Win32.
8660 \begin_layout Itemize
8661 Movie editor: Sweep axis.
8664 \begin_layout Itemize
8665 Load selected slot in ro/rw/preserve/movie mode.
8668 \begin_layout Itemize
8669 input.joyset: Preserve and invert user input.
8672 \begin_layout Itemize
8673 Allow immediate saving at point of save (transfer saves).
8676 \begin_layout Itemize
8677 Wxwidgets: Filter filenames in dialogs, autoappend extensions.
8680 \begin_layout Itemize
8681 data/verysmall.font: Add missing glyph 70 (
8682 \begin_inset Quotes eld
8686 \begin_inset Quotes erd
8692 \begin_layout Itemize
8693 Lua: Allow painting custom fonts with halo.
8696 \begin_layout Itemize
8697 Fix memory value search to work on byte types.
8700 \begin_layout Subsection
8704 \begin_layout Itemize
8705 Fix status panel (and movie editor) flicker
8708 \begin_layout Itemize
8709 Show effects of Lua in input display
8712 \begin_layout Itemize
8713 Offer lsmv.backup as file filter too for load lsmv
8716 \begin_layout Itemize
8717 Allow slowing down subframe advance
8720 \begin_layout Itemize
8721 Display current save slot information
8724 \begin_layout Itemize
8728 \begin_layout Itemize
8729 Fix hotkeys stopping working after X-ing settings dialog
8732 \begin_layout Itemize
8733 Movie editor: Fix bug if extending finished movie
8736 \begin_layout Itemize
8737 Cap current_frame_first_subframe to movie size when recounting movie
8740 \begin_layout Itemize
8741 Movie editor: Interpret ctrl+click as right click