1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
6 \use_default_options true
7 \maintain_unincluded_children false
9 \language_package default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
23 \default_output_format default
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
38 \paperorientation portrait
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
52 \paperpagestyle default
53 \tracking_changes false
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
97 \begin_layout Enumerate
101 \begin_layout Enumerate
102 Patched with included patches
106 \begin_layout Enumerate
110 \begin_layout Enumerate
114 \begin_layout Enumerate
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
122 \begin_layout Enumerate
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
142 \begin_layout Enumerate
143 Lua (if Lua support is needed).
147 \begin_layout Itemize
148 Version 5.1.X or 5.2X.
152 \begin_layout Enumerate
153 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
156 \begin_layout Section
160 \begin_layout Itemize
161 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
165 \begin_layout Itemize
166 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
169 \begin_layout Itemize
170 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
174 \begin_layout Itemize
175 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
176 ersion>', gambatte core)
179 \begin_layout Itemize
180 Edit options.build (or copy of that file)
183 \begin_layout Itemize
184 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
188 \begin_layout Section
192 \begin_layout Subsection
196 \begin_layout Subsubsection
197 --rom=<file> (lsnes/SDL, lsnes-avidump)
200 \begin_layout Standard
204 \begin_layout Subsection
208 \begin_layout Subsubsection
212 \begin_layout Standard
216 \begin_layout Subsubsection
217 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
220 \begin_layout Standard
221 Load <filename> as movie or savestate file.
222 All other session options are ignored.
225 \begin_layout Subsubsection
226 --port1=<device> (lsnes/SDL, bsnes core only)
229 \begin_layout Standard
234 \begin_layout Itemize
235 none: No device connected
238 \begin_layout Itemize
239 gamepad: One gamepad (the default)
242 \begin_layout Itemize
243 multitap: Four gamepads (warning: makes most games refuse to start)
246 \begin_layout Itemize
250 \begin_layout Subsubsection
251 --port2=<type> (lsnes/SDL, bsnes core only)
254 \begin_layout Standard
259 \begin_layout Itemize
260 none: No device connected (the default)
263 \begin_layout Itemize
267 \begin_layout Itemize
268 multitap: Four gamepads.
271 \begin_layout Itemize
275 \begin_layout Itemize
276 superscope: Super Scope
279 \begin_layout Itemize
280 justifier: One justifier
283 \begin_layout Itemize
284 justifiers: Two justifiers
287 \begin_layout Subsubsection
288 --gamename=<name> (lsnes/SDL)
291 \begin_layout Standard
292 Set the name of game to <name>.
296 \begin_layout Subsubsection
297 --author=<name> (lsnes/SDL)
300 \begin_layout Standard
301 Add author with full name of <name> (no nickname).
304 \begin_layout Subsubsection
305 --author=|<name> (lsnes/SDL)
308 \begin_layout Standard
309 Add author with nickname of <name> (no full name).
312 \begin_layout Subsubsection
313 --author=<fullname>|<nickname> (lsnes/SDL)
316 \begin_layout Standard
317 Add author with full name of <fullname> and nickname of <nickname>.
320 \begin_layout Subsubsection
321 --rtc-second=<value> (lsnes/SDL)
324 \begin_layout Standard
325 Set RTC second (0 is 1st January 1970 00:00:00Z).
326 Default is 1,000,000,000.
329 \begin_layout Subsubsection
330 --rtc-subsecond=<value> (lsnes/SDL)
333 \begin_layout Standard
340 \begin_layout Subsubsection
341 --anchor-savestate=<file> (lsnes/SDL)
344 \begin_layout Standard
345 Set the anchor savestate file.
348 \begin_layout Subsection
353 \begin_layout Subsubsection
354 --run=<file> (lsnes/SDL)
357 \begin_layout Standard
358 After running main RC file, run this file.
359 If multiple are specified, these execute in order specified.
362 \begin_layout Subsection
363 dump options (lsnes-dumpavi only)
366 \begin_layout Subsubsection
370 \begin_layout Standard
371 Set the dumper to use (required).
372 Use 'list' for listing of known dumpers.
375 \begin_layout Subsubsection
379 \begin_layout Standard
380 Set the mode to use (required for dumpers with multiple modes, forbidden
382 Use 'list' for known modes.
385 \begin_layout Subsubsection
389 \begin_layout Standard
392 \begin_inset Quotes eld
396 \begin_inset Quotes erd
402 \begin_layout Subsubsection
403 --option=<name>=<value>
406 \begin_layout Standard
407 Set option <name> to value <value>.
410 \begin_layout Subsubsection
414 \begin_layout Standard
415 Set number of frames to dump.
419 \begin_layout Subsubsection
423 \begin_layout Standard
424 Run specified lua script (lsnes-dumpavi does not have initialization files).
427 \begin_layout Subsubsection
428 --load-library=<library>
431 \begin_layout Standard
432 Load the specified shared object / dynamic library / dynamic link library.
435 \begin_layout Section
436 Startup file lsnes.rc
439 \begin_layout Standard
440 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
441 This file is located in:
444 \begin_layout Itemize
449 lsnes.rc (if %APPDATA% exists)
452 \begin_layout Itemize
453 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
456 \begin_layout Itemize
457 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
460 \begin_layout Itemize
461 All: ./lsnes.rc (fallback default).
464 \begin_layout Standard
465 If leading directories do not exist, attempt to create them is made.
468 \begin_layout Section
472 \begin_layout Itemize
473 Commands beginning with '*' invoke the corresponding command without alias
477 \begin_layout Itemize
478 If command starts with '+' (after possible '*'), the command is executed
479 as-is when button is pressed, and when button is released, it is executed
480 with '+' replaced by '-'.
483 \begin_layout Itemize
484 Commands without '+' execute only on negative edge (release).
487 \begin_layout Subsection
491 \begin_layout Standard
492 Settings control various aspects of emulator behaviour.
495 \begin_layout Subsubsection
496 set-setting <setting> <value>
499 \begin_layout Standard
500 Sets setting <setting> to value <value> (may be empty).
503 \begin_layout Subsubsection
504 unset-setting <setting>
507 \begin_layout Standard
508 Try to unset setting <setting> (not all settings can be unset).
511 \begin_layout Subsubsection
512 get-setting <setting>
515 \begin_layout Standard
516 Read value of setting <setting>
519 \begin_layout Subsubsection
523 \begin_layout Standard
524 Print names and values of all settings.
527 \begin_layout Subsection
531 \begin_layout Standard
532 Keybindings bind commands or aliases to keys (or pseudo-keys).
536 \begin_layout Standard
540 \begin_layout Itemize
541 Do not bind edge active (+/-) commands to keys with modifiers, that won't
545 \begin_layout Itemize
546 Names of keys and modifiers are platform-dependent.
549 \begin_layout Itemize
550 Be careful before binding pseudo-keys (such as joystick axes, buttons or
551 hats) with modifiers.
552 That may or may not work right.
555 \begin_layout Subsubsection
556 bind-key [<mod>/<modmask>] <key> <command>
559 \begin_layout Standard
560 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
561 ed list) are set as <mod> (comma-seperated list).
564 \begin_layout Standard
565 The names of keys and modifiers are platform-dependent.
568 \begin_layout Subsubsection
569 unbind-key [<mod>/<modmask>] <key>
572 \begin_layout Standard
573 Unbind command from <key> (with specified <mod> and <modmask>).
576 \begin_layout Subsubsection
577 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
578 | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
579 [plus=<val>] [tolerance=<val>]
582 \begin_layout Standard
583 Set axis parameters for axis <axis>.
586 \begin_layout Itemize
587 disabled: Disable axis
590 \begin_layout Itemize
594 \begin_layout Itemize
595 axis-inverse: Inverse axis
598 \begin_layout Itemize
599 pressure0-: Pressure sensitive.
600 Released at 0, pressed at -.
603 \begin_layout Itemize
604 pressure0+: Pressure sensitive.
605 Released at 0, pressed at +.
608 \begin_layout Itemize
609 pressure-0: Pressure sensitive.
610 Released at -, pressed at 0.
613 \begin_layout Itemize
614 pressure-+: Pressure sensitive.
615 Released at -, pressed at +.
618 \begin_layout Itemize
619 pressure+0: Pressure sensitive.
620 Released at +, pressed at 0.
623 \begin_layout Itemize
624 pressure+-: Pressure sensitive.
625 Released at +, pressed at -.
628 \begin_layout Itemize
629 minus=<val>: Calibration at extreme minus position (-32768-32767)
632 \begin_layout Itemize
633 zero=<val>: Calibration at neutral position (-32768-32767)
636 \begin_layout Itemize
637 plus=<val>: Calibration at extreme plus position (-32768-32767)
640 \begin_layout Itemize
641 tolerance=<value>: Center band tolerance (0<x<1).
642 The smaller the value, the more sensitive the control is.
645 \begin_layout Subsubsection
649 \begin_layout Standard
650 Print all key bindings in effect.
653 \begin_layout Subsection
657 \begin_layout Standard
658 Aliases bind command to sequence of commands.
659 After alias has been defined, it replaces the command it shadows.
662 \begin_layout Standard
666 \begin_layout Itemize
667 You can't alias command to itself.
670 \begin_layout Itemize
671 Aliases starting with +/- are edge active just like ordinary commands starting
675 \begin_layout Itemize
676 One command can be aliased to multiple commands.
679 \begin_layout Subsubsection
680 alias-command <command> <expansion>
683 \begin_layout Standard
684 Append <expansion> to alias <command>.
685 If alias does not already exist, it is created.
688 \begin_layout Subsubsection
689 unalias-command <command>
692 \begin_layout Standard
693 Clear alias expansion for <command>.
696 \begin_layout Subsubsection
700 \begin_layout Standard
701 Print all aliases and their expansions in effect.
704 \begin_layout Subsection
708 \begin_layout Standard
709 Run <script> as if commands were entered on the command line.
712 \begin_layout Subsection
716 \begin_layout Standard
717 Following commands control video dumping:
720 \begin_layout Subsubsection
721 start-dump <dumper> [<mode>] <prefix/filename>
724 \begin_layout Standard
725 Start dumping using dumper <dumper>.
726 If mode is present or not and if prefix or filename is present depends
727 on the dumper and dumper mode.
730 \begin_layout Standard
731 The following dumpers are available:
734 \begin_layout Itemize
735 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
739 \begin_layout Itemize
740 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
744 \begin_layout Itemize
745 Mode: cscd/pcm: CSCD video, PCM audio.
750 \begin_layout Itemize
751 INTERNAL-JMD: Internal .jmd dumper.
755 \begin_layout Itemize
759 \begin_layout Itemize
764 \begin_layout Itemize
765 INTERNAL-RAW: Internal RAW dumper.
769 \begin_layout Itemize
773 \begin_layout Itemize
777 \begin_layout Itemize
778 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
781 \begin_layout Itemize
782 Video is always upscaled to double resolution (512x448 / 512 x 478).
785 \begin_layout Itemize
786 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
791 \begin_layout Itemize
792 INTERNAL-SDMP: Internal SDMP dumper.
796 \begin_layout Itemize
797 Mode 'ms': Multi-segment.
801 \begin_layout Itemize
802 Mode 'ss': Single-segment.
807 \begin_layout Subsubsection
811 \begin_layout Standard
812 End dumping using <dumper>
815 \begin_layout Subsubsection
816 show-dumpers [<dumper>]
819 \begin_layout Standard
820 Show the list of dumpers or list of modes for <dumper>
823 \begin_layout Subsection
827 \begin_layout Standard
828 <address> may be decimal or hexadecimal (prefixed with '0x').
829 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
833 \begin_layout Standard
834 The available element <sizes> are:
837 \begin_layout Itemize
841 \begin_layout Itemize
845 \begin_layout Itemize
849 \begin_layout Itemize
853 \begin_layout Standard
854 When reading RAM and ROM, multi-byte reads/writes are big-endian.
855 When dealing with DSP memory, multi-byte reads/writes are native-endian
856 (do not use operand sizes exceeding DSP bitness, except dword is OK for
860 \begin_layout Subsubsection
861 read-<size> <address>
864 \begin_layout Standard
865 Read the value of byte in <address>.
868 \begin_layout Subsubsection
869 read-s<size> <address>
872 \begin_layout Standard
873 Read the value of signed byte in <address>.
876 \begin_layout Subsubsection
877 write-<size> <address> <value>
880 \begin_layout Standard
881 Write <value> to byte in address <address>.
884 \begin_layout Subsubsection
888 \begin_layout Standard
889 Reset the memory search
892 \begin_layout Subsubsection
896 \begin_layout Standard
897 Print number of candidates remaining
900 \begin_layout Subsubsection
904 \begin_layout Standard
905 Print all candidates remaining
908 \begin_layout Subsubsection
909 search-memory <usflag><sizeflag><op>
912 \begin_layout Standard
913 Searches memory for addresses satisfying criteria.
916 \begin_layout Standard
920 \begin_layout Itemize
924 \begin_layout Itemize
928 \begin_layout Standard
932 \begin_layout Itemize
936 \begin_layout Itemize
940 \begin_layout Itemize
944 \begin_layout Itemize
948 \begin_layout Standard
952 \begin_layout Itemize
953 lt: < previous value.
956 \begin_layout Itemize
957 le: <= previous value.
960 \begin_layout Itemize
961 eq: = previous value.
964 \begin_layout Itemize
965 ne: != previous value.
968 \begin_layout Itemize
969 ge: >= previous value.
972 \begin_layout Itemize
973 gt: > previous value.
976 \begin_layout Subsubsection
977 search-memory <sizeflag> <value>
980 \begin_layout Standard
981 Searches for addresses that currently have value <value>.
982 <sizeflag> is as in previous command.
985 \begin_layout Subsection
989 \begin_layout Standard
990 These commands are not available in lsnesrc, but are available after ROM
994 \begin_layout Subsubsection
998 \begin_layout Standard
999 Quits the emulator (asking for confirmation).
1000 If /y is given, no confirmation is asked.
1003 \begin_layout Subsubsection
1007 \begin_layout Standard
1008 Toggle paused/unpaused
1011 \begin_layout Subsubsection
1015 \begin_layout Standard
1017 If the button is still held after configurable timeout expires, game unpauses
1018 for the duration frame advance is held.
1021 \begin_layout Subsubsection
1025 \begin_layout Standard
1027 If the button is still held after configurable timeout expires, game unpauses
1028 for the duration frame advance is held.
1031 \begin_layout Subsubsection
1035 \begin_layout Standard
1036 Skip to first poll in frame after current.
1039 \begin_layout Subsubsection
1043 \begin_layout Standard
1044 Reset the SNES after this frame.
1047 \begin_layout Subsubsection
1051 \begin_layout Standard
1052 Load savestate <filename> in current mode.
1055 \begin_layout Subsubsection
1056 load-state <filename>
1059 \begin_layout Standard
1060 Load savestate <filename> in readwrite mode.
1063 \begin_layout Subsubsection
1064 load-readonly <filename>
1067 \begin_layout Standard
1068 Load savestate <filename> in readonly mode.
1071 \begin_layout Subsubsection
1072 load-preserve <filename>
1075 \begin_layout Standard
1076 Load savestate <filename> in readonly mode, preserving current events.
1079 \begin_layout Subsubsection
1080 load-movie <filename>
1083 \begin_layout Standard
1084 Load savestate <filename>, ignoring save part in readonly mode.
1087 \begin_layout Subsubsection
1088 save-state <filename>
1091 \begin_layout Standard
1092 Save system state to <filename> as soon as possible.
1095 \begin_layout Subsubsection
1096 save-movie <filename>
1099 \begin_layout Standard
1100 Save movie to <filename>.
1103 \begin_layout Subsubsection
1107 \begin_layout Standard
1108 Set read-write mode.
1111 \begin_layout Subsubsection
1115 \begin_layout Standard
1119 \begin_layout Subsubsection
1123 \begin_layout Standard
1124 Toggle between read-only and read-write modes.
1127 \begin_layout Subsubsection
1131 \begin_layout Standard
1132 Set name of the game to <name>
1135 \begin_layout Subsubsection
1139 \begin_layout Standard
1140 Print the name of the game.
1143 \begin_layout Subsubsection
1147 \begin_layout Standard
1148 Adds new author <author>.
1149 If <author> does not contain '|' it is full name.
1150 If it contains '|', '|' splits the full name and nickname.
1153 \begin_layout Subsubsection
1154 edit-author <num> <author>
1157 \begin_layout Standard
1158 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1162 \begin_layout Subsubsection
1166 \begin_layout Standard
1167 Remove author in slot <num>
1170 \begin_layout Subsubsection
1174 \begin_layout Standard
1178 \begin_layout Subsubsection
1179 test-1, test-2, test-3
1182 \begin_layout Standard
1183 Internal test commands.
1187 \begin_layout Subsubsection
1188 take-screenshot <filename>
1191 \begin_layout Standard
1192 Save screenshot to <filename>.
1195 \begin_layout Subsubsection
1196 +controller<num><button>
1199 \begin_layout Standard
1200 Press button <button> on controller <num> (1-8).
1201 The following button names are known:
1204 \begin_layout Itemize
1208 \begin_layout Itemize
1212 \begin_layout Itemize
1216 \begin_layout Itemize
1220 \begin_layout Itemize
1224 \begin_layout Itemize
1228 \begin_layout Itemize
1232 \begin_layout Itemize
1236 \begin_layout Itemize
1240 \begin_layout Itemize
1244 \begin_layout Itemize
1248 \begin_layout Itemize
1252 \begin_layout Itemize
1256 \begin_layout Itemize
1260 \begin_layout Itemize
1264 \begin_layout Itemize
1268 \begin_layout Subsubsection
1269 controllerh<num><button>
1272 \begin_layout Standard
1273 Hold/unhold button <button> on controller <num> (1-8).
1274 See +controller for button names.
1277 \begin_layout Subsubsection
1278 controllerf<num><button>
1281 \begin_layout Standard
1282 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1283 See +controller for button names.
1286 \begin_layout Standard
1287 Cauntion: Does not work properly if outside frame advance.
1290 \begin_layout Subsubsection
1291 autofire (<pattern>|-)...
1294 \begin_layout Standard
1295 Set autofire pattern.
1296 Each parameter is comma-separated list of button names (in form of 1start,
1297 1A, 2B, etc..) to hold on that frame.
1298 After reaching the end of pattern, the pattern restarts from the beginning.
1301 \begin_layout Subsubsection
1305 \begin_layout Standard
1309 \begin_layout Subsection
1313 \begin_layout Subsubsection
1314 cycle-jukebox-backward
1317 \begin_layout Standard
1318 Cycle save jukebox backwards.
1321 \begin_layout Subsubsection
1322 cycle-jukebox-forward
1325 \begin_layout Standard
1326 Cycle save jukebox forwards
1329 \begin_layout Subsubsection
1333 \begin_layout Standard
1334 Do load from jukebox (current mode).
1337 \begin_layout Subsubsection
1341 \begin_layout Standard
1342 Do state save to jukebox.
1345 \begin_layout Subsection
1349 \begin_layout Standard
1350 Only available if lua support is compiled in.
1353 \begin_layout Subsubsection
1354 evaluate-lua <luacode>
1357 \begin_layout Standard
1358 Run Lua code <luacode> using built-in Lua interpretter.
1361 \begin_layout Subsubsection
1365 \begin_layout Standard
1366 Run specified lua file using built-in Lua interpretter.
1369 \begin_layout Subsubsection
1373 \begin_layout Standard
1374 Clear the Lua VM state and restore to factory defaults.
1377 \begin_layout Subsection
1381 \begin_layout Subsubsection
1382 add-watch <name> <expression>
1385 \begin_layout Standard
1386 Adds new watch (or modifies old one).
1389 \begin_layout Subsubsection
1393 \begin_layout Standard
1397 \begin_layout Subsection
1401 \begin_layout Subsubsection
1402 enable-sound <on/off>
1405 \begin_layout Standard
1406 Enable/Disable sound.
1409 \begin_layout Subsubsection
1410 set-sound-device <device>
1413 \begin_layout Standard
1414 Set sound device to <device>
1417 \begin_layout Subsubsection
1421 \begin_layout Standard
1422 Show status of sound system.
1425 \begin_layout Subsubsection
1429 \begin_layout Standard
1430 Show all available devices.
1433 \begin_layout Subsubsection
1434 set-volume <multiplier>
1437 \begin_layout Standard
1438 Set the volume multiplier to <multiplier>.
1439 1 is normal volume, and higher numbers are louder.
1442 \begin_layout Subsubsection
1443 set-volume <multiplier>%
1446 \begin_layout Standard
1447 Set the volume multiplier to <multiplier> percent.
1448 100 is normal volume, and higher numbers are louder.
1451 \begin_layout Subsubsection
1452 set-volume <multiplier>dB
1455 \begin_layout Standard
1456 Set the volume multiplier to <multiplier> dB.
1457 0 is normal volume, and higher numbers are louder.
1458 The value may be negative.
1461 \begin_layout Subsection
1465 \begin_layout Subsubsection
1469 \begin_layout Standard
1470 Reloads the main ROM image from <file>.
1473 \begin_layout Subsection
1474 SDL Platform commands
1477 \begin_layout Standard
1478 The following are valid on SDL platform.
1481 \begin_layout Subsubsection
1485 \begin_layout Standard
1486 Asks to press a key and then identifies that (pseudo-)key.
1489 \begin_layout Subsubsection
1493 \begin_layout Standard
1494 Toggle between windowed/fullscreen console.
1497 \begin_layout Subsubsection
1501 \begin_layout Standard
1502 Scroll messages window as far back as it goes.
1505 \begin_layout Subsubsection
1509 \begin_layout Standard
1510 Scroll messages window as far forward as it goes.
1513 \begin_layout Subsubsection
1517 \begin_layout Standard
1518 Scroll messages window back one screenful.
1521 \begin_layout Subsubsection
1525 \begin_layout Standard
1526 Scroll messages window forward one screenful.
1529 \begin_layout Subsubsection
1530 prompt-command <command>
1533 \begin_layout Standard
1534 Enter command prompt, with prompt prepopulated with specified command.
1537 \begin_layout Section
1541 \begin_layout Subsection
1545 \begin_layout Subsubsection
1549 \begin_layout Standard
1550 Set where bsnes looks for firmware files.
1552 \begin_inset Quotes eld
1556 \begin_inset Quotes erd
1562 \begin_layout Subsubsection
1566 \begin_layout Standard
1568 Numeric, range is 0.001 to
1569 \begin_inset Quotes eld
1573 \begin_inset Quotes erd
1577 Default is native framerate.
1580 \begin_layout Subsubsection
1584 \begin_layout Standard
1585 Set save compression level (integer 0-9).
1586 Default is 7 (0 is no compression).
1589 \begin_layout Subsubsection
1593 \begin_layout Standard
1594 Set the frame advance timeout in milliseconds.
1595 Numeric integer, range is 0-999999999.
1599 \begin_layout Subsection
1603 \begin_layout Subsubsection
1607 \begin_layout Standard
1608 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1612 \begin_layout Subsubsection
1616 \begin_layout Standard
1617 AVI dumper: Set the default left border thickness (unless lua overrides)
1623 \begin_layout Subsubsection
1627 \begin_layout Standard
1628 AVI dumper: Set the default right border thickness (unless lua overrides)
1634 \begin_layout Subsubsection
1638 \begin_layout Standard
1639 AVI dumper: Set the default top border thickness (unless lua overrides)
1645 \begin_layout Subsubsection
1649 \begin_layout Standard
1650 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1656 \begin_layout Subsubsection
1660 \begin_layout Standard
1661 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1666 \begin_layout Subsubsection
1670 \begin_layout Standard
1671 AVI dumper: Compression level (0-18).
1674 \begin_layout Itemize
1675 Compression levels 10 and above are not compatible with stock CSCD codec.
1678 \begin_layout Itemize
1679 Recomended level is 7.
1682 \begin_layout Subsubsection
1686 \begin_layout Standard
1687 AVI dumper: Set method of determining the sound rate.
1690 \begin_layout Itemize
1691 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1692 128, 176.4 and 192 kHz.
1695 \begin_layout Itemize
1696 1: Round down to nearest integer.
1699 \begin_layout Itemize
1700 2: Round up to nearest ingeter.
1703 \begin_layout Subsection
1707 \begin_layout Subsubsection
1711 \begin_layout Standard
1712 JMD dumper: Compression level (0-9).
1715 \begin_layout Subsection
1716 SDL platform settings
1719 \begin_layout Subsubsection
1720 autorepeat-first-delay
1723 \begin_layout Standard
1724 Sets the delay for first character in typematic autorepeat.
1727 \begin_layout Subsubsection
1728 autorepeat-subsequent-delay
1731 \begin_layout Standard
1732 Sets the delay for subsequent characters in typematic autorepeat.
1735 \begin_layout Section
1739 \begin_layout Subsection
1740 Core (in main table)
1743 \begin_layout Subsubsection
1747 \begin_layout Standard
1748 Print line to message console.
1751 \begin_layout Subsubsection
1752 exec(string command)
1755 \begin_layout Standard
1756 Run command as it was entered on the command line
1759 \begin_layout Subsubsection
1763 \begin_layout Standard
1765 First is time since some epoch in seconds, the second is microseconds mod
1766 10^6 since that epoch.
1769 \begin_layout Subsubsection
1773 \begin_layout Standard
1774 Returns true if emulator has finished booting, false if not (on_startup()
1775 will be issued later).
1778 \begin_layout Subsubsection
1779 set_idle_timeout(number timeout)
1782 \begin_layout Standard
1783 Set number of microseconds to block idle for.
1784 After this timeout has expired, on_idle() will be called once.
1787 \begin_layout Subsubsection
1788 set_timer_timeout(number timeout)
1791 \begin_layout Standard
1792 Set number of microseconds to block timer for.
1793 After this timeout has expired, on_timer() will be called once.
1796 \begin_layout Subsubsection
1797 bus_address(number snesaddr)
1800 \begin_layout Standard
1801 Returns virtual address corresponding to specified address on SNES bus.
1804 \begin_layout Subsection
1808 \begin_layout Standard
1809 Bitwise logical functions and related.
1812 \begin_layout Subsubsection
1813 bit.none(number...) / bit.bnot(number...)
1816 \begin_layout Standard
1817 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1821 \begin_layout Subsubsection
1822 bit.any(number...) / bit.bor(number...)
1825 \begin_layout Standard
1826 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1829 \begin_layout Subsubsection
1830 bit.all(number...) / bit.band(number...)
1833 \begin_layout Standard
1834 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1838 \begin_layout Subsubsection
1839 bit.parity(number...) / bit.bxor(number...)
1842 \begin_layout Standard
1843 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1847 \begin_layout Subsubsection
1848 bit.lrotate(number base[, number amount[, number bits]])
1851 \begin_layout Standard
1852 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1855 \begin_layout Subsubsection
1856 bit.rrotate(number base[, number amount[, number bits]])
1859 \begin_layout Standard
1860 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1864 \begin_layout Subsubsection
1865 bit.lshift(number base[, number amount[, number bits]])
1868 \begin_layout Standard
1869 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1870 The new bits are filled with zeroes.
1873 \begin_layout Subsubsection
1874 bit.lrshift(number base[, number amount[, number bits]])
1877 \begin_layout Standard
1878 Shift bits-bit (max 48, default 48) number logically right by amount (default
1880 The new bits are filled with zeroes.
1883 \begin_layout Subsubsection
1884 bit.arshift(number base[, number amount[, number bits]])
1887 \begin_layout Standard
1888 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1890 The new bits are shifted in with copy of the high bit.
1893 \begin_layout Subsubsection
1894 bit.extract(number base[, number bit0[, number bit1,...]])
1897 \begin_layout Standard
1898 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1901 \begin_layout Standard
1905 \begin_layout Itemize
1906 Bit numbers up to 51 should work reliably (then things start falling apart
1907 due to double precision issues).
1910 \begin_layout Itemize
1911 There are two special bit positions, true and false, standing for always
1912 set bit and always clear bit.
1915 \begin_layout Subsubsection
1916 bit.value([number bit1[, number bit2,...]])
1919 \begin_layout Standard
1920 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1922 As special value, nil argument is no-op.
1925 \begin_layout Subsection
1929 \begin_layout Standard
1930 Most of these functions can only be called in on_paint and on_video callbacks.
1931 Exceptions are noted.
1934 \begin_layout Standard
1936 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1937 16-23 are the red component, bits 24-31 are alpha component (0 is fully
1938 opaque, 255 is almost transparent).
1939 -1 is the fully transparent color.
1940 Alpha values greater than 127 do work.
1943 \begin_layout Standard
1944 Origin of coordinates is at top left corner of game display area.
1945 Left and top gaps correspond to negative coordinates.
1948 \begin_layout Subsubsection
1952 \begin_layout Standard
1953 Returns 2-tuple (hresolution, vresolution).
1956 \begin_layout Subsubsection
1957 gui.<class>_gap(number gap)
1960 \begin_layout Standard
1961 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1965 \begin_layout Subsubsection
1966 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1969 \begin_layout Standard
1970 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1975 \begin_layout Itemize
1976 x: X-coordinate to start the drawing from (and x-coordinate at begining
1980 \begin_layout Itemize
1981 y: Y-coordinate to start the drawing from.
1984 \begin_layout Itemize
1985 text: The text to draw.
1988 \begin_layout Itemize
1989 fgc: Text color (default is 0xFFFFFF (white))
1992 \begin_layout Itemize
1993 bgc: Background color (default is -1 (transparent))
1996 \begin_layout Subsubsection
1997 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2000 \begin_layout Standard
2001 Like gui.text, but draw using double-width.
2004 \begin_layout Subsubsection
2005 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2008 \begin_layout Standard
2009 Like gui.text, but draw using double-height.
2012 \begin_layout Subsubsection
2013 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2016 \begin_layout Standard
2017 Like gui.text, but draw using double-width/double-height.
2020 \begin_layout Subsubsection
2021 gui.rectangle(number x, number y, number width, number height[, number thickness[
2022 , number outline[, number fill]]])
2025 \begin_layout Standard
2026 Draw rectangle on the GUI.
2030 \begin_layout Itemize
2031 x: X-coordinate of left edge.
2034 \begin_layout Itemize
2035 y: Y-coordinate of upper edge.
2038 \begin_layout Itemize
2039 width: Width of rectangle.
2042 \begin_layout Itemize
2043 height: Height of rectangle.
2046 \begin_layout Itemize
2047 thickness: Thickness of outline (default is 1).
2050 \begin_layout Itemize
2051 outline: Color of outline (default is 0xFFFFFF (white))
2054 \begin_layout Itemize
2055 fill: Color of fill (default is -1 (transparent))
2058 \begin_layout Subsubsection
2059 gui.box(number x, number y, number width, number height[, number thickness[,
2060 number outline1[,number outline2[, number fill]]]])
2063 \begin_layout Standard
2064 Draw rectangle with 3D effect on the GUI.
2068 \begin_layout Itemize
2069 x: X-coordinate of left edge.
2072 \begin_layout Itemize
2073 y: Y-coordinate of upper edge.
2076 \begin_layout Itemize
2077 width: Width of rectangle.
2080 \begin_layout Itemize
2081 height: Height of rectangle.
2084 \begin_layout Itemize
2085 thickness: Thickness of outline (default is 1).
2088 \begin_layout Itemize
2089 outline1: First color of outline (default is 0xFFFFFF (white))
2092 \begin_layout Itemize
2093 outline2: First color of outline (default is 0x808080 (dark gray))
2096 \begin_layout Itemize
2097 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2100 \begin_layout Subsubsection
2101 gui.pixel(number x, number y[, number color])
2104 \begin_layout Standard
2105 Draw one pixel on the GUI.
2109 \begin_layout Itemize
2110 x: X-coordinate of the pixel
2113 \begin_layout Itemize
2114 y: Y-coordinate of the pixel
2117 \begin_layout Itemize
2118 color: Color of the pixel (default is 0xFFFFFF (white))
2121 \begin_layout Subsubsection
2122 gui.crosshair(number x, number y[, number length[, number color]])
2125 \begin_layout Standard
2130 \begin_layout Itemize
2131 x: X-coordinate of the crosshair
2134 \begin_layout Itemize
2135 y: Y-coordinate of the crosshair
2138 \begin_layout Itemize
2139 length: Length of the crosshair lines (default 10).
2142 \begin_layout Itemize
2143 color: Color of the crosshair (default is 0xFFFFFF (white))
2146 \begin_layout Subsubsection
2147 gui.line(number x1, number y1, number x2, number y2[, number color])
2150 \begin_layout Standard
2155 \begin_layout Itemize
2156 x1: X-coordinate of one end.
2159 \begin_layout Itemize
2160 y1: Y-coordinate of one end.
2163 \begin_layout Itemize
2164 x2: X-coordinate of the other end.
2167 \begin_layout Itemize
2168 y2: Y-coordinate of the other end.
2171 \begin_layout Itemize
2172 color: Color of the line (default is 0xFFFFFF (white)).
2175 \begin_layout Subsubsection
2176 gui.circle(number x, number y, number r[, number thick[, number border[,
2180 \begin_layout Standard
2185 \begin_layout Itemize
2186 x: X-coordinate of the center
2189 \begin_layout Itemize
2190 y: Y-coordinate of the center
2193 \begin_layout Itemize
2194 r: The radius of the circle
2197 \begin_layout Itemize
2198 thick: Border thickness
2201 \begin_layout Itemize
2202 border: Border color (default is 0xFFFFFF (white))
2205 \begin_layout Itemize
2206 fill: Fill color (default is -1 (transparent)).
2209 \begin_layout Subsubsection
2210 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2213 \begin_layout Standard
2214 Draw a bitmap on screen with specified palette.
2218 \begin_layout Itemize
2219 x: X-coordinate of left edge.
2222 \begin_layout Itemize
2223 y: Y-coordinate of top edge.
2226 \begin_layout Itemize
2227 bitmap: The bitmap to draw
2230 \begin_layout Itemize
2231 palette: The palette to draw the bitmap using.
2234 \begin_layout Subsubsection
2235 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2238 \begin_layout Standard
2239 Draw a bitmap on screen.
2243 \begin_layout Itemize
2244 x: X-coordinate of left edge.
2247 \begin_layout Itemize
2248 y: Y-coordinate of top edge.
2251 \begin_layout Itemize
2252 bitmap: The bitmap to draw
2255 \begin_layout Subsubsection
2259 \begin_layout Standard
2260 Returns a new palette (initially all transparent).
2261 Can be used anywhere.
2264 \begin_layout Subsubsection
2265 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2268 \begin_layout Standard
2269 Returns a new bitmap/dbitmap.
2270 Can be used anywhere.
2274 \begin_layout Itemize
2275 w: The width of new bitmap
2278 \begin_layout Itemize
2279 h: The height of new bitmap
2282 \begin_layout Itemize
2283 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2286 \begin_layout Itemize
2287 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2290 \begin_layout Subsubsection
2291 gui.bitmap_load(string file)
2294 \begin_layout Standard
2295 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2297 Can be used anywhere.
2301 \begin_layout Itemize
2302 file: The name of file to load.
2305 \begin_layout Subsubsection
2306 gui.palette_set(palette palette, number index, number color)
2309 \begin_layout Standard
2310 Sets color in palette.
2311 Can be used anywhere.
2315 \begin_layout Itemize
2316 palette: The palette to manipulate
2319 \begin_layout Itemize
2320 index: Index of color (0-65535).
2323 \begin_layout Itemize
2324 color: The color value.
2327 \begin_layout Subsubsection
2328 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2331 \begin_layout Standard
2332 Sets specified pixel in bitmap.
2333 Can be used anywhere.
2337 \begin_layout Itemize
2338 bitmap: The bitmap to manipulate
2341 \begin_layout Itemize
2342 x: The x-coordinate of the pixel.
2345 \begin_layout Itemize
2346 y: The y-coordinate of the pixel.
2349 \begin_layout Itemize
2350 color: If bitmap is a bitmap, color index (0-65535).
2351 Otherwise color value.
2354 \begin_layout Subsubsection
2355 gui.bitmap_size(bitmap/dbitmap bitmap)
2358 \begin_layout Standard
2360 Can be used anywhere.
2364 \begin_layout Itemize
2365 bitmap: The bitmap to query.
2368 \begin_layout Standard
2369 The first return is the width, the second is the height.
2372 \begin_layout Subsubsection
2373 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2374 src, number sx, number sy, number w, number h[, number ck])
2377 \begin_layout Standard
2378 Blit a part of bitmap to another.
2379 Can be used anywhere.
2383 \begin_layout Itemize
2384 dest: Destination to blit to.
2387 \begin_layout Itemize
2388 dx: left edge of target
2391 \begin_layout Itemize
2392 dy: Top edge of target
2395 \begin_layout Itemize
2396 src: The source to blit from.
2397 Must be of the same type as destination.
2400 \begin_layout Itemize
2401 sx: left edge of source
2404 \begin_layout Itemize
2405 sy: Top edge of source
2408 \begin_layout Itemize
2412 \begin_layout Itemize
2413 h: Height of region.
2416 \begin_layout Itemize
2418 Pixels of this color are not blitted.
2422 \begin_layout Itemize
2423 If bitmaps are bitmaps, this is color index of colorkey.
2424 Values outside range 0-65535 cause no key to be used as colorkey.
2427 \begin_layout Itemize
2428 If bitmaps are dbitmaps, this color value of colorkey.
2431 \begin_layout Itemize
2432 May be absent or nil for no colorkey blit.
2436 \begin_layout Subsubsection
2440 \begin_layout Standard
2441 Request on_repaint() to happen as soon as possible.
2442 Can be used anywhere.
2445 \begin_layout Subsubsection
2446 gui.subframe_update(boolean on)
2449 \begin_layout Standard
2450 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2451 or not happen (on=false).
2452 Can be used anywhere.
2455 \begin_layout Subsubsection
2456 gui.screenshot(string filename)
2459 \begin_layout Standard
2460 Write PNG screenshot of the current frame (no drawings) to specified file.
2461 Can be used anywhere.
2464 \begin_layout Subsubsection
2465 gui.color(number r, number g, number b[, number a])
2468 \begin_layout Standard
2469 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2470 each component in scale 0-255.
2471 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2473 The default alpha is 256.
2476 \begin_layout Subsubsection
2477 gui.status(string name, string value)
2480 \begin_layout Standard
2482 \begin_inset Quotes eld
2486 \begin_inset Quotes erd
2489 to <value> in status area.
2490 Can be used anywhere.
2493 \begin_layout Subsubsection
2494 gui.rainbow(number step, number steps[, number color])
2497 \begin_layout Standard
2498 Perform hue rotation of color <color> (default bright red), by <step> steps.
2499 The number of steps per full rotation is given by absolute value of <steps>.
2502 \begin_layout Standard
2503 If <steps> is negative, the rotation will be counterclockwise.
2506 \begin_layout Subsection
2510 \begin_layout Standard
2512 Only available in on_input callback.
2515 \begin_layout Subsubsection
2516 input.get(number controller, number index)
2519 \begin_layout Standard
2520 Read the specified index (0-11) from specified controller (0-7).
2524 \begin_layout Itemize
2525 Uses physical controller numbering.
2526 Gamepad in port 2 is controller 4, not 1!
2529 \begin_layout Subsubsection
2530 input.set(number controller, number index, number value)
2533 \begin_layout Standard
2534 Write the specified index (0-11) from specified controller (0-7), storing
2539 \begin_layout Itemize
2540 Uses physical controller numbering.
2541 Gamepad in port 2 is controller 4, not 1!
2544 \begin_layout Subsubsection
2545 input.geta(number controller)
2548 \begin_layout Standard
2549 Get input state for entiere controller.
2550 Returns 13 return values.
2553 \begin_layout Itemize
2554 1st return value: Bitmask: bit i is set if i:th index is nonzero
2557 \begin_layout Itemize
2558 2nd-13th return value: value of i:th index.
2561 \begin_layout Subsubsection
2562 input.seta(number controller, number bitmask, number args...)
2565 \begin_layout Standard
2566 Set state for entiere controller.
2567 args is up to 12 values for indices (overriding values in bitmask if specified).
2570 \begin_layout Subsubsection
2571 input.controllertype(number controller)
2574 \begin_layout Standard
2575 Get the type of controller as string.
2579 \begin_layout Itemize
2583 \begin_layout Itemize
2587 \begin_layout Itemize
2591 \begin_layout Itemize
2595 \begin_layout Subsubsection
2596 input.reset([number cycles])
2599 \begin_layout Standard
2601 If cycles is greater than zero, do delayed reset.
2602 0 (or no value) causes immediate reset.
2605 \begin_layout Itemize
2606 Only available with subframe flag false.
2609 \begin_layout Subsubsection
2613 \begin_layout Standard
2614 Returns table of tables of all available keys and axes.
2615 The first table is indexed by key name (platform-dependent!), and the inner
2616 table has the following fields:
2619 \begin_layout Itemize
2620 last_rawval: Last reported raw value for control.
2623 \begin_layout Itemize
2624 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2625 pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2628 \begin_layout Itemize
2629 cal_left: Minimum calibration value.
2630 Only meaningful with axis and pressure types.
2633 \begin_layout Itemize
2634 cal_center: Center calibration value.
2635 Only meaningful with axis and pressure types.
2638 \begin_layout Itemize
2639 cal_right: Maximum calibration value.
2640 Only meaningful with axis and pressure types.
2643 \begin_layout Itemize
2644 cal_tolerance: Dead zone tolerance.
2645 Only meaningful with axis and pressure types.
2648 \begin_layout Subsubsection
2649 input.keyhook(key, state)
2652 \begin_layout Standard
2653 Requests that keyhook events to be sent for key (state=true) or not sent
2657 \begin_layout Subsection
2661 \begin_layout Standard
2662 Host memory handling (extra memory saved to savestates).
2663 Host memory starts empty.
2666 \begin_layout Subsubsection
2667 hostmemory.read(number address)
2670 \begin_layout Standard
2671 Reads hostmemory slot address.
2672 Slot numbers out of range return false instead of numeric.
2675 \begin_layout Subsubsection
2676 hostmemory.write(number address, number value)
2679 \begin_layout Standard
2680 Writes hostmemory slot with 0-255.
2681 Slot numbers out of range cause extension of host memory slot space.
2684 \begin_layout Subsubsection
2685 hostmemory.readbyte(number address)
2688 \begin_layout Standard
2689 Read unsigned byte (1 element) from given address.
2690 Slots out of range return false.
2693 \begin_layout Subsubsection
2694 hostmemory.writebyte(number address, number value)
2697 \begin_layout Standard
2698 Write unsigned byte (1 element) to given slot.
2699 Slot numbers out of range cause extension.
2702 \begin_layout Subsubsection
2703 hostmemory.readsbyte(number address)
2706 \begin_layout Standard
2707 Read signed byte (1 element) from given address.
2708 Slots out of range return false.
2711 \begin_layout Subsubsection
2712 hostmemory.writesbyte(number address, number value)
2715 \begin_layout Standard
2716 Write signed byte (1 element) to given slot.
2717 Slot numbers out of range cause extension.
2720 \begin_layout Subsubsection
2721 hostmemory.readword(number address)
2724 \begin_layout Standard
2725 Read unsigned word (2 elements) from given address.
2726 Slots out of range return false.
2729 \begin_layout Subsubsection
2730 hostmemory.writeword(number address, number value)
2733 \begin_layout Standard
2734 Write unsigned word (2 elements) to given slot.
2735 Slot numbers out of range cause extension.
2738 \begin_layout Subsubsection
2739 hostmemory.readsword(number address)
2742 \begin_layout Standard
2743 Read signed word (2 elements) from given address.
2744 Slots out of range return false.
2747 \begin_layout Subsubsection
2748 hostmemory.writesword(number address, number value)
2751 \begin_layout Standard
2752 Write signed word (2 elements) to given slot.
2753 Slot numbers out of range cause extension.
2756 \begin_layout Subsubsection
2757 hostmemory.readdword(number address)
2760 \begin_layout Standard
2761 Read unsigned doubleword (4 elements) from given address.
2762 Slots out of range return false.
2765 \begin_layout Subsubsection
2766 hostmemory.writedword(number address, number value)
2769 \begin_layout Standard
2770 Write unsigned doubleword (4 elements) to given slot.
2771 Slot numbers out of range cause extension.
2774 \begin_layout Subsubsection
2775 hostmemory.readsdword(number address)
2778 \begin_layout Standard
2779 Read signed doubleword (4 elements) from given address.
2780 Slots out of range return false.
2783 \begin_layout Subsubsection
2784 hostmemory.writesdword(number address, number value)
2787 \begin_layout Standard
2788 Write signed doubleword (4 elements) to given slot.
2789 Slot numbers out of range cause extension.
2792 \begin_layout Subsubsection
2793 hostmemory.readqword(number address)
2796 \begin_layout Standard
2797 Read unsigned quadword (8 elements) from given address.
2798 Slots out of range return false.
2801 \begin_layout Subsubsection
2802 hostmemory.writeqword(number address, number value)
2805 \begin_layout Standard
2806 Write unsigned quadword (4 elements) to given slot.
2807 Slot numbers out of range cause extension.
2810 \begin_layout Subsubsection
2811 hostmemory.readsqword(number address)
2814 \begin_layout Standard
2815 Read signed quadword (8 elements) from given address.
2816 Slots out of range return false.
2819 \begin_layout Subsubsection
2820 hostmemory.writesqword(number address, number value)
2823 \begin_layout Standard
2824 Write signed quadword (8 elements) to given slot.
2825 Slot numbers out of range cause extension.
2828 \begin_layout Subsection
2832 \begin_layout Standard
2836 \begin_layout Subsubsection
2837 movie.currentframe()
2840 \begin_layout Standard
2841 Return number of current frame.
2844 \begin_layout Subsubsection
2848 \begin_layout Standard
2849 Return number of frames in movie.
2852 \begin_layout Subsubsection
2856 \begin_layout Standard
2857 Return true if in readonly mode, false if in readwrite.
2860 \begin_layout Subsubsection
2861 movie.set_readwrite()
2864 \begin_layout Standard
2865 Set readwrite mode (does not cause on_readwrite callback).
2868 \begin_layout Subsubsection
2869 movie.frame_subframes(number frame)
2872 \begin_layout Standard
2873 Count number of subframes in specified frame (frame numbers are 1-based)
2877 \begin_layout Subsubsection
2878 movie.read_subframe(number frame, number subframe)
2881 \begin_layout Standard
2882 Read specifed subframe in specified frame and return data as array (100
2883 elements, numbered 0-99 currently).
2886 \begin_layout Subsubsection
2887 movie.unsafe_rewind([UNSAFEREWIND state])
2890 \begin_layout Standard
2891 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2894 \begin_layout Itemize
2895 If called without argument, causes emulator to start process of setting
2896 unsafe rewind point.
2897 When this has finished, callback on_set_rewind occurs, passing the rewind
2898 state to lua script.
2901 \begin_layout Itemize
2902 If called with argument, causes emulator rewind to passed rewind point as
2904 Readwrite mode is implicitly activated.
2907 \begin_layout Standard
2908 The following warnings apply to unsafe rewinding:
2911 \begin_layout Itemize
2912 There are no safety checks against misuse (that's what
2913 \begin_inset Quotes eld
2917 \begin_inset Quotes erd
2923 \begin_layout Itemize
2924 Only call rewind from timeline rewind point was set from.
2927 \begin_layout Itemize
2928 Only call rewind from after the rewind point was set.
2931 \begin_layout Subsection
2935 \begin_layout Standard
2936 Routines for settings manipulation
2939 \begin_layout Subsubsection
2940 settings.get(string name)
2943 \begin_layout Standard
2944 Get value of setting.
2945 If setting is blank, returns false.
2946 If setting value can't be obtained, returns (nil, error message).
2949 \begin_layout Subsubsection
2950 settings.set(string name, string value)
2953 \begin_layout Standard
2954 Set value of setting.
2955 If setting can't be set, returns (nil, error message).
2958 \begin_layout Subsubsection
2959 settings.is_set(string name)
2962 \begin_layout Standard
2963 Returns if setting is set.
2964 If setting does not exist, returns (nil, error message).
2967 \begin_layout Subsubsection
2968 settings.blank(string name)
2971 \begin_layout Standard
2972 Blanks a setting and returns true.
2973 If setting can't be blanked, returns (nil, error message).
2976 \begin_layout Subsection
2980 \begin_layout Standard
2981 Contains various functions for managing memory
2984 \begin_layout Subsubsection
2988 \begin_layout Standard
2989 Returns the number of VMAs
2992 \begin_layout Subsubsection
2993 memory.read_vma(number index)
2996 \begin_layout Standard
2997 Reads the specified VMA (indices start from zero).
2998 Trying to read invalid VMA gives nil.
2999 The read VMA is table with the following fields:
3002 \begin_layout Itemize
3003 region_name (string): The readable name of the VMA
3006 \begin_layout Itemize
3007 baseaddr (number): Base address of the VMA
3010 \begin_layout Itemize
3011 lastaddr (number): Last address in the VMA.
3014 \begin_layout Itemize
3015 size (number): The size of VMA in bytes.
3018 \begin_layout Itemize
3019 readonly (boolean): True of the VMA corresponds to ROM.
3022 \begin_layout Itemize
3023 iospace (boolean): True if the VMA is I/O space.
3026 \begin_layout Itemize
3027 native_endian (boolean): True if the VMA has native endian as opposed to
3031 \begin_layout Subsubsection
3032 memory.find_vma(number address)
3035 \begin_layout Standard
3036 Finds the VMA containing specified address.
3037 Returns table in the same format as read_vma or nil if not found.
3040 \begin_layout Subsubsection
3041 memory.readbyte(number address)
3044 \begin_layout Standard
3045 Reads the specified address as unsigned byte and returns the result.
3048 \begin_layout Subsubsection
3049 memory.readsbyte(number address)
3052 \begin_layout Standard
3053 Reads the specified address as signed byte and returns the result.
3056 \begin_layout Subsubsection
3057 memory.writebyte(number address, number value)
3060 \begin_layout Standard
3061 Writes the specified value (negative values undergo 2's complement) to specified
3062 address (as a byte).
3065 \begin_layout Subsubsection
3066 memory.readword(number address)
3069 \begin_layout Standard
3070 Reads the specified address as unsigned word and returns the result.
3073 \begin_layout Subsubsection
3074 memory.readsword(number address)
3077 \begin_layout Standard
3078 Reads the specified address as signed word and returns the result.
3081 \begin_layout Subsubsection
3082 memory.writeword(number address, number value)
3085 \begin_layout Standard
3086 Writes the specified value (negative values undergo 2's complement) to specified
3087 address (as a word).
3090 \begin_layout Subsubsection
3091 memory.readdword(number address)
3094 \begin_layout Standard
3095 Reads the specified address as unsigned doubleword and returns the result.
3098 \begin_layout Subsubsection
3099 memory.readsdword(number address)
3102 \begin_layout Standard
3103 Reads the specified address as signed doubleword and returns the result.
3106 \begin_layout Subsubsection
3107 memory.writedword(number address, number value)
3110 \begin_layout Standard
3111 Writes the specified value (negative values undergo 2's complement) to specified
3112 address (as a doubleword).
3115 \begin_layout Subsubsection
3116 memory.readqword(number address)
3119 \begin_layout Standard
3120 Reads the specified address as unsigned quadword and returns the result.
3123 \begin_layout Subsubsection
3124 memory.readsqword(number address)
3127 \begin_layout Standard
3128 Reads the specified address as signed quadword and returns the result.
3131 \begin_layout Subsubsection
3132 memory.writeqword(number address, number value)
3135 \begin_layout Standard
3136 Writes the specified value (negative values undergo 2's complement) to specified
3137 address (as a quadword).
3140 \begin_layout Subsubsection
3141 memory.hash_region(number base, number size)
3144 \begin_layout Standard
3145 Hash specified number of bytes starting from specified address and return
3149 \begin_layout Subsection
3153 \begin_layout Standard
3154 Contains copy of global variables from time of Lua initialization.
3158 \begin_layout Subsection
3162 \begin_layout Standard
3163 Various callbacks to Lua that can occur.
3166 \begin_layout Subsubsection
3167 Callback: on_paint(bool not_synth)
3170 \begin_layout Standard
3171 Called when screen is being painted.
3172 Any gui.* calls requiring graphic context draw on the screen.
3175 \begin_layout Standard
3176 not_synth is true if this hook is being called in response to received frame,
3180 \begin_layout Subsubsection
3181 Callback: on_video()
3184 \begin_layout Standard
3185 Called when video dump frame is being painted.
3186 Any gui.* calls requiring graphic context draw on the video.
3189 \begin_layout Subsubsection
3190 Callback: on_frame_emulated()
3193 \begin_layout Standard
3194 Called when emulating frame has completed and on_paint()/on_video() calls
3195 are about to be issued.
3198 \begin_layout Subsubsection
3199 Callback: on_frame()
3202 \begin_layout Standard
3203 Called on each starting whole frame.
3206 \begin_layout Subsubsection
3207 Callback: on_startup()
3210 \begin_layout Standard
3211 Called when the emulator is starting (lsnes.rc and --run files has been run).
3214 \begin_layout Subsubsection
3215 Callback: on_rewind()
3218 \begin_layout Standard
3219 Called when rewind movie to beginning has completed.
3222 \begin_layout Subsubsection
3223 Callback: on_pre_load(string name)
3226 \begin_layout Standard
3227 Called just before savestate/movie load occurs (note: loads are always delayed,
3228 so this occurs even when load was initiated by lua).
3231 \begin_layout Subsubsection
3232 Callback: on_err_load(string name)
3235 \begin_layout Standard
3236 Called if loadstate goes wrong.
3239 \begin_layout Subsubsection
3240 Callback: on_post_load(string name, boolean was_savestate)
3243 \begin_layout Standard
3244 Called on successful loadstate.
3245 was_savestate gives if this was a savestate or a movie.
3248 \begin_layout Subsubsection
3249 Callback: on_pre_save(string name, boolean is_savestate)
3252 \begin_layout Standard
3253 Called just before savestate save occurs (note: movie saves are synchronous
3254 and won't trigger these callbacks if called from Lua).
3257 \begin_layout Subsubsection
3258 Callback: on_err_save(string name)
3261 \begin_layout Standard
3262 Called if savestate goes wrong.
3265 \begin_layout Subsubsection
3266 Callback: on_post_save(string name, boolean is_savestate)
3269 \begin_layout Standard
3270 Called on successful savaestate.
3271 is_savestate gives if this was a savestate or a movie.
3274 \begin_layout Subsubsection
3278 \begin_layout Standard
3279 Called when emulator is shutting down.
3282 \begin_layout Subsubsection
3283 Callback: on_input(boolean subframe)
3286 \begin_layout Standard
3287 Called when emulator is just sending input to bsnes core.
3288 Warning: This is called even in readonly mode, but the results are ignored.
3291 \begin_layout Subsubsection
3292 Callback: on_reset()
3295 \begin_layout Standard
3296 Called when SNES is reset.
3299 \begin_layout Subsubsection
3300 Callback: on_readwrite()
3303 \begin_layout Standard
3304 Called when moving into readwrite mode as result of
3305 \begin_inset Quotes eld
3309 \begin_inset Quotes erd
3312 command (note: moving to rwmode by Lua won't trigger this, as per recursive
3316 \begin_layout Subsubsection
3317 Callback: on_snoop(number port, number controller, number index, number
3321 \begin_layout Standard
3322 Called each time bsnes asks for input.
3323 The value is the final value to be sent to bsnes core (readonly mode, autohold
3324 and autofire have been taken into account).
3325 Might be useful when translating movies to format suitable for console
3327 Note: There is no way to modify the value to be sent.
3330 \begin_layout Subsubsection
3331 Callback: on_keyhook(string keyname, table state)
3334 \begin_layout Standard
3335 Sent when key that has keyhook events requested changes state.
3336 Keyname is name of the key (group) and state is the state (same kind as
3337 table values in input.raw).
3340 \begin_layout Subsubsection
3344 \begin_layout Standard
3345 Called when requested by set_idle_timeout(), the timeout has expired and
3346 emulator is waiting.
3349 \begin_layout Subsubsection
3350 Callback: on_timer()
3353 \begin_layout Standard
3354 Called when requested by set_idle_timeout() and the timeout has expired
3355 (regardless if emulator is waiting).
3358 \begin_layout Subsubsection
3359 Callback: on_set_rewind(UNSAFEREWIND r)
3362 \begin_layout Standard
3363 Called when unsafe rewind object has been constructed.
3366 \begin_layout Subsubsection
3367 Callback: on_pre_rewind()
3370 \begin_layout Standard
3371 Called just before unsafe rewind is about to occur.
3374 \begin_layout Subsubsection
3375 Callback: on_post_rewind()
3378 \begin_layout Standard
3379 Called just after unsafe rewind has occured.
3382 \begin_layout Section
3383 Memory watch expression syntax
3386 \begin_layout Standard
3387 Memory watch expressions are in RPN (Reverse Polish Notation).
3388 At the end of expression, the top entry on stack is taken as the final
3392 \begin_layout Standard
3396 \begin_layout Itemize
3397 Evaluation order is strictly left to right.
3400 \begin_layout Itemize
3401 a is the entry on top of stack
3404 \begin_layout Itemize
3405 b is the entry immediately below top of stack
3408 \begin_layout Itemize
3409 ; separates values to be pushed (no intermediate pop).
3412 \begin_layout Itemize
3413 After end of element, all used stack slots are popped and all results are
3417 \begin_layout Itemize
3418 When pushing multiple values, the pushes occur in order shown.
3421 \begin_layout Standard
3422 The following operators are available:
3425 \begin_layout Itemize
3429 \begin_layout Itemize
3433 \begin_layout Itemize
3437 \begin_layout Itemize
3441 \begin_layout Itemize
3445 \begin_layout Itemize
3449 \begin_layout Itemize
3450 b : read_signed_byte(a)
3453 \begin_layout Itemize
3457 \begin_layout Itemize
3458 d : read_signed_dword(a)
3461 \begin_layout Itemize
3465 \begin_layout Itemize
3467 \begin_inset Formula $\pi$
3473 \begin_layout Itemize
3474 q : read_signed_qword(a)
3477 \begin_layout Itemize
3481 \begin_layout Itemize
3485 \begin_layout Itemize
3489 \begin_layout Itemize
3493 \begin_layout Itemize
3494 w : read_signed_word(a)
3497 \begin_layout Itemize
3501 \begin_layout Itemize
3502 B : read_unsigned_byte(a)
3505 \begin_layout Itemize
3506 C<number>z : Push number <number> to stack.
3509 \begin_layout Itemize
3510 D : read_unsigned_dword(a)
3513 \begin_layout Itemize
3514 C0x<number>z : Push number <number> (hexadecimal) to stack.
3517 \begin_layout Itemize
3518 Q : read_unsigned_qword(a)
3521 \begin_layout Itemize
3522 R<digit> : round a to <digit> digits.
3525 \begin_layout Itemize
3526 W : read_unsigned_word(a)
3529 \begin_layout Subsection
3533 \begin_layout Standard
3534 C0x007e0878zWC0x007e002czW-
3537 \begin_layout Enumerate
3538 Push value 0x7e0878 on top of stack (C0x007e0878z).
3541 \begin_layout Enumerate
3542 Pop the value on top of stack (0x7e0878), read word value at that address
3543 and push the result,call it x1 (W).
3546 \begin_layout Enumerate
3547 Push value 0x7e002c on top of stack (C0x007e002cz).
3550 \begin_layout Enumerate
3551 Pop the value on top of stack (0x7e002c), read word value at that address
3552 and push the result,call it x2 (W).
3555 \begin_layout Enumerate
3556 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3560 \begin_layout Enumerate
3561 Since the expression ends, the final memory watch result is the top one
3562 on stack, which is x2 - x1.
3565 \begin_layout Section
3566 Modifier and key names:
3569 \begin_layout Subsection
3573 \begin_layout Subsubsection
3577 \begin_layout Standard
3578 Following modifier names are known:
3581 \begin_layout Itemize
3582 ctrl, lctrl, rctrl: Control keys
3585 \begin_layout Itemize
3586 alt, lalt, ralt: ALT keys.
3589 \begin_layout Itemize
3590 shift, lshift, rshift: Shift keys.
3593 \begin_layout Itemize
3594 meta, lmeta, rmeta: Meta keys.
3597 \begin_layout Itemize
3598 num, caps: Numlock/Capslock (these are sticky!)
3601 \begin_layout Itemize
3605 \begin_layout Subsubsection
3609 \begin_layout Standard
3610 Following key names are known:
3613 \begin_layout Itemize
3614 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3615 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3616 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3617 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3618 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3619 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3620 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3621 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3622 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3623 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3624 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3625 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3626 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3627 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3628 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3629 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3630 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3631 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3632 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3633 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3634 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3635 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3636 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3637 break, menu, power, euro, undo
3640 \begin_layout Itemize
3641 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3642 hardware-dependent scan code of <n> (useful to bind those keys that don't
3643 have symbolic names).
3646 \begin_layout Subsubsection
3647 Joystick pseudo-keys:
3650 \begin_layout Itemize
3651 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3654 \begin_layout Itemize
3655 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3658 \begin_layout Itemize
3659 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3662 \begin_layout Itemize
3663 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3666 \begin_layout Itemize
3667 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3670 \begin_layout Itemize
3671 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3672 position (axis modes axis and axis_inverse).
3675 \begin_layout Itemize
3676 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3677 position (axis modes axis and axis_inverse).
3680 \begin_layout Itemize
3681 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3685 \begin_layout Subsubsection
3689 \begin_layout Itemize
3690 Escape: Enter/Exit Command mode, cancel modal dialogs.
3693 \begin_layout Itemize
3694 Return (also KPEnter): Execute command, ok modal dialog.
3697 \begin_layout Itemize
3698 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3702 \begin_layout Itemize
3703 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3707 \begin_layout Itemize
3708 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3711 \begin_layout Itemize
3712 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3715 \begin_layout Itemize
3716 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3719 \begin_layout Itemize
3720 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3723 \begin_layout Itemize
3725 if no num lock; command mode): Delete character to right of cursor.
3728 \begin_layout Itemize
3729 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3733 \begin_layout Itemize
3734 Backspace (command mode): Delete character to left of cursor.
3737 \begin_layout Itemize
3738 CTRL+LEFT (also ALT+B; command mode): Previous word.
3741 \begin_layout Itemize
3742 CTRL+RIGHT (also ALT+F; command mode): Next word.
3745 \begin_layout Itemize
3746 ALT+D (also CTRL+W; command mode): Delete word.
3749 \begin_layout Itemize
3750 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3753 \begin_layout Subsection
3757 \begin_layout Subsubsection
3761 \begin_layout Standard
3762 Following modifier names are known:
3765 \begin_layout Itemize
3769 \begin_layout Itemize
3773 \begin_layout Itemize
3777 \begin_layout Itemize
3781 \begin_layout Itemize
3785 \begin_layout Subsubsection
3789 \begin_layout Standard
3790 Following key names are known:
3793 \begin_layout Itemize
3794 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3795 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3796 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3797 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3798 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3799 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3800 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3801 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3802 pause, capital, end, home, lefT, up, right, down, select, print, execute,
3803 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3804 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3805 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3806 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3807 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3808 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3809 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3810 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3811 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3812 windows_right, windows_menu, command, special1, special2, special3, special4,
3813 special5, special6, special7, special8, special9, special10, special11,
3814 special12, special13, special14, special15, special16, special17, special18,
3815 special19, special20
3818 \begin_layout Section
3822 \begin_layout Standard
3823 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3824 (note: If you recompress it, do not use compression methods other than
3825 store and deflate and especially do not use encryption of any kind).
3828 \begin_layout Subsection
3829 Detecting clean start/SRAM/Savestate
3832 \begin_layout Itemize
3834 \begin_inset Quotes eld
3838 \begin_inset Quotes erd
3841 it is savestate, otherwise:
3844 \begin_layout Itemize
3845 If file has members with names starting
3846 \begin_inset Quotes eld
3850 \begin_inset Quotes erd
3853 it is movie starting from SRAM, otherwise:
3856 \begin_layout Itemize
3857 It is movie starting from clear state.
3860 \begin_layout Subsection
3864 \begin_layout Standard
3865 Type of game ROM and region (as one line).
3869 \begin_layout Standard
3870 \begin_inset Tabular
3871 <lyxtabular version="3" rows="8" columns="3">
3872 <features tabularvalignment="middle">
3873 <column alignment="center" valignment="top" width="0">
3874 <column alignment="center" valignment="top" width="0">
3875 <column alignment="center" valignment="top" width="0">
3877 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3880 \begin_layout Plain Layout
3886 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3889 \begin_layout Plain Layout
3895 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3898 \begin_layout Plain Layout
3906 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3909 \begin_layout Plain Layout
3915 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3918 \begin_layout Plain Layout
3924 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3927 \begin_layout Plain Layout
3935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3938 \begin_layout Plain Layout
3944 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3947 \begin_layout Plain Layout
3953 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3956 \begin_layout Plain Layout
3964 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3967 \begin_layout Plain Layout
3973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3976 \begin_layout Plain Layout
3982 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3985 \begin_layout Plain Layout
3993 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3996 \begin_layout Plain Layout
4002 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4005 \begin_layout Plain Layout
4011 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4014 \begin_layout Plain Layout
4022 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4025 \begin_layout Plain Layout
4031 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4034 \begin_layout Plain Layout
4040 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4043 \begin_layout Plain Layout
4051 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4054 \begin_layout Plain Layout
4060 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4063 \begin_layout Plain Layout
4069 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4072 \begin_layout Plain Layout
4080 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4083 \begin_layout Plain Layout
4089 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4092 \begin_layout Plain Layout
4098 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4101 \begin_layout Plain Layout
4115 \begin_layout Standard
4119 \begin_layout Standard
4120 \begin_inset Tabular
4121 <lyxtabular version="3" rows="3" columns="2">
4122 <features tabularvalignment="middle">
4123 <column alignment="center" valignment="top" width="0">
4124 <column alignment="center" valignment="top" width="0">
4126 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4129 \begin_layout Plain Layout
4135 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4138 \begin_layout Plain Layout
4146 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4149 \begin_layout Plain Layout
4155 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4158 \begin_layout Plain Layout
4166 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4169 \begin_layout Plain Layout
4175 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4178 \begin_layout Plain Layout
4192 \begin_layout Subsection
4196 \begin_layout Standard
4197 Contains type of port #1 (as one line).
4198 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4199 If not present, defaults to 'gamepad'.
4202 \begin_layout Subsection
4206 \begin_layout Standard
4207 Contains type of port #2 (as one line).
4208 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4209 'justifier' and 'justifiers'.
4210 If not present, defaults to 'none'.
4213 \begin_layout Subsection
4217 \begin_layout Standard
4218 Contains name of the game (as one line).
4221 \begin_layout Subsection
4225 \begin_layout Standard
4226 Contains authors, one per line.
4227 Part before '|' is the full name, part after is the nickname.
4230 \begin_layout Subsection
4234 \begin_layout Standard
4236 \begin_inset Quotes eld
4240 \begin_inset Quotes erd
4244 Used to reject other saves.
4247 \begin_layout Subsection
4248 Member: controlsversion
4251 \begin_layout Standard
4253 \begin_inset Quotes eld
4257 \begin_inset Quotes erd
4261 Used to identify what controls are there.
4264 \begin_layout Subsection
4266 \begin_inset Quotes eld
4270 \begin_inset Quotes erd
4276 \begin_layout Standard
4277 Contains bsnes core version number (as one line).
4280 \begin_layout Subsection
4284 \begin_layout Standard
4285 Contains project ID (as one line).
4286 Used to identify if two movies are part of the same project.
4289 \begin_layout Subsection
4290 Member: {rom,slota,slotb}{,xml}.sha256
4293 \begin_layout Standard
4294 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4295 Absent if corresponding file is absent.
4298 \begin_layout Subsection
4299 Member: moviesram.<name>
4302 \begin_layout Standard
4303 Raw binary startup SRAM of kind <name>.
4304 Only present in savestates and movies starting from SRAM.
4307 \begin_layout Subsection
4311 \begin_layout Standard
4312 Contains frame number (as one line) of frame movie was saved on.
4313 Only present in savestates.
4316 \begin_layout Subsection
4320 \begin_layout Standard
4321 Current value of lag counter (as one line).
4322 Only present in savestates.
4325 \begin_layout Subsection
4326 Member: pollcounters
4329 \begin_layout Standard
4330 Contains poll counters (currently 100 of them), one per line.
4331 Each line is raw poll count if DRDY is set for it.
4332 Otherwise it is negative poll count minus one.
4333 Only present in savestates.
4336 \begin_layout Subsection
4340 \begin_layout Standard
4341 Raw binary dump of host memory.
4342 Only present in savestates.
4345 \begin_layout Subsection
4349 \begin_layout Standard
4350 The raw binary savestate itself.
4351 Savestate detection uses this file, only present in savestates.
4354 \begin_layout Subsection
4358 \begin_layout Standard
4359 Screenshot of current frame.
4360 Only present in savestates.
4361 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4363 Height of image is inferred from the width and size of data.
4366 \begin_layout Subsection
4370 \begin_layout Standard
4371 Raw binary SRAM of kind <name> at time of savestate.
4372 Only present in savestates.
4375 \begin_layout Subsection
4379 \begin_layout Standard
4380 The actual input track, one line per subframe (blank lines are skipped).
4383 \begin_layout Itemize
4384 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4385 part of same frame as previous, otherwise it starts a new frame.
4388 \begin_layout Itemize
4389 First subframe must start a new frame.
4392 \begin_layout Standard
4393 Length of movie in frames is number of lines in input file that start a
4397 \begin_layout Subsection
4401 \begin_layout Standard
4402 Contains textual base-10 rerecord count (as one line; emulator just writes
4403 this, it doesn't read it) + 1.
4406 \begin_layout Subsection
4410 \begin_layout Standard
4411 This member stores set of load IDs.
4412 There is one load ID per rerecord (plus one corresponding to start of project).
4415 \begin_layout Itemize
4416 This member constists of concatenation of records
4419 \begin_layout Itemize
4420 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4424 \begin_layout Itemize
4425 IDs are interpretted as 256-bit big-endian integers with warparound.
4428 \begin_layout Itemize
4429 Initial predicted ID is all zeroes.
4432 \begin_layout Standard
4433 Format of each record is:
4436 \begin_layout Itemize
4437 1 byte: Opcode byte.
4438 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4442 \begin_layout Itemize
4443 32-prefixlen bytes of ID.
4446 \begin_layout Itemize
4447 countlen bytes of big-endian count (count).
4450 \begin_layout Standard
4451 Records are processed as follows:
4454 \begin_layout Itemize
4455 To form the first ID encoded by record, take the first prefixlen bytes predicted
4456 ID and append the read ID value to it.
4457 The result is the first ID encoded.
4460 \begin_layout Itemize
4461 If countlen is 0, record encodes 1 ID.
4464 \begin_layout Itemize
4465 If countlen is 1, record encodes 2+count IDs.
4468 \begin_layout Itemize
4469 If countlen is 2, record encodes 258+count IDs.
4472 \begin_layout Itemize
4473 If countlen is 3, record encodes 65794+count IDs.
4476 \begin_layout Itemize
4477 The new predicted ID is the next ID after last one encoded by the record.
4480 \begin_layout Standard
4481 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4485 \begin_layout Subsection
4486 Member: starttime.second
4489 \begin_layout Standard
4490 Movie starting time, second part.
4491 Epoch is Unix epoch.
4492 Default is 1,000,000,000.
4495 \begin_layout Subsection
4496 Member: starttime.subsecond
4499 \begin_layout Standard
4500 Movie starting time, subsecond part.
4505 \begin_layout Subsection
4506 Member: savetime.second
4509 \begin_layout Standard
4510 Movie saving time, second part.
4511 Default is starttime.second.
4512 Only present in savestates.
4515 \begin_layout Subsection
4516 Member: savetime.subsecond
4519 \begin_layout Standard
4520 Movie saving time, subsecond part.
4521 Default is starttime.subsecond.
4522 Only present in savestates.
4525 \begin_layout Section
4526 Known ROM extensions
4529 \begin_layout Itemize
4530 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4533 \begin_layout Itemize
4534 DMG cartridge ROMs: dmg, gb.
4537 \begin_layout Itemize
4538 GBC cartridge ROMs: cgb, gbc.
4541 \begin_layout Section
4545 \begin_layout Itemize
4546 The first line must be:
4547 \begin_inset Quotes eld
4551 \begin_inset Quotes erd
4557 \begin_layout Itemize
4558 There is one needed line:
4559 \begin_inset Quotes eld
4563 \begin_inset Quotes erd
4567 This sets system type to <systype>.
4568 The following system types are valid:
4572 \begin_layout Itemize
4576 \begin_layout Itemize
4577 bsx (BS-X non-slotted)
4580 \begin_layout Itemize
4581 bsxslotted (BS-X slotted)
4584 \begin_layout Itemize
4585 sufamiturbo (Sufami Turbo)
4588 \begin_layout Itemize
4589 sgb (Super Game Boy)
4592 \begin_layout Itemize
4596 \begin_layout Itemize
4597 gbc (Game Boy Color)
4600 \begin_layout Itemize
4601 gbc_gba (Game Boy Color with GBA initial register values)
4605 \begin_layout Itemize
4606 Optionally a region can be specified:
4607 \begin_inset Quotes eld
4611 \begin_inset Quotes erd
4615 The following values are valid:
4619 \begin_layout Itemize
4620 autodetect (Autodetect region: snes and sgb only)
4623 \begin_layout Itemize
4624 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4627 \begin_layout Itemize
4628 pal (PAL: snes, sgb)
4631 \begin_layout Itemize
4632 world (World: dmg, gbc, gbc_gba)
4636 \begin_layout Itemize
4637 ROM images are loaded as:
4638 \begin_inset Quotes eld
4642 \begin_inset Quotes erd
4646 The following types are valid:
4650 \begin_layout Itemize
4651 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4652 BIOS in bsx, bsxslotted, sufamiturbo)
4655 \begin_layout Itemize
4656 bsx (Cartridge ROM in bsx, bsxslotted)
4659 \begin_layout Itemize
4660 slot-a (Cartridge ROM in sufamiturbo)
4663 \begin_layout Itemize
4664 slot-b (Cartridge ROM in sufamiturbo)
4668 \begin_layout Itemize
4669 ROM markup can be loaded as:
4670 \begin_inset Quotes eld
4674 \begin_inset Quotes erd
4678 The types valid are the same as for ROMs.
4681 \begin_layout Itemize
4682 Patches can be loaded as
4683 \begin_inset Quotes eld
4686 patch[<offset>] <type> <file>
4687 \begin_inset Quotes erd
4691 The types are the same as for ROMs.
4695 \begin_layout Itemize
4696 Offset is given in form [+-]<number>.
4697 Usually offset is either +0 or -512.
4700 \begin_layout Itemize
4701 Default offset is +0.
4705 \begin_layout Subsection
4709 \begin_layout LyX-Code
4713 \begin_layout LyX-Code
4717 \begin_layout LyX-Code
4718 rom rom speedygonzales.sfc
4721 \begin_layout LyX-Code
4722 patch-512 rom sonicthehedgehog.ips
4725 \begin_layout Subsection
4729 \begin_layout LyX-Code
4733 \begin_layout LyX-Code
4737 \begin_layout LyX-Code
4738 rom rom supergameboy.sfc
4741 \begin_layout LyX-Code
4742 rom dmg megamanV.dmg
4745 \begin_layout Section
4746 Quick'n'dirty encode guide
4749 \begin_layout Enumerate
4750 Start the emulator and load the ROM and movie file.
4753 \begin_layout Enumerate
4754 Set large AVI option 'set-setting avi-large on'
4757 \begin_layout Enumerate
4758 Enable dumping 'dump-avi tmpdump'
4761 \begin_layout Enumerate
4762 Unpause and let it run until you want to end dumping.
4765 \begin_layout Enumerate
4766 Close the emulator (closing the window is the easiest way).
4770 \begin_layout Enumerate
4771 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4772 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4775 \begin_layout Enumerate
4776 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4779 \begin_layout Enumerate
4780 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4781 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4784 \begin_layout Enumerate
4785 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4786 Now final.mkv contains quick'n'dirty encode.
4789 \begin_layout Section
4790 Axis configurations for some gamepad types:
4793 \begin_layout Subsection
4797 \begin_layout Standard
4798 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4801 \begin_layout LyX-Code
4802 set-axis joystick0axis2 pressure-+
4805 \begin_layout LyX-Code
4806 set-axis joystick0axis5 pressure-+
4809 \begin_layout Itemize
4810 This is needed for SDL only.
4811 EVDEV sets those types correctly.
4814 \begin_layout Subsection
4816 \begin_inset Quotes eld
4820 \begin_inset Quotes erd
4826 \begin_layout Standard
4827 Axes 8-19 should be disabled.
4830 \begin_layout LyX-Code
4831 set-axis joystick0axis8 disabled
4834 \begin_layout LyX-Code
4835 set-axis joystick0axis9 disabled
4838 \begin_layout LyX-Code
4839 set-axis joystick0axis10 disabled
4842 \begin_layout LyX-Code
4843 set-axis joystick0axis11 disabled
4846 \begin_layout LyX-Code
4847 set-axis joystick0axis12 disabled
4850 \begin_layout LyX-Code
4851 set-axis joystick0axis13 disabled
4854 \begin_layout LyX-Code
4855 set-axis joystick0axis14 disabled
4858 \begin_layout LyX-Code
4859 set-axis joystick0axis15 disabled
4862 \begin_layout LyX-Code
4863 set-axis joystick0axis16 disabled
4866 \begin_layout LyX-Code
4867 set-axis joystick0axis17 disabled
4870 \begin_layout LyX-Code
4871 set-axis joystick0axis18 disabled
4874 \begin_layout LyX-Code
4875 set-axis joystick0axis19 disabled
4878 \begin_layout Section
4882 \begin_layout Subsection
4883 Problems from BSNES core:
4886 \begin_layout Itemize
4887 The whole pending save stuff.
4890 \begin_layout Itemize
4891 Lack of layer hiding.
4894 \begin_layout Itemize
4895 It is slow (especially accuracy).
4898 \begin_layout Itemize
4899 Firmwares can't be loaded from ZIP archives.
4902 \begin_layout Subsection
4906 \begin_layout Itemize
4907 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4910 \begin_layout Itemize
4911 Audio for last dumped frame is not itself dumped.
4914 \begin_layout Itemize
4915 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4918 \begin_layout Itemize
4919 No menus, command based interface (SDL).
4922 \begin_layout Itemize
4923 Long commands don't scroll.
4926 \begin_layout Section
4930 \begin_layout Subsection
4934 \begin_layout Itemize
4938 \begin_layout Itemize
4939 Fix dumper video corruption with levels 10-18.
4942 \begin_layout Subsection
4946 \begin_layout Itemize
4950 \begin_layout Itemize
4951 Lots of code cleanups
4954 \begin_layout Itemize
4955 Lua interface to settings
4958 \begin_layout Itemize
4959 Allow specifying AVI borders without Lua
4962 \begin_layout Itemize
4963 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4966 \begin_layout Itemize
4967 on_snoop lua callback
4970 \begin_layout Itemize
4971 Faster movie loading and saving.
4974 \begin_layout Subsection
4978 \begin_layout Itemize
4982 \begin_layout Subsection
4986 \begin_layout Itemize
4990 \begin_layout Itemize
4991 Save jukebox functionality.
4994 \begin_layout Subsection
4998 \begin_layout Itemize
4999 Try to fix some nasty failing movie load edge cases
5002 \begin_layout Itemize
5003 Allow specifying scripts to run on command line.
5006 \begin_layout Subsection
5010 \begin_layout Itemize
5011 Major source code reorganization.
5014 \begin_layout Itemize
5015 Backup savestates before overwriting.
5018 \begin_layout Itemize
5019 Don't crash if loading initial state fails.
5022 \begin_layout Subsection
5026 \begin_layout Itemize
5030 \begin_layout Itemize
5031 Fix author name parsing
5034 \begin_layout Itemize
5035 Fix rerecord counting
5038 \begin_layout Itemize
5039 (SDL) Print messages to console if SDL is uninitialized
5042 \begin_layout Itemize
5043 Add movieinfo program
5046 \begin_layout Itemize
5047 Fix loading movies starting from SRAM.
5050 \begin_layout Subsection
5054 \begin_layout Itemize
5055 Add support for unattended dumping
5058 \begin_layout Itemize
5059 Fix compiling for Win32
5062 \begin_layout Itemize
5063 Don't lock up if sound can't be initialized
5066 \begin_layout Itemize
5067 Strip trailing CR from commands
5070 \begin_layout Itemize
5071 Don't try to do dubious things in global ctors (fix crash on startup)
5074 \begin_layout Subsection
5078 \begin_layout Itemize
5079 Small documentation tweaking
5082 \begin_layout Itemize
5086 \begin_layout Itemize
5087 Fix major bug in modifier matching
5090 \begin_layout Subsection
5094 \begin_layout Itemize
5095 Lots of documentation fixes
5098 \begin_layout Itemize
5099 Use dedicated callbacks for event backcomm., not commands.
5102 \begin_layout Itemize
5103 Ensure that the watchdog is not hit when executing delayed reset.
5106 \begin_layout Itemize
5107 Remove errant tab from joystick message.
5110 \begin_layout Subsection
5114 \begin_layout Itemize
5115 Make autofire operate in absolute time, not linear time
5118 \begin_layout Itemize
5119 Reinitialize controls when resuming from loadstate
5122 \begin_layout Itemize
5123 Some more code cleanups
5126 \begin_layout Itemize
5127 If Lua allocator fails, call OOM_panic()
5130 \begin_layout Itemize
5131 Byte/word/dword/qword sized host memory write/read functions.
5134 \begin_layout Itemize
5135 Dump at correct framerate if dumping interlaced NTSC (height=448).
5138 \begin_layout Subsection
5142 \begin_layout Itemize
5143 Actually include the complete source code
5146 \begin_layout Itemize
5150 \begin_layout Subsection
5154 \begin_layout Itemize
5155 Document {save,start}time.{,sub}second.
5158 \begin_layout Itemize
5159 Intercept time() from bsnes core.
5162 \begin_layout Subsection
5166 \begin_layout Itemize
5167 Allow disabling time() interception (allow build on Mac OS X)
5170 \begin_layout Itemize
5171 Use SDLMain on Mac OS X (make SDL not crash)
5174 \begin_layout Itemize
5175 Disable delayed resets (just plain too buggy for now).
5178 \begin_layout Itemize
5182 \begin_layout Itemize
5183 Use 16-bit for graphics/video instead of 32-bit.
5186 \begin_layout Itemize
5187 gui.rectangle/gui.pixel
5190 \begin_layout Itemize
5194 \begin_layout Itemize
5195 New CSCD writer implementation.
5198 \begin_layout Subsection
5202 \begin_layout Itemize
5203 Fix interaction of * and +.
5206 \begin_layout Itemize
5210 \begin_layout Itemize
5211 Use gettimeofday()/usleep(), these seem portable enough.
5214 \begin_layout Itemize
5215 Move joystick axis manipulation to keymapper code.
5218 \begin_layout Itemize
5219 Changes to how read-only works.
5222 \begin_layout Itemize
5223 Refactor controller input code.
5226 \begin_layout Subsection
5230 \begin_layout Itemize
5231 Fix mouseclick scale compensation.
5234 \begin_layout Itemize
5235 Draw area boundaries correctly in SDL code.
5238 \begin_layout Itemize
5242 \begin_layout Itemize
5243 Fix CSCD output (buffer overrun and race condition).
5246 \begin_layout Subsection
5250 \begin_layout Itemize
5251 JMD dumping support.
5254 \begin_layout Itemize
5255 Allow unattended dumping to JMD.
5258 \begin_layout Itemize
5262 \begin_layout Itemize
5263 Switch back to 32-bit colors.
5266 \begin_layout Itemize
5267 Add Lua function gui.color.
5270 \begin_layout Itemize
5271 Use some new C++11 features in GCC 4.6.
5274 \begin_layout Itemize
5275 Be prepared for core frequency changes.
5278 \begin_layout Itemize
5279 Pass colors in one chunk from Lua.
5282 \begin_layout Subsection
5286 \begin_layout Itemize
5287 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5288 memory.read_vma() and memory.find_vma().
5291 \begin_layout Itemize
5292 Numerious documentation fixups
5295 \begin_layout Itemize
5296 RTC time format changed
5299 \begin_layout Itemize
5300 Reformat flags display
5303 \begin_layout Itemize
5304 Allow lua package name to be overridden
5307 \begin_layout Itemize
5308 SDUMP (high-quality dumping).
5311 \begin_layout Itemize
5312 Split platform support to plugins.
5315 \begin_layout Itemize
5316 Make all sound plugins support basic sound commands
5319 \begin_layout Itemize
5320 Support portaudio for sound.
5323 \begin_layout Itemize
5324 Allow disable Lua/SDL searching.
5327 \begin_layout Itemize
5328 Upconvert colors when copying lcscreen to screen.
5331 \begin_layout Itemize
5332 Reorganize source tree.
5335 \begin_layout Itemize
5336 Evdev joystick support.
5339 \begin_layout Itemize
5340 Refactor more code into generic window code.
5343 \begin_layout Subsection
5347 \begin_layout Itemize
5348 Refactor message handling.
5351 \begin_layout Itemize
5355 \begin_layout Itemize
5359 \begin_layout Itemize
5360 Finish pending saves before load/quit.
5363 \begin_layout Itemize
5364 Wxwidgets graphics plugin.
5367 \begin_layout Subsection
5371 \begin_layout Itemize
5372 Get rid of win32-crap.[ch]pp.
5375 \begin_layout Itemize
5376 Move files around a lot.
5379 \begin_layout Itemize
5380 Get rid of need for host C++ compiler.
5383 \begin_layout Itemize
5387 \begin_layout Itemize
5388 Refactor inter-component communication.
5391 \begin_layout Itemize
5395 \begin_layout Itemize
5396 Fix crash on multiline aliases.
5399 \begin_layout Itemize
5400 Load/Save settings in wxwidgets gui.
5403 \begin_layout Subsection
5407 \begin_layout Itemize
5408 Patch problems in bsnes core
5411 \begin_layout Itemize
5412 SNES is little-endian, not big-endian!
5415 \begin_layout Itemize
5416 Fix memory corruption in lcscreen::load()
5419 \begin_layout Subsection
5423 \begin_layout Itemize
5424 Fix interpretting repeat counts in rrdata loading.
5427 \begin_layout Itemize
5428 New lua callback: on_frame()
5431 \begin_layout Itemize
5432 Remove calls to runtosave() that aren't supposed to be there
5435 \begin_layout Itemize
5436 Lua function: movie.read_rtc()
5439 \begin_layout Itemize
5440 Ignore src/fonts/font.cpp
5443 \begin_layout Itemize
5444 Fix more bsnes core problems
5447 \begin_layout Itemize
5448 Control bsnes random seeding
5451 \begin_layout Itemize
5455 \begin_layout Itemize
5456 Some bsnes core debugging features (state dump and state hash)
5459 \begin_layout Itemize
5460 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5461 it was 'lsnes rr0-beta21').
5464 \begin_layout Subsection
5468 \begin_layout Itemize
5469 Fix memory corruption due to macro/field mixup
5472 \begin_layout Itemize
5473 search-memory update
5476 \begin_layout Itemize
5477 Allow direct-mapped framebuffer
5480 \begin_layout Itemize
5481 SDL: Use SDL_ANYFORMAT if possible
5484 \begin_layout Itemize
5485 SDMP2SOX: 2s delay modes.
5488 \begin_layout Itemize
5492 \begin_layout Itemize
5493 Use sed -E, not sed -r.
5494 Fixes building on Mac OS X.
5497 \begin_layout Itemize
5498 Wxwidgets: Save jukebox on exit
5501 \begin_layout Itemize
5502 Fix RTC if using load-movie on savestate.
5505 \begin_layout Itemize
5506 Fix crash related to full console mode.
5509 \begin_layout Subsection
5513 \begin_layout Itemize
5514 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5517 \begin_layout Itemize
5518 Wxwidgets: Allow compiling on Mac OS X.
5521 \begin_layout Itemize
5522 Use movie compare instead of movie hashing (faster save/load).
5525 \begin_layout Itemize
5529 \begin_layout Subsection
5533 \begin_layout Itemize
5534 sdmp2sox: Pad soundtrack if using -l or -L.
5537 \begin_layout Itemize
5538 sdmp2sox: Fix NTSC overscan.
5541 \begin_layout Itemize
5542 sdmp2sox: Add AR correction mode.
5545 \begin_layout Itemize
5546 call lua_close() when exiting.
5549 \begin_layout Itemize
5550 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5553 \begin_layout Subsection
5557 \begin_layout Itemize
5558 Fix IPS patching code (use bsnes core IPS patcher).
5561 \begin_layout Itemize
5562 Implement BPS patching (using bsnes core IPS patcher).
5565 \begin_layout Itemize
5566 Add feature to load headered ROMs.
5569 \begin_layout Subsection
5573 \begin_layout Itemize
5574 Show command names when showing keybindings
5577 \begin_layout Subsection
5581 \begin_layout Itemize
5582 Fix pause-on-end to be actually controllable
5585 \begin_layout Itemize
5586 SDL: Poll all events in queue, not just first one (fixes slowness in command
5590 \begin_layout Itemize
5591 Wxwidgets: Fix ROM loading.
5594 \begin_layout Subsection
5598 \begin_layout Itemize
5599 Lua: Add gui.textH, gui.textV, gui.textHV
5602 \begin_layout Itemize
5603 Fix text colors on SDL on Mac OS X
5606 \begin_layout Itemize
5607 Mode 'F' for finished in readonly mode.
5610 \begin_layout Itemize
5614 \begin_layout Itemize
5615 Reliably pause after skip poll
5618 \begin_layout Itemize
5619 Split UI and core into their own threads
5622 \begin_layout Subsection
5626 \begin_layout Itemize
5627 Remove leftover dummy SRAM slot
5630 \begin_layout Itemize
5631 Fix controller numbers.
5634 \begin_layout Subsection
5638 \begin_layout Itemize
5639 Fix lsnes-dumpavi after interface change.
5642 \begin_layout Itemize
5643 Also give BSNES patches for v085.
5646 \begin_layout Itemize
5647 Pack movie data in memory.
5650 \begin_layout Subsection
5654 \begin_layout Itemize
5655 Fix framecount/length given when loading movies.
5658 \begin_layout Itemize
5659 Controller command memory leak fixes.
5662 \begin_layout Itemize
5663 Don't leak palette if freeing screen object.
5666 \begin_layout Subsection
5670 \begin_layout Itemize
5674 \begin_layout Itemize
5675 Wxwidgets: Allow controlling dumper from the menu.
5678 \begin_layout Subsection
5682 \begin_layout Itemize
5683 Rewrite parts of manual
5686 \begin_layout Itemize
5687 Lua: Make it work with Lua 5.2.
5690 \begin_layout Subsection
5694 \begin_layout Itemize
5695 Win32: Fix compile errors.
5698 \begin_layout Subsection
5702 \begin_layout Itemize
5703 Refactor controller input code.
5706 \begin_layout Itemize
5707 Fix crash when using command line on SDL / Mac OS X.
5710 \begin_layout Subsection
5714 \begin_layout Itemize
5715 Delete core/coroutine (obsolete)
5718 \begin_layout Itemize
5719 Lag input display by one frame.
5722 \begin_layout Itemize
5723 Rewind movie to beginning function.
5726 \begin_layout Itemize
5727 Fix wrong frame number reported to Lua when repainting after loadstate
5730 \begin_layout Itemize
5731 Support UI editing of jukebox
5734 \begin_layout Itemize
5735 Wxwidgets: Save settings on exit.
5738 \begin_layout Itemize
5739 Support ${project} for filenames
5742 \begin_layout Itemize
5743 SDL: Fix command history
5746 \begin_layout Subsection
5750 \begin_layout Itemize
5751 Fix some order-of-global-ctor bugs.
5754 \begin_layout Subsection
5758 \begin_layout Itemize
5759 Fix crashes when quitting on Win32.
5762 \begin_layout Subsection
5766 \begin_layout Itemize
5767 EVDEV: Queue keypresses from joystick, don't send directly
5770 \begin_layout Itemize
5771 Wxwidgets: Load-Preserve that actually works.
5774 \begin_layout Subsection
5778 \begin_layout Itemize
5779 Wxwidgets: GUI for memory search.
5782 \begin_layout Itemize
5783 Warn about using synchronous queue in UI callback.
5786 \begin_layout Subsection
5790 \begin_layout Itemize
5791 Remember last saved file for each ROM
5794 \begin_layout Itemize
5795 Support MT dumping via boost.
5798 \begin_layout Itemize
5802 \begin_layout Itemize
5806 \begin_layout Itemize
5807 Make mouse be ordinary input instead of special-casing
5810 \begin_layout Itemize
5811 SDL: Don't screw up commands with NUL codepoints.
5814 \begin_layout Subsection
5818 \begin_layout Itemize
5819 Merge status panel and main window
5822 \begin_layout Itemize
5823 True movie slot support (the rest of it)
5826 \begin_layout Itemize
5827 SDL: Fix compilation error
5830 \begin_layout Itemize
5831 Elminate cross calls in dump menu code.
5834 \begin_layout Subsection
5838 \begin_layout Itemize
5839 Cancel pending saves command
5842 \begin_layout Itemize
5843 Wxwidgets: Code refactoring
5846 \begin_layout Itemize
5847 Wxwidgets: Fix system -> reset
5850 \begin_layout Itemize
5851 Wxwidgets: Read watch expressions in the right thread
5854 \begin_layout Subsection
5858 \begin_layout Itemize
5859 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5863 \begin_layout Itemize
5864 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5867 \begin_layout Itemize
5868 Don't append trailing '-' to prefix when saving movie.
5871 \begin_layout Itemize
5872 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5875 \begin_layout Subsection
5879 \begin_layout Itemize
5880 Document memory watch syntax.
5883 \begin_layout Subsection
5887 \begin_layout Itemize
5888 Fix unattended dumping (lsnes-dumpavi)
5891 \begin_layout Itemize
5895 \begin_layout Itemize
5896 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5899 \begin_layout Itemize
5900 Add option to control sample rate preturbation in AVI dumper
5903 \begin_layout Subsection
5907 \begin_layout Itemize
5908 Wxwidgets: Fix dumper submodes
5911 \begin_layout Itemize
5912 Set core controller types before loadstate
5915 \begin_layout Subsection
5919 \begin_layout Itemize
5920 Fix compiling with bsnes v086.
5923 \begin_layout Subsection
5927 \begin_layout Itemize
5928 Don't prompt before quitting
5931 \begin_layout Itemize
5932 Start unpaused, preserve pause/unpause over load.
5935 \begin_layout Itemize
5936 Try to autodetect if ROM is headered.
5939 \begin_layout Itemize
5940 Wxwidgets: Only bring up ROM patching screen if specifically requested.
5943 \begin_layout Itemize
5944 Allow configuring some hotkeys.
5947 \begin_layout Subsection
5951 \begin_layout Itemize
5952 Lots of code cleanups
5955 \begin_layout Itemize
5956 Fix JMD compression (JMD dumping was broken)
5959 \begin_layout Itemize
5960 Don't crash if Lua C function throws an exception.
5963 \begin_layout Itemize
5964 Support bitmap drawing in Lua.
5967 \begin_layout Itemize
5968 Fix bsnes v085/v086 patches.
5971 \begin_layout Itemize
5972 Improve stability on win32.
5975 \begin_layout Subsection
5979 \begin_layout Itemize
5980 Don't corrupt movie if movie length is integer multiple of frames per page.
5983 \begin_layout Subsection
5987 \begin_layout Itemize
5988 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
5991 \begin_layout Itemize
5992 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
5993 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
5997 \begin_layout Itemize
5998 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6001 \begin_layout Itemize
6002 Wxwidgets: Fix broken modifiers
6005 \begin_layout Itemize
6006 on_paint has parameter now.
6009 \begin_layout Itemize
6010 Optional initital fill for bitmaps
6013 \begin_layout Itemize
6014 Fix palette changing.
6017 \begin_layout Itemize
6018 Optimize rendering a bit.
6021 \begin_layout Itemize
6025 \begin_layout Subsection
6029 \begin_layout Itemize
6030 Movieinfo: Fix display of port #2 type.
6033 \begin_layout Itemize
6034 Call on_input() after loadstate.
6037 \begin_layout Subsection
6041 \begin_layout Itemize
6042 Fix writing port2 data to movie.
6045 \begin_layout Itemize
6046 Fix SRAM handling with Bsnes v087.
6049 \begin_layout Subsection
6053 \begin_layout Itemize
6054 Library loading support
6057 \begin_layout Itemize
6058 Built-in TSCC encoder
6061 \begin_layout Itemize
6062 Hi-color (256T colors) dumping.
6065 \begin_layout Itemize
6066 Dump over TCP/IP(v6)
6069 \begin_layout Itemize
6070 Hidable status panel
6073 \begin_layout Itemize
6077 \begin_layout Itemize
6078 Adjustable sound volume
6081 \begin_layout Itemize
6085 \begin_layout Itemize
6086 Allow DnD into filename boxes
6089 \begin_layout Itemize
6093 \begin_layout Itemize
6094 Portaudio: Fix speaker popping at start
6097 \begin_layout Itemize
6101 \begin_layout Itemize
6102 Speed adjustment menu
6105 \begin_layout Itemize
6106 Win32 joystick support
6109 \begin_layout Itemize
6110 Lua: gui.rainbow and gui.box
6113 \begin_layout Itemize
6114 Split key lists into classes (the key list was large!)
6117 \begin_layout Itemize
6118 More save slots support
6121 \begin_layout Itemize
6122 Wxwidgets (wxJoystick) joystick support
6125 \begin_layout Subsection
6129 \begin_layout Itemize
6130 Lots of internal joystick refactoring
6133 \begin_layout Itemize
6134 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6137 \begin_layout Itemize
6138 Wxwidgets: Settings mode (open settings without ROM)
6141 \begin_layout Itemize
6142 Wxwidgets: Prompt key to use option
6145 \begin_layout Itemize
6146 Wxwidgets: Fix crash if key goes away underneath
6149 \begin_layout Itemize
6150 Wxwidgets: Fix mouse position in presence of scaling
6153 \begin_layout Itemize
6154 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6157 \begin_layout Itemize
6158 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6159 seem to work well on WinXP)
6162 \begin_layout Itemize
6163 Start paused option.
6166 \begin_layout Subsection
6170 \begin_layout Itemize
6174 \begin_layout Itemize
6175 lsnes-dumpavi: Start Lua before starting dumper
6178 \begin_layout Itemize
6179 AVI: Fix secondary audio in mode 4.
6182 \begin_layout Subsection
6186 \begin_layout Itemize
6187 AVI: Refactor ZMBV a bit.
6190 \begin_layout Itemize
6191 Fix error reading analog values from movie file
6194 \begin_layout Subsection
6198 \begin_layout Itemize
6199 Delayed reset support
6202 \begin_layout Itemize
6203 Lua: memory.hash_region
6206 \begin_layout Subsection
6210 \begin_layout Itemize
6211 Rework the build system
6214 \begin_layout Itemize
6215 Typing input support
6218 \begin_layout Itemize
6219 Fix building with bsnes v086 and v087.
6222 \begin_layout Itemize
6223 SDL: Save settings on exit
6226 \begin_layout Itemize
6227 SDL: Command to enter command line mode with given command.
6230 \begin_layout Itemize
6231 SDL: More advanced command editing.
6234 \begin_layout Subsection
6238 \begin_layout Itemize
6240 \begin_inset Quotes eld
6243 arrow keys and enter don't work
6244 \begin_inset Quotes erd
6250 \begin_layout Itemize
6254 \begin_layout Itemize
6255 Show mode changes due to rewinding.
6258 \begin_layout Itemize
6259 Unsafe rewind support
6262 \begin_layout Itemize
6263 Fix directory transversal.
6266 \begin_layout Subsection
6270 \begin_layout Itemize
6271 AVI: Sound mode 5 (48kHz high-quality)
6274 \begin_layout Itemize
6278 \begin_layout Itemize
6279 Map the SNES bus into address space
6282 \begin_layout Itemize
6283 Fix loading memory watch files with CRLF line endings
6286 \begin_layout Subsection
6290 \begin_layout Itemize
6291 Map bsnes internal state into memory space
6294 \begin_layout Itemize
6296 \begin_inset Quotes eld
6299 click on panel wedges the emulator
6300 \begin_inset Quotes erd
6306 \begin_layout Itemize
6307 DnD movies/saves on the main window.
6310 \begin_layout Subsection
6314 \begin_layout Itemize
6315 Split core bindings into own module.
6318 \begin_layout Itemize
6319 Remember invalid settings
6322 \begin_layout Itemize
6323 Support for modified Gambatte core for GB/GBC emulation.
6326 \begin_layout Itemize
6327 Reload/swap ROM function
6330 \begin_layout Subsection
6334 \begin_layout Itemize
6335 Fix step poll function
6338 \begin_layout Subsection
6342 \begin_layout Itemize
6343 Non-insane savestate anchoring
6346 \begin_layout Subsection
6350 \begin_layout Itemize
6351 More Memory search methods
6354 \begin_layout Itemize
6355 Preserve movie if loading in RO mode.
6358 \begin_layout Itemize
6359 Fix a obscure case in timeline check
6362 \begin_layout Itemize
6363 Revamp the entiere ROM loading code
6366 \begin_layout Itemize
6370 \begin_layout Itemize
6374 \begin_layout Itemize
6375 Standalone hotkey config dialog
6378 \begin_layout Itemize
6379 Show bindings in more user-friendly format