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
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).
151 \begin_layout Itemize
152 Version 5.1.X or 5.2X.
156 \begin_layout Enumerate
157 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
160 \begin_layout Section
164 \begin_layout Itemize
165 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
169 \begin_layout Itemize
170 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
173 \begin_layout Itemize
174 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
178 \begin_layout Itemize
179 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
180 ersion>', gambatte core)
183 \begin_layout Itemize
184 Edit options.build (or copy of that file)
187 \begin_layout Itemize
188 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
192 \begin_layout Section
196 \begin_layout Subsection
200 \begin_layout Subsubsection
201 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
204 \begin_layout Standard
208 \begin_layout Subsection
212 \begin_layout Subsubsection
216 \begin_layout Standard
220 \begin_layout Subsubsection
221 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
224 \begin_layout Standard
225 Load <filename> as movie or savestate file.
226 All other session options are ignored.
229 \begin_layout Subsubsection
230 --port1=<device> (lsnes/SDL, bsnes core only)
233 \begin_layout Standard
238 \begin_layout Itemize
239 none: No device connected
242 \begin_layout Itemize
243 gamepad: One gamepad (the default)
246 \begin_layout Itemize
247 multitap: Four gamepads (warning: makes most games refuse to start)
250 \begin_layout Itemize
254 \begin_layout Subsubsection
255 --port2=<type> (lsnes/SDL, bsnes core only)
258 \begin_layout Standard
263 \begin_layout Itemize
264 none: No device connected (the default)
267 \begin_layout Itemize
271 \begin_layout Itemize
272 multitap: Four gamepads.
275 \begin_layout Itemize
279 \begin_layout Itemize
280 superscope: Super Scope
283 \begin_layout Itemize
284 justifier: One justifier
287 \begin_layout Itemize
288 justifiers: Two justifiers
291 \begin_layout Subsubsection
292 --gamename=<name> (lsnes/SDL)
295 \begin_layout Standard
296 Set the name of game to <name>.
300 \begin_layout Subsubsection
301 --author=<name> (lsnes/SDL)
304 \begin_layout Standard
305 Add author with full name of <name> (no nickname).
308 \begin_layout Subsubsection
309 --author=|<name> (lsnes/SDL)
312 \begin_layout Standard
313 Add author with nickname of <name> (no full name).
316 \begin_layout Subsubsection
317 --author=<fullname>|<nickname> (lsnes/SDL)
320 \begin_layout Standard
321 Add author with full name of <fullname> and nickname of <nickname>.
324 \begin_layout Subsubsection
325 --rtc-second=<value> (lsnes/SDL)
328 \begin_layout Standard
329 Set RTC second (0 is 1st January 1970 00:00:00Z).
330 Default is 1,000,000,000.
333 \begin_layout Subsubsection
334 --rtc-subsecond=<value> (lsnes/SDL)
337 \begin_layout Standard
344 \begin_layout Subsubsection
345 --anchor-savestate=<file> (lsnes/SDL)
348 \begin_layout Standard
349 Set the anchor savestate file.
352 \begin_layout Subsubsection
353 --load=<file> (lsnes/wxwidgets)
356 \begin_layout Standard
357 After loading the ROM, load <file> as savestate/movie.
360 \begin_layout Subsection
365 \begin_layout Subsubsection
366 --run=<file> (lsnes/SDL)
369 \begin_layout Standard
370 After running main RC file, run this file.
371 If multiple are specified, these execute in order specified.
374 \begin_layout Subsection
375 dump options (lsnes-dumpavi only)
378 \begin_layout Subsubsection
382 \begin_layout Standard
383 Set the dumper to use (required).
384 Use 'list' for listing of known dumpers.
387 \begin_layout Subsubsection
391 \begin_layout Standard
392 Set the mode to use (required for dumpers with multiple modes, forbidden
394 Use 'list' for known modes.
397 \begin_layout Subsubsection
401 \begin_layout Standard
404 \begin_inset Quotes eld
408 \begin_inset Quotes erd
414 \begin_layout Subsubsection
415 --option=<name>=<value>
418 \begin_layout Standard
419 Set option <name> to value <value>.
422 \begin_layout Subsubsection
426 \begin_layout Standard
427 Set number of frames to dump.
431 \begin_layout Subsubsection
435 \begin_layout Standard
436 Run specified lua script (lsnes-dumpavi does not have initialization files).
439 \begin_layout Subsubsection
440 --load-library=<library>
443 \begin_layout Standard
444 Load the specified shared object / dynamic library / dynamic link library.
447 \begin_layout Section
448 Startup file lsnes.rc
451 \begin_layout Standard
452 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
453 This file is located in:
456 \begin_layout Itemize
461 lsnes.rc (if %APPDATA% exists)
464 \begin_layout Itemize
465 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
468 \begin_layout Itemize
469 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
472 \begin_layout Itemize
473 All: ./lsnes.rc (fallback default).
476 \begin_layout Standard
477 If leading directories do not exist, attempt to create them is made.
480 \begin_layout Section
484 \begin_layout Itemize
485 Commands beginning with '*' invoke the corresponding command without alias
489 \begin_layout Itemize
490 If command starts with '+' (after possible '*'), the command is executed
491 as-is when button is pressed, and when button is released, it is executed
492 with '+' replaced by '-'.
495 \begin_layout Itemize
496 Commands without '+' execute only on negative edge (release).
499 \begin_layout Subsection
503 \begin_layout Standard
504 Settings control various aspects of emulator behaviour.
507 \begin_layout Subsubsection
508 set-setting <setting> <value>
511 \begin_layout Standard
512 Sets setting <setting> to value <value> (may be empty).
515 \begin_layout Subsubsection
516 unset-setting <setting>
519 \begin_layout Standard
520 Try to unset setting <setting> (not all settings can be unset).
523 \begin_layout Subsubsection
524 get-setting <setting>
527 \begin_layout Standard
528 Read value of setting <setting>
531 \begin_layout Subsubsection
535 \begin_layout Standard
536 Print names and values of all settings.
539 \begin_layout Subsection
543 \begin_layout Standard
544 Keybindings bind commands or aliases to keys (or pseudo-keys).
548 \begin_layout Standard
552 \begin_layout Itemize
553 Do not bind edge active (+/-) commands to keys with modifiers, that won't
557 \begin_layout Itemize
558 Names of keys and modifiers are platform-dependent.
561 \begin_layout Itemize
562 Be careful before binding pseudo-keys (such as joystick axes, buttons or
563 hats) with modifiers.
564 That may or may not work right.
567 \begin_layout Subsubsection
568 bind-key [<mod>/<modmask>] <key> <command>
571 \begin_layout Standard
572 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
573 ed list) are set as <mod> (comma-seperated list).
576 \begin_layout Standard
577 The names of keys and modifiers are platform-dependent.
580 \begin_layout Subsubsection
581 unbind-key [<mod>/<modmask>] <key>
584 \begin_layout Standard
585 Unbind command from <key> (with specified <mod> and <modmask>).
588 \begin_layout Subsubsection
589 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
590 | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
591 [plus=<val>] [tolerance=<val>]
594 \begin_layout Standard
595 Set axis parameters for axis <axis>.
598 \begin_layout Itemize
599 disabled: Disable axis
602 \begin_layout Itemize
606 \begin_layout Itemize
607 axis-inverse: Inverse axis
610 \begin_layout Itemize
611 pressure0-: Pressure sensitive.
612 Released at 0, pressed at -.
615 \begin_layout Itemize
616 pressure0+: Pressure sensitive.
617 Released at 0, pressed at +.
620 \begin_layout Itemize
621 pressure-0: Pressure sensitive.
622 Released at -, pressed at 0.
625 \begin_layout Itemize
626 pressure-+: Pressure sensitive.
627 Released at -, pressed at +.
630 \begin_layout Itemize
631 pressure+0: Pressure sensitive.
632 Released at +, pressed at 0.
635 \begin_layout Itemize
636 pressure+-: Pressure sensitive.
637 Released at +, pressed at -.
640 \begin_layout Itemize
641 minus=<val>: Calibration at extreme minus position (-32768-32767)
644 \begin_layout Itemize
645 zero=<val>: Calibration at neutral position (-32768-32767)
648 \begin_layout Itemize
649 plus=<val>: Calibration at extreme plus position (-32768-32767)
652 \begin_layout Itemize
653 tolerance=<value>: Center band tolerance (0<x<1).
654 The smaller the value, the more sensitive the control is.
657 \begin_layout Subsubsection
661 \begin_layout Standard
662 Print all key bindings in effect.
665 \begin_layout Subsection
669 \begin_layout Standard
670 Aliases bind command to sequence of commands.
671 After alias has been defined, it replaces the command it shadows.
674 \begin_layout Standard
678 \begin_layout Itemize
679 You can't alias command to itself.
682 \begin_layout Itemize
683 Aliases starting with +/- are edge active just like ordinary commands starting
687 \begin_layout Itemize
688 One command can be aliased to multiple commands.
691 \begin_layout Subsubsection
692 alias-command <command> <expansion>
695 \begin_layout Standard
696 Append <expansion> to alias <command>.
697 If alias does not already exist, it is created.
700 \begin_layout Subsubsection
701 unalias-command <command>
704 \begin_layout Standard
705 Clear alias expansion for <command>.
708 \begin_layout Subsubsection
712 \begin_layout Standard
713 Print all aliases and their expansions in effect.
716 \begin_layout Subsection
720 \begin_layout Standard
721 Run <script> as if commands were entered on the command line.
724 \begin_layout Subsection
728 \begin_layout Standard
729 Following commands control video dumping:
732 \begin_layout Subsubsection
733 start-dump <dumper> [<mode>] <prefix/filename>
736 \begin_layout Standard
737 Start dumping using dumper <dumper>.
738 If mode is present or not and if prefix or filename is present depends
739 on the dumper and dumper mode.
742 \begin_layout Standard
743 The following dumpers are available:
746 \begin_layout Itemize
747 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
751 \begin_layout Itemize
752 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
756 \begin_layout Itemize
757 Mode: cscd/pcm: CSCD video, PCM audio.
762 \begin_layout Itemize
763 INTERNAL-JMD: Internal .jmd dumper.
767 \begin_layout Itemize
771 \begin_layout Itemize
776 \begin_layout Itemize
777 INTERNAL-RAW: Internal RAW dumper.
781 \begin_layout Itemize
785 \begin_layout Itemize
789 \begin_layout Itemize
790 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
793 \begin_layout Itemize
794 Video is always upscaled to double resolution (512x448 / 512 x 478).
797 \begin_layout Itemize
798 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
803 \begin_layout Itemize
804 INTERNAL-SDMP: Internal SDMP dumper.
808 \begin_layout Itemize
809 Mode 'ms': Multi-segment.
813 \begin_layout Itemize
814 Mode 'ss': Single-segment.
819 \begin_layout Subsubsection
823 \begin_layout Standard
824 End dumping using <dumper>
827 \begin_layout Subsubsection
828 show-dumpers [<dumper>]
831 \begin_layout Standard
832 Show the list of dumpers or list of modes for <dumper>
835 \begin_layout Subsection
839 \begin_layout Standard
840 <address> may be decimal or hexadecimal (prefixed with '0x').
841 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
845 \begin_layout Standard
846 The available element <sizes> are:
849 \begin_layout Itemize
853 \begin_layout Itemize
857 \begin_layout Itemize
861 \begin_layout Itemize
865 \begin_layout Standard
866 When reading RAM and ROM, multi-byte reads/writes are big-endian.
867 When dealing with DSP memory, multi-byte reads/writes are native-endian
868 (do not use operand sizes exceeding DSP bitness, except dword is OK for
872 \begin_layout Subsubsection
873 read-<size> <address>
876 \begin_layout Standard
877 Read the value of byte in <address>.
880 \begin_layout Subsubsection
881 read-s<size> <address>
884 \begin_layout Standard
885 Read the value of signed byte in <address>.
888 \begin_layout Subsubsection
889 write-<size> <address> <value>
892 \begin_layout Standard
893 Write <value> to byte in address <address>.
896 \begin_layout Subsubsection
900 \begin_layout Standard
901 Reset the memory search
904 \begin_layout Subsubsection
908 \begin_layout Standard
909 Print number of candidates remaining
912 \begin_layout Subsubsection
916 \begin_layout Standard
917 Print all candidates remaining
920 \begin_layout Subsubsection
921 search-memory <usflag><sizeflag><op>
924 \begin_layout Standard
925 Searches memory for addresses satisfying criteria.
928 \begin_layout Standard
932 \begin_layout Itemize
936 \begin_layout Itemize
940 \begin_layout Standard
944 \begin_layout Itemize
948 \begin_layout Itemize
952 \begin_layout Itemize
956 \begin_layout Itemize
960 \begin_layout Standard
964 \begin_layout Itemize
965 lt: < previous value.
968 \begin_layout Itemize
969 le: <= previous value.
972 \begin_layout Itemize
973 eq: = previous value.
976 \begin_layout Itemize
977 ne: != previous value.
980 \begin_layout Itemize
981 ge: >= previous value.
984 \begin_layout Itemize
985 gt: > previous value.
988 \begin_layout Subsubsection
989 search-memory <sizeflag> <value>
992 \begin_layout Standard
993 Searches for addresses that currently have value <value>.
994 <sizeflag> is as in previous command.
997 \begin_layout Subsection
1001 \begin_layout Standard
1002 These commands are not available in lsnesrc, but are available after ROM
1006 \begin_layout Subsubsection
1010 \begin_layout Standard
1011 Quits the emulator (asking for confirmation).
1012 If /y is given, no confirmation is asked.
1015 \begin_layout Subsubsection
1019 \begin_layout Standard
1020 Toggle paused/unpaused
1023 \begin_layout Subsubsection
1027 \begin_layout Standard
1029 If the button is still held after configurable timeout expires, game unpauses
1030 for the duration frame advance is held.
1033 \begin_layout Subsubsection
1037 \begin_layout Standard
1039 If the button is still held after configurable timeout expires, game unpauses
1040 for the duration frame advance is held.
1043 \begin_layout Subsubsection
1047 \begin_layout Standard
1048 Skip to first poll in frame after current.
1051 \begin_layout Subsubsection
1055 \begin_layout Standard
1056 Reset the SNES after this frame.
1059 \begin_layout Subsubsection
1063 \begin_layout Standard
1064 Load savestate <filename> in current mode.
1067 \begin_layout Subsubsection
1068 load-state <filename>
1071 \begin_layout Standard
1072 Load savestate <filename> in readwrite mode.
1075 \begin_layout Subsubsection
1076 load-readonly <filename>
1079 \begin_layout Standard
1080 Load savestate <filename> in readonly mode.
1083 \begin_layout Subsubsection
1084 load-preserve <filename>
1087 \begin_layout Standard
1088 Load savestate <filename> in readonly mode, preserving current events.
1091 \begin_layout Subsubsection
1092 load-movie <filename>
1095 \begin_layout Standard
1096 Load savestate <filename>, ignoring save part in readonly mode.
1099 \begin_layout Subsubsection
1100 save-state <filename>
1103 \begin_layout Standard
1104 Save system state to <filename> as soon as possible.
1107 \begin_layout Subsubsection
1108 save-movie <filename>
1111 \begin_layout Standard
1112 Save movie to <filename>.
1115 \begin_layout Subsubsection
1119 \begin_layout Standard
1120 Set read-write mode.
1123 \begin_layout Subsubsection
1127 \begin_layout Standard
1131 \begin_layout Subsubsection
1135 \begin_layout Standard
1136 Toggle between read-only and read-write modes.
1139 \begin_layout Subsubsection
1143 \begin_layout Standard
1144 Set name of the game to <name>
1147 \begin_layout Subsubsection
1151 \begin_layout Standard
1152 Print the name of the game.
1155 \begin_layout Subsubsection
1159 \begin_layout Standard
1160 Adds new author <author>.
1161 If <author> does not contain '|' it is full name.
1162 If it contains '|', '|' splits the full name and nickname.
1165 \begin_layout Subsubsection
1166 edit-author <num> <author>
1169 \begin_layout Standard
1170 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1174 \begin_layout Subsubsection
1178 \begin_layout Standard
1179 Remove author in slot <num>
1182 \begin_layout Subsubsection
1186 \begin_layout Standard
1190 \begin_layout Subsubsection
1191 test-1, test-2, test-3
1194 \begin_layout Standard
1195 Internal test commands.
1199 \begin_layout Subsubsection
1200 take-screenshot <filename>
1203 \begin_layout Standard
1204 Save screenshot to <filename>.
1207 \begin_layout Subsubsection
1208 +controller<num><button>
1211 \begin_layout Standard
1212 Press button <button> on controller <num> (1-8).
1213 The following button names are known:
1216 \begin_layout Itemize
1220 \begin_layout Itemize
1224 \begin_layout Itemize
1228 \begin_layout Itemize
1232 \begin_layout Itemize
1236 \begin_layout Itemize
1240 \begin_layout Itemize
1244 \begin_layout Itemize
1248 \begin_layout Itemize
1252 \begin_layout Itemize
1256 \begin_layout Itemize
1260 \begin_layout Itemize
1264 \begin_layout Itemize
1268 \begin_layout Itemize
1272 \begin_layout Itemize
1276 \begin_layout Itemize
1280 \begin_layout Subsubsection
1281 controllerh<num><button>
1284 \begin_layout Standard
1285 Hold/unhold button <button> on controller <num> (1-8).
1286 See +controller for button names.
1289 \begin_layout Subsubsection
1290 controllerf<num><button>
1293 \begin_layout Standard
1294 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1295 See +controller for button names.
1298 \begin_layout Standard
1299 Cauntion: Does not work properly if outside frame advance.
1302 \begin_layout Subsubsection
1303 autofire (<pattern>|-)...
1306 \begin_layout Standard
1307 Set autofire pattern.
1308 Each parameter is comma-separated list of button names (in form of 1start,
1309 1A, 2B, etc..) to hold on that frame.
1310 After reaching the end of pattern, the pattern restarts from the beginning.
1313 \begin_layout Subsubsection
1317 \begin_layout Standard
1321 \begin_layout Subsection
1325 \begin_layout Subsubsection
1326 cycle-jukebox-backward
1329 \begin_layout Standard
1330 Cycle save jukebox backwards.
1333 \begin_layout Subsubsection
1334 cycle-jukebox-forward
1337 \begin_layout Standard
1338 Cycle save jukebox forwards
1341 \begin_layout Subsubsection
1345 \begin_layout Standard
1346 Do load from jukebox (current mode).
1349 \begin_layout Subsubsection
1353 \begin_layout Standard
1354 Do state save to jukebox.
1357 \begin_layout Subsection
1361 \begin_layout Standard
1362 Only available if lua support is compiled in.
1365 \begin_layout Subsubsection
1366 evaluate-lua <luacode>
1369 \begin_layout Standard
1370 Run Lua code <luacode> using built-in Lua interpretter.
1373 \begin_layout Subsubsection
1377 \begin_layout Standard
1378 Run specified lua file using built-in Lua interpretter.
1381 \begin_layout Subsubsection
1385 \begin_layout Standard
1386 Clear the Lua VM state and restore to factory defaults.
1389 \begin_layout Subsection
1393 \begin_layout Subsubsection
1394 add-watch <name> <expression>
1397 \begin_layout Standard
1398 Adds new watch (or modifies old one).
1401 \begin_layout Subsubsection
1405 \begin_layout Standard
1409 \begin_layout Subsection
1413 \begin_layout Subsubsection
1414 enable-sound <on/off>
1417 \begin_layout Standard
1418 Enable/Disable sound.
1421 \begin_layout Subsubsection
1422 set-sound-device <device>
1425 \begin_layout Standard
1426 Set sound device to <device>
1429 \begin_layout Subsubsection
1433 \begin_layout Standard
1434 Show status of sound system.
1437 \begin_layout Subsubsection
1441 \begin_layout Standard
1442 Show all available devices.
1445 \begin_layout Subsubsection
1446 set-volume <multiplier>
1449 \begin_layout Standard
1450 Set the volume multiplier to <multiplier>.
1451 1 is normal volume, and higher numbers are louder.
1454 \begin_layout Subsubsection
1455 set-volume <multiplier>%
1458 \begin_layout Standard
1459 Set the volume multiplier to <multiplier> percent.
1460 100 is normal volume, and higher numbers are louder.
1463 \begin_layout Subsubsection
1464 set-volume <multiplier>dB
1467 \begin_layout Standard
1468 Set the volume multiplier to <multiplier> dB.
1469 0 is normal volume, and higher numbers are louder.
1470 The value may be negative.
1473 \begin_layout Subsection
1477 \begin_layout Subsubsection
1481 \begin_layout Standard
1482 Reloads the main ROM image from <file>.
1485 \begin_layout Subsubsection
1486 edit-subtitle <firstframe> <length> [<text>]
1489 \begin_layout Standard
1490 Edit or delete a subtitle.
1493 \begin_layout Subsubsection
1497 \begin_layout Standard
1501 \begin_layout Subsection
1505 \begin_layout Subsubsection
1509 \begin_layout Standard
1513 \begin_layout Subsubsection
1517 \begin_layout Standard
1521 \begin_layout Subsubsection
1525 \begin_layout Standard
1529 \begin_layout Subsubsection
1530 change-timebase <id> <newbase>
1533 \begin_layout Standard
1534 Change time base of <id> to <newbase>.
1535 The time base can be given as samples (integer) or second (postfix with
1539 \begin_layout Subsubsection
1540 import-stream-opus <timebase> <file>
1543 \begin_layout Standard
1544 Import opus stream from <file>, placing it at <timebase>.
1545 This operation is lossless.
1548 \begin_layout Subsubsection
1549 import-stream-pcm <timebase> <file>
1552 \begin_layout Standard
1553 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at <timebase>.
1556 \begin_layout Subsubsection
1557 export-stream-opus <id> <file>
1560 \begin_layout Standard
1561 Export stream <id> as opus stream to <file>.
1562 This operation is lossless.
1565 \begin_layout Subsubsection
1566 export-stream-pcm <id> <file>
1569 \begin_layout Standard
1570 Export stream <id> as PCM (.sox) stream to <file>.
1574 \begin_layout Subsubsection
1575 export-superstream <file>
1578 \begin_layout Standard
1579 Export the entiere superstream as PCM (.sox) stream to <file>.
1582 \begin_layout Subsubsection
1583 load-collection <file>
1586 \begin_layout Standard
1587 Load collection (if there is existing collection, unload it) from <file>
1590 \begin_layout Subsubsection
1594 \begin_layout Standard
1598 \begin_layout Subsubsection
1602 \begin_layout Standard
1603 Tangent for recording voice for commentary track.
1604 While pressed, record a stream.
1607 \begin_layout Subsection
1608 SDL Platform commands
1611 \begin_layout Standard
1612 The following are valid on SDL platform.
1615 \begin_layout Subsubsection
1619 \begin_layout Standard
1620 Asks to press a key and then identifies that (pseudo-)key.
1623 \begin_layout Subsubsection
1627 \begin_layout Standard
1628 Toggle between windowed/fullscreen console.
1631 \begin_layout Subsubsection
1635 \begin_layout Standard
1636 Scroll messages window as far back as it goes.
1639 \begin_layout Subsubsection
1643 \begin_layout Standard
1644 Scroll messages window as far forward as it goes.
1647 \begin_layout Subsubsection
1651 \begin_layout Standard
1652 Scroll messages window back one screenful.
1655 \begin_layout Subsubsection
1659 \begin_layout Standard
1660 Scroll messages window forward one screenful.
1663 \begin_layout Subsubsection
1664 prompt-command <command>
1667 \begin_layout Standard
1668 Enter command prompt, with prompt prepopulated with specified command.
1671 \begin_layout Section
1675 \begin_layout Subsection
1679 \begin_layout Subsubsection
1683 \begin_layout Standard
1684 Set where bsnes looks for firmware files.
1686 \begin_inset Quotes eld
1690 \begin_inset Quotes erd
1696 \begin_layout Subsubsection
1700 \begin_layout Standard
1702 Numeric, range is 0.001 to
1703 \begin_inset Quotes eld
1707 \begin_inset Quotes erd
1711 Default is native framerate.
1714 \begin_layout Subsubsection
1718 \begin_layout Standard
1719 Set save compression level (integer 0-9).
1720 Default is 7 (0 is no compression).
1723 \begin_layout Subsubsection
1727 \begin_layout Standard
1728 Set the frame advance timeout in milliseconds.
1729 Numeric integer, range is 0-999999999.
1733 \begin_layout Subsubsection
1734 allow-inconsistent-saves (bsnes only)
1737 \begin_layout Standard
1738 If true, save without synchronization.
1739 Makes games seriously unstable.
1742 \begin_layout Subsubsection
1743 save-every-frame (bsnes only)
1746 \begin_layout Standard
1747 If true, simulate saving on each frame.
1748 Trades off emulation accuracy for sync stability.
1749 Also needed if the movie assumes saving on each frame for rewind.
1752 \begin_layout Subsection
1756 \begin_layout Subsubsection
1760 \begin_layout Standard
1761 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1765 \begin_layout Subsubsection
1769 \begin_layout Standard
1770 AVI dumper: Set the default left border thickness (unless lua overrides)
1776 \begin_layout Subsubsection
1780 \begin_layout Standard
1781 AVI dumper: Set the default right border thickness (unless lua overrides)
1787 \begin_layout Subsubsection
1791 \begin_layout Standard
1792 AVI dumper: Set the default top border thickness (unless lua overrides)
1798 \begin_layout Subsubsection
1802 \begin_layout Standard
1803 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1809 \begin_layout Subsubsection
1813 \begin_layout Standard
1814 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1819 \begin_layout Subsubsection
1823 \begin_layout Standard
1824 AVI dumper: Compression level (0-18).
1827 \begin_layout Itemize
1828 Compression levels 10 and above are not compatible with stock CSCD codec.
1831 \begin_layout Itemize
1832 Recomended level is 7.
1835 \begin_layout Subsubsection
1839 \begin_layout Standard
1840 AVI dumper: Set method of determining the sound rate.
1843 \begin_layout Itemize
1844 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1845 128, 176.4 and 192 kHz.
1848 \begin_layout Itemize
1849 1: Round down to nearest integer.
1852 \begin_layout Itemize
1853 2: Round up to nearest ingeter.
1856 \begin_layout Subsection
1860 \begin_layout Subsubsection
1864 \begin_layout Standard
1865 JMD dumper: Compression level (0-9).
1868 \begin_layout Subsection
1869 SDL platform settings
1872 \begin_layout Subsubsection
1873 autorepeat-first-delay
1876 \begin_layout Standard
1877 Sets the delay for first character in typematic autorepeat.
1880 \begin_layout Subsubsection
1881 autorepeat-subsequent-delay
1884 \begin_layout Standard
1885 Sets the delay for subsequent characters in typematic autorepeat.
1888 \begin_layout Section
1892 \begin_layout Subsection
1893 Core (in main table)
1896 \begin_layout Subsubsection
1900 \begin_layout Standard
1901 Print line to message console.
1904 \begin_layout Subsubsection
1905 exec(string command)
1908 \begin_layout Standard
1909 Run command as it was entered on the command line
1912 \begin_layout Subsubsection
1916 \begin_layout Standard
1918 First is time since some epoch in seconds, the second is microseconds mod
1919 10^6 since that epoch.
1922 \begin_layout Subsubsection
1926 \begin_layout Standard
1927 Returns true if emulator has finished booting, false if not (on_startup()
1928 will be issued later).
1931 \begin_layout Subsubsection
1932 set_idle_timeout(number timeout)
1935 \begin_layout Standard
1936 Set number of microseconds to block idle for.
1937 After this timeout has expired, on_idle() will be called once.
1940 \begin_layout Subsubsection
1941 set_timer_timeout(number timeout)
1944 \begin_layout Standard
1945 Set number of microseconds to block timer for.
1946 After this timeout has expired, on_timer() will be called once.
1949 \begin_layout Subsubsection
1950 bus_address(number snesaddr)
1953 \begin_layout Standard
1954 Returns virtual address corresponding to specified address on SNES bus.
1957 \begin_layout Subsubsection
1958 loopwrapper(function fun, ...)
1961 \begin_layout Standard
1962 Calls function fun with function and specified arguments.
1963 The function passed suspends execution until the function returned is called.
1964 Handy for linear flow control among multiple invocations of a hook.
1968 \begin_layout LyX-Code
1969 on_paint = loopwrapper(function(wait)
1973 \begin_layout LyX-Code
1978 \begin_layout LyX-Code
1980 \begin_inset Quotes eld
1984 \begin_inset Quotes erd
1990 \begin_layout LyX-Code
1995 \begin_layout LyX-Code
2000 \begin_layout LyX-Code
2004 \begin_layout Subsection
2008 \begin_layout Standard
2009 Bitwise logical functions and related.
2012 \begin_layout Subsubsection
2013 bit.none(number...) / bit.bnot(number...)
2016 \begin_layout Standard
2017 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2021 \begin_layout Subsubsection
2022 bit.any(number...) / bit.bor(number...)
2025 \begin_layout Standard
2026 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2029 \begin_layout Subsubsection
2030 bit.all(number...) / bit.band(number...)
2033 \begin_layout Standard
2034 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2038 \begin_layout Subsubsection
2039 bit.parity(number...) / bit.bxor(number...)
2042 \begin_layout Standard
2043 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2047 \begin_layout Subsubsection
2048 bit.lrotate(number base[, number amount[, number bits]])
2051 \begin_layout Standard
2052 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2055 \begin_layout Subsubsection
2056 bit.rrotate(number base[, number amount[, number bits]])
2059 \begin_layout Standard
2060 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2064 \begin_layout Subsubsection
2065 bit.lshift(number base[, number amount[, number bits]])
2068 \begin_layout Standard
2069 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2070 The new bits are filled with zeroes.
2073 \begin_layout Subsubsection
2074 bit.lrshift(number base[, number amount[, number bits]])
2077 \begin_layout Standard
2078 Shift bits-bit (max 48, default 48) number logically right by amount (default
2080 The new bits are filled with zeroes.
2083 \begin_layout Subsubsection
2084 bit.arshift(number base[, number amount[, number bits]])
2087 \begin_layout Standard
2088 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2090 The new bits are shifted in with copy of the high bit.
2093 \begin_layout Subsubsection
2094 bit.extract(number base[, number bit0[, number bit1,...]])
2097 \begin_layout Standard
2098 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2101 \begin_layout Standard
2105 \begin_layout Itemize
2106 Bit numbers up to 51 should work reliably (then things start falling apart
2107 due to double precision issues).
2110 \begin_layout Itemize
2111 There are two special bit positions, true and false, standing for always
2112 set bit and always clear bit.
2115 \begin_layout Subsubsection
2116 bit.value([number bit1[, number bit2,...]])
2119 \begin_layout Standard
2120 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2122 As special value, nil argument is no-op.
2125 \begin_layout Subsubsection
2126 bit.test_any(number a, number b)
2129 \begin_layout Standard
2130 Is there a common set bit in a and b?
2133 \begin_layout Subsubsection
2134 bit.test_all(number a, number b)
2137 \begin_layout Standard
2138 Are all set bits in b also set in a?
2141 \begin_layout Subsubsection
2142 bit.popcount(number a)
2145 \begin_layout Standard
2146 Population count of a.
2149 \begin_layout Subsubsection
2150 bit.clshift(number a, number b, [number amount,[number bits]])
2153 \begin_layout Standard
2154 Does chained left shift on a, b by amount positions, assuming numbers to
2155 be of specified number of bits.
2158 \begin_layout Subsubsection
2159 bit.crshift(number a, number b, [number amount,[number bits]])
2162 \begin_layout Standard
2163 Does chained right shift on a, b by amount positions, assuming numbers to
2164 be of specified number of bits.
2167 \begin_layout Subsubsection
2168 bit.flagdecode(number a, number bits, [string on, [string off]])
2171 \begin_layout Standard
2172 Return string of length bits where ith character is ith character of on
2173 if bit i is on, otherwise ith character of off.
2174 Out of range reads give last character, or '*'/'-' if empty.
2177 \begin_layout Subsubsection
2178 bit.rflagdecode(number a, number bits, [string on, [string off]])
2181 \begin_layout Standard
2182 Like bit.flagdecode, but outputs the string in the opposite order (most significa
2186 \begin_layout Subsection
2190 \begin_layout Standard
2191 Most of these functions can only be called in on_paint and on_video callbacks.
2192 Exceptions are noted.
2195 \begin_layout Standard
2197 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2198 16-23 are the red component, bits 24-31 are alpha component (0 is fully
2199 opaque, 255 is almost transparent).
2200 -1 is the fully transparent color.
2201 Alpha values greater than 127 do work.
2204 \begin_layout Standard
2205 Origin of coordinates is at top left corner of game display area.
2206 Left and top gaps correspond to negative coordinates.
2209 \begin_layout Subsubsection
2213 \begin_layout Standard
2214 Returns 2-tuple (hresolution, vresolution).
2217 \begin_layout Subsubsection
2218 gui.<class>_gap(number gap)
2221 \begin_layout Standard
2222 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2226 \begin_layout Subsubsection
2227 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2230 \begin_layout Standard
2231 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2236 \begin_layout Itemize
2237 x: X-coordinate to start the drawing from (and x-coordinate at begining
2241 \begin_layout Itemize
2242 y: Y-coordinate to start the drawing from.
2245 \begin_layout Itemize
2246 text: The text to draw.
2249 \begin_layout Itemize
2250 fgc: Text color (default is 0xFFFFFF (white))
2253 \begin_layout Itemize
2254 bgc: Background color (default is -1 (transparent))
2257 \begin_layout Subsubsection
2258 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2261 \begin_layout Standard
2262 Like gui.text, but draw using double-width.
2265 \begin_layout Subsubsection
2266 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2269 \begin_layout Standard
2270 Like gui.text, but draw using double-height.
2273 \begin_layout Subsubsection
2274 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2277 \begin_layout Standard
2278 Like gui.text, but draw using double-width/double-height.
2281 \begin_layout Subsubsection
2282 gui.rectangle(number x, number y, number width, number height[, number thickness[
2283 , number outline[, number fill]]])
2286 \begin_layout Standard
2287 Draw rectangle on the GUI.
2291 \begin_layout Itemize
2292 x: X-coordinate of left edge.
2295 \begin_layout Itemize
2296 y: Y-coordinate of upper edge.
2299 \begin_layout Itemize
2300 width: Width of rectangle.
2303 \begin_layout Itemize
2304 height: Height of rectangle.
2307 \begin_layout Itemize
2308 thickness: Thickness of outline (default is 1).
2311 \begin_layout Itemize
2312 outline: Color of outline (default is 0xFFFFFF (white))
2315 \begin_layout Itemize
2316 fill: Color of fill (default is -1 (transparent))
2319 \begin_layout Subsubsection
2320 gui.box(number x, number y, number width, number height[, number thickness[,
2321 number outline1[,number outline2[, number fill]]]])
2324 \begin_layout Standard
2325 Draw rectangle with 3D effect on the GUI.
2329 \begin_layout Itemize
2330 x: X-coordinate of left edge.
2333 \begin_layout Itemize
2334 y: Y-coordinate of upper edge.
2337 \begin_layout Itemize
2338 width: Width of rectangle.
2341 \begin_layout Itemize
2342 height: Height of rectangle.
2345 \begin_layout Itemize
2346 thickness: Thickness of outline (default is 1).
2349 \begin_layout Itemize
2350 outline1: First color of outline (default is 0xFFFFFF (white))
2353 \begin_layout Itemize
2354 outline2: First color of outline (default is 0x808080 (dark gray))
2357 \begin_layout Itemize
2358 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2361 \begin_layout Subsubsection
2362 gui.pixel(number x, number y[, number color])
2365 \begin_layout Standard
2366 Draw one pixel on the GUI.
2370 \begin_layout Itemize
2371 x: X-coordinate of the pixel
2374 \begin_layout Itemize
2375 y: Y-coordinate of the pixel
2378 \begin_layout Itemize
2379 color: Color of the pixel (default is 0xFFFFFF (white))
2382 \begin_layout Subsubsection
2383 gui.crosshair(number x, number y[, number length[, number color]])
2386 \begin_layout Standard
2391 \begin_layout Itemize
2392 x: X-coordinate of the crosshair
2395 \begin_layout Itemize
2396 y: Y-coordinate of the crosshair
2399 \begin_layout Itemize
2400 length: Length of the crosshair lines (default 10).
2403 \begin_layout Itemize
2404 color: Color of the crosshair (default is 0xFFFFFF (white))
2407 \begin_layout Subsubsection
2408 gui.line(number x1, number y1, number x2, number y2[, number color])
2411 \begin_layout Standard
2416 \begin_layout Itemize
2417 x1: X-coordinate of one end.
2420 \begin_layout Itemize
2421 y1: Y-coordinate of one end.
2424 \begin_layout Itemize
2425 x2: X-coordinate of the other end.
2428 \begin_layout Itemize
2429 y2: Y-coordinate of the other end.
2432 \begin_layout Itemize
2433 color: Color of the line (default is 0xFFFFFF (white)).
2436 \begin_layout Subsubsection
2437 gui.circle(number x, number y, number r[, number thick[, number border[,
2441 \begin_layout Standard
2446 \begin_layout Itemize
2447 x: X-coordinate of the center
2450 \begin_layout Itemize
2451 y: Y-coordinate of the center
2454 \begin_layout Itemize
2455 r: The radius of the circle
2458 \begin_layout Itemize
2459 thick: Border thickness
2462 \begin_layout Itemize
2463 border: Border color (default is 0xFFFFFF (white))
2466 \begin_layout Itemize
2467 fill: Fill color (default is -1 (transparent)).
2470 \begin_layout Subsubsection
2471 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2474 \begin_layout Standard
2475 Draw a bitmap on screen with specified palette.
2479 \begin_layout Itemize
2480 x: X-coordinate of left edge.
2483 \begin_layout Itemize
2484 y: Y-coordinate of top edge.
2487 \begin_layout Itemize
2488 bitmap: The bitmap to draw
2491 \begin_layout Itemize
2492 palette: The palette to draw the bitmap using.
2495 \begin_layout Subsubsection
2496 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2499 \begin_layout Standard
2500 Draw a bitmap on screen.
2504 \begin_layout Itemize
2505 x: X-coordinate of left edge.
2508 \begin_layout Itemize
2509 y: Y-coordinate of top edge.
2512 \begin_layout Itemize
2513 bitmap: The bitmap to draw
2516 \begin_layout Subsubsection
2520 \begin_layout Standard
2521 Returns a new palette (initially all transparent).
2522 Can be used anywhere.
2525 \begin_layout Subsubsection
2526 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2529 \begin_layout Standard
2530 Returns a new bitmap/dbitmap.
2531 Can be used anywhere.
2535 \begin_layout Itemize
2536 w: The width of new bitmap
2539 \begin_layout Itemize
2540 h: The height of new bitmap
2543 \begin_layout Itemize
2544 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2547 \begin_layout Itemize
2548 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2551 \begin_layout Subsubsection
2552 gui.bitmap_load(string file)
2555 \begin_layout Standard
2556 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2558 Can be used anywhere.
2562 \begin_layout Itemize
2563 file: The name of file to load.
2566 \begin_layout Subsubsection
2567 gui.palette_set(palette palette, number index, number color)
2570 \begin_layout Standard
2571 Sets color in palette.
2572 Can be used anywhere.
2576 \begin_layout Itemize
2577 palette: The palette to manipulate
2580 \begin_layout Itemize
2581 index: Index of color (0-65535).
2584 \begin_layout Itemize
2585 color: The color value.
2588 \begin_layout Subsubsection
2589 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2592 \begin_layout Standard
2593 Sets specified pixel in bitmap.
2594 Can be used anywhere.
2598 \begin_layout Itemize
2599 bitmap: The bitmap to manipulate
2602 \begin_layout Itemize
2603 x: The x-coordinate of the pixel.
2606 \begin_layout Itemize
2607 y: The y-coordinate of the pixel.
2610 \begin_layout Itemize
2611 color: If bitmap is a bitmap, color index (0-65535).
2612 Otherwise color value.
2615 \begin_layout Subsubsection
2616 gui.bitmap_size(bitmap/dbitmap bitmap)
2619 \begin_layout Standard
2621 Can be used anywhere.
2625 \begin_layout Itemize
2626 bitmap: The bitmap to query.
2629 \begin_layout Standard
2630 The first return is the width, the second is the height.
2633 \begin_layout Subsubsection
2634 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2635 src, number sx, number sy, number w, number h[, number ck])
2638 \begin_layout Standard
2639 Blit a part of bitmap to another.
2640 Can be used anywhere.
2644 \begin_layout Itemize
2645 dest: Destination to blit to.
2648 \begin_layout Itemize
2649 dx: left edge of target
2652 \begin_layout Itemize
2653 dy: Top edge of target
2656 \begin_layout Itemize
2657 src: The source to blit from.
2658 Must be of the same type as destination.
2661 \begin_layout Itemize
2662 sx: left edge of source
2665 \begin_layout Itemize
2666 sy: Top edge of source
2669 \begin_layout Itemize
2673 \begin_layout Itemize
2674 h: Height of region.
2677 \begin_layout Itemize
2679 Pixels of this color are not blitted.
2683 \begin_layout Itemize
2684 If bitmaps are bitmaps, this is color index of colorkey.
2685 Values outside range 0-65535 cause no key to be used as colorkey.
2688 \begin_layout Itemize
2689 If bitmaps are dbitmaps, this color value of colorkey.
2692 \begin_layout Itemize
2693 May be absent or nil for no colorkey blit.
2697 \begin_layout Subsubsection
2701 \begin_layout Standard
2702 Request on_repaint() to happen as soon as possible.
2703 Can be used anywhere.
2706 \begin_layout Subsubsection
2707 gui.subframe_update(boolean on)
2710 \begin_layout Standard
2711 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2712 or not happen (on=false).
2713 Can be used anywhere.
2716 \begin_layout Subsubsection
2717 gui.screenshot(string filename)
2720 \begin_layout Standard
2721 Write PNG screenshot of the current frame (no drawings) to specified file.
2722 Can be used anywhere.
2725 \begin_layout Subsubsection
2726 gui.color(number r, number g, number b[, number a])
2729 \begin_layout Standard
2730 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2731 each component in scale 0-255.
2732 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2734 The default alpha is 256.
2737 \begin_layout Subsubsection
2738 gui.status(string name, string value)
2741 \begin_layout Standard
2743 \begin_inset Quotes eld
2747 \begin_inset Quotes erd
2750 to <value> in status area.
2751 Can be used anywhere.
2754 \begin_layout Subsubsection
2755 gui.rainbow(number step, number steps[, number color])
2758 \begin_layout Standard
2759 Perform hue rotation of color <color> (default bright red), by <step> steps.
2760 The number of steps per full rotation is given by absolute value of <steps>.
2763 \begin_layout Standard
2764 If <steps> is negative, the rotation will be counterclockwise.
2767 \begin_layout Subsubsection
2768 gui.screenshot(string filename)
2771 \begin_layout Standard
2772 Saves a screenshot into specified file.
2775 \begin_layout Subsubsection
2776 gui.loadfont(string filename)
2779 \begin_layout Standard
2780 Loads font from specified file (CUSTOMFONT object).
2783 \begin_layout Subsubsection
2784 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc]])
2787 \begin_layout Standard
2788 Draw string with custom font to screen.
2789 The parameters are the same as in gui.text.
2792 \begin_layout Subsection
2796 \begin_layout Standard
2798 Only available in on_input callback.
2801 \begin_layout Subsubsection
2802 input.get(number controller, number index)
2805 \begin_layout Standard
2806 Read the specified index (0-11) from specified controller (0-7).
2810 \begin_layout Itemize
2811 Uses physical controller numbering.
2812 Gamepad in port 2 is controller 4, not 1!
2815 \begin_layout Subsubsection
2816 input.set(number controller, number index, number value)
2819 \begin_layout Standard
2820 Write the specified index (0-11) from specified controller (0-7), storing
2825 \begin_layout Itemize
2826 Uses physical controller numbering.
2827 Gamepad in port 2 is controller 4, not 1!
2830 \begin_layout Subsubsection
2831 input.geta(number controller)
2834 \begin_layout Standard
2835 Get input state for entiere controller.
2836 Returns 13 return values.
2839 \begin_layout Itemize
2840 1st return value: Bitmask: bit i is set if i:th index is nonzero
2843 \begin_layout Itemize
2844 2nd-13th return value: value of i:th index.
2847 \begin_layout Subsubsection
2848 input.seta(number controller, number bitmask, number args...)
2851 \begin_layout Standard
2852 Set state for entiere controller.
2853 args is up to 12 values for indices (overriding values in bitmask if specified).
2856 \begin_layout Subsubsection
2857 input.controllertype(number controller)
2860 \begin_layout Standard
2861 Get the type of controller as string.
2865 \begin_layout Itemize
2869 \begin_layout Itemize
2873 \begin_layout Itemize
2877 \begin_layout Itemize
2881 \begin_layout Subsubsection
2882 input.reset([number cycles])
2885 \begin_layout Standard
2887 If cycles is greater than zero, do delayed reset.
2888 0 (or no value) causes immediate reset.
2891 \begin_layout Itemize
2892 Only available with subframe flag false.
2895 \begin_layout Subsubsection
2899 \begin_layout Standard
2900 Returns table of tables of all available keys and axes.
2901 The first table is indexed by key name (platform-dependent!), and the inner
2902 table has the following fields:
2905 \begin_layout Itemize
2906 last_rawval: Last reported raw value for control.
2909 \begin_layout Itemize
2910 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2911 pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2914 \begin_layout Itemize
2915 cal_left: Minimum calibration value.
2916 Only meaningful with axis and pressure types.
2919 \begin_layout Itemize
2920 cal_center: Center calibration value.
2921 Only meaningful with axis and pressure types.
2924 \begin_layout Itemize
2925 cal_right: Maximum calibration value.
2926 Only meaningful with axis and pressure types.
2929 \begin_layout Itemize
2930 cal_tolerance: Dead zone tolerance.
2931 Only meaningful with axis and pressure types.
2934 \begin_layout Subsubsection
2935 input.keyhook(string key, boolean state)
2938 \begin_layout Standard
2939 Requests that keyhook events to be sent for key (state=true) or not sent
2943 \begin_layout Subsubsection
2944 input.joyget(number controller)
2947 \begin_layout Standard
2948 Returns table for current controls for specified controller.
2949 The names of fields vary by controller type.
2952 \begin_layout Itemize
2953 The buttons have the same name as those are referred to in other contexts
2957 \begin_layout Itemize
2959 \begin_inset Quotes eld
2963 \begin_inset Quotes erd
2967 \begin_inset Quotes eld
2971 \begin_inset Quotes erd
2977 \begin_layout Subsubsection
2978 input.joyset(number controller, table controls)
2981 \begin_layout Standard
2982 Set the the state of specified controller to values specified in specified
2986 \begin_layout Subsubsection
2987 input.lcid_to_pcid(number controller)
2990 \begin_layout Standard
2991 Return the physical index, physical port and controller number in port for
2992 specified (1-based) logical controller.
2995 \begin_layout Subsection
2999 \begin_layout Standard
3003 \begin_layout Subsubsection
3004 subtitle.byindex(number i)
3007 \begin_layout Standard
3008 Read the frame and length of ith subtitle.
3009 Returns nothing if not present.
3012 \begin_layout Subsubsection
3013 subtitle.set(number f, number l, string txt)
3016 \begin_layout Standard
3017 Set the text of subtitle.
3020 \begin_layout Subsubsection
3021 subtitle.get(number f, number l)
3024 \begin_layout Standard
3025 Get the text of subtitle.
3028 \begin_layout Subsubsection
3029 subtitle.delete(number f, number l)
3032 \begin_layout Standard
3033 Delete specified subtitle.
3036 \begin_layout Subsection
3040 \begin_layout Standard
3041 Host memory handling (extra memory saved to savestates).
3042 Host memory starts empty.
3045 \begin_layout Subsubsection
3046 hostmemory.read(number address)
3049 \begin_layout Standard
3050 Reads hostmemory slot address.
3051 Slot numbers out of range return false instead of numeric.
3054 \begin_layout Subsubsection
3055 hostmemory.write(number address, number value)
3058 \begin_layout Standard
3059 Writes hostmemory slot with 0-255.
3060 Slot numbers out of range cause extension of host memory slot space.
3063 \begin_layout Subsubsection
3064 hostmemory.readbyte(number address)
3067 \begin_layout Standard
3068 Read unsigned byte (1 element) from given address.
3069 Slots out of range return false.
3072 \begin_layout Subsubsection
3073 hostmemory.writebyte(number address, number value)
3076 \begin_layout Standard
3077 Write unsigned byte (1 element) to given slot.
3078 Slot numbers out of range cause extension.
3081 \begin_layout Subsubsection
3082 hostmemory.readsbyte(number address)
3085 \begin_layout Standard
3086 Read signed byte (1 element) from given address.
3087 Slots out of range return false.
3090 \begin_layout Subsubsection
3091 hostmemory.writesbyte(number address, number value)
3094 \begin_layout Standard
3095 Write signed byte (1 element) to given slot.
3096 Slot numbers out of range cause extension.
3099 \begin_layout Subsubsection
3100 hostmemory.readword(number address)
3103 \begin_layout Standard
3104 Read unsigned word (2 elements) from given address.
3105 Slots out of range return false.
3108 \begin_layout Subsubsection
3109 hostmemory.writeword(number address, number value)
3112 \begin_layout Standard
3113 Write unsigned word (2 elements) to given slot.
3114 Slot numbers out of range cause extension.
3117 \begin_layout Subsubsection
3118 hostmemory.readsword(number address)
3121 \begin_layout Standard
3122 Read signed word (2 elements) from given address.
3123 Slots out of range return false.
3126 \begin_layout Subsubsection
3127 hostmemory.writesword(number address, number value)
3130 \begin_layout Standard
3131 Write signed word (2 elements) to given slot.
3132 Slot numbers out of range cause extension.
3135 \begin_layout Subsubsection
3136 hostmemory.readdword(number address)
3139 \begin_layout Standard
3140 Read unsigned doubleword (4 elements) from given address.
3141 Slots out of range return false.
3144 \begin_layout Subsubsection
3145 hostmemory.writedword(number address, number value)
3148 \begin_layout Standard
3149 Write unsigned doubleword (4 elements) to given slot.
3150 Slot numbers out of range cause extension.
3153 \begin_layout Subsubsection
3154 hostmemory.readsdword(number address)
3157 \begin_layout Standard
3158 Read signed doubleword (4 elements) from given address.
3159 Slots out of range return false.
3162 \begin_layout Subsubsection
3163 hostmemory.writesdword(number address, number value)
3166 \begin_layout Standard
3167 Write signed doubleword (4 elements) to given slot.
3168 Slot numbers out of range cause extension.
3171 \begin_layout Subsubsection
3172 hostmemory.readqword(number address)
3175 \begin_layout Standard
3176 Read unsigned quadword (8 elements) from given address.
3177 Slots out of range return false.
3180 \begin_layout Subsubsection
3181 hostmemory.writeqword(number address, number value)
3184 \begin_layout Standard
3185 Write unsigned quadword (4 elements) to given slot.
3186 Slot numbers out of range cause extension.
3189 \begin_layout Subsubsection
3190 hostmemory.readsqword(number address)
3193 \begin_layout Standard
3194 Read signed quadword (8 elements) from given address.
3195 Slots out of range return false.
3198 \begin_layout Subsubsection
3199 hostmemory.writesqword(number address, number value)
3202 \begin_layout Standard
3203 Write signed quadword (8 elements) to given slot.
3204 Slot numbers out of range cause extension.
3207 \begin_layout Subsection
3211 \begin_layout Standard
3215 \begin_layout Subsubsection
3216 movie.currentframe()
3219 \begin_layout Standard
3220 Return number of current frame.
3223 \begin_layout Subsubsection
3227 \begin_layout Standard
3228 Return number of frames in movie.
3231 \begin_layout Subsubsection
3235 \begin_layout Standard
3236 Return true if in readonly mode, false if in readwrite.
3239 \begin_layout Subsubsection
3243 \begin_layout Standard
3244 Returns the current value of rerecord count.
3247 \begin_layout Subsubsection
3248 movie.set_readwrite()
3251 \begin_layout Standard
3252 Set readwrite mode (does not cause on_readwrite callback).
3255 \begin_layout Subsubsection
3256 movie.frame_subframes(number frame)
3259 \begin_layout Standard
3260 Count number of subframes in specified frame (frame numbers are 1-based)
3264 \begin_layout Subsubsection
3265 movie.read_subframe(number frame, number subframe)
3268 \begin_layout Standard
3269 Read specifed subframe in specified frame and return data as array (100
3270 elements, numbered 0-99 currently).
3273 \begin_layout Subsubsection
3277 \begin_layout Standard
3278 Returns the current value of the RTC as a pair (second, subsecond).
3281 \begin_layout Subsubsection
3282 movie.unsafe_rewind([UNSAFEREWIND state])
3285 \begin_layout Standard
3286 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3289 \begin_layout Itemize
3290 If called without argument, causes emulator to start process of setting
3291 unsafe rewind point.
3292 When this has finished, callback on_set_rewind occurs, passing the rewind
3293 state to lua script.
3296 \begin_layout Itemize
3297 If called with argument, causes emulator rewind to passed rewind point as
3299 Readwrite mode is implicitly activated.
3302 \begin_layout Standard
3303 The following warnings apply to unsafe rewinding:
3306 \begin_layout Itemize
3307 There are no safety checks against misuse (that's what
3308 \begin_inset Quotes eld
3312 \begin_inset Quotes erd
3318 \begin_layout Itemize
3319 Only call rewind from timeline rewind point was set from.
3322 \begin_layout Itemize
3323 Only call rewind from after the rewind point was set.
3326 \begin_layout Subsection
3330 \begin_layout Standard
3331 Routines for settings manipulation
3334 \begin_layout Subsubsection
3335 settings.get(string name)
3338 \begin_layout Standard
3339 Get value of setting.
3340 If setting is blank, returns false.
3341 If setting value can't be obtained, returns (nil, error message).
3344 \begin_layout Subsubsection
3345 settings.set(string name, string value)
3348 \begin_layout Standard
3349 Set value of setting.
3350 If setting can't be set, returns (nil, error message).
3353 \begin_layout Subsubsection
3354 settings.is_set(string name)
3357 \begin_layout Standard
3358 Returns if setting is set.
3359 If setting does not exist, returns (nil, error message).
3362 \begin_layout Subsubsection
3363 settings.blank(string name)
3366 \begin_layout Standard
3367 Blanks a setting and returns true.
3368 If setting can't be blanked, returns (nil, error message).
3371 \begin_layout Subsection
3375 \begin_layout Standard
3376 Contains various functions for managing memory
3379 \begin_layout Subsubsection
3383 \begin_layout Standard
3384 Returns the number of VMAs
3387 \begin_layout Subsubsection
3388 memory.read_vma(number index)
3391 \begin_layout Standard
3392 Reads the specified VMA (indices start from zero).
3393 Trying to read invalid VMA gives nil.
3394 The read VMA is table with the following fields:
3397 \begin_layout Itemize
3398 region_name (string): The readable name of the VMA
3401 \begin_layout Itemize
3402 baseaddr (number): Base address of the VMA
3405 \begin_layout Itemize
3406 lastaddr (number): Last address in the VMA.
3409 \begin_layout Itemize
3410 size (number): The size of VMA in bytes.
3413 \begin_layout Itemize
3414 readonly (boolean): True of the VMA corresponds to ROM.
3417 \begin_layout Itemize
3418 iospace (boolean): True if the VMA is I/O space.
3421 \begin_layout Itemize
3422 native_endian (boolean): True if the VMA has native endian as opposed to
3426 \begin_layout Subsubsection
3427 memory.find_vma(number address)
3430 \begin_layout Standard
3431 Finds the VMA containing specified address.
3432 Returns table in the same format as read_vma or nil if not found.
3435 \begin_layout Subsubsection
3436 memory.readbyte(number address)
3439 \begin_layout Standard
3440 Reads the specified address as unsigned byte and returns the result.
3443 \begin_layout Subsubsection
3444 memory.readsbyte(number address)
3447 \begin_layout Standard
3448 Reads the specified address as signed byte and returns the result.
3451 \begin_layout Subsubsection
3452 memory.writebyte(number address, number value)
3455 \begin_layout Standard
3456 Writes the specified value (negative values undergo 2's complement) to specified
3457 address (as a byte).
3460 \begin_layout Subsubsection
3461 memory.readword(number address)
3464 \begin_layout Standard
3465 Reads the specified address as unsigned word and returns the result.
3468 \begin_layout Subsubsection
3469 memory.readsword(number address)
3472 \begin_layout Standard
3473 Reads the specified address as signed word and returns the result.
3476 \begin_layout Subsubsection
3477 memory.writeword(number address, number value)
3480 \begin_layout Standard
3481 Writes the specified value (negative values undergo 2's complement) to specified
3482 address (as a word).
3485 \begin_layout Subsubsection
3486 memory.readdword(number address)
3489 \begin_layout Standard
3490 Reads the specified address as unsigned doubleword and returns the result.
3493 \begin_layout Subsubsection
3494 memory.readsdword(number address)
3497 \begin_layout Standard
3498 Reads the specified address as signed doubleword and returns the result.
3501 \begin_layout Subsubsection
3502 memory.writedword(number address, number value)
3505 \begin_layout Standard
3506 Writes the specified value (negative values undergo 2's complement) to specified
3507 address (as a doubleword).
3510 \begin_layout Subsubsection
3511 memory.readqword(number address)
3514 \begin_layout Standard
3515 Reads the specified address as unsigned quadword and returns the result.
3518 \begin_layout Subsubsection
3519 memory.readsqword(number address)
3522 \begin_layout Standard
3523 Reads the specified address as signed quadword and returns the result.
3526 \begin_layout Subsubsection
3527 memory.writeqword(number address, number value)
3530 \begin_layout Standard
3531 Writes the specified value (negative values undergo 2's complement) to specified
3532 address (as a quadword).
3535 \begin_layout Subsubsection
3536 memory.hash_region(number base, number size)
3539 \begin_layout Standard
3540 Hash specified number of bytes starting from specified address and return
3544 \begin_layout Subsubsection
3548 \begin_layout Standard
3549 Hash the current system state.
3550 Mainly useful for debugging savestates.
3553 \begin_layout Subsubsection
3554 memory.readregion(number base, number size)
3557 \begin_layout Standard
3558 Read a region of memory.
3561 \begin_layout Itemize
3562 Warning: If the region crosses VMA boundary, the results are undefined.
3565 \begin_layout Subsubsection
3566 memory.map<type>([number base, number size])
3569 \begin_layout Standard
3570 Returns a table mapping specified memory aperture for read/write.
3571 If parameters are omitted, entiere map space is the aperture.
3574 \begin_layout Itemize
3575 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3578 \begin_layout Subsubsection
3579 memory.writeregion(number base, number size, table data)
3582 \begin_layout Standard
3583 Write a region of memory.
3586 \begin_layout Itemize
3587 Warning: If the region crosses VMA boundary, the results are undefined.
3590 \begin_layout Subsubsection
3591 memory.map_structure()
3594 \begin_layout Standard
3595 Returns a new mapping structure (MMAP_STRUCT)
3598 \begin_layout Subsubsection
3599 MMAP_STRUCT(string key, number address, string type)
3602 \begin_layout Standard
3603 Bind key in mmap structure to specified address with specified type.
3606 \begin_layout Itemize
3607 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3610 \begin_layout Subsubsection
3611 memory.read_expr(string expr)
3614 \begin_layout Standard
3615 Evaluate specified watch expression and return result
3618 \begin_layout Subsection
3622 \begin_layout Standard
3623 Contains functions for manipulating subtitles.
3626 \begin_layout Subsubsection
3627 subtitle.byindex(number index)
3630 \begin_layout Standard
3631 Get (basetime, length) pair of specified subtitle index or nothing if index
3635 \begin_layout Subsubsection
3636 subtitle.get(number basetime, number length)
3639 \begin_layout Standard
3640 Read the specified subtitle.
3642 \begin_inset Quotes eld
3646 \begin_inset Quotes erd
3649 if the subtitle does not exist.
3652 \begin_layout Subsubsection
3653 subtitle.set(number basetime, number length, string content)
3656 \begin_layout Standard
3657 Set the specified subtitle.
3660 \begin_layout Subsubsection
3661 subtitle.deltete(number basetime, number length)
3664 \begin_layout Standard
3665 Delete the specified subtitle.
3668 \begin_layout Subsection
3672 \begin_layout Standard
3673 Contains copy of global variables from time of Lua initialization.
3677 \begin_layout Subsection
3681 \begin_layout Standard
3682 Various callbacks to Lua that can occur.
3685 \begin_layout Subsubsection
3686 Callback: on_paint(bool not_synth)
3689 \begin_layout Standard
3690 Called when screen is being painted.
3691 Any gui.* calls requiring graphic context draw on the screen.
3694 \begin_layout Standard
3695 not_synth is true if this hook is being called in response to received frame,
3699 \begin_layout Subsubsection
3700 Callback: on_video()
3703 \begin_layout Standard
3704 Called when video dump frame is being painted.
3705 Any gui.* calls requiring graphic context draw on the video.
3708 \begin_layout Subsubsection
3709 Callback: on_frame_emulated()
3712 \begin_layout Standard
3713 Called when emulating frame has completed and on_paint()/on_video() calls
3714 are about to be issued.
3717 \begin_layout Subsubsection
3718 Callback: on_frame()
3721 \begin_layout Standard
3722 Called on each starting whole frame.
3725 \begin_layout Subsubsection
3726 Callback: on_startup()
3729 \begin_layout Standard
3730 Called when the emulator is starting (lsnes.rc and --run files has been run).
3733 \begin_layout Subsubsection
3734 Callback: on_rewind()
3737 \begin_layout Standard
3738 Called when rewind movie to beginning has completed.
3741 \begin_layout Subsubsection
3742 Callback: on_pre_load(string name)
3745 \begin_layout Standard
3746 Called just before savestate/movie load occurs (note: loads are always delayed,
3747 so this occurs even when load was initiated by lua).
3750 \begin_layout Subsubsection
3751 Callback: on_err_load(string name)
3754 \begin_layout Standard
3755 Called if loadstate goes wrong.
3758 \begin_layout Subsubsection
3759 Callback: on_post_load(string name, boolean was_savestate)
3762 \begin_layout Standard
3763 Called on successful loadstate.
3764 was_savestate gives if this was a savestate or a movie.
3767 \begin_layout Subsubsection
3768 Callback: on_pre_save(string name, boolean is_savestate)
3771 \begin_layout Standard
3772 Called just before savestate save occurs (note: movie saves are synchronous
3773 and won't trigger these callbacks if called from Lua).
3776 \begin_layout Subsubsection
3777 Callback: on_err_save(string name)
3780 \begin_layout Standard
3781 Called if savestate goes wrong.
3784 \begin_layout Subsubsection
3785 Callback: on_post_save(string name, boolean is_savestate)
3788 \begin_layout Standard
3789 Called on successful savaestate.
3790 is_savestate gives if this was a savestate or a movie.
3793 \begin_layout Subsubsection
3797 \begin_layout Standard
3798 Called when emulator is shutting down.
3801 \begin_layout Subsubsection
3802 Callback: on_input(boolean subframe)
3805 \begin_layout Standard
3806 Called when emulator is just sending input to bsnes core.
3807 Warning: This is called even in readonly mode, but the results are ignored.
3810 \begin_layout Subsubsection
3811 Callback: on_reset()
3814 \begin_layout Standard
3815 Called when SNES is reset.
3818 \begin_layout Subsubsection
3819 Callback: on_readwrite()
3822 \begin_layout Standard
3823 Called when moving into readwrite mode as result of
3824 \begin_inset Quotes eld
3828 \begin_inset Quotes erd
3831 command (note: moving to rwmode by Lua won't trigger this, as per recursive
3835 \begin_layout Subsubsection
3836 Callback: on_snoop(number port, number controller, number index, number
3840 \begin_layout Standard
3841 Called each time bsnes asks for input.
3842 The value is the final value to be sent to bsnes core (readonly mode, autohold
3843 and autofire have been taken into account).
3844 Might be useful when translating movies to format suitable for console
3846 Note: There is no way to modify the value to be sent.
3849 \begin_layout Subsubsection
3850 Callback: on_keyhook(string keyname, table state)
3853 \begin_layout Standard
3854 Sent when key that has keyhook events requested changes state.
3855 Keyname is name of the key (group) and state is the state (same kind as
3856 table values in input.raw).
3859 \begin_layout Subsubsection
3863 \begin_layout Standard
3864 Called when requested by set_idle_timeout(), the timeout has expired and
3865 emulator is waiting.
3868 \begin_layout Subsubsection
3869 Callback: on_timer()
3872 \begin_layout Standard
3873 Called when requested by set_idle_timeout() and the timeout has expired
3874 (regardless if emulator is waiting).
3877 \begin_layout Subsubsection
3878 Callback: on_set_rewind(UNSAFEREWIND r)
3881 \begin_layout Standard
3882 Called when unsafe rewind object has been constructed.
3885 \begin_layout Subsubsection
3886 Callback: on_pre_rewind()
3889 \begin_layout Standard
3890 Called just before unsafe rewind is about to occur.
3893 \begin_layout Subsubsection
3894 Callback: on_post_rewind()
3897 \begin_layout Standard
3898 Called just after unsafe rewind has occured.
3901 \begin_layout Section
3902 Memory watch expression syntax
3905 \begin_layout Standard
3906 Memory watch expressions are in RPN (Reverse Polish Notation).
3907 At the end of expression, the top entry on stack is taken as the final
3911 \begin_layout Standard
3915 \begin_layout Itemize
3916 Evaluation order is strictly left to right.
3919 \begin_layout Itemize
3920 a is the entry on top of stack
3923 \begin_layout Itemize
3924 b is the entry immediately below top of stack
3927 \begin_layout Itemize
3928 ; separates values to be pushed (no intermediate pop).
3931 \begin_layout Itemize
3932 After end of element, all used stack slots are popped and all results are
3936 \begin_layout Itemize
3937 When pushing multiple values, the pushes occur in order shown.
3940 \begin_layout Standard
3941 The following operators are available:
3944 \begin_layout Itemize
3948 \begin_layout Itemize
3952 \begin_layout Itemize
3956 \begin_layout Itemize
3960 \begin_layout Itemize
3964 \begin_layout Itemize
3968 \begin_layout Itemize
3969 b : read_signed_byte(a)
3972 \begin_layout Itemize
3976 \begin_layout Itemize
3977 d : read_signed_dword(a)
3980 \begin_layout Itemize
3984 \begin_layout Itemize
3986 \begin_inset Formula $\pi$
3992 \begin_layout Itemize
3993 q : read_signed_qword(a)
3996 \begin_layout Itemize
4000 \begin_layout Itemize
4004 \begin_layout Itemize
4008 \begin_layout Itemize
4012 \begin_layout Itemize
4013 w : read_signed_word(a)
4016 \begin_layout Itemize
4020 \begin_layout Itemize
4021 B : read_unsigned_byte(a)
4024 \begin_layout Itemize
4025 C<number>z : Push number <number> to stack.
4028 \begin_layout Itemize
4029 D : read_unsigned_dword(a)
4032 \begin_layout Itemize
4033 C0x<number>z : Push number <number> (hexadecimal) to stack.
4036 \begin_layout Itemize
4037 Q : read_unsigned_qword(a)
4040 \begin_layout Itemize
4041 R<digit> : round a to <digit> digits.
4044 \begin_layout Itemize
4045 W : read_unsigned_word(a)
4048 \begin_layout Subsection
4052 \begin_layout Standard
4053 C0x007e0878zWC0x007e002czW-
4056 \begin_layout Enumerate
4057 Push value 0x7e0878 on top of stack (C0x007e0878z).
4060 \begin_layout Enumerate
4061 Pop the value on top of stack (0x7e0878), read word value at that address
4062 and push the result,call it x1 (W).
4065 \begin_layout Enumerate
4066 Push value 0x7e002c on top of stack (C0x007e002cz).
4069 \begin_layout Enumerate
4070 Pop the value on top of stack (0x7e002c), read word value at that address
4071 and push the result,call it x2 (W).
4074 \begin_layout Enumerate
4075 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
4079 \begin_layout Enumerate
4080 Since the expression ends, the final memory watch result is the top one
4081 on stack, which is x2 - x1.
4084 \begin_layout Section
4085 Modifier and key names:
4088 \begin_layout Subsection
4092 \begin_layout Subsubsection
4096 \begin_layout Standard
4097 Following modifier names are known:
4100 \begin_layout Itemize
4101 ctrl, lctrl, rctrl: Control keys
4104 \begin_layout Itemize
4105 alt, lalt, ralt: ALT keys.
4108 \begin_layout Itemize
4109 shift, lshift, rshift: Shift keys.
4112 \begin_layout Itemize
4113 meta, lmeta, rmeta: Meta keys.
4116 \begin_layout Itemize
4117 num, caps: Numlock/Capslock (these are sticky!)
4120 \begin_layout Itemize
4124 \begin_layout Subsubsection
4128 \begin_layout Standard
4129 Following key names are known:
4132 \begin_layout Itemize
4133 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
4134 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
4135 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
4136 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
4137 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
4138 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
4139 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
4140 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
4141 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
4142 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
4143 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
4144 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
4145 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
4146 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
4147 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
4148 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
4149 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
4150 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
4151 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
4152 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
4153 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
4154 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
4155 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
4156 break, menu, power, euro, undo
4159 \begin_layout Itemize
4160 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
4161 hardware-dependent scan code of <n> (useful to bind those keys that don't
4162 have symbolic names).
4165 \begin_layout Subsubsection
4166 Joystick pseudo-keys:
4169 \begin_layout Itemize
4170 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
4173 \begin_layout Itemize
4174 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
4177 \begin_layout Itemize
4178 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
4181 \begin_layout Itemize
4182 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
4185 \begin_layout Itemize
4186 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
4189 \begin_layout Itemize
4190 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
4191 position (axis modes axis and axis_inverse).
4194 \begin_layout Itemize
4195 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
4196 position (axis modes axis and axis_inverse).
4199 \begin_layout Itemize
4200 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
4204 \begin_layout Subsubsection
4208 \begin_layout Itemize
4209 Escape: Enter/Exit Command mode, cancel modal dialogs.
4212 \begin_layout Itemize
4213 Return (also KPEnter): Execute command, ok modal dialog.
4216 \begin_layout Itemize
4217 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
4221 \begin_layout Itemize
4222 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
4226 \begin_layout Itemize
4227 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
4230 \begin_layout Itemize
4231 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
4234 \begin_layout Itemize
4235 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
4238 \begin_layout Itemize
4239 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
4242 \begin_layout Itemize
4244 if no num lock; command mode): Delete character to right of cursor.
4247 \begin_layout Itemize
4248 Insert (also KP0 if no num lock; command mode): Toggle between insert /
4252 \begin_layout Itemize
4253 Backspace (command mode): Delete character to left of cursor.
4256 \begin_layout Itemize
4257 CTRL+LEFT (also ALT+B; command mode): Previous word.
4260 \begin_layout Itemize
4261 CTRL+RIGHT (also ALT+F; command mode): Next word.
4264 \begin_layout Itemize
4265 ALT+D (also CTRL+W; command mode): Delete word.
4268 \begin_layout Itemize
4269 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
4272 \begin_layout Subsection
4276 \begin_layout Subsubsection
4280 \begin_layout Standard
4281 Following modifier names are known:
4284 \begin_layout Itemize
4288 \begin_layout Itemize
4292 \begin_layout Itemize
4296 \begin_layout Itemize
4300 \begin_layout Itemize
4304 \begin_layout Subsubsection
4308 \begin_layout Standard
4309 Following key names are known:
4312 \begin_layout Itemize
4313 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
4314 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
4315 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
4316 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4317 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
4318 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4319 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
4320 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
4321 pause, capital, end, home, lefT, up, right, down, select, print, execute,
4322 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
4323 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
4324 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
4325 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
4326 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
4327 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
4328 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
4329 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
4330 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
4331 windows_right, windows_menu, command, special1, special2, special3, special4,
4332 special5, special6, special7, special8, special9, special10, special11,
4333 special12, special13, special14, special15, special16, special17, special18,
4334 special19, special20
4337 \begin_layout Section
4341 \begin_layout Standard
4342 Movie file is .zip archive in itself, normal ZIP archive tools work on it
4343 (note: If you recompress it, do not use compression methods other than
4344 store and deflate and especially do not use encryption of any kind).
4347 \begin_layout Subsection
4348 Detecting clean start/SRAM/Savestate
4351 \begin_layout Itemize
4353 \begin_inset Quotes eld
4357 \begin_inset Quotes erd
4360 it is savestate, otherwise:
4363 \begin_layout Itemize
4364 If file has members with names starting
4365 \begin_inset Quotes eld
4369 \begin_inset Quotes erd
4372 it is movie starting from SRAM, otherwise:
4375 \begin_layout Itemize
4376 It is movie starting from clear state.
4379 \begin_layout Subsection
4383 \begin_layout Standard
4384 Type of game ROM and region (as one line).
4388 \begin_layout Standard
4389 \begin_inset Tabular
4390 <lyxtabular version="3" rows="8" columns="3">
4391 <features tabularvalignment="middle">
4392 <column alignment="center" valignment="top" width="0">
4393 <column alignment="center" valignment="top" width="0">
4394 <column alignment="center" valignment="top" width="0">
4396 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4399 \begin_layout Plain Layout
4405 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4408 \begin_layout Plain Layout
4414 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4417 \begin_layout Plain Layout
4425 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4428 \begin_layout Plain Layout
4434 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4437 \begin_layout Plain Layout
4443 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4446 \begin_layout Plain Layout
4454 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4457 \begin_layout Plain Layout
4463 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4466 \begin_layout Plain Layout
4472 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4475 \begin_layout Plain Layout
4483 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4486 \begin_layout Plain Layout
4492 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4495 \begin_layout Plain Layout
4501 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4504 \begin_layout Plain Layout
4512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4515 \begin_layout Plain Layout
4521 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4524 \begin_layout Plain Layout
4530 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4533 \begin_layout Plain Layout
4541 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4544 \begin_layout Plain Layout
4550 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4553 \begin_layout Plain Layout
4559 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4562 \begin_layout Plain Layout
4570 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4573 \begin_layout Plain Layout
4579 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4582 \begin_layout Plain Layout
4588 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4591 \begin_layout Plain Layout
4599 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4602 \begin_layout Plain Layout
4608 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4611 \begin_layout Plain Layout
4617 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4620 \begin_layout Plain Layout
4634 \begin_layout Standard
4638 \begin_layout Standard
4639 \begin_inset Tabular
4640 <lyxtabular version="3" rows="3" columns="2">
4641 <features tabularvalignment="middle">
4642 <column alignment="center" valignment="top" width="0">
4643 <column alignment="center" valignment="top" width="0">
4645 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4648 \begin_layout Plain Layout
4654 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4657 \begin_layout Plain Layout
4665 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4668 \begin_layout Plain Layout
4674 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4677 \begin_layout Plain Layout
4685 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4688 \begin_layout Plain Layout
4694 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4697 \begin_layout Plain Layout
4711 \begin_layout Subsection
4715 \begin_layout Standard
4716 Contains type of port #1 (as one line).
4717 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4718 If not present, defaults to 'gamepad'.
4721 \begin_layout Subsection
4725 \begin_layout Standard
4726 Contains type of port #2 (as one line).
4727 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4728 'justifier' and 'justifiers'.
4729 If not present, defaults to 'none'.
4732 \begin_layout Subsection
4736 \begin_layout Standard
4737 Contains name of the game (as one line).
4740 \begin_layout Subsection
4744 \begin_layout Standard
4745 Contains authors, one per line.
4746 Part before '|' is the full name, part after is the nickname.
4749 \begin_layout Subsection
4753 \begin_layout Standard
4755 \begin_inset Quotes eld
4759 \begin_inset Quotes erd
4763 Used to reject other saves.
4766 \begin_layout Subsection
4767 Member: controlsversion
4770 \begin_layout Standard
4772 \begin_inset Quotes eld
4776 \begin_inset Quotes erd
4780 Used to identify what controls are there.
4783 \begin_layout Subsection
4785 \begin_inset Quotes eld
4789 \begin_inset Quotes erd
4795 \begin_layout Standard
4796 Contains bsnes core version number (as one line).
4799 \begin_layout Subsection
4803 \begin_layout Standard
4804 Contains project ID (as one line).
4805 Used to identify if two movies are part of the same project.
4808 \begin_layout Subsection
4809 Member: {rom,slota,slotb}{,xml}.sha256
4812 \begin_layout Standard
4813 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4814 Absent if corresponding file is absent.
4817 \begin_layout Subsection
4818 Member: moviesram.<name>
4821 \begin_layout Standard
4822 Raw binary startup SRAM of kind <name>.
4823 Only present in savestates and movies starting from SRAM.
4826 \begin_layout Subsection
4830 \begin_layout Standard
4831 Contains frame number (as one line) of frame movie was saved on.
4832 Only present in savestates.
4835 \begin_layout Subsection
4839 \begin_layout Standard
4840 Current value of lag counter (as one line).
4841 Only present in savestates.
4844 \begin_layout Subsection
4845 Member: pollcounters
4848 \begin_layout Standard
4849 Contains poll counters (currently 100 of them), one per line.
4850 Each line is raw poll count if DRDY is set for it.
4851 Otherwise it is negative poll count minus one.
4852 Only present in savestates.
4855 \begin_layout Subsection
4859 \begin_layout Standard
4860 Raw binary dump of host memory.
4861 Only present in savestates.
4864 \begin_layout Subsection
4868 \begin_layout Standard
4869 The raw binary savestate itself.
4870 Savestate detection uses this file, only present in savestates.
4873 \begin_layout Subsection
4877 \begin_layout Standard
4878 Screenshot of current frame.
4879 Only present in savestates.
4880 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4882 Height of image is inferred from the width and size of data.
4885 \begin_layout Subsection
4889 \begin_layout Standard
4890 Raw binary SRAM of kind <name> at time of savestate.
4891 Only present in savestates.
4894 \begin_layout Subsection
4898 \begin_layout Standard
4899 The actual input track, one line per subframe (blank lines are skipped).
4902 \begin_layout Itemize
4903 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4904 part of same frame as previous, otherwise it starts a new frame.
4907 \begin_layout Itemize
4908 First subframe must start a new frame.
4911 \begin_layout Standard
4912 Length of movie in frames is number of lines in input file that start a
4916 \begin_layout Subsection
4920 \begin_layout Standard
4925 \begin_layout Itemize
4926 Each line is in form <firstframe> <numframes> <text>.
4929 \begin_layout Itemize
4930 Linefeed is encoded as
4932 n, backslash is encoded as
4939 \begin_layout Subsection
4943 \begin_layout Standard
4944 Contains textual base-10 rerecord count (as one line; emulator just writes
4945 this, it doesn't read it) + 1.
4948 \begin_layout Subsection
4952 \begin_layout Standard
4953 This member stores set of load IDs.
4954 There is one load ID per rerecord (plus one corresponding to start of project).
4957 \begin_layout Itemize
4958 This member constists of concatenation of records
4961 \begin_layout Itemize
4962 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4966 \begin_layout Itemize
4967 IDs are interpretted as 256-bit big-endian integers with warparound.
4970 \begin_layout Itemize
4971 Initial predicted ID is all zeroes.
4974 \begin_layout Standard
4975 Format of each record is:
4978 \begin_layout Itemize
4979 1 byte: Opcode byte.
4980 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4984 \begin_layout Itemize
4985 32-prefixlen bytes of ID.
4988 \begin_layout Itemize
4989 countlen bytes of big-endian count (count).
4992 \begin_layout Standard
4993 Records are processed as follows:
4996 \begin_layout Itemize
4997 To form the first ID encoded by record, take the first prefixlen bytes predicted
4998 ID and append the read ID value to it.
4999 The result is the first ID encoded.
5002 \begin_layout Itemize
5003 If countlen is 0, record encodes 1 ID.
5006 \begin_layout Itemize
5007 If countlen is 1, record encodes 2+count IDs.
5010 \begin_layout Itemize
5011 If countlen is 2, record encodes 258+count IDs.
5014 \begin_layout Itemize
5015 If countlen is 3, record encodes 65794+count IDs.
5018 \begin_layout Itemize
5019 The new predicted ID is the next ID after last one encoded by the record.
5022 \begin_layout Standard
5023 The number of rerecords + 1 is equal to the sum of number of IDs encoded
5027 \begin_layout Subsection
5028 Member: starttime.second
5031 \begin_layout Standard
5032 Movie starting time, second part.
5033 Epoch is Unix epoch.
5034 Default is 1,000,000,000.
5037 \begin_layout Subsection
5038 Member: starttime.subsecond
5041 \begin_layout Standard
5042 Movie starting time, subsecond part.
5047 \begin_layout Subsection
5048 Member: savetime.second
5051 \begin_layout Standard
5052 Movie saving time, second part.
5053 Default is starttime.second.
5054 Only present in savestates.
5057 \begin_layout Subsection
5058 Member: savetime.subsecond
5061 \begin_layout Standard
5062 Movie saving time, subsecond part.
5063 Default is starttime.subsecond.
5064 Only present in savestates.
5067 \begin_layout Section
5068 lsvs file format (commentary tracks)
5071 \begin_layout Subsection
5075 \begin_layout Itemize
5076 Each cluster is 8kB (8192 bytes) in size.
5079 \begin_layout Itemize
5080 Cluster n starts at offset 8192*n in file.
5083 \begin_layout Itemize
5084 The following clusters are system special:
5088 \begin_layout Itemize
5089 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
5092 \begin_layout Itemize
5093 Cluster 1 (superblock)
5097 \begin_layout Subsection
5101 \begin_layout Itemize
5102 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
5106 \begin_layout Itemize
5107 This cluster table consists of 2048 4-byte big-endian integers.
5110 \begin_layout Itemize
5111 Each entry describes a cluster in 16MB supercluster, in order.
5114 \begin_layout Itemize
5115 The valid values for entries are:
5119 \begin_layout Itemize
5120 0x00000000: Free cluster
5123 \begin_layout Itemize
5124 0x00000001: Last cluster in chain.
5127 \begin_layout Itemize
5128 0xFFFFFFFF: System cluster (cluster tables and superblock)
5131 \begin_layout Itemize
5132 (anything else): Number of next cluster in chain.
5133 Must not be multiple of 2048.
5137 \begin_layout Itemize
5138 Due to limitations of the format, there can be at most 2097052 superclusters,
5139 giving maximum file size of 16TB.
5142 \begin_layout Subsection
5146 \begin_layout Itemize
5147 The stream table chain always starts in cluster 2.
5150 \begin_layout Itemize
5151 Otherwise, it follows normal chaining.
5154 \begin_layout Itemize
5155 The stream table consists of 16-byte entries:
5159 \begin_layout Itemize
5160 The first 8 bytes of entry give big-endian beginning position of stream
5161 in units of 1/48000 s.
5164 \begin_layout Itemize
5165 The next 4 bytes of entry give big-endian beginning cluster for control
5167 0 here marks the entry as not present.
5170 \begin_layout Itemize
5171 The last 4 bytes of entry give big-endian beginning cluster for codec data.
5175 \begin_layout Itemize
5176 Stream table clusters are normal clusters, following normal chaining.
5179 \begin_layout Itemize
5180 The stream begnning position is not guarenteed unique.
5181 There can be multiple streams with the same starting position in the file.
5184 \begin_layout Subsection
5188 \begin_layout Itemize
5189 The stream control data consists of entries 4 bytes each:
5193 \begin_layout Itemize
5194 The first 2 bytes of entry gives big-endian length of packet
5197 \begin_layout Itemize
5198 The next byte of entry gives audio length of packet in units of 1/400 s.
5201 \begin_layout Itemize
5202 The last byte is control byte.
5206 \begin_layout Itemize
5207 0 means this entry is not present and the control data ends.
5210 \begin_layout Itemize
5211 1 is valid control entry.
5216 \begin_layout Itemize
5217 The stream control data can also end by running into end of the readable
5222 \begin_layout Itemize
5223 This happens if there happens to be exact multiple of 2048 packets in stream
5224 and number of packets is nonzero.
5228 \begin_layout Itemize
5229 These clusters follow normal chaining.
5232 \begin_layout Subsection
5236 \begin_layout Itemize
5237 Stream codec data consists of raw Opus data packets packed back to back
5238 with nothing in between.
5241 \begin_layout Itemize
5242 Warning: Due to internal limitations, this data must reside in the first
5243 65536 superclusters (that is, the first 1TB of the file).
5246 \begin_layout Subsection
5250 \begin_layout Itemize
5251 The superblock is stored in cluster 1.
5255 \begin_layout Itemize
5256 The first 11 bytes are
5257 \begin_inset Quotes eld
5261 \begin_inset Quotes erd
5267 \begin_layout Itemize
5268 The rest are unused.
5271 \begin_layout Itemize
5272 This cluster 1 is marked as system special.
5275 \begin_layout Section
5276 Known ROM extensions
5279 \begin_layout Itemize
5280 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
5283 \begin_layout Itemize
5284 DMG cartridge ROMs: dmg, gb.
5287 \begin_layout Itemize
5288 GBC cartridge ROMs: cgb, gbc.
5291 \begin_layout Section
5295 \begin_layout Itemize
5296 The first line must be:
5297 \begin_inset Quotes eld
5301 \begin_inset Quotes erd
5307 \begin_layout Itemize
5308 There is one needed line:
5309 \begin_inset Quotes eld
5313 \begin_inset Quotes erd
5317 This sets system type to <systype>.
5318 The following system types are valid:
5322 \begin_layout Itemize
5326 \begin_layout Itemize
5327 bsx (BS-X non-slotted)
5330 \begin_layout Itemize
5331 bsxslotted (BS-X slotted)
5334 \begin_layout Itemize
5335 sufamiturbo (Sufami Turbo)
5338 \begin_layout Itemize
5339 sgb (Super Game Boy)
5342 \begin_layout Itemize
5346 \begin_layout Itemize
5347 gbc (Game Boy Color)
5350 \begin_layout Itemize
5351 gbc_gba (Game Boy Color with GBA initial register values)
5355 \begin_layout Itemize
5356 Optionally a region can be specified:
5357 \begin_inset Quotes eld
5361 \begin_inset Quotes erd
5365 The following values are valid:
5369 \begin_layout Itemize
5370 autodetect (Autodetect region: snes and sgb only)
5373 \begin_layout Itemize
5374 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
5377 \begin_layout Itemize
5378 pal (PAL: snes, sgb)
5381 \begin_layout Itemize
5382 world (World: dmg, gbc, gbc_gba)
5386 \begin_layout Itemize
5387 ROM images are loaded as:
5388 \begin_inset Quotes eld
5392 \begin_inset Quotes erd
5396 The following types are valid:
5400 \begin_layout Itemize
5401 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
5402 BIOS in bsx, bsxslotted, sufamiturbo)
5405 \begin_layout Itemize
5406 bsx (Cartridge ROM in bsx, bsxslotted)
5409 \begin_layout Itemize
5410 slot-a (Cartridge ROM in sufamiturbo)
5413 \begin_layout Itemize
5414 slot-b (Cartridge ROM in sufamiturbo)
5418 \begin_layout Itemize
5419 ROM markup can be loaded as:
5420 \begin_inset Quotes eld
5424 \begin_inset Quotes erd
5428 The types valid are the same as for ROMs.
5431 \begin_layout Itemize
5432 Patches can be loaded as
5433 \begin_inset Quotes eld
5436 patch[<offset>] <type> <file>
5437 \begin_inset Quotes erd
5441 The types are the same as for ROMs.
5445 \begin_layout Itemize
5446 Offset is given in form [+-]<number>.
5447 Usually offset is either +0 or -512.
5450 \begin_layout Itemize
5451 Default offset is +0.
5455 \begin_layout Subsection
5459 \begin_layout LyX-Code
5463 \begin_layout LyX-Code
5467 \begin_layout LyX-Code
5468 rom rom speedygonzales.sfc
5471 \begin_layout LyX-Code
5472 patch-512 rom sonicthehedgehog.ips
5475 \begin_layout Subsection
5479 \begin_layout LyX-Code
5483 \begin_layout LyX-Code
5487 \begin_layout LyX-Code
5488 rom rom supergameboy.sfc
5491 \begin_layout LyX-Code
5492 rom dmg megamanV.dmg
5495 \begin_layout Section
5496 Quick'n'dirty encode guide
5499 \begin_layout Enumerate
5500 Start the emulator and load the ROM and movie file.
5503 \begin_layout Enumerate
5504 Set large AVI option 'set-setting avi-large on'
5507 \begin_layout Enumerate
5508 Enable dumping 'dump-avi tmpdump'
5511 \begin_layout Enumerate
5512 Unpause and let it run until you want to end dumping.
5515 \begin_layout Enumerate
5516 Close the emulator (closing the window is the easiest way).
5520 \begin_layout Enumerate
5521 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5522 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5525 \begin_layout Enumerate
5526 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5529 \begin_layout Enumerate
5530 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5531 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5534 \begin_layout Enumerate
5535 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5536 Now final.mkv contains quick'n'dirty encode.
5539 \begin_layout Section
5540 Axis configurations for some gamepad types:
5543 \begin_layout Subsection
5547 \begin_layout Standard
5548 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5551 \begin_layout LyX-Code
5552 set-axis joystick0axis2 pressure-+
5555 \begin_layout LyX-Code
5556 set-axis joystick0axis5 pressure-+
5559 \begin_layout Itemize
5560 This is needed for SDL only.
5561 EVDEV sets those types correctly.
5564 \begin_layout Subsection
5566 \begin_inset Quotes eld
5570 \begin_inset Quotes erd
5576 \begin_layout Standard
5577 Axes 8-19 should be disabled.
5580 \begin_layout LyX-Code
5581 set-axis joystick0axis8 disabled
5584 \begin_layout LyX-Code
5585 set-axis joystick0axis9 disabled
5588 \begin_layout LyX-Code
5589 set-axis joystick0axis10 disabled
5592 \begin_layout LyX-Code
5593 set-axis joystick0axis11 disabled
5596 \begin_layout LyX-Code
5597 set-axis joystick0axis12 disabled
5600 \begin_layout LyX-Code
5601 set-axis joystick0axis13 disabled
5604 \begin_layout LyX-Code
5605 set-axis joystick0axis14 disabled
5608 \begin_layout LyX-Code
5609 set-axis joystick0axis15 disabled
5612 \begin_layout LyX-Code
5613 set-axis joystick0axis16 disabled
5616 \begin_layout LyX-Code
5617 set-axis joystick0axis17 disabled
5620 \begin_layout LyX-Code
5621 set-axis joystick0axis18 disabled
5624 \begin_layout LyX-Code
5625 set-axis joystick0axis19 disabled
5628 \begin_layout Section
5632 \begin_layout Subsection
5633 Problems from BSNES core:
5636 \begin_layout Itemize
5637 The whole pending save stuff.
5640 \begin_layout Itemize
5641 Lack of layer hiding.
5644 \begin_layout Itemize
5645 It is slow (especially accuracy).
5648 \begin_layout Itemize
5649 Firmwares can't be loaded from ZIP archives.
5652 \begin_layout Subsection
5656 \begin_layout Itemize
5657 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5660 \begin_layout Itemize
5661 Audio for last dumped frame is not itself dumped.
5664 \begin_layout Itemize
5665 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5668 \begin_layout Itemize
5669 No menus, command based interface (SDL).
5672 \begin_layout Itemize
5673 Long commands don't scroll.
5676 \begin_layout Section
5680 \begin_layout Subsection
5684 \begin_layout Itemize
5688 \begin_layout Itemize
5689 Fix dumper video corruption with levels 10-18.
5692 \begin_layout Subsection
5696 \begin_layout Itemize
5700 \begin_layout Itemize
5701 Lots of code cleanups
5704 \begin_layout Itemize
5705 Lua interface to settings
5708 \begin_layout Itemize
5709 Allow specifying AVI borders without Lua
5712 \begin_layout Itemize
5713 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5716 \begin_layout Itemize
5717 on_snoop lua callback
5720 \begin_layout Itemize
5721 Faster movie loading and saving.
5724 \begin_layout Subsection
5728 \begin_layout Itemize
5732 \begin_layout Subsection
5736 \begin_layout Itemize
5740 \begin_layout Itemize
5741 Save jukebox functionality.
5744 \begin_layout Subsection
5748 \begin_layout Itemize
5749 Try to fix some nasty failing movie load edge cases
5752 \begin_layout Itemize
5753 Allow specifying scripts to run on command line.
5756 \begin_layout Subsection
5760 \begin_layout Itemize
5761 Major source code reorganization.
5764 \begin_layout Itemize
5765 Backup savestates before overwriting.
5768 \begin_layout Itemize
5769 Don't crash if loading initial state fails.
5772 \begin_layout Subsection
5776 \begin_layout Itemize
5780 \begin_layout Itemize
5781 Fix author name parsing
5784 \begin_layout Itemize
5785 Fix rerecord counting
5788 \begin_layout Itemize
5789 (SDL) Print messages to console if SDL is uninitialized
5792 \begin_layout Itemize
5793 Add movieinfo program
5796 \begin_layout Itemize
5797 Fix loading movies starting from SRAM.
5800 \begin_layout Subsection
5804 \begin_layout Itemize
5805 Add support for unattended dumping
5808 \begin_layout Itemize
5809 Fix compiling for Win32
5812 \begin_layout Itemize
5813 Don't lock up if sound can't be initialized
5816 \begin_layout Itemize
5817 Strip trailing CR from commands
5820 \begin_layout Itemize
5821 Don't try to do dubious things in global ctors (fix crash on startup)
5824 \begin_layout Subsection
5828 \begin_layout Itemize
5829 Small documentation tweaking
5832 \begin_layout Itemize
5836 \begin_layout Itemize
5837 Fix major bug in modifier matching
5840 \begin_layout Subsection
5844 \begin_layout Itemize
5845 Lots of documentation fixes
5848 \begin_layout Itemize
5849 Use dedicated callbacks for event backcomm., not commands.
5852 \begin_layout Itemize
5853 Ensure that the watchdog is not hit when executing delayed reset.
5856 \begin_layout Itemize
5857 Remove errant tab from joystick message.
5860 \begin_layout Subsection
5864 \begin_layout Itemize
5865 Make autofire operate in absolute time, not linear time
5868 \begin_layout Itemize
5869 Reinitialize controls when resuming from loadstate
5872 \begin_layout Itemize
5873 Some more code cleanups
5876 \begin_layout Itemize
5877 If Lua allocator fails, call OOM_panic()
5880 \begin_layout Itemize
5881 Byte/word/dword/qword sized host memory write/read functions.
5884 \begin_layout Itemize
5885 Dump at correct framerate if dumping interlaced NTSC (height=448).
5888 \begin_layout Subsection
5892 \begin_layout Itemize
5893 Actually include the complete source code
5896 \begin_layout Itemize
5900 \begin_layout Subsection
5904 \begin_layout Itemize
5905 Document {save,start}time.{,sub}second.
5908 \begin_layout Itemize
5909 Intercept time() from bsnes core.
5912 \begin_layout Subsection
5916 \begin_layout Itemize
5917 Allow disabling time() interception (allow build on Mac OS X)
5920 \begin_layout Itemize
5921 Use SDLMain on Mac OS X (make SDL not crash)
5924 \begin_layout Itemize
5925 Disable delayed resets (just plain too buggy for now).
5928 \begin_layout Itemize
5932 \begin_layout Itemize
5933 Use 16-bit for graphics/video instead of 32-bit.
5936 \begin_layout Itemize
5937 gui.rectangle/gui.pixel
5940 \begin_layout Itemize
5944 \begin_layout Itemize
5945 New CSCD writer implementation.
5948 \begin_layout Subsection
5952 \begin_layout Itemize
5953 Fix interaction of * and +.
5956 \begin_layout Itemize
5960 \begin_layout Itemize
5961 Use gettimeofday()/usleep(), these seem portable enough.
5964 \begin_layout Itemize
5965 Move joystick axis manipulation to keymapper code.
5968 \begin_layout Itemize
5969 Changes to how read-only works.
5972 \begin_layout Itemize
5973 Refactor controller input code.
5976 \begin_layout Subsection
5980 \begin_layout Itemize
5981 Fix mouseclick scale compensation.
5984 \begin_layout Itemize
5985 Draw area boundaries correctly in SDL code.
5988 \begin_layout Itemize
5992 \begin_layout Itemize
5993 Fix CSCD output (buffer overrun and race condition).
5996 \begin_layout Subsection
6000 \begin_layout Itemize
6001 JMD dumping support.
6004 \begin_layout Itemize
6005 Allow unattended dumping to JMD.
6008 \begin_layout Itemize
6012 \begin_layout Itemize
6013 Switch back to 32-bit colors.
6016 \begin_layout Itemize
6017 Add Lua function gui.color.
6020 \begin_layout Itemize
6021 Use some new C++11 features in GCC 4.6.
6024 \begin_layout Itemize
6025 Be prepared for core frequency changes.
6028 \begin_layout Itemize
6029 Pass colors in one chunk from Lua.
6032 \begin_layout Subsection
6036 \begin_layout Itemize
6037 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
6038 memory.read_vma() and memory.find_vma().
6041 \begin_layout Itemize
6042 Numerious documentation fixups
6045 \begin_layout Itemize
6046 RTC time format changed
6049 \begin_layout Itemize
6050 Reformat flags display
6053 \begin_layout Itemize
6054 Allow lua package name to be overridden
6057 \begin_layout Itemize
6058 SDUMP (high-quality dumping).
6061 \begin_layout Itemize
6062 Split platform support to plugins.
6065 \begin_layout Itemize
6066 Make all sound plugins support basic sound commands
6069 \begin_layout Itemize
6070 Support portaudio for sound.
6073 \begin_layout Itemize
6074 Allow disable Lua/SDL searching.
6077 \begin_layout Itemize
6078 Upconvert colors when copying lcscreen to screen.
6081 \begin_layout Itemize
6082 Reorganize source tree.
6085 \begin_layout Itemize
6086 Evdev joystick support.
6089 \begin_layout Itemize
6090 Refactor more code into generic window code.
6093 \begin_layout Subsection
6097 \begin_layout Itemize
6098 Refactor message handling.
6101 \begin_layout Itemize
6105 \begin_layout Itemize
6109 \begin_layout Itemize
6110 Finish pending saves before load/quit.
6113 \begin_layout Itemize
6114 Wxwidgets graphics plugin.
6117 \begin_layout Subsection
6121 \begin_layout Itemize
6122 Get rid of win32-crap.[ch]pp.
6125 \begin_layout Itemize
6126 Move files around a lot.
6129 \begin_layout Itemize
6130 Get rid of need for host C++ compiler.
6133 \begin_layout Itemize
6137 \begin_layout Itemize
6138 Refactor inter-component communication.
6141 \begin_layout Itemize
6145 \begin_layout Itemize
6146 Fix crash on multiline aliases.
6149 \begin_layout Itemize
6150 Load/Save settings in wxwidgets gui.
6153 \begin_layout Subsection
6157 \begin_layout Itemize
6158 Patch problems in bsnes core
6161 \begin_layout Itemize
6162 SNES is little-endian, not big-endian!
6165 \begin_layout Itemize
6166 Fix memory corruption in lcscreen::load()
6169 \begin_layout Subsection
6173 \begin_layout Itemize
6174 Fix interpretting repeat counts in rrdata loading.
6177 \begin_layout Itemize
6178 New lua callback: on_frame()
6181 \begin_layout Itemize
6182 Remove calls to runtosave() that aren't supposed to be there
6185 \begin_layout Itemize
6186 Lua function: movie.read_rtc()
6189 \begin_layout Itemize
6190 Ignore src/fonts/font.cpp
6193 \begin_layout Itemize
6194 Fix more bsnes core problems
6197 \begin_layout Itemize
6198 Control bsnes random seeding
6201 \begin_layout Itemize
6205 \begin_layout Itemize
6206 Some bsnes core debugging features (state dump and state hash)
6209 \begin_layout Itemize
6210 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
6211 it was 'lsnes rr0-beta21').
6214 \begin_layout Subsection
6218 \begin_layout Itemize
6219 Fix memory corruption due to macro/field mixup
6222 \begin_layout Itemize
6223 search-memory update
6226 \begin_layout Itemize
6227 Allow direct-mapped framebuffer
6230 \begin_layout Itemize
6231 SDL: Use SDL_ANYFORMAT if possible
6234 \begin_layout Itemize
6235 SDMP2SOX: 2s delay modes.
6238 \begin_layout Itemize
6242 \begin_layout Itemize
6243 Use sed -E, not sed -r.
6244 Fixes building on Mac OS X.
6247 \begin_layout Itemize
6248 Wxwidgets: Save jukebox on exit
6251 \begin_layout Itemize
6252 Fix RTC if using load-movie on savestate.
6255 \begin_layout Itemize
6256 Fix crash related to full console mode.
6259 \begin_layout Subsection
6263 \begin_layout Itemize
6264 Wxwidgets: Allow bringing application to foreground on Mac OS X.
6267 \begin_layout Itemize
6268 Wxwidgets: Allow compiling on Mac OS X.
6271 \begin_layout Itemize
6272 Use movie compare instead of movie hashing (faster save/load).
6275 \begin_layout Itemize
6279 \begin_layout Subsection
6283 \begin_layout Itemize
6284 sdmp2sox: Pad soundtrack if using -l or -L.
6287 \begin_layout Itemize
6288 sdmp2sox: Fix NTSC overscan.
6291 \begin_layout Itemize
6292 sdmp2sox: Add AR correction mode.
6295 \begin_layout Itemize
6296 call lua_close() when exiting.
6299 \begin_layout Itemize
6300 Fix zip_writer bug causing warnings from info-zip and error from advzip.
6303 \begin_layout Subsection
6307 \begin_layout Itemize
6308 Fix IPS patching code (use bsnes core IPS patcher).
6311 \begin_layout Itemize
6312 Implement BPS patching (using bsnes core IPS patcher).
6315 \begin_layout Itemize
6316 Add feature to load headered ROMs.
6319 \begin_layout Subsection
6323 \begin_layout Itemize
6324 Show command names when showing keybindings
6327 \begin_layout Subsection
6331 \begin_layout Itemize
6332 Fix pause-on-end to be actually controllable
6335 \begin_layout Itemize
6336 SDL: Poll all events in queue, not just first one (fixes slowness in command
6340 \begin_layout Itemize
6341 Wxwidgets: Fix ROM loading.
6344 \begin_layout Subsection
6348 \begin_layout Itemize
6349 Lua: Add gui.textH, gui.textV, gui.textHV
6352 \begin_layout Itemize
6353 Fix text colors on SDL on Mac OS X
6356 \begin_layout Itemize
6357 Mode 'F' for finished in readonly mode.
6360 \begin_layout Itemize
6364 \begin_layout Itemize
6365 Reliably pause after skip poll
6368 \begin_layout Itemize
6369 Split UI and core into their own threads
6372 \begin_layout Subsection
6376 \begin_layout Itemize
6377 Remove leftover dummy SRAM slot
6380 \begin_layout Itemize
6381 Fix controller numbers.
6384 \begin_layout Subsection
6388 \begin_layout Itemize
6389 Fix lsnes-dumpavi after interface change.
6392 \begin_layout Itemize
6393 Also give BSNES patches for v085.
6396 \begin_layout Itemize
6397 Pack movie data in memory.
6400 \begin_layout Subsection
6404 \begin_layout Itemize
6405 Fix framecount/length given when loading movies.
6408 \begin_layout Itemize
6409 Controller command memory leak fixes.
6412 \begin_layout Itemize
6413 Don't leak palette if freeing screen object.
6416 \begin_layout Subsection
6420 \begin_layout Itemize
6424 \begin_layout Itemize
6425 Wxwidgets: Allow controlling dumper from the menu.
6428 \begin_layout Subsection
6432 \begin_layout Itemize
6433 Rewrite parts of manual
6436 \begin_layout Itemize
6437 Lua: Make it work with Lua 5.2.
6440 \begin_layout Subsection
6444 \begin_layout Itemize
6445 Win32: Fix compile errors.
6448 \begin_layout Subsection
6452 \begin_layout Itemize
6453 Refactor controller input code.
6456 \begin_layout Itemize
6457 Fix crash when using command line on SDL / Mac OS X.
6460 \begin_layout Subsection
6464 \begin_layout Itemize
6465 Delete core/coroutine (obsolete)
6468 \begin_layout Itemize
6469 Lag input display by one frame.
6472 \begin_layout Itemize
6473 Rewind movie to beginning function.
6476 \begin_layout Itemize
6477 Fix wrong frame number reported to Lua when repainting after loadstate
6480 \begin_layout Itemize
6481 Support UI editing of jukebox
6484 \begin_layout Itemize
6485 Wxwidgets: Save settings on exit.
6488 \begin_layout Itemize
6489 Support ${project} for filenames
6492 \begin_layout Itemize
6493 SDL: Fix command history
6496 \begin_layout Subsection
6500 \begin_layout Itemize
6501 Fix some order-of-global-ctor bugs.
6504 \begin_layout Subsection
6508 \begin_layout Itemize
6509 Fix crashes when quitting on Win32.
6512 \begin_layout Subsection
6516 \begin_layout Itemize
6517 EVDEV: Queue keypresses from joystick, don't send directly
6520 \begin_layout Itemize
6521 Wxwidgets: Load-Preserve that actually works.
6524 \begin_layout Subsection
6528 \begin_layout Itemize
6529 Wxwidgets: GUI for memory search.
6532 \begin_layout Itemize
6533 Warn about using synchronous queue in UI callback.
6536 \begin_layout Subsection
6540 \begin_layout Itemize
6541 Remember last saved file for each ROM
6544 \begin_layout Itemize
6545 Support MT dumping via boost.
6548 \begin_layout Itemize
6552 \begin_layout Itemize
6556 \begin_layout Itemize
6557 Make mouse be ordinary input instead of special-casing
6560 \begin_layout Itemize
6561 SDL: Don't screw up commands with NUL codepoints.
6564 \begin_layout Subsection
6568 \begin_layout Itemize
6569 Merge status panel and main window
6572 \begin_layout Itemize
6573 True movie slot support (the rest of it)
6576 \begin_layout Itemize
6577 SDL: Fix compilation error
6580 \begin_layout Itemize
6581 Elminate cross calls in dump menu code.
6584 \begin_layout Subsection
6588 \begin_layout Itemize
6589 Cancel pending saves command
6592 \begin_layout Itemize
6593 Wxwidgets: Code refactoring
6596 \begin_layout Itemize
6597 Wxwidgets: Fix system -> reset
6600 \begin_layout Itemize
6601 Wxwidgets: Read watch expressions in the right thread
6604 \begin_layout Subsection
6608 \begin_layout Itemize
6609 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6613 \begin_layout Itemize
6614 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6617 \begin_layout Itemize
6618 Don't append trailing '-' to prefix when saving movie.
6621 \begin_layout Itemize
6622 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6625 \begin_layout Subsection
6629 \begin_layout Itemize
6630 Document memory watch syntax.
6633 \begin_layout Subsection
6637 \begin_layout Itemize
6638 Fix unattended dumping (lsnes-dumpavi)
6641 \begin_layout Itemize
6645 \begin_layout Itemize
6646 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6649 \begin_layout Itemize
6650 Add option to control sample rate preturbation in AVI dumper
6653 \begin_layout Subsection
6657 \begin_layout Itemize
6658 Wxwidgets: Fix dumper submodes
6661 \begin_layout Itemize
6662 Set core controller types before loadstate
6665 \begin_layout Subsection
6669 \begin_layout Itemize
6670 Fix compiling with bsnes v086.
6673 \begin_layout Subsection
6677 \begin_layout Itemize
6678 Don't prompt before quitting
6681 \begin_layout Itemize
6682 Start unpaused, preserve pause/unpause over load.
6685 \begin_layout Itemize
6686 Try to autodetect if ROM is headered.
6689 \begin_layout Itemize
6690 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6693 \begin_layout Itemize
6694 Allow configuring some hotkeys.
6697 \begin_layout Subsection
6701 \begin_layout Itemize
6702 Lots of code cleanups
6705 \begin_layout Itemize
6706 Fix JMD compression (JMD dumping was broken)
6709 \begin_layout Itemize
6710 Don't crash if Lua C function throws an exception.
6713 \begin_layout Itemize
6714 Support bitmap drawing in Lua.
6717 \begin_layout Itemize
6718 Fix bsnes v085/v086 patches.
6721 \begin_layout Itemize
6722 Improve stability on win32.
6725 \begin_layout Subsection
6729 \begin_layout Itemize
6730 Don't corrupt movie if movie length is integer multiple of frames per page.
6733 \begin_layout Subsection
6737 \begin_layout Itemize
6738 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6741 \begin_layout Itemize
6742 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6743 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6747 \begin_layout Itemize
6748 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6751 \begin_layout Itemize
6752 Wxwidgets: Fix broken modifiers
6755 \begin_layout Itemize
6756 on_paint has parameter now.
6759 \begin_layout Itemize
6760 Optional initital fill for bitmaps
6763 \begin_layout Itemize
6764 Fix palette changing.
6767 \begin_layout Itemize
6768 Optimize rendering a bit.
6771 \begin_layout Itemize
6775 \begin_layout Subsection
6779 \begin_layout Itemize
6780 Movieinfo: Fix display of port #2 type.
6783 \begin_layout Itemize
6784 Call on_input() after loadstate.
6787 \begin_layout Subsection
6791 \begin_layout Itemize
6792 Fix writing port2 data to movie.
6795 \begin_layout Itemize
6796 Fix SRAM handling with Bsnes v087.
6799 \begin_layout Subsection
6803 \begin_layout Itemize
6804 Library loading support
6807 \begin_layout Itemize
6808 Built-in TSCC encoder
6811 \begin_layout Itemize
6812 Hi-color (256T colors) dumping.
6815 \begin_layout Itemize
6816 Dump over TCP/IP(v6)
6819 \begin_layout Itemize
6820 Hidable status panel
6823 \begin_layout Itemize
6827 \begin_layout Itemize
6828 Adjustable sound volume
6831 \begin_layout Itemize
6835 \begin_layout Itemize
6836 Allow DnD into filename boxes
6839 \begin_layout Itemize
6843 \begin_layout Itemize
6844 Portaudio: Fix speaker popping at start
6847 \begin_layout Itemize
6851 \begin_layout Itemize
6852 Speed adjustment menu
6855 \begin_layout Itemize
6856 Win32 joystick support
6859 \begin_layout Itemize
6860 Lua: gui.rainbow and gui.box
6863 \begin_layout Itemize
6864 Split key lists into classes (the key list was large!)
6867 \begin_layout Itemize
6868 More save slots support
6871 \begin_layout Itemize
6872 Wxwidgets (wxJoystick) joystick support
6875 \begin_layout Subsection
6879 \begin_layout Itemize
6880 Lots of internal joystick refactoring
6883 \begin_layout Itemize
6884 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6887 \begin_layout Itemize
6888 Wxwidgets: Settings mode (open settings without ROM)
6891 \begin_layout Itemize
6892 Wxwidgets: Prompt key to use option
6895 \begin_layout Itemize
6896 Wxwidgets: Fix crash if key goes away underneath
6899 \begin_layout Itemize
6900 Wxwidgets: Fix mouse position in presence of scaling
6903 \begin_layout Itemize
6904 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6907 \begin_layout Itemize
6908 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6909 seem to work well on WinXP)
6912 \begin_layout Itemize
6913 Start paused option.
6916 \begin_layout Subsection
6920 \begin_layout Itemize
6924 \begin_layout Itemize
6925 lsnes-dumpavi: Start Lua before starting dumper
6928 \begin_layout Itemize
6929 AVI: Fix secondary audio in mode 4.
6932 \begin_layout Subsection
6936 \begin_layout Itemize
6937 AVI: Refactor ZMBV a bit.
6940 \begin_layout Itemize
6941 Fix error reading analog values from movie file
6944 \begin_layout Subsection
6948 \begin_layout Itemize
6949 Delayed reset support
6952 \begin_layout Itemize
6953 Lua: memory.hash_region
6956 \begin_layout Subsection
6960 \begin_layout Itemize
6961 Rework the build system
6964 \begin_layout Itemize
6965 Typing input support
6968 \begin_layout Itemize
6969 Fix building with bsnes v086 and v087.
6972 \begin_layout Itemize
6973 SDL: Save settings on exit
6976 \begin_layout Itemize
6977 SDL: Command to enter command line mode with given command.
6980 \begin_layout Itemize
6981 SDL: More advanced command editing.
6984 \begin_layout Subsection
6988 \begin_layout Itemize
6990 \begin_inset Quotes eld
6993 arrow keys and enter don't work
6994 \begin_inset Quotes erd
7000 \begin_layout Itemize
7004 \begin_layout Itemize
7005 Show mode changes due to rewinding.
7008 \begin_layout Itemize
7009 Unsafe rewind support
7012 \begin_layout Itemize
7013 Fix directory transversal.
7016 \begin_layout Subsection
7020 \begin_layout Itemize
7021 AVI: Sound mode 5 (48kHz high-quality)
7024 \begin_layout Itemize
7028 \begin_layout Itemize
7029 Map the SNES bus into address space
7032 \begin_layout Itemize
7033 Fix loading memory watch files with CRLF line endings
7036 \begin_layout Subsection
7040 \begin_layout Itemize
7041 Map bsnes internal state into memory space
7044 \begin_layout Itemize
7046 \begin_inset Quotes eld
7049 click on panel wedges the emulator
7050 \begin_inset Quotes erd
7056 \begin_layout Itemize
7057 DnD movies/saves on the main window.
7060 \begin_layout Subsection
7064 \begin_layout Itemize
7065 Split core bindings into own module.
7068 \begin_layout Itemize
7069 Remember invalid settings
7072 \begin_layout Itemize
7073 Support for modified Gambatte core for GB/GBC emulation.
7076 \begin_layout Itemize
7077 Reload/swap ROM function
7080 \begin_layout Subsection
7084 \begin_layout Itemize
7085 Fix step poll function
7088 \begin_layout Subsection
7092 \begin_layout Itemize
7093 Non-insane savestate anchoring
7096 \begin_layout Subsection
7100 \begin_layout Itemize
7101 More Memory search methods
7104 \begin_layout Itemize
7105 Preserve movie if loading in RO mode.
7108 \begin_layout Itemize
7109 Fix a obscure case in timeline check
7112 \begin_layout Itemize
7113 Revamp the entiere ROM loading code
7116 \begin_layout Itemize
7120 \begin_layout Itemize
7124 \begin_layout Itemize
7125 Standalone hotkey config dialog
7128 \begin_layout Itemize
7129 Show bindings in more user-friendly format
7132 \begin_layout Subsection
7136 \begin_layout Itemize
7140 \begin_layout Itemize
7141 Fix uninitialized variables in bsnes v085
7144 \begin_layout Subsection
7148 \begin_layout Itemize
7149 Merge gambatte core into mainline (from its own branch)
7152 \begin_layout Itemize
7153 Wxwidgets: Show expected dump file formats
7156 \begin_layout Itemize
7157 Memory watch: Data typing
7160 \begin_layout Itemize
7161 lsnes internal MMIO area.
7164 \begin_layout Itemize
7165 Wxwidgets: New memory watch editor
7168 \begin_layout Itemize
7169 Hexadecimal memory watches
7172 \begin_layout Itemize
7173 Wxwidgets: Monospaced panel
7176 \begin_layout Itemize
7177 Wxwidgets: Split memory watches in panel
7180 \begin_layout Itemize
7181 Wxwidgets: Disable VMAs in memory search
7184 \begin_layout Itemize
7185 lsnes-dumpavi: Fix speed bug
7188 \begin_layout Itemize
7189 Movie subtitle support
7192 \begin_layout Itemize
7193 Fix rerecord count reporting
7196 \begin_layout Itemize
7197 Don't trash movie when loading in readonly mode.
7200 \begin_layout Subsection
7204 \begin_layout Itemize
7205 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
7208 \begin_layout Itemize
7209 Fix build on Mac OS X.
7212 \begin_layout Itemize
7216 \begin_layout Itemize
7217 Wxwidgets: Hidable messages window
7220 \begin_layout Itemize
7224 \begin_layout Itemize
7225 Bsnes: Support inconsistent saves
7228 \begin_layout Itemize
7229 Bsnes: Allow simulating saving every frame
7232 \begin_layout Itemize
7233 Fix desync if savestate is loaded in readonly mode in certain conditions.
7236 \begin_layout Itemize
7237 Wxwidgets: Fix save dialogs on Mac OS X.
7240 \begin_layout Itemize
7241 Wxwidgets: Fix insane status width on Win32.
7244 \begin_layout Itemize
7245 Wxwidgets: Fix autohold processing to be faster.
7248 \begin_layout Itemize
7249 Wxwidgets: Allow loading ROMs and movies from commandline.
7252 \begin_layout Subsection
7256 \begin_layout Itemize
7257 Be a bit smarter with --load
7260 \begin_layout Itemize
7261 Rewrote higher-level parts of audio system
7264 \begin_layout Itemize
7265 Tool to build commentary tracks
7268 \begin_layout Itemize
7272 \begin_layout Itemize
7273 Gambatte: Add support for SVN358
7276 \begin_layout Itemize
7277 Use builtin font when rendering status panel.
7280 \begin_layout Itemize
7281 Option to detach memory watch to its own window.
7284 \begin_layout Itemize
7285 Recent ROMs/Movies menu
7288 \begin_layout Itemize
7292 \begin_layout Itemize
7293 Useful lag counter for SNES games that autopoll
7296 \begin_layout Itemize
7297 Fix buffer overflow in gambatte sound output
7300 \begin_layout Subsection
7304 \begin_layout Itemize
7305 Don't blow up on wxGTK if the window is hidden somehow
7308 \begin_layout Itemize
7309 Support simultaneous drop of ROM and movie.
7312 \begin_layout Itemize
7313 Gambatte: Don't save spurious SRAMs.
7316 \begin_layout Itemize
7317 Make SGB ROMs actually usable.
7320 \begin_layout Itemize
7321 Fix so that saved movies appear in recent movies.
7324 \begin_layout Itemize
7325 Don't open multiple commentary editors at once.
7328 \begin_layout Subsection
7332 \begin_layout Itemize
7333 Lua: memory.readregion/memory.writeregion
7336 \begin_layout Itemize
7337 Lua: memory.map{,s}{byte,word,dword,qword}
7340 \begin_layout Itemize
7341 Lua: memory.map_structure
7344 \begin_layout Itemize
7345 Lua: Fix bus_address for gambatte
7348 \begin_layout Itemize
7349 Fix features dependent of bsnes debugger
7352 \begin_layout Itemize
7353 Cleanup bsnes debugger logic
7356 \begin_layout Itemize
7357 Fix resets in presence of save every frame
7360 \begin_layout Subsection
7364 \begin_layout Itemize
7365 Lua: input.lcid_to_pcid
7368 \begin_layout Itemize
7369 Fix off-by-one bug with slot hashes
7372 \begin_layout Itemize
7373 Fix crashes on certain memory watch expressions
7376 \begin_layout Itemize
7377 Lua: memory.read_expr
7380 \begin_layout Itemize
7381 Lua: Fix memory.read_expr on nil argument
7384 \begin_layout Itemize
7385 Fix the code to compile on G++ 4.7
7388 \begin_layout Itemize
7389 Change button_id to be a function pointer field, not a virtual method
7392 \begin_layout Itemize
7393 Add bsnes patches to fix libsnes to compile on GCC 4.7
7396 \begin_layout Itemize
7397 Gambatte: Always use legacy lag counting
7400 \begin_layout Itemize
7401 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
7404 \begin_layout Itemize
7405 Fix analog controllers
7408 \begin_layout Itemize
7412 \begin_layout Itemize
7413 Fix button symbols in input display
7416 \begin_layout Itemize
7417 Compensate for nuts bsnes superscope/justifier handling
7420 \begin_layout Itemize
7421 Lua: Fix bit.extract boolean handling
7424 \begin_layout Subsection
7428 \begin_layout Itemize
7429 Stop at movie end: Don't off-by-one
7432 \begin_layout Itemize
7433 Fix crash closing lsnes with voice playback active.
7436 \begin_layout Itemize
7437 Import/Export OggOpus for commentary tracks
7440 \begin_layout Itemize
7441 16-button controllers.
7444 \begin_layout Itemize
7445 Don't show nonexistent controllers in input display
7448 \begin_layout Itemize
7449 Set voice record/playback volume from UI
7452 \begin_layout Itemize
7453 Patches for gambatte SVN364.
7456 \begin_layout Itemize
7457 Load markup (if exists) even without gamepack file.
7460 \begin_layout Itemize
7461 Screen rotation & flipping
7464 \begin_layout Itemize
7465 Lua: Some new bit functions
7468 \begin_layout Itemize
7469 Auto-refresh voice streams on change.
7472 \begin_layout Itemize
7473 Auto-refresh subtitles on change & new subtitle editor.
7476 \begin_layout Itemize
7477 Fix music volume adjustment.
7480 \begin_layout Subsection
7484 \begin_layout Itemize
7485 Wxwidgets: Fix memory watch rendering.
7488 \begin_layout Itemize
7489 Wxwidgets: Allow setting voice stream gain.
7492 \begin_layout Itemize
7493 Wxwidgets: VU meters and volume adjustment.
7496 \begin_layout Itemize
7497 Lua: Custom fonts support.
7500 \begin_layout Itemize
7501 Lua: Fix methods stopping working when resetting Lua.
7504 \begin_layout Itemize
7505 Fix loading standard-format movies in preserve (readonly) mode.