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 Subsection
2478 \begin_layout Standard
2479 Host memory handling (extra memory saved to savestates).
2480 Host memory starts empty.
2483 \begin_layout Subsubsection
2484 hostmemory.read(number address)
2487 \begin_layout Standard
2488 Reads hostmemory slot address.
2489 Slot numbers out of range return false instead of numeric.
2492 \begin_layout Subsubsection
2493 hostmemory.write(number address, number value)
2496 \begin_layout Standard
2497 Writes hostmemory slot with 0-255.
2498 Slot numbers out of range cause extension of host memory slot space.
2501 \begin_layout Subsubsection
2502 hostmemory.readbyte(number address)
2505 \begin_layout Standard
2506 Read unsigned byte (1 element) from given address.
2507 Slots out of range return false.
2510 \begin_layout Subsubsection
2511 hostmemory.writebyte(number address, number value)
2514 \begin_layout Standard
2515 Write unsigned byte (1 element) to given slot.
2516 Slot numbers out of range cause extension.
2519 \begin_layout Subsubsection
2520 hostmemory.readsbyte(number address)
2523 \begin_layout Standard
2524 Read signed byte (1 element) from given address.
2525 Slots out of range return false.
2528 \begin_layout Subsubsection
2529 hostmemory.writesbyte(number address, number value)
2532 \begin_layout Standard
2533 Write signed byte (1 element) to given slot.
2534 Slot numbers out of range cause extension.
2537 \begin_layout Subsubsection
2538 hostmemory.readword(number address)
2541 \begin_layout Standard
2542 Read unsigned word (2 elements) from given address.
2543 Slots out of range return false.
2546 \begin_layout Subsubsection
2547 hostmemory.writeword(number address, number value)
2550 \begin_layout Standard
2551 Write unsigned word (2 elements) to given slot.
2552 Slot numbers out of range cause extension.
2555 \begin_layout Subsubsection
2556 hostmemory.readsword(number address)
2559 \begin_layout Standard
2560 Read signed word (2 elements) from given address.
2561 Slots out of range return false.
2564 \begin_layout Subsubsection
2565 hostmemory.writesword(number address, number value)
2568 \begin_layout Standard
2569 Write signed word (2 elements) to given slot.
2570 Slot numbers out of range cause extension.
2573 \begin_layout Subsubsection
2574 hostmemory.readdword(number address)
2577 \begin_layout Standard
2578 Read unsigned doubleword (4 elements) from given address.
2579 Slots out of range return false.
2582 \begin_layout Subsubsection
2583 hostmemory.writedword(number address, number value)
2586 \begin_layout Standard
2587 Write unsigned doubleword (4 elements) to given slot.
2588 Slot numbers out of range cause extension.
2591 \begin_layout Subsubsection
2592 hostmemory.readsdword(number address)
2595 \begin_layout Standard
2596 Read signed doubleword (4 elements) from given address.
2597 Slots out of range return false.
2600 \begin_layout Subsubsection
2601 hostmemory.writesdword(number address, number value)
2604 \begin_layout Standard
2605 Write signed doubleword (4 elements) to given slot.
2606 Slot numbers out of range cause extension.
2609 \begin_layout Subsubsection
2610 hostmemory.readqword(number address)
2613 \begin_layout Standard
2614 Read unsigned quadword (8 elements) from given address.
2615 Slots out of range return false.
2618 \begin_layout Subsubsection
2619 hostmemory.writeqword(number address, number value)
2622 \begin_layout Standard
2623 Write unsigned quadword (4 elements) to given slot.
2624 Slot numbers out of range cause extension.
2627 \begin_layout Subsubsection
2628 hostmemory.readsqword(number address)
2631 \begin_layout Standard
2632 Read signed quadword (8 elements) from given address.
2633 Slots out of range return false.
2636 \begin_layout Subsubsection
2637 hostmemory.writesqword(number address, number value)
2640 \begin_layout Standard
2641 Write signed quadword (8 elements) to given slot.
2642 Slot numbers out of range cause extension.
2645 \begin_layout Subsection
2649 \begin_layout Standard
2653 \begin_layout Subsubsection
2654 movie.currentframe()
2657 \begin_layout Standard
2658 Return number of current frame.
2661 \begin_layout Subsubsection
2665 \begin_layout Standard
2666 Return number of frames in movie.
2669 \begin_layout Subsubsection
2673 \begin_layout Standard
2674 Return true if in readonly mode, false if in readwrite.
2677 \begin_layout Subsubsection
2678 movie.set_readwrite()
2681 \begin_layout Standard
2682 Set readwrite mode (does not cause on_readwrite callback).
2685 \begin_layout Subsubsection
2686 movie.frame_subframes(number frame)
2689 \begin_layout Standard
2690 Count number of subframes in specified frame (frame numbers are 1-based)
2694 \begin_layout Subsubsection
2695 movie.read_subframe(number frame, number subframe)
2698 \begin_layout Standard
2699 Read specifed subframe in specified frame and return data as array (100
2700 elements, numbered 0-99 currently).
2703 \begin_layout Subsection
2707 \begin_layout Standard
2708 Routines for settings manipulation
2711 \begin_layout Subsubsection
2712 settings.get(string name)
2715 \begin_layout Standard
2716 Get value of setting.
2717 If setting is blank, returns false.
2718 If setting value can't be obtained, returns (nil, error message).
2721 \begin_layout Subsubsection
2722 settings.set(string name, string value)
2725 \begin_layout Standard
2726 Set value of setting.
2727 If setting can't be set, returns (nil, error message).
2730 \begin_layout Subsubsection
2731 settings.is_set(string name)
2734 \begin_layout Standard
2735 Returns if setting is set.
2736 If setting does not exist, returns (nil, error message).
2739 \begin_layout Subsubsection
2740 settings.blank(string name)
2743 \begin_layout Standard
2744 Blanks a setting and returns true.
2745 If setting can't be blanked, returns (nil, error message).
2748 \begin_layout Subsection
2752 \begin_layout Standard
2753 Contains various functions for managing memory
2756 \begin_layout Subsubsection
2760 \begin_layout Standard
2761 Returns the number of VMAs
2764 \begin_layout Subsubsection
2765 memory.read_vma(number index)
2768 \begin_layout Standard
2769 Reads the specified VMA (indices start from zero).
2770 Trying to read invalid VMA gives nil.
2771 The read VMA is table with the following fields:
2774 \begin_layout Itemize
2775 region_name (string): The readable name of the VMA
2778 \begin_layout Itemize
2779 baseaddr (number): Base address of the VMA
2782 \begin_layout Itemize
2783 lastaddr (number): Last address in the VMA.
2786 \begin_layout Itemize
2787 size (number): The size of VMA in bytes.
2790 \begin_layout Itemize
2791 readonly (boolean): True of the VMA corresponds to ROM.
2794 \begin_layout Itemize
2795 native_endian (boolean): True if the VMA has native endian as opposed to
2799 \begin_layout Subsubsection
2800 memory.find_vma(number address)
2803 \begin_layout Standard
2804 Finds the VMA containing specified address.
2805 Returns table in the same format as read_vma or nil if not found.
2808 \begin_layout Subsubsection
2809 memory.readbyte(number address)
2812 \begin_layout Standard
2813 Reads the specified address as unsigned byte and returns the result.
2816 \begin_layout Subsubsection
2817 memory.readsbyte(number address)
2820 \begin_layout Standard
2821 Reads the specified address as signed byte and returns the result.
2824 \begin_layout Subsubsection
2825 memory.writebyte(number address, number value)
2828 \begin_layout Standard
2829 Writes the specified value (negative values undergo 2's complement) to specified
2830 address (as a byte).
2833 \begin_layout Subsubsection
2834 memory.readword(number address)
2837 \begin_layout Standard
2838 Reads the specified address as unsigned word and returns the result.
2841 \begin_layout Subsubsection
2842 memory.readsword(number address)
2845 \begin_layout Standard
2846 Reads the specified address as signed word and returns the result.
2849 \begin_layout Subsubsection
2850 memory.writeword(number address, number value)
2853 \begin_layout Standard
2854 Writes the specified value (negative values undergo 2's complement) to specified
2855 address (as a word).
2858 \begin_layout Subsubsection
2859 memory.readdword(number address)
2862 \begin_layout Standard
2863 Reads the specified address as unsigned doubleword and returns the result.
2866 \begin_layout Subsubsection
2867 memory.readsdword(number address)
2870 \begin_layout Standard
2871 Reads the specified address as signed doubleword and returns the result.
2874 \begin_layout Subsubsection
2875 memory.writedword(number address, number value)
2878 \begin_layout Standard
2879 Writes the specified value (negative values undergo 2's complement) to specified
2880 address (as a doubleword).
2883 \begin_layout Subsubsection
2884 memory.readqword(number address)
2887 \begin_layout Standard
2888 Reads the specified address as unsigned quadword and returns the result.
2891 \begin_layout Subsubsection
2892 memory.readsqword(number address)
2895 \begin_layout Standard
2896 Reads the specified address as signed quadword and returns the result.
2899 \begin_layout Subsubsection
2900 memory.writeqword(number address, number value)
2903 \begin_layout Standard
2904 Writes the specified value (negative values undergo 2's complement) to specified
2905 address (as a quadword).
2908 \begin_layout Subsection
2912 \begin_layout Standard
2913 Contains copy of global variables from time of Lua initialization.
2917 \begin_layout Subsection
2921 \begin_layout Standard
2922 Various callbacks to Lua that can occur.
2925 \begin_layout Subsubsection
2926 Callback: on_paint()
2929 \begin_layout Standard
2930 Called when screen is being painted.
2931 Any gui.* calls requiring graphic context draw on the screen.
2934 \begin_layout Subsubsection
2935 Callback: on_video()
2938 \begin_layout Standard
2939 Called when video dump frame is being painted.
2940 Any gui.* calls requiring graphic context draw on the video.
2943 \begin_layout Subsubsection
2944 Callback: on_frame()
2947 \begin_layout Standard
2948 Called on each starting whole frame.
2951 \begin_layout Subsubsection
2952 Callback: on_startup()
2955 \begin_layout Standard
2956 Called when the emulator is starting (lsnes.rc and --run files has been run).
2959 \begin_layout Subsubsection
2960 Callback: on_pre_load(string name)
2963 \begin_layout Standard
2964 Called just before savestate/movie load occurs (note: loads are always delayed,
2965 so this occurs even when load was initiated by lua).
2968 \begin_layout Subsubsection
2969 Callback: on_err_load(string name)
2972 \begin_layout Standard
2973 Called if loadstate goes wrong.
2976 \begin_layout Subsubsection
2977 Callback: on_post_load(string name, boolean was_savestate)
2980 \begin_layout Standard
2981 Called on successful loadstate.
2982 was_savestate gives if this was a savestate or a movie.
2985 \begin_layout Subsubsection
2986 Callback: on_pre_save(string name, boolean is_savestate)
2989 \begin_layout Standard
2990 Called just before savestate save occurs (note: movie saves are synchronous
2991 and won't trigger these callbacks if called from Lua).
2994 \begin_layout Subsubsection
2995 Callback: on_err_save(string name)
2998 \begin_layout Standard
2999 Called if savestate goes wrong.
3002 \begin_layout Subsubsection
3003 Callback: on_post_save(string name, boolean is_savestate)
3006 \begin_layout Standard
3007 Called on successful savaestate.
3008 is_savestate gives if this was a savestate or a movie.
3011 \begin_layout Subsubsection
3015 \begin_layout Standard
3016 Called when emulator is shutting down.
3019 \begin_layout Subsubsection
3020 Callback: on_input(boolean subframe)
3023 \begin_layout Standard
3024 Called when emulator is just sending input to bsnes core.
3025 Warning: This is called even in readonly mode, but the results are ignored.
3028 \begin_layout Subsubsection
3029 Callback: on_reset()
3032 \begin_layout Standard
3033 Called when SNES is reset.
3036 \begin_layout Subsubsection
3037 Callback: on_readwrite()
3040 \begin_layout Standard
3041 Called when moving into readwrite mode as result of
3042 \begin_inset Quotes eld
3046 \begin_inset Quotes erd
3049 command (note: moving to rwmode by Lua won't trigger this, as per recursive
3053 \begin_layout Subsubsection
3054 Callback: on_snoop(number port, number controller, number index, number
3058 \begin_layout Standard
3059 Called each time bsnes asks for input.
3060 The value is the final value to be sent to bsnes core (readonly mode, autohold
3061 and autofire have been taken into account).
3062 Might be useful when translating movies to format suitable for console
3064 Note: There is no way to modify the value to be sent.
3067 \begin_layout Section
3068 Modifier and key names:
3071 \begin_layout Subsection
3075 \begin_layout Subsubsection
3079 \begin_layout Standard
3080 Following modifier names are known:
3083 \begin_layout Itemize
3084 ctrl, lctrl, rctrl: Control keys
3087 \begin_layout Itemize
3088 alt, lalt, ralt: ALT keys.
3091 \begin_layout Itemize
3092 shift, lshift, rshift: Shift keys.
3095 \begin_layout Itemize
3096 meta, lmeta, rmeta: Meta keys.
3099 \begin_layout Itemize
3100 num, caps: Numlock/Capslock (these are sticky!)
3103 \begin_layout Itemize
3107 \begin_layout Subsubsection
3111 \begin_layout Standard
3112 Following key names are known:
3115 \begin_layout Itemize
3116 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3117 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3118 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3119 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3120 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3121 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3122 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3123 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3124 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3125 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3126 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3127 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3128 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3129 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3130 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3131 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3132 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3133 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3134 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3135 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3136 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3137 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3138 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3139 break, menu, power, euro, undo
3142 \begin_layout Itemize
3143 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3144 hardware-dependent scan code of <n> (useful to bind those keys that don't
3145 have symbolic names).
3148 \begin_layout Subsubsection
3149 Joystick pseudo-keys:
3152 \begin_layout Itemize
3153 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3156 \begin_layout Itemize
3157 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3160 \begin_layout Itemize
3161 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3164 \begin_layout Itemize
3165 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3168 \begin_layout Itemize
3169 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3172 \begin_layout Itemize
3173 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3174 position (axis modes axis and axis_inverse).
3177 \begin_layout Itemize
3178 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3179 position (axis modes axis and axis_inverse).
3182 \begin_layout Itemize
3183 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3187 \begin_layout Subsubsection
3191 \begin_layout Itemize
3192 Escape: Enter/Exit Command mode, cancel modal dialogs.
3195 \begin_layout Itemize
3196 Return (also KPEnter): Execute command, ok modal dialog.
3199 \begin_layout Itemize
3200 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
3204 \begin_layout Itemize
3205 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
3209 \begin_layout Itemize
3210 Home (also KP7 if no num lock; command mode): Beginning of command.
3213 \begin_layout Itemize
3214 End (also KP1 if no num lock; command mode): End of command.
3217 \begin_layout Itemize
3218 Left (also KP4 if no num lock; command mode): Move cursor left.
3221 \begin_layout Itemize
3222 Right (also KP6 if no num lock; command mode): Move cursor right.
3225 \begin_layout Itemize
3227 if no num lock; command mode): Delete character to right of cursor.
3230 \begin_layout Itemize
3231 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3235 \begin_layout Itemize
3236 Backspace (command mode): Delete character to left of cursor.
3239 \begin_layout Itemize
3240 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3243 \begin_layout Subsection
3247 \begin_layout Subsubsection
3251 \begin_layout Standard
3252 Following modifier names are known:
3255 \begin_layout Itemize
3259 \begin_layout Itemize
3263 \begin_layout Itemize
3267 \begin_layout Itemize
3271 \begin_layout Itemize
3275 \begin_layout Subsubsection
3279 \begin_layout Standard
3280 Following key names are known:
3283 \begin_layout Itemize
3284 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3285 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3286 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3287 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3288 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3289 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3290 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3291 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3292 pause, capital, end, home, lefT, up, right, down, select, print, execute,
3293 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3294 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3295 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3296 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3297 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3298 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3299 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3300 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3301 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3302 windows_right, windows_menu, command, special1, special2, special3, special4,
3303 special5, special6, special7, special8, special9, special10, special11,
3304 special12, special13, special14, special15, special16, special17, special18,
3305 special19, special20
3308 \begin_layout Section
3312 \begin_layout Standard
3313 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3314 (note: If you recompress it, do not use compression methods other than
3315 store and deflate and especially do not use encryption of any kind).
3318 \begin_layout Subsection
3319 Detecting clean start/SRAM/Savestate
3322 \begin_layout Itemize
3324 \begin_inset Quotes eld
3328 \begin_inset Quotes erd
3331 it is savestate, otherwise:
3334 \begin_layout Itemize
3335 If file has members with names starting
3336 \begin_inset Quotes eld
3340 \begin_inset Quotes erd
3343 it is movie starting from SRAM, otherwise:
3346 \begin_layout Itemize
3347 It is movie starting from clear state.
3350 \begin_layout Subsection
3354 \begin_layout Standard
3355 Type of game ROM and region (as one line).
3359 \begin_layout Standard
3360 \begin_inset Tabular
3361 <lyxtabular version="3" rows="8" columns="3">
3362 <features tabularvalignment="middle">
3363 <column alignment="center" valignment="top" width="0">
3364 <column alignment="center" valignment="top" width="0">
3365 <column alignment="center" valignment="top" width="0">
3367 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3370 \begin_layout Plain Layout
3376 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3379 \begin_layout Plain Layout
3385 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3388 \begin_layout Plain Layout
3396 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3399 \begin_layout Plain Layout
3405 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3408 \begin_layout Plain Layout
3414 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3417 \begin_layout Plain Layout
3425 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3428 \begin_layout Plain Layout
3434 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3437 \begin_layout Plain Layout
3443 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3446 \begin_layout Plain Layout
3454 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3457 \begin_layout Plain Layout
3463 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3466 \begin_layout Plain Layout
3472 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3475 \begin_layout Plain Layout
3483 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3486 \begin_layout Plain Layout
3492 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3495 \begin_layout Plain Layout
3501 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3504 \begin_layout Plain Layout
3512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3515 \begin_layout Plain Layout
3521 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3524 \begin_layout Plain Layout
3530 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3533 \begin_layout Plain Layout
3541 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3544 \begin_layout Plain Layout
3550 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3553 \begin_layout Plain Layout
3559 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3562 \begin_layout Plain Layout
3570 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3573 \begin_layout Plain Layout
3579 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3582 \begin_layout Plain Layout
3588 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3591 \begin_layout Plain Layout
3605 \begin_layout Standard
3609 \begin_layout Standard
3610 \begin_inset Tabular
3611 <lyxtabular version="3" rows="3" columns="2">
3612 <features tabularvalignment="middle">
3613 <column alignment="center" valignment="top" width="0">
3614 <column alignment="center" valignment="top" width="0">
3616 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3619 \begin_layout Plain Layout
3625 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3628 \begin_layout Plain Layout
3636 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3639 \begin_layout Plain Layout
3645 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3648 \begin_layout Plain Layout
3656 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3659 \begin_layout Plain Layout
3665 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3668 \begin_layout Plain Layout
3682 \begin_layout Subsection
3686 \begin_layout Standard
3687 Contains type of port #1 (as one line).
3688 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3689 If not present, defaults to 'gamepad'.
3692 \begin_layout Subsection
3696 \begin_layout Standard
3697 Contains type of port #2 (as one line).
3698 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3699 'justifier' and 'justifiers'.
3700 If not present, defaults to 'none'.
3703 \begin_layout Subsection
3707 \begin_layout Standard
3708 Contains name of the game (as one line).
3711 \begin_layout Subsection
3715 \begin_layout Standard
3716 Contains authors, one per line.
3717 Part before '|' is the full name, part after is the nickname.
3720 \begin_layout Subsection
3724 \begin_layout Standard
3726 \begin_inset Quotes eld
3730 \begin_inset Quotes erd
3734 Used to reject other saves.
3737 \begin_layout Subsection
3738 Member: controlsversion
3741 \begin_layout Standard
3743 \begin_inset Quotes eld
3747 \begin_inset Quotes erd
3751 Used to identify what controls are there.
3754 \begin_layout Subsection
3756 \begin_inset Quotes eld
3760 \begin_inset Quotes erd
3766 \begin_layout Standard
3767 Contains bsnes core version number (as one line).
3770 \begin_layout Subsection
3774 \begin_layout Standard
3775 Contains project ID (as one line).
3776 Used to identify if two movies are part of the same project.
3779 \begin_layout Subsection
3780 Member: {rom,slota,slotb}{,xml}.sha256
3783 \begin_layout Standard
3784 Contains SHA-256 of said ROM or ROM mapping file (as one line).
3785 Absent if corresponding file is absent.
3788 \begin_layout Subsection
3789 Member: moviesram.<name>
3792 \begin_layout Standard
3793 Raw binary startup SRAM of kind <name>.
3794 Only present in savestates and movies starting from SRAM.
3797 \begin_layout Subsection
3801 \begin_layout Standard
3802 Contains frame number (as one line) of frame movie was saved on.
3803 Only present in savestates.
3806 \begin_layout Subsection
3810 \begin_layout Standard
3811 Current value of lag counter (as one line).
3812 Only present in savestates.
3815 \begin_layout Subsection
3816 Member: pollcounters
3819 \begin_layout Standard
3820 Contains poll counters (currently 100 of them), one per line.
3821 Each line is raw poll count if DRDY is set for it.
3822 Otherwise it is negative poll count minus one.
3823 Only present in savestates.
3826 \begin_layout Subsection
3830 \begin_layout Standard
3831 Raw binary dump of host memory.
3832 Only present in savestates.
3835 \begin_layout Subsection
3839 \begin_layout Standard
3840 The raw binary savestate itself.
3841 Savestate detection uses this file, only present in savestates.
3844 \begin_layout Subsection
3848 \begin_layout Standard
3849 Screenshot of current frame.
3850 Only present in savestates.
3851 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
3853 Height of image is inferred from the width and size of data.
3856 \begin_layout Subsection
3860 \begin_layout Standard
3861 Raw binary SRAM of kind <name> at time of savestate.
3862 Only present in savestates.
3865 \begin_layout Subsection
3869 \begin_layout Standard
3870 The actual input track, one line per subframe (blank lines are skipped).
3873 \begin_layout Itemize
3874 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
3875 part of same frame as previous, otherwise it starts a new frame.
3878 \begin_layout Itemize
3879 First subframe must start a new frame.
3882 \begin_layout Standard
3883 Length of movie in frames is number of lines in input file that start a
3887 \begin_layout Subsection
3891 \begin_layout Standard
3892 Contains textual base-10 rerecord count (as one line; emulator just writes
3893 this, it doesn't read it) + 1.
3896 \begin_layout Subsection
3900 \begin_layout Standard
3901 This member stores set of load IDs.
3902 There is one load ID per rerecord (plus one corresponding to start of project).
3905 \begin_layout Itemize
3906 This member constists of concatenation of records
3909 \begin_layout Itemize
3910 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
3914 \begin_layout Itemize
3915 IDs are interpretted as 256-bit big-endian integers with warparound.
3918 \begin_layout Itemize
3919 Initial predicted ID is all zeroes.
3922 \begin_layout Standard
3923 Format of each record is:
3926 \begin_layout Itemize
3927 1 byte: Opcode byte.
3928 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
3932 \begin_layout Itemize
3933 32-prefixlen bytes of ID.
3936 \begin_layout Itemize
3937 countlen bytes of big-endian count (count).
3940 \begin_layout Standard
3941 Records are processed as follows:
3944 \begin_layout Itemize
3945 To form the first ID encoded by record, take the first prefixlen bytes predicted
3946 ID and append the read ID value to it.
3947 The result is the first ID encoded.
3950 \begin_layout Itemize
3951 If countlen is 0, record encodes 1 ID.
3954 \begin_layout Itemize
3955 If countlen is 1, record encodes 2+count IDs.
3958 \begin_layout Itemize
3959 If countlen is 2, record encodes 258+count IDs.
3962 \begin_layout Itemize
3963 If countlen is 3, record encodes 65794+count IDs.
3966 \begin_layout Itemize
3967 The new predicted ID is the next ID after last one encoded by the record.
3970 \begin_layout Standard
3971 The number of rerecords + 1 is equal to the sum of number of IDs encoded
3975 \begin_layout Subsection
3976 Member: starttime.second
3979 \begin_layout Standard
3980 Movie starting time, second part.
3981 Epoch is Unix epoch.
3982 Default is 1,000,000,000.
3985 \begin_layout Subsection
3986 Member: starttime.subsecond
3989 \begin_layout Standard
3990 Movie starting time, subsecond part.
3995 \begin_layout Subsection
3996 Member: savetime.second
3999 \begin_layout Standard
4000 Movie saving time, second part.
4001 Default is starttime.second.
4002 Only present in savestates.
4005 \begin_layout Subsection
4006 Member: savetime.subsecond
4009 \begin_layout Standard
4010 Movie saving time, subsecond part.
4011 Default is starttime.subsecond.
4012 Only present in savestates.
4015 \begin_layout Section
4016 Quick'n'dirty encode guide
4019 \begin_layout Enumerate
4020 Start the emulator and load the movie file.
4023 \begin_layout Enumerate
4024 Set large AVI option 'set-setting avi-large on'
4027 \begin_layout Enumerate
4028 Enable dumping 'dump-avi tmpdump'
4031 \begin_layout Enumerate
4032 Unpause and let it run until you want to end dumping.
4035 \begin_layout Enumerate
4036 Close the emulator (closing the window is the easiest way).
4040 \begin_layout Enumerate
4041 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4042 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4045 \begin_layout Enumerate
4046 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4049 \begin_layout Enumerate
4050 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4051 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4054 \begin_layout Enumerate
4055 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4056 Now final.mkv contains quick'n'dirty encode.
4059 \begin_layout Section
4060 Axis configurations for some gamepad types:
4063 \begin_layout Subsection
4067 \begin_layout Standard
4068 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4071 \begin_layout LyX-Code
4072 set-axis joystick0axis2 pressure-+
4075 \begin_layout LyX-Code
4076 set-axis joystick0axis5 pressure-+
4079 \begin_layout Itemize
4080 This is needed for SDL only.
4081 EVDEV sets those types correctly.
4084 \begin_layout Subsection
4086 \begin_inset Quotes eld
4090 \begin_inset Quotes erd
4096 \begin_layout Standard
4097 Axes 8-19 should be disabled.
4100 \begin_layout LyX-Code
4101 set-axis joystick0axis8 disabled
4104 \begin_layout LyX-Code
4105 set-axis joystick0axis9 disabled
4108 \begin_layout LyX-Code
4109 set-axis joystick0axis10 disabled
4112 \begin_layout LyX-Code
4113 set-axis joystick0axis11 disabled
4116 \begin_layout LyX-Code
4117 set-axis joystick0axis12 disabled
4120 \begin_layout LyX-Code
4121 set-axis joystick0axis13 disabled
4124 \begin_layout LyX-Code
4125 set-axis joystick0axis14 disabled
4128 \begin_layout LyX-Code
4129 set-axis joystick0axis15 disabled
4132 \begin_layout LyX-Code
4133 set-axis joystick0axis16 disabled
4136 \begin_layout LyX-Code
4137 set-axis joystick0axis17 disabled
4140 \begin_layout LyX-Code
4141 set-axis joystick0axis18 disabled
4144 \begin_layout LyX-Code
4145 set-axis joystick0axis19 disabled
4148 \begin_layout Section
4152 \begin_layout Subsection
4153 Problems from BSNES core:
4156 \begin_layout Itemize
4157 The whole pending save stuff.
4160 \begin_layout Itemize
4161 Lack of layer hiding.
4164 \begin_layout Itemize
4165 It is slow (especially accuracy).
4168 \begin_layout Itemize
4169 Firmwares can't be loaded from ZIP archives.
4172 \begin_layout Subsection
4176 \begin_layout Itemize
4177 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4180 \begin_layout Itemize
4181 Audio for last dumped frame is not itself dumped.
4184 \begin_layout Itemize
4185 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4188 \begin_layout Itemize
4189 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4192 \begin_layout Itemize
4193 No menus, command based interface (SDL).
4196 \begin_layout Itemize
4197 Long commands don't scroll.
4200 \begin_layout Itemize
4201 The SDL screen drawing is slow.
4204 \begin_layout Itemize
4205 Wxwidgets UI is still pretty buggy.
4208 \begin_layout Section
4212 \begin_layout Subsection
4216 \begin_layout Itemize
4220 \begin_layout Itemize
4221 Fix dumper video corruption with levels 10-18.
4224 \begin_layout Subsection
4228 \begin_layout Itemize
4232 \begin_layout Itemize
4233 Lots of code cleanups
4236 \begin_layout Itemize
4237 Lua interface to settings
4240 \begin_layout Itemize
4241 Allow specifying AVI borders without Lua
4244 \begin_layout Itemize
4245 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4248 \begin_layout Itemize
4249 on_snoop lua callback
4252 \begin_layout Itemize
4253 Faster movie loading and saving.
4256 \begin_layout Subsection
4260 \begin_layout Itemize
4264 \begin_layout Subsection
4268 \begin_layout Itemize
4272 \begin_layout Itemize
4273 Save jukebox functionality.
4276 \begin_layout Subsection
4280 \begin_layout Itemize
4281 Try to fix some nasty failing movie load edge cases
4284 \begin_layout Itemize
4285 Allow specifying scripts to run on command line.
4288 \begin_layout Subsection
4292 \begin_layout Itemize
4293 Major source code reorganization.
4296 \begin_layout Itemize
4297 Backup savestates before overwriting.
4300 \begin_layout Itemize
4301 Don't crash if loading initial state fails.
4304 \begin_layout Subsection
4308 \begin_layout Itemize
4312 \begin_layout Itemize
4313 Fix author name parsing
4316 \begin_layout Itemize
4317 Fix rerecord counting
4320 \begin_layout Itemize
4321 (SDL) Print messages to console if SDL is uninitialized
4324 \begin_layout Itemize
4325 Add movieinfo program
4328 \begin_layout Itemize
4329 Fix loading movies starting from SRAM.
4332 \begin_layout Subsection
4336 \begin_layout Itemize
4337 Add support for unattended dumping
4340 \begin_layout Itemize
4341 Fix compiling for Win32
4344 \begin_layout Itemize
4345 Don't lock up if sound can't be initialized
4348 \begin_layout Itemize
4349 Strip trailing CR from commands
4352 \begin_layout Itemize
4353 Don't try to do dubious things in global ctors (fix crash on startup)
4356 \begin_layout Subsection
4360 \begin_layout Itemize
4361 Small documentation tweaking
4364 \begin_layout Itemize
4368 \begin_layout Itemize
4369 Fix major bug in modifier matching
4372 \begin_layout Subsection
4376 \begin_layout Itemize
4377 Lots of documentation fixes
4380 \begin_layout Itemize
4381 Use dedicated callbacks for event backcomm., not commands.
4384 \begin_layout Itemize
4385 Ensure that the watchdog is not hit when executing delayed reset.
4388 \begin_layout Itemize
4389 Remove errant tab from joystick message.
4392 \begin_layout Subsection
4396 \begin_layout Itemize
4397 Make autofire operate in absolute time, not linear time
4400 \begin_layout Itemize
4401 Reinitialize controls when resuming from loadstate
4404 \begin_layout Itemize
4405 Some more code cleanups
4408 \begin_layout Itemize
4409 If Lua allocator fails, call OOM_panic()
4412 \begin_layout Itemize
4413 Byte/word/dword/qword sized host memory write/read functions.
4416 \begin_layout Itemize
4417 Dump at correct framerate if dumping interlaced NTSC (height=448).
4420 \begin_layout Subsection
4424 \begin_layout Itemize
4425 Actually include the complete source code
4428 \begin_layout Itemize
4432 \begin_layout Subsection
4436 \begin_layout Itemize
4437 Document {save,start}time.{,sub}second.
4440 \begin_layout Itemize
4441 Intercept time() from bsnes core.
4444 \begin_layout Subsection
4448 \begin_layout Itemize
4449 Allow disabling time() interception (allow build on Mac OS X)
4452 \begin_layout Itemize
4453 Use SDLMain on Mac OS X (make SDL not crash)
4456 \begin_layout Itemize
4457 Disable delayed resets (just plain too buggy for now).
4460 \begin_layout Itemize
4464 \begin_layout Itemize
4465 Use 16-bit for graphics/video instead of 32-bit.
4468 \begin_layout Itemize
4469 gui.rectangle/gui.pixel
4472 \begin_layout Itemize
4476 \begin_layout Itemize
4477 New CSCD writer implementation.
4480 \begin_layout Subsection
4484 \begin_layout Itemize
4485 Fix interaction of * and +.
4488 \begin_layout Itemize
4492 \begin_layout Itemize
4493 Use gettimeofday()/usleep(), these seem portable enough.
4496 \begin_layout Itemize
4497 Move joystick axis manipulation to keymapper code.
4500 \begin_layout Itemize
4501 Changes to how read-only works.
4504 \begin_layout Itemize
4505 Refactor controller input code.
4508 \begin_layout Subsection
4512 \begin_layout Itemize
4513 Fix mouseclick scale compensation.
4516 \begin_layout Itemize
4517 Draw area boundaries correctly in SDL code.
4520 \begin_layout Itemize
4524 \begin_layout Itemize
4525 Fix CSCD output (buffer overrun and race condition).
4528 \begin_layout Subsection
4532 \begin_layout Itemize
4533 JMD dumping support.
4536 \begin_layout Itemize
4537 Allow unattended dumping to JMD.
4540 \begin_layout Itemize
4544 \begin_layout Itemize
4545 Switch back to 32-bit colors.
4548 \begin_layout Itemize
4549 Add Lua function gui.color.
4552 \begin_layout Itemize
4553 Use some new C++11 features in GCC 4.6.
4556 \begin_layout Itemize
4557 Be prepared for core frequency changes.
4560 \begin_layout Itemize
4561 Pass colors in one chunk from Lua.
4564 \begin_layout Subsection
4568 \begin_layout Itemize
4569 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
4570 memory.read_vma() and memory.find_vma().
4573 \begin_layout Itemize
4574 Numerious documentation fixups
4577 \begin_layout Itemize
4578 RTC time format changed
4581 \begin_layout Itemize
4582 Reformat flags display
4585 \begin_layout Itemize
4586 Allow lua package name to be overridden
4589 \begin_layout Itemize
4590 SDUMP (high-quality dumping).
4593 \begin_layout Itemize
4594 Split platform support to plugins.
4597 \begin_layout Itemize
4598 Make all sound plugins support basic sound commands
4601 \begin_layout Itemize
4602 Support portaudio for sound.
4605 \begin_layout Itemize
4606 Allow disable Lua/SDL searching.
4609 \begin_layout Itemize
4610 Upconvert colors when copying lcscreen to screen.
4613 \begin_layout Itemize
4614 Reorganize source tree.
4617 \begin_layout Itemize
4618 Evdev joystick support.
4621 \begin_layout Itemize
4622 Refactor more code into generic window code.
4625 \begin_layout Subsection
4629 \begin_layout Itemize
4630 Refactor message handling.
4633 \begin_layout Itemize
4637 \begin_layout Itemize
4641 \begin_layout Itemize
4642 Finish pending saves before load/quit.
4645 \begin_layout Itemize
4646 Wxwidgets graphics plugin.
4649 \begin_layout Subsection
4653 \begin_layout Itemize
4654 Get rid of win32-crap.[ch]pp.
4657 \begin_layout Itemize
4658 Move files around a lot.
4661 \begin_layout Itemize
4662 Get rid of need for host C++ compiler.
4665 \begin_layout Itemize
4669 \begin_layout Itemize
4670 Refactor inter-component communication.
4673 \begin_layout Itemize
4677 \begin_layout Itemize
4678 Fix crash on multiline aliases.
4681 \begin_layout Itemize
4682 Load/Save settings in wxwidgets gui.
4685 \begin_layout Subsection
4689 \begin_layout Itemize
4690 Patch problems in bsnes core
4693 \begin_layout Itemize
4694 SNES is little-endian, not big-endian!
4697 \begin_layout Itemize
4698 Fix memory corruption in lcscreen::load()
4701 \begin_layout Subsection
4705 \begin_layout Itemize
4706 Fix interpretting repeat counts in rrdata loading.
4709 \begin_layout Itemize
4710 New lua callback: on_frame()
4713 \begin_layout Itemize
4714 Remove calls to runtosave() that aren't supposed to be there
4717 \begin_layout Itemize
4718 Lua function: movie.read_rtc()
4721 \begin_layout Itemize
4722 Ignore src/fonts/font.cpp
4725 \begin_layout Itemize
4726 Fix more bsnes core problems
4729 \begin_layout Itemize
4730 Control bsnes random seeding
4733 \begin_layout Itemize
4737 \begin_layout Itemize
4738 Some bsnes core debugging features (state dump and state hash)
4741 \begin_layout Itemize
4742 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
4743 it was 'lsnes rr0-beta21').
4746 \begin_layout Subsection
4750 \begin_layout Itemize
4751 Fix memory corruption due to macro/field mixup
4754 \begin_layout Itemize
4755 search-memory update
4758 \begin_layout Itemize
4759 Allow direct-mapped framebuffer
4762 \begin_layout Itemize
4763 SDL: Use SDL_ANYFORMAT if possible
4766 \begin_layout Itemize
4767 SDMP2SOX: 2s delay modes.
4770 \begin_layout Itemize
4774 \begin_layout Itemize
4775 Use sed -E, not sed -r.
4776 Fixes building on Mac OS X.
4779 \begin_layout Itemize
4780 Wxwidgets: Save jukebox on exit
4783 \begin_layout Itemize
4784 Fix RTC if using load-movie on savestate.
4787 \begin_layout Itemize
4788 Fix crash related to full console mode.
4791 \begin_layout Subsection
4795 \begin_layout Itemize
4796 Wxwidgets: Allow bringing application to foreground on Mac OS X.
4799 \begin_layout Itemize
4800 Wxwidgets: Allow compiling on Mac OS X.
4803 \begin_layout Itemize
4804 Use movie compare instead of movie hashing (faster save/load).
4807 \begin_layout Itemize
4811 \begin_layout Subsection
4815 \begin_layout Itemize
4816 sdmp2sox: Pad soundtrack if using -l or -L.
4819 \begin_layout Itemize
4820 sdmp2sox: Fix NTSC overscan.
4823 \begin_layout Itemize
4824 sdmp2sox: Add AR correction mode.
4827 \begin_layout Itemize
4828 call lua_close() when exiting.
4831 \begin_layout Itemize
4832 Fix zip_writer bug causing warnings from info-zip and error from advzip.
4835 \begin_layout Subsection
4839 \begin_layout Itemize
4840 Fix IPS patching code (use bsnes core IPS patcher).
4843 \begin_layout Itemize
4844 Implement BPS patching (using bsnes core IPS patcher).
4847 \begin_layout Itemize
4848 Add feature to load headered ROMs.
4851 \begin_layout Subsection
4855 \begin_layout Itemize
4856 Show command names when showing keybindings
4859 \begin_layout Subsection
4863 \begin_layout Itemize
4864 Fix pause-on-end to be actually controllable
4867 \begin_layout Itemize
4868 SDL: Poll all events in queue, not just first one (fixes slowness in command
4872 \begin_layout Itemize
4873 Wxwidgets: Fix ROM loading.
4876 \begin_layout Subsection
4880 \begin_layout Itemize
4881 Lua: Add gui.textH, gui.textV, gui.textHV
4884 \begin_layout Itemize
4885 Fix text colors on SDL on Mac OS X
4888 \begin_layout Itemize
4889 Mode 'F' for finished in readonly mode.
4892 \begin_layout Itemize
4896 \begin_layout Itemize
4897 Reliably pause after skip poll
4900 \begin_layout Itemize
4901 Split UI and core into their own threads
4904 \begin_layout Subsection
4908 \begin_layout Itemize
4909 Remove leftover dummy SRAM slot
4912 \begin_layout Itemize
4913 Fix controller numbers.
4916 \begin_layout Subsection
4920 \begin_layout Itemize
4921 Fix lsnes-dumpavi after interface change.
4924 \begin_layout Itemize
4925 Also give BSNES patches for v085.
4928 \begin_layout Itemize
4929 Pack movie data in memory.
4932 \begin_layout Subsection
4936 \begin_layout Itemize
4937 Fix framecount/length given when loading movies.
4940 \begin_layout Itemize
4941 Controller command memory leak fixes.
4944 \begin_layout Itemize
4945 Don't leak palette if freeing screen object.
4948 \begin_layout Subsection
4952 \begin_layout Itemize
4956 \begin_layout Itemize
4957 Wxwidgets: Allow controlling dumper from the menu.
4960 \begin_layout Subsection
4964 \begin_layout Itemize
4965 Rewrite parts of manual
4968 \begin_layout Itemize
4969 Lua: Make it work with Lua 5.2.
4972 \begin_layout Subsection
4976 \begin_layout Itemize
4977 Win32: Fix compile errors.
4980 \begin_layout Subsection
4984 \begin_layout Itemize
4985 Refactor controller input code.
4988 \begin_layout Itemize
4989 Fix crash when using command line on SDL / Mac OS X.
4992 \begin_layout Subsection
4996 \begin_layout Itemize
4997 Delete core/coroutine (obsolete)
5000 \begin_layout Itemize
5001 Lag input display by one frame.
5004 \begin_layout Itemize
5005 Rewind movie to beginning function.
5008 \begin_layout Itemize
5009 Fix wrong frame number reported to Lua when repainting after loadstate
5012 \begin_layout Itemize
5013 Support UI editing of jukebox
5016 \begin_layout Itemize
5017 Wxwidgets: Save settings on exit.
5020 \begin_layout Itemize
5021 Support ${project} for filenames
5024 \begin_layout Itemize
5025 SDL: Fix command history
5028 \begin_layout Subsection
5032 \begin_layout Itemize
5033 Fix some order-of-global-ctor bugs.
5036 \begin_layout Subsection
5040 \begin_layout Itemize
5041 Fix crashes when quitting on Win32.
5044 \begin_layout Subsection
5048 \begin_layout Itemize
5049 EVDEV: Queue keypresses from joystick, don't send directly
5052 \begin_layout Itemize
5053 Wxwidgets: Load-Preserve that actually works.
5056 \begin_layout Subsection
5060 \begin_layout Itemize
5061 Wxwidgets: GUI for memory search.
5064 \begin_layout Itemize
5065 Warn about using synchronous queue in UI callback.