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
79 \begin_layout Enumerate
83 \begin_layout Enumerate
84 accuracy or compatiblity core.
87 \begin_layout Enumerate
88 Patched version (using included 6 patches)
92 \begin_layout Enumerate
96 \begin_layout Enumerate
100 \begin_layout Enumerate
104 \begin_layout Enumerate
108 \begin_layout Enumerate
112 \begin_layout Enumerate
113 sdlmain (SDL only, part of SDL)
116 \begin_layout Enumerate
117 boost_conversion (this is header-only library)
120 \begin_layout Enumerate
121 libswscale (wxwidgets graphics only)
124 \begin_layout Enumerate
125 Portaudio (portaudio sound only)
128 \begin_layout Enumerate
129 std::thread and co (for threaded dumper only, not needed if std::thread
133 \begin_layout Enumerate
134 Lua (if Lua support is needed).
137 \begin_layout Itemize
138 Version 5.1.X or 5.2X.
141 \begin_layout Section
145 \begin_layout Standard
146 Building is via makefile, the following options are available:
149 \begin_layout Itemize
150 CROSS_PREFIX=<prefix>
154 \begin_layout Itemize
155 Prefix to apply to commands when building executables / object files for
156 the target architecture.
160 \begin_layout Itemize
165 \begin_layout Itemize
170 \begin_layout Itemize
171 Name of C++ compiler.
174 \begin_layout Itemize
175 CROSS_PREFIX is prepended if compiling for target architecture.
178 \begin_layout Itemize
179 This needs to be at least GCC 4.6.
182 \begin_layout Itemize
183 Set to 'g++-mp-4.6' if compiling on Mac OS X using GCC 4.6 from Macports.
186 \begin_layout Itemize
191 \begin_layout Itemize
196 \begin_layout Itemize
197 Name of host C++ compiler.
200 \begin_layout Itemize
201 Default is value of 'CC' option.
205 \begin_layout Itemize
206 USER_HOSTCCFLAGS=<flags>:
210 \begin_layout Itemize
211 Compiler flags to pass when compiling/linking for host architecture.
214 \begin_layout Itemize
219 \begin_layout Itemize
224 \begin_layout Itemize
225 Extra flags to pass when compiling for target architecture
228 \begin_layout Itemize
233 \begin_layout Itemize
234 USER_LDFLAGS=<flags>:
238 \begin_layout Itemize
239 Extra flags to pass when linking for target architecture.
242 \begin_layout Itemize
247 \begin_layout Itemize
248 USER_PLATFORM_CFLAGS=<flags>
252 \begin_layout Itemize
253 Extra flags to pass when compiling files using platform-dependent code for
257 \begin_layout Itemize
262 \begin_layout Itemize
263 USER_PLATFORM_LDFLAGS=<flags>
267 \begin_layout Itemize
268 Extra flags to pass when linking files using platform-dependent code for
272 \begin_layout Itemize
277 \begin_layout Itemize
282 \begin_layout Itemize
283 Set the font file to use.
286 \begin_layout Itemize
287 Currently the valid values are:
291 \begin_layout Itemize
292 cp437.hex: Standard VGA font (256 characters).
295 \begin_layout Itemize
296 unifontfull-5.1.20080820.hex: GNU unifont (covers most of Unicode BMP)
300 \begin_layout Itemize
301 Default is 'unifontfull-5.1.20080820.hex'
305 \begin_layout Itemize
310 \begin_layout Itemize
311 Package to use for Lua support.
314 \begin_layout Itemize
315 Usually valid value is 'lua' or 'lua5.1'.
318 \begin_layout Itemize
319 Default is not to build Lua support.
323 \begin_layout Itemize
328 \begin_layout Itemize
329 Override platform default for dumper threading support.
332 \begin_layout Itemize
333 Threading is default on Linux.
336 \begin_layout Itemize
337 'YES' tries to use threading (std::thread).
340 \begin_layout Itemize
341 'BOOST' tries to use threading (boost::thread).
344 \begin_layout Itemize
345 'NO' disables threading.
348 \begin_layout Itemize
349 Note: This has absolutely nothing to do with platform threading.
353 \begin_layout Itemize
354 BSNES_IS_COMPAT=<anything>
358 \begin_layout Itemize
359 Signals that BSNES core used is compatiblity core, not accuracy core.
362 \begin_layout Itemize
363 Default is to assume accuracy core.
367 \begin_layout Itemize
368 JOYSTICK=<implementation>
372 \begin_layout Itemize
373 Set joystick implementation.
378 \begin_layout Itemize
379 SDL: Use SDL for joystick (requires SDL graphics)
382 \begin_layout Itemize
383 EVDEV: Use EVDEV for joystick (Linux only).
386 \begin_layout Itemize
387 DUMMY: Disable joystick support.
391 \begin_layout Itemize
396 \begin_layout Itemize
397 SOUND=<implementation>
401 \begin_layout Itemize
402 Set sound implementation.
407 \begin_layout Itemize
408 SDL: Use SDL for sound (requires SDL graphics)
411 \begin_layout Itemize
412 PORTAUDIO: Use Portaudio for sound.
415 \begin_layout Itemize
416 DUMMY: Disable sound support
420 \begin_layout Itemize
425 \begin_layout Itemize
426 GRAPHICS=<implementation>
430 \begin_layout Itemize
431 Set windowing library to use.
436 \begin_layout Itemize
437 SDL: Use SDL for graphics
440 \begin_layout Itemize
441 WXWIDGETS: Use wxWidgets for graphics.
445 \begin_layout Itemize
450 \begin_layout Section
454 \begin_layout Subsection
458 \begin_layout Standard
459 <kind> in the following can be one of:
462 \begin_layout Itemize
463 rom: Cartridge ROM (BIOS for special carts).
467 \begin_layout Itemize
468 bsx: BS-X (non-slotted) Game flash ROM.
471 \begin_layout Itemize
472 bsxslotted: BS-X (slotted) Game flash ROM.
475 \begin_layout Itemize
479 \begin_layout Itemize
480 slot-a: Sufami Turbo Slot A ROM
483 \begin_layout Itemize
484 slot-b: Sufami Turbo Slot B ROM
487 \begin_layout Subsubsection
488 --<kind>=<file> (lsnes/SDL, lsnes-avidump)
491 \begin_layout Standard
492 Load <file> as specified ROM (SFC/BS/DMG/ST file format).
495 \begin_layout Subsubsection
496 --headered-<kind>=<file> (lsnes/SDL, lsnes-avidump)
499 \begin_layout Standard
500 Load <file> as specified ROM, stripping first 512 bytes.
501 Handy for loading SMC / FIG and such files.
504 \begin_layout Subsubsection
505 --<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
508 \begin_layout Standard
509 Override hardware detection for ROM, reading the values from <file> (BSNES
513 \begin_layout Subsubsection
514 --ips-<kind>=<file> (lsnes/SDL, lsnes-avidump)
517 \begin_layout Standard
518 Apply BPS/IPS patch <file> to ROM <kind>.
519 If specified multiple times, the patches are applied in order.
522 \begin_layout Subsubsection
523 --ips-<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
526 \begin_layout Standard
527 Apply BPS/IPS patch <file> to XML of ROM <kind>.
528 If specified multiple times, the patches are applied in order.
531 \begin_layout Subsubsection
532 --ips-offset=<offset> (lsnes/SDL, lsnes-avidump)
535 \begin_layout Standard
536 Set offset to apply to IPS patches.
538 Handy for applying headered IPS patches (use offset of -512 for this).
539 The offset must be 0 for BPS patches.
542 \begin_layout Subsubsection
546 \begin_layout Standard
547 Force ROM to be considered PAL-only.
550 \begin_layout Itemize
551 Only works on SNES and SGB ROMs (not BS-X or Sufami Turbo).
554 \begin_layout Itemize
555 Attempting to load NTSC movie file will error out.
558 \begin_layout Subsubsection
562 \begin_layout Standard
563 Force ROM to be considered NTSC-only.
566 \begin_layout Itemize
567 Attempting to load PAL movie file will error out.
570 \begin_layout Subsection
574 \begin_layout Subsubsection
575 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
578 \begin_layout Standard
579 Load <filename> as movie or savestate file.
580 All other session options are ignored.
583 \begin_layout Subsubsection
584 --port1=<device> (lsnes/SDL)
587 \begin_layout Standard
592 \begin_layout Itemize
593 none: No device connected
596 \begin_layout Itemize
597 gamepad: One gamepad (the default)
600 \begin_layout Itemize
601 multitap: Four gamepads (warning: makes most games refuse to start)
604 \begin_layout Itemize
608 \begin_layout Subsubsection
609 --port2=<type> (lsnes/SDL)
612 \begin_layout Standard
617 \begin_layout Itemize
618 none: No device connected (the default)
621 \begin_layout Itemize
625 \begin_layout Itemize
626 multitap: Four gamepads.
629 \begin_layout Itemize
633 \begin_layout Itemize
634 superscope: Super Scope
637 \begin_layout Itemize
638 justifier: One justifier
641 \begin_layout Itemize
642 justifiers: Two justifiers
645 \begin_layout Subsubsection
646 --gamename=<name> (lsnes/SDL)
649 \begin_layout Standard
650 Set the name of game to <name>.
654 \begin_layout Subsubsection
655 --author=<name> (lsnes/SDL)
658 \begin_layout Standard
659 Add author with full name of <name> (no nickname).
662 \begin_layout Subsubsection
663 --author=|<name> (lsnes/SDL)
666 \begin_layout Standard
667 Add author with nickname of <name> (no full name).
670 \begin_layout Subsubsection
671 --author=<fullname>|<nickname> (lsnes/SDL)
674 \begin_layout Standard
675 Add author with full name of <fullname> and nickname of <nickname>.
678 \begin_layout Subsubsection
679 --rtc-second=<value> (lsnes/SDL)
682 \begin_layout Standard
683 Set RTC second (0 is 1st January 1970 00:00:00Z).
684 Default is 1,000,000,000.
687 \begin_layout Subsubsection
688 --rtc-subsecond=<value> (lsnes/SDL)
691 \begin_layout Standard
698 \begin_layout Subsection
703 \begin_layout Subsubsection
704 --run=<file> (lsnes/SDL)
707 \begin_layout Standard
708 After running main RC file, run this file.
709 If multiple are specified, these execute in order specified.
712 \begin_layout Subsection
713 dump options (lsnes-dumpavi only)
716 \begin_layout Subsubsection
720 \begin_layout Standard
723 \begin_inset Quotes eld
727 \begin_inset Quotes erd
733 \begin_layout Subsubsection
737 \begin_layout Standard
738 Set compression level (0-18).
742 \begin_layout Subsubsection
746 \begin_layout Standard
747 Set number of frames to dump.
751 \begin_layout Subsubsection
755 \begin_layout Standard
756 Run specified lua script (lsnes-dumpavi does not have initialization files).
759 \begin_layout Subsubsection
763 \begin_layout Standard
764 Use JMD dumping instead of AVI dumping.
767 \begin_layout Subsubsection
771 \begin_layout Standard
772 Use SDMP dumping instead of AVI dumping.
775 \begin_layout Subsubsection
779 \begin_layout Standard
780 Dump in single segment (SDMP only).
783 \begin_layout Section
784 Startup file lsnes.rc
787 \begin_layout Standard
788 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
789 This file is located in:
792 \begin_layout Itemize
797 lsnes.rc (if %APPDATA% exists)
800 \begin_layout Itemize
801 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
804 \begin_layout Itemize
805 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
808 \begin_layout Itemize
809 All: ./lsnes.rc (fallback default).
812 \begin_layout Standard
813 If leading directories do not exist, attempt to create them is made.
816 \begin_layout Section
820 \begin_layout Itemize
821 Commands beginning with '*' invoke the corresponding command without alias
825 \begin_layout Itemize
826 If command starts with '+' (after possible '*'), the command is executed
827 as-is when button is pressed, and when button is released, it is executed
828 with '+' replaced by '-'.
831 \begin_layout Itemize
832 Commands without '+' execute only on negative edge (release).
835 \begin_layout Subsection
839 \begin_layout Standard
840 Settings control various aspects of emulator behaviour.
843 \begin_layout Subsubsection
844 set-setting <setting> <value>
847 \begin_layout Standard
848 Sets setting <setting> to value <value> (may be empty).
851 \begin_layout Subsubsection
852 unset-setting <setting>
855 \begin_layout Standard
856 Try to unset setting <setting> (not all settings can be unset).
859 \begin_layout Subsubsection
860 get-setting <setting>
863 \begin_layout Standard
864 Read value of setting <setting>
867 \begin_layout Subsubsection
871 \begin_layout Standard
872 Print names and values of all settings.
875 \begin_layout Subsection
879 \begin_layout Standard
880 Keybindings bind commands or aliases to keys (or pseudo-keys).
884 \begin_layout Standard
888 \begin_layout Itemize
889 Do not bind edge active (+/-) commands to keys with modifiers, that won't
893 \begin_layout Itemize
894 Names of keys and modifiers are platform-dependent.
897 \begin_layout Itemize
898 Be careful before binding pseudo-keys (such as joystick axes, buttons or
899 hats) with modifiers.
900 That may or may not work right.
903 \begin_layout Subsubsection
904 bind-key [<mod>/<modmask>] <key> <command>
907 \begin_layout Standard
908 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
909 ed list) are set as <mod> (comma-seperated list).
912 \begin_layout Standard
913 The names of keys and modifiers are platform-dependent.
916 \begin_layout Subsubsection
917 unbind-key [<mod>/<modmask>] <key>
920 \begin_layout Standard
921 Unbind command from <key> (with specified <mod> and <modmask>).
924 \begin_layout Subsubsection
925 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
926 | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
927 [plus=<val>] [tolerance=<val>]
930 \begin_layout Standard
931 Set axis parameters for axis <axis>.
934 \begin_layout Itemize
935 disabled: Disable axis
938 \begin_layout Itemize
942 \begin_layout Itemize
943 axis-inverse: Inverse axis
946 \begin_layout Itemize
947 pressure0-: Pressure sensitive.
948 Released at 0, pressed at -.
951 \begin_layout Itemize
952 pressure0+: Pressure sensitive.
953 Released at 0, pressed at +.
956 \begin_layout Itemize
957 pressure-0: Pressure sensitive.
958 Released at -, pressed at 0.
961 \begin_layout Itemize
962 pressure-+: Pressure sensitive.
963 Released at -, pressed at +.
966 \begin_layout Itemize
967 pressure+0: Pressure sensitive.
968 Released at +, pressed at 0.
971 \begin_layout Itemize
972 pressure+-: Pressure sensitive.
973 Released at +, pressed at -.
976 \begin_layout Itemize
977 minus=<val>: Calibration at extreme minus position (-32768-32767)
980 \begin_layout Itemize
981 zero=<val>: Calibration at neutral position (-32768-32767)
984 \begin_layout Itemize
985 plus=<val>: Calibration at extreme plus position (-32768-32767)
988 \begin_layout Itemize
989 tolerance=<value>: Center band tolerance (0<x<1).
990 The smaller the value, the more sensitive the control is.
993 \begin_layout Subsubsection
997 \begin_layout Standard
998 Print all key bindings in effect.
1001 \begin_layout Subsection
1005 \begin_layout Standard
1006 Aliases bind command to sequence of commands.
1007 After alias has been defined, it replaces the command it shadows.
1010 \begin_layout Standard
1014 \begin_layout Itemize
1015 You can't alias command to itself.
1018 \begin_layout Itemize
1019 Aliases starting with +/- are edge active just like ordinary commands starting
1023 \begin_layout Itemize
1024 One command can be aliased to multiple commands.
1027 \begin_layout Subsubsection
1028 alias-command <command> <expansion>
1031 \begin_layout Standard
1032 Append <expansion> to alias <command>.
1033 If alias does not already exist, it is created.
1036 \begin_layout Subsubsection
1037 unalias-command <command>
1040 \begin_layout Standard
1041 Clear alias expansion for <command>.
1044 \begin_layout Subsubsection
1048 \begin_layout Standard
1049 Print all aliases and their expansions in effect.
1052 \begin_layout Subsection
1056 \begin_layout Standard
1057 Run <script> as if commands were entered on the command line.
1060 \begin_layout Subsection
1064 \begin_layout Standard
1065 Following commands control video dumping:
1068 \begin_layout Subsubsection
1072 \begin_layout Standard
1073 Dump AVI video to prefix <prefix> Notes:
1076 \begin_layout Itemize
1077 The codec is Camstudio Codec in gzip mode.
1080 \begin_layout Itemize
1081 Encoder and muxer are internal, available on all platforms.
1084 \begin_layout Itemize
1085 Audio enable/disable and framerate has no effect.
1088 \begin_layout Itemize
1089 The audio dumped to .avi is low-quality version.
1090 The high-quality version is dumped to .sox file.
1093 \begin_layout Subsubsection
1097 \begin_layout Standard
1098 End current AVI video dump (closing the emulator also closes the dump).
1101 \begin_layout Subsubsection
1105 \begin_layout Standard
1106 Dump JMD video to file <file>.
1109 \begin_layout Subsubsection
1113 \begin_layout Standard
1114 End the current JMD dump in progress.
1117 \begin_layout Subsubsection
1121 \begin_layout Standard
1122 Dump SDMP to <prefix>, splitting at 2GB.
1125 \begin_layout Subsubsection
1129 \begin_layout Standard
1130 Dump SDMP to <file>, no splitting
1133 \begin_layout Subsubsection
1137 \begin_layout Standard
1138 End the current SDMP dump in progress.
1141 \begin_layout Subsection
1145 \begin_layout Standard
1146 <address> may be decimal or hexadecimal (prefixed with '0x').
1147 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
1151 \begin_layout Standard
1152 The available element <sizes> are:
1155 \begin_layout Itemize
1159 \begin_layout Itemize
1163 \begin_layout Itemize
1167 \begin_layout Itemize
1171 \begin_layout Standard
1172 When reading RAM and ROM, multi-byte reads/writes are big-endian.
1173 When dealing with DSP memory, multi-byte reads/writes are native-endian
1174 (do not use operand sizes exceeding DSP bitness, except dword is OK for
1178 \begin_layout Subsubsection
1179 read-<size> <address>
1182 \begin_layout Standard
1183 Read the value of byte in <address>.
1186 \begin_layout Subsubsection
1187 read-s<size> <address>
1190 \begin_layout Standard
1191 Read the value of signed byte in <address>.
1194 \begin_layout Subsubsection
1195 write-<size> <address> <value>
1198 \begin_layout Standard
1199 Write <value> to byte in address <address>.
1202 \begin_layout Subsubsection
1206 \begin_layout Standard
1207 Reset the memory search
1210 \begin_layout Subsubsection
1214 \begin_layout Standard
1215 Print number of candidates remaining
1218 \begin_layout Subsubsection
1222 \begin_layout Standard
1223 Print all candidates remaining
1226 \begin_layout Subsubsection
1227 search-memory <usflag><sizeflag><op>
1230 \begin_layout Standard
1231 Searches memory for addresses satisfying criteria.
1234 \begin_layout Standard
1238 \begin_layout Itemize
1242 \begin_layout Itemize
1246 \begin_layout Standard
1250 \begin_layout Itemize
1254 \begin_layout Itemize
1258 \begin_layout Itemize
1262 \begin_layout Itemize
1266 \begin_layout Standard
1270 \begin_layout Itemize
1271 lt: < previous value.
1274 \begin_layout Itemize
1275 le: <= previous value.
1278 \begin_layout Itemize
1279 eq: = previous value.
1282 \begin_layout Itemize
1283 ne: != previous value.
1286 \begin_layout Itemize
1287 ge: >= previous value.
1290 \begin_layout Itemize
1291 gt: > previous value.
1294 \begin_layout Subsubsection
1295 search-memory <sizeflag> <value>
1298 \begin_layout Standard
1299 Searches for addresses that currently have value <value>.
1300 <sizeflag> is as in previous command.
1303 \begin_layout Subsection
1307 \begin_layout Standard
1308 These commands are not available in lsnesrc, but are available after ROM
1312 \begin_layout Subsubsection
1316 \begin_layout Standard
1317 Quits the emulator (asking for confirmation).
1318 If /y is given, no confirmation is asked.
1321 \begin_layout Subsubsection
1325 \begin_layout Standard
1326 Toggle paused/unpaused
1329 \begin_layout Subsubsection
1333 \begin_layout Standard
1335 If the button is still held after configurable timeout expires, game unpauses
1336 for the duration frame advance is held.
1339 \begin_layout Subsubsection
1343 \begin_layout Standard
1345 If the button is still held after configurable timeout expires, game unpauses
1346 for the duration frame advance is held.
1349 \begin_layout Subsubsection
1353 \begin_layout Standard
1354 Skip to first poll in frame after current.
1357 \begin_layout Subsubsection
1361 \begin_layout Standard
1362 Reset the SNES after this frame.
1365 \begin_layout Subsubsection
1369 \begin_layout Standard
1370 Load savestate <filename> in current mode.
1373 \begin_layout Subsubsection
1374 load-state <filename>
1377 \begin_layout Standard
1378 Load savestate <filename> in readwrite mode.
1381 \begin_layout Subsubsection
1382 load-readonly <filename>
1385 \begin_layout Standard
1386 Load savestate <filename> in readonly mode.
1389 \begin_layout Subsubsection
1390 load-preserve <filename>
1393 \begin_layout Standard
1394 Load savestate <filename> in readonly mode, preserving current events.
1397 \begin_layout Subsubsection
1398 load-movie <filename>
1401 \begin_layout Standard
1402 Load savestate <filename>, ignoring save part in readonly mode.
1405 \begin_layout Subsubsection
1406 save-state <filename>
1409 \begin_layout Standard
1410 Save system state to <filename> as soon as possible.
1413 \begin_layout Subsubsection
1414 save-movie <filename>
1417 \begin_layout Standard
1418 Save movie to <filename>.
1421 \begin_layout Subsubsection
1425 \begin_layout Standard
1426 Set read-write mode.
1429 \begin_layout Subsubsection
1433 \begin_layout Standard
1437 \begin_layout Subsubsection
1441 \begin_layout Standard
1442 Toggle between read-only and read-write modes.
1445 \begin_layout Subsubsection
1449 \begin_layout Standard
1450 Set name of the game to <name>
1453 \begin_layout Subsubsection
1457 \begin_layout Standard
1458 Print the name of the game.
1461 \begin_layout Subsubsection
1465 \begin_layout Standard
1466 Adds new author <author>.
1467 If <author> does not contain '|' it is full name.
1468 If it contains '|', '|' splits the full name and nickname.
1471 \begin_layout Subsubsection
1472 edit-author <num> <author>
1475 \begin_layout Standard
1476 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1480 \begin_layout Subsubsection
1484 \begin_layout Standard
1485 Remove author in slot <num>
1488 \begin_layout Subsubsection
1492 \begin_layout Standard
1496 \begin_layout Subsubsection
1497 test-1, test-2, test-3
1500 \begin_layout Standard
1501 Internal test commands.
1505 \begin_layout Subsubsection
1506 take-screenshot <filename>
1509 \begin_layout Standard
1510 Save screenshot to <filename>.
1513 \begin_layout Subsubsection
1514 +controller<num><button>
1517 \begin_layout Standard
1518 Press button <button> on controller <num> (1-8).
1519 The following button names are known:
1522 \begin_layout Itemize
1526 \begin_layout Itemize
1530 \begin_layout Itemize
1534 \begin_layout Itemize
1538 \begin_layout Itemize
1542 \begin_layout Itemize
1546 \begin_layout Itemize
1550 \begin_layout Itemize
1554 \begin_layout Itemize
1558 \begin_layout Itemize
1562 \begin_layout Itemize
1566 \begin_layout Itemize
1570 \begin_layout Itemize
1574 \begin_layout Itemize
1578 \begin_layout Itemize
1582 \begin_layout Itemize
1586 \begin_layout Subsubsection
1587 controllerh<num><button>
1590 \begin_layout Standard
1591 Hold/unhold button <button> on controller <num> (1-8).
1592 See +controller for button names.
1595 \begin_layout Subsubsection
1596 autofire (<pattern>|-)...
1599 \begin_layout Standard
1600 Set autofire pattern.
1601 Each parameter is comma-separated list of button names (in form of 1start,
1602 1A, 2B, etc..) to hold on that frame.
1603 After reaching the end of pattern, the pattern restarts from the beginning.
1606 \begin_layout Subsubsection
1610 \begin_layout Standard
1614 \begin_layout Subsection
1618 \begin_layout Subsubsection
1619 cycle-jukebox-backward
1622 \begin_layout Standard
1623 Cycle save jukebox backwards.
1626 \begin_layout Subsubsection
1627 cycle-jukebox-forward
1630 \begin_layout Standard
1631 Cycle save jukebox forwards
1634 \begin_layout Subsubsection
1635 add-jukebox-save <filename>
1638 \begin_layout Standard
1639 Add <filename> to jukebox saves.
1642 \begin_layout Subsubsection
1646 \begin_layout Standard
1647 Do load from jukebox (current mode).
1650 \begin_layout Subsubsection
1654 \begin_layout Standard
1655 Do state save to jukebox.
1658 \begin_layout Subsection
1662 \begin_layout Standard
1663 Only available if lua support is compiled in.
1666 \begin_layout Subsubsection
1667 evaluate-lua <luacode>
1670 \begin_layout Standard
1671 Run Lua code <luacode> using built-in Lua interpretter.
1674 \begin_layout Subsubsection
1678 \begin_layout Standard
1679 Run specified lua file using built-in Lua interpretter.
1682 \begin_layout Subsection
1686 \begin_layout Subsubsection
1687 add-watch <name> <expression>
1690 \begin_layout Standard
1691 Adds new watch (or modifies old one).
1694 \begin_layout Subsubsection
1698 \begin_layout Standard
1702 \begin_layout Subsection
1706 \begin_layout Subsubsection
1707 enable-sound <on/off>
1710 \begin_layout Standard
1711 Enable/Disable sound.
1714 \begin_layout Subsubsection
1715 set-sound-device <device>
1718 \begin_layout Standard
1719 Set sound device to <device>
1722 \begin_layout Subsubsection
1726 \begin_layout Standard
1727 Show status of sound system.
1730 \begin_layout Subsubsection
1734 \begin_layout Standard
1735 Show all available devices.
1738 \begin_layout Subsection
1739 SDL Platform commands
1742 \begin_layout Standard
1743 The following are valid on SDL platform.
1746 \begin_layout Subsubsection
1750 \begin_layout Standard
1751 Asks to press a key and then identifies that (pseudo-)key.
1754 \begin_layout Subsubsection
1758 \begin_layout Standard
1759 Toggle between windowed/fullscreen console.
1762 \begin_layout Subsubsection
1766 \begin_layout Standard
1767 Scroll messages window as far back as it goes.
1770 \begin_layout Subsubsection
1774 \begin_layout Standard
1775 Scroll messages window as far forward as it goes.
1778 \begin_layout Subsubsection
1782 \begin_layout Standard
1783 Scroll messages window back one screenful.
1786 \begin_layout Subsubsection
1790 \begin_layout Standard
1791 Scroll messages window forward one screenful.
1794 \begin_layout Section
1798 \begin_layout Subsection
1802 \begin_layout Subsubsection
1806 \begin_layout Standard
1807 Set where bsnes looks for firmware files.
1809 \begin_inset Quotes eld
1813 \begin_inset Quotes erd
1819 \begin_layout Subsubsection
1823 \begin_layout Standard
1825 Numeric, range is 0.001 to
1826 \begin_inset Quotes eld
1830 \begin_inset Quotes erd
1834 Default is native framerate.
1837 \begin_layout Subsubsection
1841 \begin_layout Standard
1842 Set save compression level (integer 0-9).
1843 Default is 7 (0 is no compression).
1846 \begin_layout Subsubsection
1850 \begin_layout Standard
1851 Set the frame advance timeout in milliseconds.
1852 Numeric integer, range is 0-999999999.
1856 \begin_layout Subsection
1860 \begin_layout Subsubsection
1864 \begin_layout Standard
1865 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1869 \begin_layout Subsubsection
1873 \begin_layout Standard
1874 AVI dumper: Set the default left border thickness (unless lua overrides)
1880 \begin_layout Subsubsection
1884 \begin_layout Standard
1885 AVI dumper: Set the default right border thickness (unless lua overrides)
1891 \begin_layout Subsubsection
1895 \begin_layout Standard
1896 AVI dumper: Set the default top border thickness (unless lua overrides)
1902 \begin_layout Subsubsection
1906 \begin_layout Standard
1907 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1913 \begin_layout Subsubsection
1917 \begin_layout Standard
1918 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1923 \begin_layout Subsubsection
1927 \begin_layout Standard
1928 AVI dumper: Compression level (0-18).
1931 \begin_layout Itemize
1932 Compression levels 10 and above are not compatible with stock CSCD codec.
1935 \begin_layout Itemize
1936 Recomended level is 7.
1939 \begin_layout Subsection
1943 \begin_layout Subsubsection
1947 \begin_layout Standard
1948 JMD dumper: Compression level (0-9).
1951 \begin_layout Subsection
1952 SDL platform settings
1955 \begin_layout Subsubsection
1956 autorepeat-first-delay
1959 \begin_layout Standard
1960 Sets the delay for first character in typematic autorepeat.
1963 \begin_layout Subsubsection
1964 autorepeat-subsequent-delay
1967 \begin_layout Standard
1968 Sets the delay for subsequent characters in typematic autorepeat.
1971 \begin_layout Section
1975 \begin_layout Subsection
1976 Core (in main table)
1979 \begin_layout Subsubsection
1983 \begin_layout Standard
1984 Print line to message console.
1987 \begin_layout Subsubsection
1988 exec(string command)
1991 \begin_layout Standard
1992 Run command as it was entered on the command line
1995 \begin_layout Subsection
1999 \begin_layout Standard
2000 Bitwise logical functions and related.
2003 \begin_layout Subsubsection
2004 bit.none(number...) / bit.bnot(number...)
2007 \begin_layout Standard
2008 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2012 \begin_layout Subsubsection
2013 bit.any(number...) / bit.bor(number...)
2016 \begin_layout Standard
2017 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2020 \begin_layout Subsubsection
2021 bit.all(number...) / bit.band(number...)
2024 \begin_layout Standard
2025 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2029 \begin_layout Subsubsection
2030 bit.parity(number...) / bit.bxor(number...)
2033 \begin_layout Standard
2034 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2038 \begin_layout Subsubsection
2039 bit.lrotate(number base[, number amount[, number bits]])
2042 \begin_layout Standard
2043 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2046 \begin_layout Subsubsection
2047 bit.rrotate(number base[, number amount[, number bits]])
2050 \begin_layout Standard
2051 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2055 \begin_layout Subsubsection
2056 bit.lshift(number base[, number amount[, number bits]])
2059 \begin_layout Standard
2060 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2061 The new bits are filled with zeroes.
2064 \begin_layout Subsubsection
2065 bit.lrshift(number base[, number amount[, number bits]])
2068 \begin_layout Standard
2069 Shift bits-bit (max 48, default 48) number logically right by amount (default
2071 The new bits are filled with zeroes.
2074 \begin_layout Subsubsection
2075 bit.arshift(number base[, number amount[, number bits]])
2078 \begin_layout Standard
2079 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2081 The new bits are shifted in with copy of the high bit.
2084 \begin_layout Subsection
2088 \begin_layout Standard
2089 Most of these functions can only be called in on_paint and on_video callbacks.
2090 Exceptions are noted.
2093 \begin_layout Standard
2095 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2096 16-23 are the red component, bits 24-31 are alpha component (0 is fully
2097 opaque, 255 is almost transparent).
2098 -1 is the fully transparent color.
2099 Alpha values greater than 127 do work.
2102 \begin_layout Standard
2103 Origin of coordinates is at top left corner of game display area.
2104 Left and top gaps correspond to negative coordinates.
2107 \begin_layout Subsubsection
2111 \begin_layout Standard
2112 Returns 2-tuple (hresolution, vresolution).
2115 \begin_layout Subsubsection
2116 gui.<class>_gap(number gap)
2119 \begin_layout Standard
2120 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2124 \begin_layout Subsubsection
2125 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2128 \begin_layout Standard
2129 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2134 \begin_layout Itemize
2135 x: X-coordinate to start the drawing from (and x-coordinate at begining
2139 \begin_layout Itemize
2140 y: Y-coordinate to start the drawing from.
2143 \begin_layout Itemize
2144 text: The text to draw.
2147 \begin_layout Itemize
2148 fgc: Text color (default is 0xFFFFFF (white))
2151 \begin_layout Itemize
2152 bgc: Background color (default is -1 (transparent))
2155 \begin_layout Subsubsection
2156 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2159 \begin_layout Standard
2160 Like gui.text, but draw using double-width.
2163 \begin_layout Subsubsection
2164 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2167 \begin_layout Standard
2168 Like gui.text, but draw using double-height.
2171 \begin_layout Subsubsection
2172 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2175 \begin_layout Standard
2176 Like gui.text, but draw using double-width/double-height.
2179 \begin_layout Subsubsection
2180 gui.rectangle(number x, number y, number width, number height[, number thickness[
2181 , number outline[, number fill]]])
2184 \begin_layout Standard
2185 Draw rectangle on the GUI.
2189 \begin_layout Itemize
2190 x: X-coordinate of left edge.
2193 \begin_layout Itemize
2194 y: Y-coordinate of upper edge.
2197 \begin_layout Itemize
2198 width: Width of rectangle.
2201 \begin_layout Itemize
2202 height: Height of rectangle.
2205 \begin_layout Itemize
2206 thickness: Thickness of outline (default is 1).
2209 \begin_layout Itemize
2210 outline: Color of outline (default is 0xFFFFFF (white))
2213 \begin_layout Itemize
2214 fill: Color of fil (default is -1 (transparent))
2217 \begin_layout Subsubsection
2218 gui.pixel(number x, number y[, number color])
2221 \begin_layout Standard
2222 Draw one pixel on the GUI.
2226 \begin_layout Itemize
2227 x: X-coordinate of the pixel
2230 \begin_layout Itemize
2231 y: Y-coordinate of the pixel
2234 \begin_layout Itemize
2235 color: Color of the pixel (default is 0xFFFFFF (white))
2238 \begin_layout Subsubsection
2239 gui.crosshair(number x, number y[, number length[, number color]])
2242 \begin_layout Standard
2247 \begin_layout Itemize
2248 x: X-coordinate of the crosshair
2251 \begin_layout Itemize
2252 y: Y-coordinate of the crosshair
2255 \begin_layout Itemize
2256 length: Length of the crosshair lines (default 10).
2259 \begin_layout Itemize
2260 color: Color of the crosshair (default is 0xFFFFFF (white))
2263 \begin_layout Subsubsection
2264 gui.line(number x1, number y1, number x2, number y2[, number color])
2267 \begin_layout Standard
2272 \begin_layout Itemize
2273 x1: X-coordinate of one end.
2276 \begin_layout Itemize
2277 y1: Y-coordinate of one end.
2280 \begin_layout Itemize
2281 x2: X-coordinate of the other end.
2284 \begin_layout Itemize
2285 y2: Y-coordinate of the other end.
2288 \begin_layout Itemize
2289 color: Color of the line (default is 0xFFFFFF (white)).
2292 \begin_layout Subsubsection
2293 gui.circle(number x, number y, number r[, number thick[, number border[,
2297 \begin_layout Standard
2302 \begin_layout Itemize
2303 x: X-coordinate of the center
2306 \begin_layout Itemize
2307 y: Y-coordinate of the center
2310 \begin_layout Itemize
2311 r: The radius of the circle
2314 \begin_layout Itemize
2315 thick: Border thickness
2318 \begin_layout Itemize
2319 border: Border color (default is 0xFFFFFF (white))
2322 \begin_layout Itemize
2323 fill: Fill color (default is -1 (transparent)).
2326 \begin_layout Subsubsection
2330 \begin_layout Standard
2331 Request on_repaint() to happen as soon as possible.
2332 Can be used anywhere.
2335 \begin_layout Subsubsection
2336 gui.subframe_update(boolean on)
2339 \begin_layout Standard
2340 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2341 or not happen (on=false).
2342 Can be used anywhere.
2345 \begin_layout Subsubsection
2346 gui.screenshot(string filename)
2349 \begin_layout Standard
2350 Write PNG screenshot of the current frame (no drawings) to specified file.
2351 Can be used anywhere.
2354 \begin_layout Subsubsection
2355 gui.color(number r, number g, number b[, number a])
2358 \begin_layout Standard
2359 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2360 each component in scale 0-255.
2361 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2363 The default alpha is 256.
2366 \begin_layout Subsubsection
2367 gui.status(string name, string value)
2370 \begin_layout Standard
2372 \begin_inset Quotes eld
2376 \begin_inset Quotes erd
2379 to <value> in status area.
2380 Can be used anywhere.
2383 \begin_layout Subsection
2387 \begin_layout Standard
2389 Only available in on_input callback.
2392 \begin_layout Subsubsection
2393 input.get(number controller, number index)
2396 \begin_layout Standard
2397 Read the specified index (0-11) from specified controller (0-7).
2401 \begin_layout Itemize
2402 Uses physical controller numbering.
2403 Gamepad in port 2 is controller 4, not 1!
2406 \begin_layout Subsubsection
2407 input.set(number controller, number index, number value)
2410 \begin_layout Standard
2411 Write the specified index (0-11) from specified controller (0-7), storing
2416 \begin_layout Itemize
2417 Uses physical controller numbering.
2418 Gamepad in port 2 is controller 4, not 1!
2421 \begin_layout Subsubsection
2422 input.reset([number cycles])
2425 \begin_layout Standard
2427 If cycles is greater than zero, do delayed reset.
2428 0 (or no value) causes immediate reset.
2431 \begin_layout Itemize
2432 Only available with subframe flag false.
2435 \begin_layout Subsubsection
2439 \begin_layout Standard
2440 Returns table of tables of all available keys and axes.
2441 The first table is indexed by key name (platform-dependent!), and the inner
2442 table has the following fields:
2445 \begin_layout Itemize
2446 last_rawval: Last reported raw value for control.
2449 \begin_layout Itemize
2450 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2451 pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2454 \begin_layout Itemize
2455 cal_left: Minimum calibration value.
2456 Only meaningful with axis and pressure types.
2459 \begin_layout Itemize
2460 cal_center: Center calibration value.
2461 Only meaningful with axis and pressure types.
2464 \begin_layout Itemize
2465 cal_right: Maximum calibration value.
2466 Only meaningful with axis and pressure types.
2469 \begin_layout Itemize
2470 cal_tolerance: Dead zone tolerance.
2471 Only meaningful with axis and pressure types.
2474 \begin_layout Subsubsection
2475 input.keyhook(key, state)
2478 \begin_layout Standard
2479 Requests that keyhook events to be sent for key (state=true) or not sent
2483 \begin_layout Subsection
2487 \begin_layout Standard
2488 Host memory handling (extra memory saved to savestates).
2489 Host memory starts empty.
2492 \begin_layout Subsubsection
2493 hostmemory.read(number address)
2496 \begin_layout Standard
2497 Reads hostmemory slot address.
2498 Slot numbers out of range return false instead of numeric.
2501 \begin_layout Subsubsection
2502 hostmemory.write(number address, number value)
2505 \begin_layout Standard
2506 Writes hostmemory slot with 0-255.
2507 Slot numbers out of range cause extension of host memory slot space.
2510 \begin_layout Subsubsection
2511 hostmemory.readbyte(number address)
2514 \begin_layout Standard
2515 Read unsigned byte (1 element) from given address.
2516 Slots out of range return false.
2519 \begin_layout Subsubsection
2520 hostmemory.writebyte(number address, number value)
2523 \begin_layout Standard
2524 Write unsigned byte (1 element) to given slot.
2525 Slot numbers out of range cause extension.
2528 \begin_layout Subsubsection
2529 hostmemory.readsbyte(number address)
2532 \begin_layout Standard
2533 Read signed byte (1 element) from given address.
2534 Slots out of range return false.
2537 \begin_layout Subsubsection
2538 hostmemory.writesbyte(number address, number value)
2541 \begin_layout Standard
2542 Write signed byte (1 element) to given slot.
2543 Slot numbers out of range cause extension.
2546 \begin_layout Subsubsection
2547 hostmemory.readword(number address)
2550 \begin_layout Standard
2551 Read unsigned word (2 elements) from given address.
2552 Slots out of range return false.
2555 \begin_layout Subsubsection
2556 hostmemory.writeword(number address, number value)
2559 \begin_layout Standard
2560 Write unsigned word (2 elements) to given slot.
2561 Slot numbers out of range cause extension.
2564 \begin_layout Subsubsection
2565 hostmemory.readsword(number address)
2568 \begin_layout Standard
2569 Read signed word (2 elements) from given address.
2570 Slots out of range return false.
2573 \begin_layout Subsubsection
2574 hostmemory.writesword(number address, number value)
2577 \begin_layout Standard
2578 Write signed word (2 elements) to given slot.
2579 Slot numbers out of range cause extension.
2582 \begin_layout Subsubsection
2583 hostmemory.readdword(number address)
2586 \begin_layout Standard
2587 Read unsigned doubleword (4 elements) from given address.
2588 Slots out of range return false.
2591 \begin_layout Subsubsection
2592 hostmemory.writedword(number address, number value)
2595 \begin_layout Standard
2596 Write unsigned doubleword (4 elements) to given slot.
2597 Slot numbers out of range cause extension.
2600 \begin_layout Subsubsection
2601 hostmemory.readsdword(number address)
2604 \begin_layout Standard
2605 Read signed doubleword (4 elements) from given address.
2606 Slots out of range return false.
2609 \begin_layout Subsubsection
2610 hostmemory.writesdword(number address, number value)
2613 \begin_layout Standard
2614 Write signed doubleword (4 elements) to given slot.
2615 Slot numbers out of range cause extension.
2618 \begin_layout Subsubsection
2619 hostmemory.readqword(number address)
2622 \begin_layout Standard
2623 Read unsigned quadword (8 elements) from given address.
2624 Slots out of range return false.
2627 \begin_layout Subsubsection
2628 hostmemory.writeqword(number address, number value)
2631 \begin_layout Standard
2632 Write unsigned quadword (4 elements) to given slot.
2633 Slot numbers out of range cause extension.
2636 \begin_layout Subsubsection
2637 hostmemory.readsqword(number address)
2640 \begin_layout Standard
2641 Read signed quadword (8 elements) from given address.
2642 Slots out of range return false.
2645 \begin_layout Subsubsection
2646 hostmemory.writesqword(number address, number value)
2649 \begin_layout Standard
2650 Write signed quadword (8 elements) to given slot.
2651 Slot numbers out of range cause extension.
2654 \begin_layout Subsection
2658 \begin_layout Standard
2662 \begin_layout Subsubsection
2663 movie.currentframe()
2666 \begin_layout Standard
2667 Return number of current frame.
2670 \begin_layout Subsubsection
2674 \begin_layout Standard
2675 Return number of frames in movie.
2678 \begin_layout Subsubsection
2682 \begin_layout Standard
2683 Return true if in readonly mode, false if in readwrite.
2686 \begin_layout Subsubsection
2687 movie.set_readwrite()
2690 \begin_layout Standard
2691 Set readwrite mode (does not cause on_readwrite callback).
2694 \begin_layout Subsubsection
2695 movie.frame_subframes(number frame)
2698 \begin_layout Standard
2699 Count number of subframes in specified frame (frame numbers are 1-based)
2703 \begin_layout Subsubsection
2704 movie.read_subframe(number frame, number subframe)
2707 \begin_layout Standard
2708 Read specifed subframe in specified frame and return data as array (100
2709 elements, numbered 0-99 currently).
2712 \begin_layout Subsection
2716 \begin_layout Standard
2717 Routines for settings manipulation
2720 \begin_layout Subsubsection
2721 settings.get(string name)
2724 \begin_layout Standard
2725 Get value of setting.
2726 If setting is blank, returns false.
2727 If setting value can't be obtained, returns (nil, error message).
2730 \begin_layout Subsubsection
2731 settings.set(string name, string value)
2734 \begin_layout Standard
2735 Set value of setting.
2736 If setting can't be set, returns (nil, error message).
2739 \begin_layout Subsubsection
2740 settings.is_set(string name)
2743 \begin_layout Standard
2744 Returns if setting is set.
2745 If setting does not exist, returns (nil, error message).
2748 \begin_layout Subsubsection
2749 settings.blank(string name)
2752 \begin_layout Standard
2753 Blanks a setting and returns true.
2754 If setting can't be blanked, returns (nil, error message).
2757 \begin_layout Subsection
2761 \begin_layout Standard
2762 Contains various functions for managing memory
2765 \begin_layout Subsubsection
2769 \begin_layout Standard
2770 Returns the number of VMAs
2773 \begin_layout Subsubsection
2774 memory.read_vma(number index)
2777 \begin_layout Standard
2778 Reads the specified VMA (indices start from zero).
2779 Trying to read invalid VMA gives nil.
2780 The read VMA is table with the following fields:
2783 \begin_layout Itemize
2784 region_name (string): The readable name of the VMA
2787 \begin_layout Itemize
2788 baseaddr (number): Base address of the VMA
2791 \begin_layout Itemize
2792 lastaddr (number): Last address in the VMA.
2795 \begin_layout Itemize
2796 size (number): The size of VMA in bytes.
2799 \begin_layout Itemize
2800 readonly (boolean): True of the VMA corresponds to ROM.
2803 \begin_layout Itemize
2804 native_endian (boolean): True if the VMA has native endian as opposed to
2808 \begin_layout Subsubsection
2809 memory.find_vma(number address)
2812 \begin_layout Standard
2813 Finds the VMA containing specified address.
2814 Returns table in the same format as read_vma or nil if not found.
2817 \begin_layout Subsubsection
2818 memory.readbyte(number address)
2821 \begin_layout Standard
2822 Reads the specified address as unsigned byte and returns the result.
2825 \begin_layout Subsubsection
2826 memory.readsbyte(number address)
2829 \begin_layout Standard
2830 Reads the specified address as signed byte and returns the result.
2833 \begin_layout Subsubsection
2834 memory.writebyte(number address, number value)
2837 \begin_layout Standard
2838 Writes the specified value (negative values undergo 2's complement) to specified
2839 address (as a byte).
2842 \begin_layout Subsubsection
2843 memory.readword(number address)
2846 \begin_layout Standard
2847 Reads the specified address as unsigned word and returns the result.
2850 \begin_layout Subsubsection
2851 memory.readsword(number address)
2854 \begin_layout Standard
2855 Reads the specified address as signed word and returns the result.
2858 \begin_layout Subsubsection
2859 memory.writeword(number address, number value)
2862 \begin_layout Standard
2863 Writes the specified value (negative values undergo 2's complement) to specified
2864 address (as a word).
2867 \begin_layout Subsubsection
2868 memory.readdword(number address)
2871 \begin_layout Standard
2872 Reads the specified address as unsigned doubleword and returns the result.
2875 \begin_layout Subsubsection
2876 memory.readsdword(number address)
2879 \begin_layout Standard
2880 Reads the specified address as signed doubleword and returns the result.
2883 \begin_layout Subsubsection
2884 memory.writedword(number address, number value)
2887 \begin_layout Standard
2888 Writes the specified value (negative values undergo 2's complement) to specified
2889 address (as a doubleword).
2892 \begin_layout Subsubsection
2893 memory.readqword(number address)
2896 \begin_layout Standard
2897 Reads the specified address as unsigned quadword and returns the result.
2900 \begin_layout Subsubsection
2901 memory.readsqword(number address)
2904 \begin_layout Standard
2905 Reads the specified address as signed quadword and returns the result.
2908 \begin_layout Subsubsection
2909 memory.writeqword(number address, number value)
2912 \begin_layout Standard
2913 Writes the specified value (negative values undergo 2's complement) to specified
2914 address (as a quadword).
2917 \begin_layout Subsection
2921 \begin_layout Standard
2922 Contains copy of global variables from time of Lua initialization.
2926 \begin_layout Subsection
2930 \begin_layout Standard
2931 Various callbacks to Lua that can occur.
2934 \begin_layout Subsubsection
2935 Callback: on_paint()
2938 \begin_layout Standard
2939 Called when screen is being painted.
2940 Any gui.* calls requiring graphic context draw on the screen.
2943 \begin_layout Subsubsection
2944 Callback: on_video()
2947 \begin_layout Standard
2948 Called when video dump frame is being painted.
2949 Any gui.* calls requiring graphic context draw on the video.
2952 \begin_layout Subsubsection
2953 Callback: on_frame()
2956 \begin_layout Standard
2957 Called on each starting whole frame.
2960 \begin_layout Subsubsection
2961 Callback: on_startup()
2964 \begin_layout Standard
2965 Called when the emulator is starting (lsnes.rc and --run files has been run).
2968 \begin_layout Subsubsection
2969 Callback: on_pre_load(string name)
2972 \begin_layout Standard
2973 Called just before savestate/movie load occurs (note: loads are always delayed,
2974 so this occurs even when load was initiated by lua).
2977 \begin_layout Subsubsection
2978 Callback: on_err_load(string name)
2981 \begin_layout Standard
2982 Called if loadstate goes wrong.
2985 \begin_layout Subsubsection
2986 Callback: on_post_load(string name, boolean was_savestate)
2989 \begin_layout Standard
2990 Called on successful loadstate.
2991 was_savestate gives if this was a savestate or a movie.
2994 \begin_layout Subsubsection
2995 Callback: on_pre_save(string name, boolean is_savestate)
2998 \begin_layout Standard
2999 Called just before savestate save occurs (note: movie saves are synchronous
3000 and won't trigger these callbacks if called from Lua).
3003 \begin_layout Subsubsection
3004 Callback: on_err_save(string name)
3007 \begin_layout Standard
3008 Called if savestate goes wrong.
3011 \begin_layout Subsubsection
3012 Callback: on_post_save(string name, boolean is_savestate)
3015 \begin_layout Standard
3016 Called on successful savaestate.
3017 is_savestate gives if this was a savestate or a movie.
3020 \begin_layout Subsubsection
3024 \begin_layout Standard
3025 Called when emulator is shutting down.
3028 \begin_layout Subsubsection
3029 Callback: on_input(boolean subframe)
3032 \begin_layout Standard
3033 Called when emulator is just sending input to bsnes core.
3034 Warning: This is called even in readonly mode, but the results are ignored.
3037 \begin_layout Subsubsection
3038 Callback: on_reset()
3041 \begin_layout Standard
3042 Called when SNES is reset.
3045 \begin_layout Subsubsection
3046 Callback: on_readwrite()
3049 \begin_layout Standard
3050 Called when moving into readwrite mode as result of
3051 \begin_inset Quotes eld
3055 \begin_inset Quotes erd
3058 command (note: moving to rwmode by Lua won't trigger this, as per recursive
3062 \begin_layout Subsubsection
3063 Callback: on_snoop(number port, number controller, number index, number
3067 \begin_layout Standard
3068 Called each time bsnes asks for input.
3069 The value is the final value to be sent to bsnes core (readonly mode, autohold
3070 and autofire have been taken into account).
3071 Might be useful when translating movies to format suitable for console
3073 Note: There is no way to modify the value to be sent.
3076 \begin_layout Subsubsection
3077 Callback: on_keyhook(string keyname, table state)
3080 \begin_layout Standard
3081 Sent when key that has keyhook events requested changes state.
3082 Keyname is name of the key (group) and state is the state (same kind as
3083 table values in input.raw).
3086 \begin_layout Section
3087 Modifier and key names:
3090 \begin_layout Subsection
3094 \begin_layout Subsubsection
3098 \begin_layout Standard
3099 Following modifier names are known:
3102 \begin_layout Itemize
3103 ctrl, lctrl, rctrl: Control keys
3106 \begin_layout Itemize
3107 alt, lalt, ralt: ALT keys.
3110 \begin_layout Itemize
3111 shift, lshift, rshift: Shift keys.
3114 \begin_layout Itemize
3115 meta, lmeta, rmeta: Meta keys.
3118 \begin_layout Itemize
3119 num, caps: Numlock/Capslock (these are sticky!)
3122 \begin_layout Itemize
3126 \begin_layout Subsubsection
3130 \begin_layout Standard
3131 Following key names are known:
3134 \begin_layout Itemize
3135 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3136 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3137 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3138 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3139 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3140 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3141 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3142 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3143 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3144 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3145 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3146 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3147 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3148 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3149 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3150 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3151 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3152 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3153 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3154 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3155 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3156 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3157 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3158 break, menu, power, euro, undo
3161 \begin_layout Itemize
3162 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3163 hardware-dependent scan code of <n> (useful to bind those keys that don't
3164 have symbolic names).
3167 \begin_layout Subsubsection
3168 Joystick pseudo-keys:
3171 \begin_layout Itemize
3172 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3175 \begin_layout Itemize
3176 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3179 \begin_layout Itemize
3180 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3183 \begin_layout Itemize
3184 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3187 \begin_layout Itemize
3188 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3191 \begin_layout Itemize
3192 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3193 position (axis modes axis and axis_inverse).
3196 \begin_layout Itemize
3197 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3198 position (axis modes axis and axis_inverse).
3201 \begin_layout Itemize
3202 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3206 \begin_layout Subsubsection
3210 \begin_layout Itemize
3211 Escape: Enter/Exit Command mode, cancel modal dialogs.
3214 \begin_layout Itemize
3215 Return (also KPEnter): Execute command, ok modal dialog.
3218 \begin_layout Itemize
3219 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
3223 \begin_layout Itemize
3224 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
3228 \begin_layout Itemize
3229 Home (also KP7 if no num lock; command mode): Beginning of command.
3232 \begin_layout Itemize
3233 End (also KP1 if no num lock; command mode): End of command.
3236 \begin_layout Itemize
3237 Left (also KP4 if no num lock; command mode): Move cursor left.
3240 \begin_layout Itemize
3241 Right (also KP6 if no num lock; command mode): Move cursor right.
3244 \begin_layout Itemize
3246 if no num lock; command mode): Delete character to right of cursor.
3249 \begin_layout Itemize
3250 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3254 \begin_layout Itemize
3255 Backspace (command mode): Delete character to left of cursor.
3258 \begin_layout Itemize
3259 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3262 \begin_layout Subsection
3266 \begin_layout Subsubsection
3270 \begin_layout Standard
3271 Following modifier names are known:
3274 \begin_layout Itemize
3278 \begin_layout Itemize
3282 \begin_layout Itemize
3286 \begin_layout Itemize
3290 \begin_layout Itemize
3294 \begin_layout Subsubsection
3298 \begin_layout Standard
3299 Following key names are known:
3302 \begin_layout Itemize
3303 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3304 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3305 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3306 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3307 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3308 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3309 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3310 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3311 pause, capital, end, home, lefT, up, right, down, select, print, execute,
3312 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3313 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3314 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3315 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3316 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3317 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3318 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3319 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3320 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3321 windows_right, windows_menu, command, special1, special2, special3, special4,
3322 special5, special6, special7, special8, special9, special10, special11,
3323 special12, special13, special14, special15, special16, special17, special18,
3324 special19, special20
3327 \begin_layout Section
3331 \begin_layout Standard
3332 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3333 (note: If you recompress it, do not use compression methods other than
3334 store and deflate and especially do not use encryption of any kind).
3337 \begin_layout Subsection
3338 Detecting clean start/SRAM/Savestate
3341 \begin_layout Itemize
3343 \begin_inset Quotes eld
3347 \begin_inset Quotes erd
3350 it is savestate, otherwise:
3353 \begin_layout Itemize
3354 If file has members with names starting
3355 \begin_inset Quotes eld
3359 \begin_inset Quotes erd
3362 it is movie starting from SRAM, otherwise:
3365 \begin_layout Itemize
3366 It is movie starting from clear state.
3369 \begin_layout Subsection
3373 \begin_layout Standard
3374 Type of game ROM and region (as one line).
3378 \begin_layout Standard
3379 \begin_inset Tabular
3380 <lyxtabular version="3" rows="8" columns="3">
3381 <features tabularvalignment="middle">
3382 <column alignment="center" valignment="top" width="0">
3383 <column alignment="center" valignment="top" width="0">
3384 <column alignment="center" valignment="top" width="0">
3386 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3389 \begin_layout Plain Layout
3395 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3398 \begin_layout Plain Layout
3404 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3407 \begin_layout Plain Layout
3415 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3418 \begin_layout Plain Layout
3424 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3427 \begin_layout Plain Layout
3433 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3436 \begin_layout Plain Layout
3444 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3447 \begin_layout Plain Layout
3453 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3456 \begin_layout Plain Layout
3462 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3465 \begin_layout Plain Layout
3473 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3476 \begin_layout Plain Layout
3482 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3485 \begin_layout Plain Layout
3491 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3494 \begin_layout Plain Layout
3502 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3505 \begin_layout Plain Layout
3511 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3514 \begin_layout Plain Layout
3520 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3523 \begin_layout Plain Layout
3531 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3534 \begin_layout Plain Layout
3540 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3543 \begin_layout Plain Layout
3549 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3552 \begin_layout Plain Layout
3560 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3563 \begin_layout Plain Layout
3569 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3572 \begin_layout Plain Layout
3578 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3581 \begin_layout Plain Layout
3589 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3592 \begin_layout Plain Layout
3598 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3601 \begin_layout Plain Layout
3607 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3610 \begin_layout Plain Layout
3624 \begin_layout Standard
3628 \begin_layout Standard
3629 \begin_inset Tabular
3630 <lyxtabular version="3" rows="3" columns="2">
3631 <features tabularvalignment="middle">
3632 <column alignment="center" valignment="top" width="0">
3633 <column alignment="center" valignment="top" width="0">
3635 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3638 \begin_layout Plain Layout
3644 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3647 \begin_layout Plain Layout
3655 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3658 \begin_layout Plain Layout
3664 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3667 \begin_layout Plain Layout
3675 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3678 \begin_layout Plain Layout
3684 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3687 \begin_layout Plain Layout
3701 \begin_layout Subsection
3705 \begin_layout Standard
3706 Contains type of port #1 (as one line).
3707 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3708 If not present, defaults to 'gamepad'.
3711 \begin_layout Subsection
3715 \begin_layout Standard
3716 Contains type of port #2 (as one line).
3717 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3718 'justifier' and 'justifiers'.
3719 If not present, defaults to 'none'.
3722 \begin_layout Subsection
3726 \begin_layout Standard
3727 Contains name of the game (as one line).
3730 \begin_layout Subsection
3734 \begin_layout Standard
3735 Contains authors, one per line.
3736 Part before '|' is the full name, part after is the nickname.
3739 \begin_layout Subsection
3743 \begin_layout Standard
3745 \begin_inset Quotes eld
3749 \begin_inset Quotes erd
3753 Used to reject other saves.
3756 \begin_layout Subsection
3757 Member: controlsversion
3760 \begin_layout Standard
3762 \begin_inset Quotes eld
3766 \begin_inset Quotes erd
3770 Used to identify what controls are there.
3773 \begin_layout Subsection
3775 \begin_inset Quotes eld
3779 \begin_inset Quotes erd
3785 \begin_layout Standard
3786 Contains bsnes core version number (as one line).
3789 \begin_layout Subsection
3793 \begin_layout Standard
3794 Contains project ID (as one line).
3795 Used to identify if two movies are part of the same project.
3798 \begin_layout Subsection
3799 Member: {rom,slota,slotb}{,xml}.sha256
3802 \begin_layout Standard
3803 Contains SHA-256 of said ROM or ROM mapping file (as one line).
3804 Absent if corresponding file is absent.
3807 \begin_layout Subsection
3808 Member: moviesram.<name>
3811 \begin_layout Standard
3812 Raw binary startup SRAM of kind <name>.
3813 Only present in savestates and movies starting from SRAM.
3816 \begin_layout Subsection
3820 \begin_layout Standard
3821 Contains frame number (as one line) of frame movie was saved on.
3822 Only present in savestates.
3825 \begin_layout Subsection
3829 \begin_layout Standard
3830 Current value of lag counter (as one line).
3831 Only present in savestates.
3834 \begin_layout Subsection
3835 Member: pollcounters
3838 \begin_layout Standard
3839 Contains poll counters (currently 100 of them), one per line.
3840 Each line is raw poll count if DRDY is set for it.
3841 Otherwise it is negative poll count minus one.
3842 Only present in savestates.
3845 \begin_layout Subsection
3849 \begin_layout Standard
3850 Raw binary dump of host memory.
3851 Only present in savestates.
3854 \begin_layout Subsection
3858 \begin_layout Standard
3859 The raw binary savestate itself.
3860 Savestate detection uses this file, only present in savestates.
3863 \begin_layout Subsection
3867 \begin_layout Standard
3868 Screenshot of current frame.
3869 Only present in savestates.
3870 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
3872 Height of image is inferred from the width and size of data.
3875 \begin_layout Subsection
3879 \begin_layout Standard
3880 Raw binary SRAM of kind <name> at time of savestate.
3881 Only present in savestates.
3884 \begin_layout Subsection
3888 \begin_layout Standard
3889 The actual input track, one line per subframe (blank lines are skipped).
3892 \begin_layout Itemize
3893 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
3894 part of same frame as previous, otherwise it starts a new frame.
3897 \begin_layout Itemize
3898 First subframe must start a new frame.
3901 \begin_layout Standard
3902 Length of movie in frames is number of lines in input file that start a
3906 \begin_layout Subsection
3910 \begin_layout Standard
3911 Contains textual base-10 rerecord count (as one line; emulator just writes
3912 this, it doesn't read it) + 1.
3915 \begin_layout Subsection
3919 \begin_layout Standard
3920 This member stores set of load IDs.
3921 There is one load ID per rerecord (plus one corresponding to start of project).
3924 \begin_layout Itemize
3925 This member constists of concatenation of records
3928 \begin_layout Itemize
3929 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
3933 \begin_layout Itemize
3934 IDs are interpretted as 256-bit big-endian integers with warparound.
3937 \begin_layout Itemize
3938 Initial predicted ID is all zeroes.
3941 \begin_layout Standard
3942 Format of each record is:
3945 \begin_layout Itemize
3946 1 byte: Opcode byte.
3947 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
3951 \begin_layout Itemize
3952 32-prefixlen bytes of ID.
3955 \begin_layout Itemize
3956 countlen bytes of big-endian count (count).
3959 \begin_layout Standard
3960 Records are processed as follows:
3963 \begin_layout Itemize
3964 To form the first ID encoded by record, take the first prefixlen bytes predicted
3965 ID and append the read ID value to it.
3966 The result is the first ID encoded.
3969 \begin_layout Itemize
3970 If countlen is 0, record encodes 1 ID.
3973 \begin_layout Itemize
3974 If countlen is 1, record encodes 2+count IDs.
3977 \begin_layout Itemize
3978 If countlen is 2, record encodes 258+count IDs.
3981 \begin_layout Itemize
3982 If countlen is 3, record encodes 65794+count IDs.
3985 \begin_layout Itemize
3986 The new predicted ID is the next ID after last one encoded by the record.
3989 \begin_layout Standard
3990 The number of rerecords + 1 is equal to the sum of number of IDs encoded
3994 \begin_layout Subsection
3995 Member: starttime.second
3998 \begin_layout Standard
3999 Movie starting time, second part.
4000 Epoch is Unix epoch.
4001 Default is 1,000,000,000.
4004 \begin_layout Subsection
4005 Member: starttime.subsecond
4008 \begin_layout Standard
4009 Movie starting time, subsecond part.
4014 \begin_layout Subsection
4015 Member: savetime.second
4018 \begin_layout Standard
4019 Movie saving time, second part.
4020 Default is starttime.second.
4021 Only present in savestates.
4024 \begin_layout Subsection
4025 Member: savetime.subsecond
4028 \begin_layout Standard
4029 Movie saving time, subsecond part.
4030 Default is starttime.subsecond.
4031 Only present in savestates.
4034 \begin_layout Section
4035 Quick'n'dirty encode guide
4038 \begin_layout Enumerate
4039 Start the emulator and load the movie file.
4042 \begin_layout Enumerate
4043 Set large AVI option 'set-setting avi-large on'
4046 \begin_layout Enumerate
4047 Enable dumping 'dump-avi tmpdump'
4050 \begin_layout Enumerate
4051 Unpause and let it run until you want to end dumping.
4054 \begin_layout Enumerate
4055 Close the emulator (closing the window is the easiest way).
4059 \begin_layout Enumerate
4060 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4061 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4064 \begin_layout Enumerate
4065 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4068 \begin_layout Enumerate
4069 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4070 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4073 \begin_layout Enumerate
4074 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4075 Now final.mkv contains quick'n'dirty encode.
4078 \begin_layout Section
4079 Axis configurations for some gamepad types:
4082 \begin_layout Subsection
4086 \begin_layout Standard
4087 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4090 \begin_layout LyX-Code
4091 set-axis joystick0axis2 pressure-+
4094 \begin_layout LyX-Code
4095 set-axis joystick0axis5 pressure-+
4098 \begin_layout Itemize
4099 This is needed for SDL only.
4100 EVDEV sets those types correctly.
4103 \begin_layout Subsection
4105 \begin_inset Quotes eld
4109 \begin_inset Quotes erd
4115 \begin_layout Standard
4116 Axes 8-19 should be disabled.
4119 \begin_layout LyX-Code
4120 set-axis joystick0axis8 disabled
4123 \begin_layout LyX-Code
4124 set-axis joystick0axis9 disabled
4127 \begin_layout LyX-Code
4128 set-axis joystick0axis10 disabled
4131 \begin_layout LyX-Code
4132 set-axis joystick0axis11 disabled
4135 \begin_layout LyX-Code
4136 set-axis joystick0axis12 disabled
4139 \begin_layout LyX-Code
4140 set-axis joystick0axis13 disabled
4143 \begin_layout LyX-Code
4144 set-axis joystick0axis14 disabled
4147 \begin_layout LyX-Code
4148 set-axis joystick0axis15 disabled
4151 \begin_layout LyX-Code
4152 set-axis joystick0axis16 disabled
4155 \begin_layout LyX-Code
4156 set-axis joystick0axis17 disabled
4159 \begin_layout LyX-Code
4160 set-axis joystick0axis18 disabled
4163 \begin_layout LyX-Code
4164 set-axis joystick0axis19 disabled
4167 \begin_layout Section
4171 \begin_layout Subsection
4172 Problems from BSNES core:
4175 \begin_layout Itemize
4176 The whole pending save stuff.
4179 \begin_layout Itemize
4180 Lack of layer hiding.
4183 \begin_layout Itemize
4184 It is slow (especially accuracy).
4187 \begin_layout Itemize
4188 Firmwares can't be loaded from ZIP archives.
4191 \begin_layout Subsection
4195 \begin_layout Itemize
4196 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4199 \begin_layout Itemize
4200 Audio for last dumped frame is not itself dumped.
4203 \begin_layout Itemize
4204 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4207 \begin_layout Itemize
4208 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4211 \begin_layout Itemize
4212 No menus, command based interface (SDL).
4215 \begin_layout Itemize
4216 Long commands don't scroll.
4219 \begin_layout Itemize
4220 The SDL screen drawing is slow.
4223 \begin_layout Itemize
4224 Wxwidgets UI is still pretty buggy.
4227 \begin_layout Section
4231 \begin_layout Subsection
4235 \begin_layout Itemize
4239 \begin_layout Itemize
4240 Fix dumper video corruption with levels 10-18.
4243 \begin_layout Subsection
4247 \begin_layout Itemize
4251 \begin_layout Itemize
4252 Lots of code cleanups
4255 \begin_layout Itemize
4256 Lua interface to settings
4259 \begin_layout Itemize
4260 Allow specifying AVI borders without Lua
4263 \begin_layout Itemize
4264 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4267 \begin_layout Itemize
4268 on_snoop lua callback
4271 \begin_layout Itemize
4272 Faster movie loading and saving.
4275 \begin_layout Subsection
4279 \begin_layout Itemize
4283 \begin_layout Subsection
4287 \begin_layout Itemize
4291 \begin_layout Itemize
4292 Save jukebox functionality.
4295 \begin_layout Subsection
4299 \begin_layout Itemize
4300 Try to fix some nasty failing movie load edge cases
4303 \begin_layout Itemize
4304 Allow specifying scripts to run on command line.
4307 \begin_layout Subsection
4311 \begin_layout Itemize
4312 Major source code reorganization.
4315 \begin_layout Itemize
4316 Backup savestates before overwriting.
4319 \begin_layout Itemize
4320 Don't crash if loading initial state fails.
4323 \begin_layout Subsection
4327 \begin_layout Itemize
4331 \begin_layout Itemize
4332 Fix author name parsing
4335 \begin_layout Itemize
4336 Fix rerecord counting
4339 \begin_layout Itemize
4340 (SDL) Print messages to console if SDL is uninitialized
4343 \begin_layout Itemize
4344 Add movieinfo program
4347 \begin_layout Itemize
4348 Fix loading movies starting from SRAM.
4351 \begin_layout Subsection
4355 \begin_layout Itemize
4356 Add support for unattended dumping
4359 \begin_layout Itemize
4360 Fix compiling for Win32
4363 \begin_layout Itemize
4364 Don't lock up if sound can't be initialized
4367 \begin_layout Itemize
4368 Strip trailing CR from commands
4371 \begin_layout Itemize
4372 Don't try to do dubious things in global ctors (fix crash on startup)
4375 \begin_layout Subsection
4379 \begin_layout Itemize
4380 Small documentation tweaking
4383 \begin_layout Itemize
4387 \begin_layout Itemize
4388 Fix major bug in modifier matching
4391 \begin_layout Subsection
4395 \begin_layout Itemize
4396 Lots of documentation fixes
4399 \begin_layout Itemize
4400 Use dedicated callbacks for event backcomm., not commands.
4403 \begin_layout Itemize
4404 Ensure that the watchdog is not hit when executing delayed reset.
4407 \begin_layout Itemize
4408 Remove errant tab from joystick message.
4411 \begin_layout Subsection
4415 \begin_layout Itemize
4416 Make autofire operate in absolute time, not linear time
4419 \begin_layout Itemize
4420 Reinitialize controls when resuming from loadstate
4423 \begin_layout Itemize
4424 Some more code cleanups
4427 \begin_layout Itemize
4428 If Lua allocator fails, call OOM_panic()
4431 \begin_layout Itemize
4432 Byte/word/dword/qword sized host memory write/read functions.
4435 \begin_layout Itemize
4436 Dump at correct framerate if dumping interlaced NTSC (height=448).
4439 \begin_layout Subsection
4443 \begin_layout Itemize
4444 Actually include the complete source code
4447 \begin_layout Itemize
4451 \begin_layout Subsection
4455 \begin_layout Itemize
4456 Document {save,start}time.{,sub}second.
4459 \begin_layout Itemize
4460 Intercept time() from bsnes core.
4463 \begin_layout Subsection
4467 \begin_layout Itemize
4468 Allow disabling time() interception (allow build on Mac OS X)
4471 \begin_layout Itemize
4472 Use SDLMain on Mac OS X (make SDL not crash)
4475 \begin_layout Itemize
4476 Disable delayed resets (just plain too buggy for now).
4479 \begin_layout Itemize
4483 \begin_layout Itemize
4484 Use 16-bit for graphics/video instead of 32-bit.
4487 \begin_layout Itemize
4488 gui.rectangle/gui.pixel
4491 \begin_layout Itemize
4495 \begin_layout Itemize
4496 New CSCD writer implementation.
4499 \begin_layout Subsection
4503 \begin_layout Itemize
4504 Fix interaction of * and +.
4507 \begin_layout Itemize
4511 \begin_layout Itemize
4512 Use gettimeofday()/usleep(), these seem portable enough.
4515 \begin_layout Itemize
4516 Move joystick axis manipulation to keymapper code.
4519 \begin_layout Itemize
4520 Changes to how read-only works.
4523 \begin_layout Itemize
4524 Refactor controller input code.
4527 \begin_layout Subsection
4531 \begin_layout Itemize
4532 Fix mouseclick scale compensation.
4535 \begin_layout Itemize
4536 Draw area boundaries correctly in SDL code.
4539 \begin_layout Itemize
4543 \begin_layout Itemize
4544 Fix CSCD output (buffer overrun and race condition).
4547 \begin_layout Subsection
4551 \begin_layout Itemize
4552 JMD dumping support.
4555 \begin_layout Itemize
4556 Allow unattended dumping to JMD.
4559 \begin_layout Itemize
4563 \begin_layout Itemize
4564 Switch back to 32-bit colors.
4567 \begin_layout Itemize
4568 Add Lua function gui.color.
4571 \begin_layout Itemize
4572 Use some new C++11 features in GCC 4.6.
4575 \begin_layout Itemize
4576 Be prepared for core frequency changes.
4579 \begin_layout Itemize
4580 Pass colors in one chunk from Lua.
4583 \begin_layout Subsection
4587 \begin_layout Itemize
4588 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
4589 memory.read_vma() and memory.find_vma().
4592 \begin_layout Itemize
4593 Numerious documentation fixups
4596 \begin_layout Itemize
4597 RTC time format changed
4600 \begin_layout Itemize
4601 Reformat flags display
4604 \begin_layout Itemize
4605 Allow lua package name to be overridden
4608 \begin_layout Itemize
4609 SDUMP (high-quality dumping).
4612 \begin_layout Itemize
4613 Split platform support to plugins.
4616 \begin_layout Itemize
4617 Make all sound plugins support basic sound commands
4620 \begin_layout Itemize
4621 Support portaudio for sound.
4624 \begin_layout Itemize
4625 Allow disable Lua/SDL searching.
4628 \begin_layout Itemize
4629 Upconvert colors when copying lcscreen to screen.
4632 \begin_layout Itemize
4633 Reorganize source tree.
4636 \begin_layout Itemize
4637 Evdev joystick support.
4640 \begin_layout Itemize
4641 Refactor more code into generic window code.
4644 \begin_layout Subsection
4648 \begin_layout Itemize
4649 Refactor message handling.
4652 \begin_layout Itemize
4656 \begin_layout Itemize
4660 \begin_layout Itemize
4661 Finish pending saves before load/quit.
4664 \begin_layout Itemize
4665 Wxwidgets graphics plugin.
4668 \begin_layout Subsection
4672 \begin_layout Itemize
4673 Get rid of win32-crap.[ch]pp.
4676 \begin_layout Itemize
4677 Move files around a lot.
4680 \begin_layout Itemize
4681 Get rid of need for host C++ compiler.
4684 \begin_layout Itemize
4688 \begin_layout Itemize
4689 Refactor inter-component communication.
4692 \begin_layout Itemize
4696 \begin_layout Itemize
4697 Fix crash on multiline aliases.
4700 \begin_layout Itemize
4701 Load/Save settings in wxwidgets gui.
4704 \begin_layout Subsection
4708 \begin_layout Itemize
4709 Patch problems in bsnes core
4712 \begin_layout Itemize
4713 SNES is little-endian, not big-endian!
4716 \begin_layout Itemize
4717 Fix memory corruption in lcscreen::load()
4720 \begin_layout Subsection
4724 \begin_layout Itemize
4725 Fix interpretting repeat counts in rrdata loading.
4728 \begin_layout Itemize
4729 New lua callback: on_frame()
4732 \begin_layout Itemize
4733 Remove calls to runtosave() that aren't supposed to be there
4736 \begin_layout Itemize
4737 Lua function: movie.read_rtc()
4740 \begin_layout Itemize
4741 Ignore src/fonts/font.cpp
4744 \begin_layout Itemize
4745 Fix more bsnes core problems
4748 \begin_layout Itemize
4749 Control bsnes random seeding
4752 \begin_layout Itemize
4756 \begin_layout Itemize
4757 Some bsnes core debugging features (state dump and state hash)
4760 \begin_layout Itemize
4761 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
4762 it was 'lsnes rr0-beta21').
4765 \begin_layout Subsection
4769 \begin_layout Itemize
4770 Fix memory corruption due to macro/field mixup
4773 \begin_layout Itemize
4774 search-memory update
4777 \begin_layout Itemize
4778 Allow direct-mapped framebuffer
4781 \begin_layout Itemize
4782 SDL: Use SDL_ANYFORMAT if possible
4785 \begin_layout Itemize
4786 SDMP2SOX: 2s delay modes.
4789 \begin_layout Itemize
4793 \begin_layout Itemize
4794 Use sed -E, not sed -r.
4795 Fixes building on Mac OS X.
4798 \begin_layout Itemize
4799 Wxwidgets: Save jukebox on exit
4802 \begin_layout Itemize
4803 Fix RTC if using load-movie on savestate.
4806 \begin_layout Itemize
4807 Fix crash related to full console mode.
4810 \begin_layout Subsection
4814 \begin_layout Itemize
4815 Wxwidgets: Allow bringing application to foreground on Mac OS X.
4818 \begin_layout Itemize
4819 Wxwidgets: Allow compiling on Mac OS X.
4822 \begin_layout Itemize
4823 Use movie compare instead of movie hashing (faster save/load).
4826 \begin_layout Itemize
4830 \begin_layout Subsection
4834 \begin_layout Itemize
4835 sdmp2sox: Pad soundtrack if using -l or -L.
4838 \begin_layout Itemize
4839 sdmp2sox: Fix NTSC overscan.
4842 \begin_layout Itemize
4843 sdmp2sox: Add AR correction mode.
4846 \begin_layout Itemize
4847 call lua_close() when exiting.
4850 \begin_layout Itemize
4851 Fix zip_writer bug causing warnings from info-zip and error from advzip.
4854 \begin_layout Subsection
4858 \begin_layout Itemize
4859 Fix IPS patching code (use bsnes core IPS patcher).
4862 \begin_layout Itemize
4863 Implement BPS patching (using bsnes core IPS patcher).
4866 \begin_layout Itemize
4867 Add feature to load headered ROMs.
4870 \begin_layout Subsection
4874 \begin_layout Itemize
4875 Show command names when showing keybindings
4878 \begin_layout Subsection
4882 \begin_layout Itemize
4883 Fix pause-on-end to be actually controllable
4886 \begin_layout Itemize
4887 SDL: Poll all events in queue, not just first one (fixes slowness in command
4891 \begin_layout Itemize
4892 Wxwidgets: Fix ROM loading.
4895 \begin_layout Subsection
4899 \begin_layout Itemize
4900 Lua: Add gui.textH, gui.textV, gui.textHV
4903 \begin_layout Itemize
4904 Fix text colors on SDL on Mac OS X
4907 \begin_layout Itemize
4908 Mode 'F' for finished in readonly mode.
4911 \begin_layout Itemize
4915 \begin_layout Itemize
4916 Reliably pause after skip poll
4919 \begin_layout Itemize
4920 Split UI and core into their own threads
4923 \begin_layout Subsection
4927 \begin_layout Itemize
4928 Remove leftover dummy SRAM slot
4931 \begin_layout Itemize
4932 Fix controller numbers.
4935 \begin_layout Subsection
4939 \begin_layout Itemize
4940 Fix lsnes-dumpavi after interface change.
4943 \begin_layout Itemize
4944 Also give BSNES patches for v085.
4947 \begin_layout Itemize
4948 Pack movie data in memory.
4951 \begin_layout Subsection
4955 \begin_layout Itemize
4956 Fix framecount/length given when loading movies.
4959 \begin_layout Itemize
4960 Controller command memory leak fixes.
4963 \begin_layout Itemize
4964 Don't leak palette if freeing screen object.
4967 \begin_layout Subsection
4971 \begin_layout Itemize
4975 \begin_layout Itemize
4976 Wxwidgets: Allow controlling dumper from the menu.
4979 \begin_layout Subsection
4983 \begin_layout Itemize
4984 Rewrite parts of manual
4987 \begin_layout Itemize
4988 Lua: Make it work with Lua 5.2.
4991 \begin_layout Subsection
4995 \begin_layout Itemize
4996 Win32: Fix compile errors.
4999 \begin_layout Subsection
5003 \begin_layout Itemize
5004 Refactor controller input code.
5007 \begin_layout Itemize
5008 Fix crash when using command line on SDL / Mac OS X.
5011 \begin_layout Subsection
5015 \begin_layout Itemize
5016 Delete core/coroutine (obsolete)
5019 \begin_layout Itemize
5020 Lag input display by one frame.
5023 \begin_layout Itemize
5024 Rewind movie to beginning function.
5027 \begin_layout Itemize
5028 Fix wrong frame number reported to Lua when repainting after loadstate
5031 \begin_layout Itemize
5032 Support UI editing of jukebox
5035 \begin_layout Itemize
5036 Wxwidgets: Save settings on exit.
5039 \begin_layout Itemize
5040 Support ${project} for filenames
5043 \begin_layout Itemize
5044 SDL: Fix command history
5047 \begin_layout Subsection
5051 \begin_layout Itemize
5052 Fix some order-of-global-ctor bugs.
5055 \begin_layout Subsection
5059 \begin_layout Itemize
5060 Fix crashes when quitting on Win32.
5063 \begin_layout Subsection
5067 \begin_layout Itemize
5068 EVDEV: Queue keypresses from joystick, don't send directly
5071 \begin_layout Itemize
5072 Wxwidgets: Load-Preserve that actually works.
5075 \begin_layout Subsection
5079 \begin_layout Itemize
5080 Wxwidgets: GUI for memory search.
5083 \begin_layout Itemize
5084 Warn about using synchronous queue in UI callback.
5087 \begin_layout Subsection
5091 \begin_layout Itemize
5092 Remember last saved file for each ROM
5095 \begin_layout Itemize
5096 Support MT dumping via boost.
5099 \begin_layout Itemize
5103 \begin_layout Itemize
5107 \begin_layout Itemize
5108 Make mouse be ordinary input instead of special-casing
5111 \begin_layout Itemize
5112 SDL: Don't screw up commands with NUL codepoints.
5115 \begin_layout Subsection
5119 \begin_layout Itemize
5120 Merge status panel and main window
5123 \begin_layout Itemize
5124 True movie slot support (the rest of it)
5127 \begin_layout Itemize
5128 SDL: Fix compilation error
5131 \begin_layout Itemize
5132 Elminate cross calls in dump menu code.