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 Subsubsection
1474 edit-subtitle <firstframe> <length> [<text>]
1477 \begin_layout Standard
1478 Edit or delete a subtitle.
1481 \begin_layout Subsubsection
1485 \begin_layout Standard
1489 \begin_layout Subsection
1490 SDL Platform commands
1493 \begin_layout Standard
1494 The following are valid on SDL platform.
1497 \begin_layout Subsubsection
1501 \begin_layout Standard
1502 Asks to press a key and then identifies that (pseudo-)key.
1505 \begin_layout Subsubsection
1509 \begin_layout Standard
1510 Toggle between windowed/fullscreen console.
1513 \begin_layout Subsubsection
1517 \begin_layout Standard
1518 Scroll messages window as far back as it goes.
1521 \begin_layout Subsubsection
1525 \begin_layout Standard
1526 Scroll messages window as far forward as it goes.
1529 \begin_layout Subsubsection
1533 \begin_layout Standard
1534 Scroll messages window back one screenful.
1537 \begin_layout Subsubsection
1541 \begin_layout Standard
1542 Scroll messages window forward one screenful.
1545 \begin_layout Subsubsection
1546 prompt-command <command>
1549 \begin_layout Standard
1550 Enter command prompt, with prompt prepopulated with specified command.
1553 \begin_layout Section
1557 \begin_layout Subsection
1561 \begin_layout Subsubsection
1565 \begin_layout Standard
1566 Set where bsnes looks for firmware files.
1568 \begin_inset Quotes eld
1572 \begin_inset Quotes erd
1578 \begin_layout Subsubsection
1582 \begin_layout Standard
1584 Numeric, range is 0.001 to
1585 \begin_inset Quotes eld
1589 \begin_inset Quotes erd
1593 Default is native framerate.
1596 \begin_layout Subsubsection
1600 \begin_layout Standard
1601 Set save compression level (integer 0-9).
1602 Default is 7 (0 is no compression).
1605 \begin_layout Subsubsection
1609 \begin_layout Standard
1610 Set the frame advance timeout in milliseconds.
1611 Numeric integer, range is 0-999999999.
1615 \begin_layout Subsection
1619 \begin_layout Subsubsection
1623 \begin_layout Standard
1624 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1628 \begin_layout Subsubsection
1632 \begin_layout Standard
1633 AVI dumper: Set the default left border thickness (unless lua overrides)
1639 \begin_layout Subsubsection
1643 \begin_layout Standard
1644 AVI dumper: Set the default right border thickness (unless lua overrides)
1650 \begin_layout Subsubsection
1654 \begin_layout Standard
1655 AVI dumper: Set the default top border thickness (unless lua overrides)
1661 \begin_layout Subsubsection
1665 \begin_layout Standard
1666 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1672 \begin_layout Subsubsection
1676 \begin_layout Standard
1677 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1682 \begin_layout Subsubsection
1686 \begin_layout Standard
1687 AVI dumper: Compression level (0-18).
1690 \begin_layout Itemize
1691 Compression levels 10 and above are not compatible with stock CSCD codec.
1694 \begin_layout Itemize
1695 Recomended level is 7.
1698 \begin_layout Subsubsection
1702 \begin_layout Standard
1703 AVI dumper: Set method of determining the sound rate.
1706 \begin_layout Itemize
1707 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1708 128, 176.4 and 192 kHz.
1711 \begin_layout Itemize
1712 1: Round down to nearest integer.
1715 \begin_layout Itemize
1716 2: Round up to nearest ingeter.
1719 \begin_layout Subsection
1723 \begin_layout Subsubsection
1727 \begin_layout Standard
1728 JMD dumper: Compression level (0-9).
1731 \begin_layout Subsection
1732 SDL platform settings
1735 \begin_layout Subsubsection
1736 autorepeat-first-delay
1739 \begin_layout Standard
1740 Sets the delay for first character in typematic autorepeat.
1743 \begin_layout Subsubsection
1744 autorepeat-subsequent-delay
1747 \begin_layout Standard
1748 Sets the delay for subsequent characters in typematic autorepeat.
1751 \begin_layout Section
1755 \begin_layout Subsection
1756 Core (in main table)
1759 \begin_layout Subsubsection
1763 \begin_layout Standard
1764 Print line to message console.
1767 \begin_layout Subsubsection
1768 exec(string command)
1771 \begin_layout Standard
1772 Run command as it was entered on the command line
1775 \begin_layout Subsubsection
1779 \begin_layout Standard
1781 First is time since some epoch in seconds, the second is microseconds mod
1782 10^6 since that epoch.
1785 \begin_layout Subsubsection
1789 \begin_layout Standard
1790 Returns true if emulator has finished booting, false if not (on_startup()
1791 will be issued later).
1794 \begin_layout Subsubsection
1795 set_idle_timeout(number timeout)
1798 \begin_layout Standard
1799 Set number of microseconds to block idle for.
1800 After this timeout has expired, on_idle() will be called once.
1803 \begin_layout Subsubsection
1804 set_timer_timeout(number timeout)
1807 \begin_layout Standard
1808 Set number of microseconds to block timer for.
1809 After this timeout has expired, on_timer() will be called once.
1812 \begin_layout Subsubsection
1813 bus_address(number snesaddr)
1816 \begin_layout Standard
1817 Returns virtual address corresponding to specified address on SNES bus.
1820 \begin_layout Subsection
1824 \begin_layout Standard
1825 Bitwise logical functions and related.
1828 \begin_layout Subsubsection
1829 bit.none(number...) / bit.bnot(number...)
1832 \begin_layout Standard
1833 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1837 \begin_layout Subsubsection
1838 bit.any(number...) / bit.bor(number...)
1841 \begin_layout Standard
1842 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1845 \begin_layout Subsubsection
1846 bit.all(number...) / bit.band(number...)
1849 \begin_layout Standard
1850 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1854 \begin_layout Subsubsection
1855 bit.parity(number...) / bit.bxor(number...)
1858 \begin_layout Standard
1859 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1863 \begin_layout Subsubsection
1864 bit.lrotate(number base[, number amount[, number bits]])
1867 \begin_layout Standard
1868 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1871 \begin_layout Subsubsection
1872 bit.rrotate(number base[, number amount[, number bits]])
1875 \begin_layout Standard
1876 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1880 \begin_layout Subsubsection
1881 bit.lshift(number base[, number amount[, number bits]])
1884 \begin_layout Standard
1885 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1886 The new bits are filled with zeroes.
1889 \begin_layout Subsubsection
1890 bit.lrshift(number base[, number amount[, number bits]])
1893 \begin_layout Standard
1894 Shift bits-bit (max 48, default 48) number logically right by amount (default
1896 The new bits are filled with zeroes.
1899 \begin_layout Subsubsection
1900 bit.arshift(number base[, number amount[, number bits]])
1903 \begin_layout Standard
1904 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1906 The new bits are shifted in with copy of the high bit.
1909 \begin_layout Subsubsection
1910 bit.extract(number base[, number bit0[, number bit1,...]])
1913 \begin_layout Standard
1914 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1917 \begin_layout Standard
1921 \begin_layout Itemize
1922 Bit numbers up to 51 should work reliably (then things start falling apart
1923 due to double precision issues).
1926 \begin_layout Itemize
1927 There are two special bit positions, true and false, standing for always
1928 set bit and always clear bit.
1931 \begin_layout Subsubsection
1932 bit.value([number bit1[, number bit2,...]])
1935 \begin_layout Standard
1936 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1938 As special value, nil argument is no-op.
1941 \begin_layout Subsection
1945 \begin_layout Standard
1946 Most of these functions can only be called in on_paint and on_video callbacks.
1947 Exceptions are noted.
1950 \begin_layout Standard
1952 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1953 16-23 are the red component, bits 24-31 are alpha component (0 is fully
1954 opaque, 255 is almost transparent).
1955 -1 is the fully transparent color.
1956 Alpha values greater than 127 do work.
1959 \begin_layout Standard
1960 Origin of coordinates is at top left corner of game display area.
1961 Left and top gaps correspond to negative coordinates.
1964 \begin_layout Subsubsection
1968 \begin_layout Standard
1969 Returns 2-tuple (hresolution, vresolution).
1972 \begin_layout Subsubsection
1973 gui.<class>_gap(number gap)
1976 \begin_layout Standard
1977 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1981 \begin_layout Subsubsection
1982 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1985 \begin_layout Standard
1986 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1991 \begin_layout Itemize
1992 x: X-coordinate to start the drawing from (and x-coordinate at begining
1996 \begin_layout Itemize
1997 y: Y-coordinate to start the drawing from.
2000 \begin_layout Itemize
2001 text: The text to draw.
2004 \begin_layout Itemize
2005 fgc: Text color (default is 0xFFFFFF (white))
2008 \begin_layout Itemize
2009 bgc: Background color (default is -1 (transparent))
2012 \begin_layout Subsubsection
2013 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2016 \begin_layout Standard
2017 Like gui.text, but draw using double-width.
2020 \begin_layout Subsubsection
2021 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2024 \begin_layout Standard
2025 Like gui.text, but draw using double-height.
2028 \begin_layout Subsubsection
2029 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2032 \begin_layout Standard
2033 Like gui.text, but draw using double-width/double-height.
2036 \begin_layout Subsubsection
2037 gui.rectangle(number x, number y, number width, number height[, number thickness[
2038 , number outline[, number fill]]])
2041 \begin_layout Standard
2042 Draw rectangle on the GUI.
2046 \begin_layout Itemize
2047 x: X-coordinate of left edge.
2050 \begin_layout Itemize
2051 y: Y-coordinate of upper edge.
2054 \begin_layout Itemize
2055 width: Width of rectangle.
2058 \begin_layout Itemize
2059 height: Height of rectangle.
2062 \begin_layout Itemize
2063 thickness: Thickness of outline (default is 1).
2066 \begin_layout Itemize
2067 outline: Color of outline (default is 0xFFFFFF (white))
2070 \begin_layout Itemize
2071 fill: Color of fill (default is -1 (transparent))
2074 \begin_layout Subsubsection
2075 gui.box(number x, number y, number width, number height[, number thickness[,
2076 number outline1[,number outline2[, number fill]]]])
2079 \begin_layout Standard
2080 Draw rectangle with 3D effect on the GUI.
2084 \begin_layout Itemize
2085 x: X-coordinate of left edge.
2088 \begin_layout Itemize
2089 y: Y-coordinate of upper edge.
2092 \begin_layout Itemize
2093 width: Width of rectangle.
2096 \begin_layout Itemize
2097 height: Height of rectangle.
2100 \begin_layout Itemize
2101 thickness: Thickness of outline (default is 1).
2104 \begin_layout Itemize
2105 outline1: First color of outline (default is 0xFFFFFF (white))
2108 \begin_layout Itemize
2109 outline2: First color of outline (default is 0x808080 (dark gray))
2112 \begin_layout Itemize
2113 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2116 \begin_layout Subsubsection
2117 gui.pixel(number x, number y[, number color])
2120 \begin_layout Standard
2121 Draw one pixel on the GUI.
2125 \begin_layout Itemize
2126 x: X-coordinate of the pixel
2129 \begin_layout Itemize
2130 y: Y-coordinate of the pixel
2133 \begin_layout Itemize
2134 color: Color of the pixel (default is 0xFFFFFF (white))
2137 \begin_layout Subsubsection
2138 gui.crosshair(number x, number y[, number length[, number color]])
2141 \begin_layout Standard
2146 \begin_layout Itemize
2147 x: X-coordinate of the crosshair
2150 \begin_layout Itemize
2151 y: Y-coordinate of the crosshair
2154 \begin_layout Itemize
2155 length: Length of the crosshair lines (default 10).
2158 \begin_layout Itemize
2159 color: Color of the crosshair (default is 0xFFFFFF (white))
2162 \begin_layout Subsubsection
2163 gui.line(number x1, number y1, number x2, number y2[, number color])
2166 \begin_layout Standard
2171 \begin_layout Itemize
2172 x1: X-coordinate of one end.
2175 \begin_layout Itemize
2176 y1: Y-coordinate of one end.
2179 \begin_layout Itemize
2180 x2: X-coordinate of the other end.
2183 \begin_layout Itemize
2184 y2: Y-coordinate of the other end.
2187 \begin_layout Itemize
2188 color: Color of the line (default is 0xFFFFFF (white)).
2191 \begin_layout Subsubsection
2192 gui.circle(number x, number y, number r[, number thick[, number border[,
2196 \begin_layout Standard
2201 \begin_layout Itemize
2202 x: X-coordinate of the center
2205 \begin_layout Itemize
2206 y: Y-coordinate of the center
2209 \begin_layout Itemize
2210 r: The radius of the circle
2213 \begin_layout Itemize
2214 thick: Border thickness
2217 \begin_layout Itemize
2218 border: Border color (default is 0xFFFFFF (white))
2221 \begin_layout Itemize
2222 fill: Fill color (default is -1 (transparent)).
2225 \begin_layout Subsubsection
2226 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2229 \begin_layout Standard
2230 Draw a bitmap on screen with specified palette.
2234 \begin_layout Itemize
2235 x: X-coordinate of left edge.
2238 \begin_layout Itemize
2239 y: Y-coordinate of top edge.
2242 \begin_layout Itemize
2243 bitmap: The bitmap to draw
2246 \begin_layout Itemize
2247 palette: The palette to draw the bitmap using.
2250 \begin_layout Subsubsection
2251 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2254 \begin_layout Standard
2255 Draw a bitmap on screen.
2259 \begin_layout Itemize
2260 x: X-coordinate of left edge.
2263 \begin_layout Itemize
2264 y: Y-coordinate of top edge.
2267 \begin_layout Itemize
2268 bitmap: The bitmap to draw
2271 \begin_layout Subsubsection
2275 \begin_layout Standard
2276 Returns a new palette (initially all transparent).
2277 Can be used anywhere.
2280 \begin_layout Subsubsection
2281 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2284 \begin_layout Standard
2285 Returns a new bitmap/dbitmap.
2286 Can be used anywhere.
2290 \begin_layout Itemize
2291 w: The width of new bitmap
2294 \begin_layout Itemize
2295 h: The height of new bitmap
2298 \begin_layout Itemize
2299 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2302 \begin_layout Itemize
2303 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2306 \begin_layout Subsubsection
2307 gui.bitmap_load(string file)
2310 \begin_layout Standard
2311 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2313 Can be used anywhere.
2317 \begin_layout Itemize
2318 file: The name of file to load.
2321 \begin_layout Subsubsection
2322 gui.palette_set(palette palette, number index, number color)
2325 \begin_layout Standard
2326 Sets color in palette.
2327 Can be used anywhere.
2331 \begin_layout Itemize
2332 palette: The palette to manipulate
2335 \begin_layout Itemize
2336 index: Index of color (0-65535).
2339 \begin_layout Itemize
2340 color: The color value.
2343 \begin_layout Subsubsection
2344 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2347 \begin_layout Standard
2348 Sets specified pixel in bitmap.
2349 Can be used anywhere.
2353 \begin_layout Itemize
2354 bitmap: The bitmap to manipulate
2357 \begin_layout Itemize
2358 x: The x-coordinate of the pixel.
2361 \begin_layout Itemize
2362 y: The y-coordinate of the pixel.
2365 \begin_layout Itemize
2366 color: If bitmap is a bitmap, color index (0-65535).
2367 Otherwise color value.
2370 \begin_layout Subsubsection
2371 gui.bitmap_size(bitmap/dbitmap bitmap)
2374 \begin_layout Standard
2376 Can be used anywhere.
2380 \begin_layout Itemize
2381 bitmap: The bitmap to query.
2384 \begin_layout Standard
2385 The first return is the width, the second is the height.
2388 \begin_layout Subsubsection
2389 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2390 src, number sx, number sy, number w, number h[, number ck])
2393 \begin_layout Standard
2394 Blit a part of bitmap to another.
2395 Can be used anywhere.
2399 \begin_layout Itemize
2400 dest: Destination to blit to.
2403 \begin_layout Itemize
2404 dx: left edge of target
2407 \begin_layout Itemize
2408 dy: Top edge of target
2411 \begin_layout Itemize
2412 src: The source to blit from.
2413 Must be of the same type as destination.
2416 \begin_layout Itemize
2417 sx: left edge of source
2420 \begin_layout Itemize
2421 sy: Top edge of source
2424 \begin_layout Itemize
2428 \begin_layout Itemize
2429 h: Height of region.
2432 \begin_layout Itemize
2434 Pixels of this color are not blitted.
2438 \begin_layout Itemize
2439 If bitmaps are bitmaps, this is color index of colorkey.
2440 Values outside range 0-65535 cause no key to be used as colorkey.
2443 \begin_layout Itemize
2444 If bitmaps are dbitmaps, this color value of colorkey.
2447 \begin_layout Itemize
2448 May be absent or nil for no colorkey blit.
2452 \begin_layout Subsubsection
2456 \begin_layout Standard
2457 Request on_repaint() to happen as soon as possible.
2458 Can be used anywhere.
2461 \begin_layout Subsubsection
2462 gui.subframe_update(boolean on)
2465 \begin_layout Standard
2466 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2467 or not happen (on=false).
2468 Can be used anywhere.
2471 \begin_layout Subsubsection
2472 gui.screenshot(string filename)
2475 \begin_layout Standard
2476 Write PNG screenshot of the current frame (no drawings) to specified file.
2477 Can be used anywhere.
2480 \begin_layout Subsubsection
2481 gui.color(number r, number g, number b[, number a])
2484 \begin_layout Standard
2485 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2486 each component in scale 0-255.
2487 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2489 The default alpha is 256.
2492 \begin_layout Subsubsection
2493 gui.status(string name, string value)
2496 \begin_layout Standard
2498 \begin_inset Quotes eld
2502 \begin_inset Quotes erd
2505 to <value> in status area.
2506 Can be used anywhere.
2509 \begin_layout Subsubsection
2510 gui.rainbow(number step, number steps[, number color])
2513 \begin_layout Standard
2514 Perform hue rotation of color <color> (default bright red), by <step> steps.
2515 The number of steps per full rotation is given by absolute value of <steps>.
2518 \begin_layout Standard
2519 If <steps> is negative, the rotation will be counterclockwise.
2522 \begin_layout Subsection
2526 \begin_layout Standard
2528 Only available in on_input callback.
2531 \begin_layout Subsubsection
2532 input.get(number controller, number index)
2535 \begin_layout Standard
2536 Read the specified index (0-11) from specified controller (0-7).
2540 \begin_layout Itemize
2541 Uses physical controller numbering.
2542 Gamepad in port 2 is controller 4, not 1!
2545 \begin_layout Subsubsection
2546 input.set(number controller, number index, number value)
2549 \begin_layout Standard
2550 Write the specified index (0-11) from specified controller (0-7), storing
2555 \begin_layout Itemize
2556 Uses physical controller numbering.
2557 Gamepad in port 2 is controller 4, not 1!
2560 \begin_layout Subsubsection
2561 input.geta(number controller)
2564 \begin_layout Standard
2565 Get input state for entiere controller.
2566 Returns 13 return values.
2569 \begin_layout Itemize
2570 1st return value: Bitmask: bit i is set if i:th index is nonzero
2573 \begin_layout Itemize
2574 2nd-13th return value: value of i:th index.
2577 \begin_layout Subsubsection
2578 input.seta(number controller, number bitmask, number args...)
2581 \begin_layout Standard
2582 Set state for entiere controller.
2583 args is up to 12 values for indices (overriding values in bitmask if specified).
2586 \begin_layout Subsubsection
2587 input.controllertype(number controller)
2590 \begin_layout Standard
2591 Get the type of controller as string.
2595 \begin_layout Itemize
2599 \begin_layout Itemize
2603 \begin_layout Itemize
2607 \begin_layout Itemize
2611 \begin_layout Subsubsection
2612 input.reset([number cycles])
2615 \begin_layout Standard
2617 If cycles is greater than zero, do delayed reset.
2618 0 (or no value) causes immediate reset.
2621 \begin_layout Itemize
2622 Only available with subframe flag false.
2625 \begin_layout Subsubsection
2629 \begin_layout Standard
2630 Returns table of tables of all available keys and axes.
2631 The first table is indexed by key name (platform-dependent!), and the inner
2632 table has the following fields:
2635 \begin_layout Itemize
2636 last_rawval: Last reported raw value for control.
2639 \begin_layout Itemize
2640 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2641 pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2644 \begin_layout Itemize
2645 cal_left: Minimum calibration value.
2646 Only meaningful with axis and pressure types.
2649 \begin_layout Itemize
2650 cal_center: Center calibration value.
2651 Only meaningful with axis and pressure types.
2654 \begin_layout Itemize
2655 cal_right: Maximum calibration value.
2656 Only meaningful with axis and pressure types.
2659 \begin_layout Itemize
2660 cal_tolerance: Dead zone tolerance.
2661 Only meaningful with axis and pressure types.
2664 \begin_layout Subsubsection
2665 input.keyhook(key, state)
2668 \begin_layout Standard
2669 Requests that keyhook events to be sent for key (state=true) or not sent
2673 \begin_layout Subsection
2677 \begin_layout Standard
2681 \begin_layout Subsubsection
2682 subtitle.byindex(number i)
2685 \begin_layout Standard
2686 Read the frame and length of ith subtitle.
2687 Returns nothing if not present.
2690 \begin_layout Subsubsection
2691 subtitle.set(number f, number l, string txt)
2694 \begin_layout Standard
2695 Set the text of subtitle.
2698 \begin_layout Subsubsection
2699 subtitle.get(number f, number l)
2702 \begin_layout Standard
2703 Get the text of subtitle.
2706 \begin_layout Subsubsection
2707 subtitle.delete(number f, number l)
2710 \begin_layout Standard
2711 Delete specified subtitle.
2714 \begin_layout Subsection
2718 \begin_layout Standard
2719 Host memory handling (extra memory saved to savestates).
2720 Host memory starts empty.
2723 \begin_layout Subsubsection
2724 hostmemory.read(number address)
2727 \begin_layout Standard
2728 Reads hostmemory slot address.
2729 Slot numbers out of range return false instead of numeric.
2732 \begin_layout Subsubsection
2733 hostmemory.write(number address, number value)
2736 \begin_layout Standard
2737 Writes hostmemory slot with 0-255.
2738 Slot numbers out of range cause extension of host memory slot space.
2741 \begin_layout Subsubsection
2742 hostmemory.readbyte(number address)
2745 \begin_layout Standard
2746 Read unsigned byte (1 element) from given address.
2747 Slots out of range return false.
2750 \begin_layout Subsubsection
2751 hostmemory.writebyte(number address, number value)
2754 \begin_layout Standard
2755 Write unsigned byte (1 element) to given slot.
2756 Slot numbers out of range cause extension.
2759 \begin_layout Subsubsection
2760 hostmemory.readsbyte(number address)
2763 \begin_layout Standard
2764 Read signed byte (1 element) from given address.
2765 Slots out of range return false.
2768 \begin_layout Subsubsection
2769 hostmemory.writesbyte(number address, number value)
2772 \begin_layout Standard
2773 Write signed byte (1 element) to given slot.
2774 Slot numbers out of range cause extension.
2777 \begin_layout Subsubsection
2778 hostmemory.readword(number address)
2781 \begin_layout Standard
2782 Read unsigned word (2 elements) from given address.
2783 Slots out of range return false.
2786 \begin_layout Subsubsection
2787 hostmemory.writeword(number address, number value)
2790 \begin_layout Standard
2791 Write unsigned word (2 elements) to given slot.
2792 Slot numbers out of range cause extension.
2795 \begin_layout Subsubsection
2796 hostmemory.readsword(number address)
2799 \begin_layout Standard
2800 Read signed word (2 elements) from given address.
2801 Slots out of range return false.
2804 \begin_layout Subsubsection
2805 hostmemory.writesword(number address, number value)
2808 \begin_layout Standard
2809 Write signed word (2 elements) to given slot.
2810 Slot numbers out of range cause extension.
2813 \begin_layout Subsubsection
2814 hostmemory.readdword(number address)
2817 \begin_layout Standard
2818 Read unsigned doubleword (4 elements) from given address.
2819 Slots out of range return false.
2822 \begin_layout Subsubsection
2823 hostmemory.writedword(number address, number value)
2826 \begin_layout Standard
2827 Write unsigned doubleword (4 elements) to given slot.
2828 Slot numbers out of range cause extension.
2831 \begin_layout Subsubsection
2832 hostmemory.readsdword(number address)
2835 \begin_layout Standard
2836 Read signed doubleword (4 elements) from given address.
2837 Slots out of range return false.
2840 \begin_layout Subsubsection
2841 hostmemory.writesdword(number address, number value)
2844 \begin_layout Standard
2845 Write signed doubleword (4 elements) to given slot.
2846 Slot numbers out of range cause extension.
2849 \begin_layout Subsubsection
2850 hostmemory.readqword(number address)
2853 \begin_layout Standard
2854 Read unsigned quadword (8 elements) from given address.
2855 Slots out of range return false.
2858 \begin_layout Subsubsection
2859 hostmemory.writeqword(number address, number value)
2862 \begin_layout Standard
2863 Write unsigned quadword (4 elements) to given slot.
2864 Slot numbers out of range cause extension.
2867 \begin_layout Subsubsection
2868 hostmemory.readsqword(number address)
2871 \begin_layout Standard
2872 Read signed quadword (8 elements) from given address.
2873 Slots out of range return false.
2876 \begin_layout Subsubsection
2877 hostmemory.writesqword(number address, number value)
2880 \begin_layout Standard
2881 Write signed quadword (8 elements) to given slot.
2882 Slot numbers out of range cause extension.
2885 \begin_layout Subsection
2889 \begin_layout Standard
2893 \begin_layout Subsubsection
2894 movie.currentframe()
2897 \begin_layout Standard
2898 Return number of current frame.
2901 \begin_layout Subsubsection
2905 \begin_layout Standard
2906 Return number of frames in movie.
2909 \begin_layout Subsubsection
2913 \begin_layout Standard
2914 Return true if in readonly mode, false if in readwrite.
2917 \begin_layout Subsubsection
2918 movie.set_readwrite()
2921 \begin_layout Standard
2922 Set readwrite mode (does not cause on_readwrite callback).
2925 \begin_layout Subsubsection
2926 movie.frame_subframes(number frame)
2929 \begin_layout Standard
2930 Count number of subframes in specified frame (frame numbers are 1-based)
2934 \begin_layout Subsubsection
2935 movie.read_subframe(number frame, number subframe)
2938 \begin_layout Standard
2939 Read specifed subframe in specified frame and return data as array (100
2940 elements, numbered 0-99 currently).
2943 \begin_layout Subsubsection
2944 movie.unsafe_rewind([UNSAFEREWIND state])
2947 \begin_layout Standard
2948 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2951 \begin_layout Itemize
2952 If called without argument, causes emulator to start process of setting
2953 unsafe rewind point.
2954 When this has finished, callback on_set_rewind occurs, passing the rewind
2955 state to lua script.
2958 \begin_layout Itemize
2959 If called with argument, causes emulator rewind to passed rewind point as
2961 Readwrite mode is implicitly activated.
2964 \begin_layout Standard
2965 The following warnings apply to unsafe rewinding:
2968 \begin_layout Itemize
2969 There are no safety checks against misuse (that's what
2970 \begin_inset Quotes eld
2974 \begin_inset Quotes erd
2980 \begin_layout Itemize
2981 Only call rewind from timeline rewind point was set from.
2984 \begin_layout Itemize
2985 Only call rewind from after the rewind point was set.
2988 \begin_layout Subsection
2992 \begin_layout Standard
2993 Routines for settings manipulation
2996 \begin_layout Subsubsection
2997 settings.get(string name)
3000 \begin_layout Standard
3001 Get value of setting.
3002 If setting is blank, returns false.
3003 If setting value can't be obtained, returns (nil, error message).
3006 \begin_layout Subsubsection
3007 settings.set(string name, string value)
3010 \begin_layout Standard
3011 Set value of setting.
3012 If setting can't be set, returns (nil, error message).
3015 \begin_layout Subsubsection
3016 settings.is_set(string name)
3019 \begin_layout Standard
3020 Returns if setting is set.
3021 If setting does not exist, returns (nil, error message).
3024 \begin_layout Subsubsection
3025 settings.blank(string name)
3028 \begin_layout Standard
3029 Blanks a setting and returns true.
3030 If setting can't be blanked, returns (nil, error message).
3033 \begin_layout Subsection
3037 \begin_layout Standard
3038 Contains various functions for managing memory
3041 \begin_layout Subsubsection
3045 \begin_layout Standard
3046 Returns the number of VMAs
3049 \begin_layout Subsubsection
3050 memory.read_vma(number index)
3053 \begin_layout Standard
3054 Reads the specified VMA (indices start from zero).
3055 Trying to read invalid VMA gives nil.
3056 The read VMA is table with the following fields:
3059 \begin_layout Itemize
3060 region_name (string): The readable name of the VMA
3063 \begin_layout Itemize
3064 baseaddr (number): Base address of the VMA
3067 \begin_layout Itemize
3068 lastaddr (number): Last address in the VMA.
3071 \begin_layout Itemize
3072 size (number): The size of VMA in bytes.
3075 \begin_layout Itemize
3076 readonly (boolean): True of the VMA corresponds to ROM.
3079 \begin_layout Itemize
3080 iospace (boolean): True if the VMA is I/O space.
3083 \begin_layout Itemize
3084 native_endian (boolean): True if the VMA has native endian as opposed to
3088 \begin_layout Subsubsection
3089 memory.find_vma(number address)
3092 \begin_layout Standard
3093 Finds the VMA containing specified address.
3094 Returns table in the same format as read_vma or nil if not found.
3097 \begin_layout Subsubsection
3098 memory.readbyte(number address)
3101 \begin_layout Standard
3102 Reads the specified address as unsigned byte and returns the result.
3105 \begin_layout Subsubsection
3106 memory.readsbyte(number address)
3109 \begin_layout Standard
3110 Reads the specified address as signed byte and returns the result.
3113 \begin_layout Subsubsection
3114 memory.writebyte(number address, number value)
3117 \begin_layout Standard
3118 Writes the specified value (negative values undergo 2's complement) to specified
3119 address (as a byte).
3122 \begin_layout Subsubsection
3123 memory.readword(number address)
3126 \begin_layout Standard
3127 Reads the specified address as unsigned word and returns the result.
3130 \begin_layout Subsubsection
3131 memory.readsword(number address)
3134 \begin_layout Standard
3135 Reads the specified address as signed word and returns the result.
3138 \begin_layout Subsubsection
3139 memory.writeword(number address, number value)
3142 \begin_layout Standard
3143 Writes the specified value (negative values undergo 2's complement) to specified
3144 address (as a word).
3147 \begin_layout Subsubsection
3148 memory.readdword(number address)
3151 \begin_layout Standard
3152 Reads the specified address as unsigned doubleword and returns the result.
3155 \begin_layout Subsubsection
3156 memory.readsdword(number address)
3159 \begin_layout Standard
3160 Reads the specified address as signed doubleword and returns the result.
3163 \begin_layout Subsubsection
3164 memory.writedword(number address, number value)
3167 \begin_layout Standard
3168 Writes the specified value (negative values undergo 2's complement) to specified
3169 address (as a doubleword).
3172 \begin_layout Subsubsection
3173 memory.readqword(number address)
3176 \begin_layout Standard
3177 Reads the specified address as unsigned quadword and returns the result.
3180 \begin_layout Subsubsection
3181 memory.readsqword(number address)
3184 \begin_layout Standard
3185 Reads the specified address as signed quadword and returns the result.
3188 \begin_layout Subsubsection
3189 memory.writeqword(number address, number value)
3192 \begin_layout Standard
3193 Writes the specified value (negative values undergo 2's complement) to specified
3194 address (as a quadword).
3197 \begin_layout Subsubsection
3198 memory.hash_region(number base, number size)
3201 \begin_layout Standard
3202 Hash specified number of bytes starting from specified address and return
3206 \begin_layout Subsection
3210 \begin_layout Standard
3211 Contains copy of global variables from time of Lua initialization.
3215 \begin_layout Subsection
3219 \begin_layout Standard
3220 Various callbacks to Lua that can occur.
3223 \begin_layout Subsubsection
3224 Callback: on_paint(bool not_synth)
3227 \begin_layout Standard
3228 Called when screen is being painted.
3229 Any gui.* calls requiring graphic context draw on the screen.
3232 \begin_layout Standard
3233 not_synth is true if this hook is being called in response to received frame,
3237 \begin_layout Subsubsection
3238 Callback: on_video()
3241 \begin_layout Standard
3242 Called when video dump frame is being painted.
3243 Any gui.* calls requiring graphic context draw on the video.
3246 \begin_layout Subsubsection
3247 Callback: on_frame_emulated()
3250 \begin_layout Standard
3251 Called when emulating frame has completed and on_paint()/on_video() calls
3252 are about to be issued.
3255 \begin_layout Subsubsection
3256 Callback: on_frame()
3259 \begin_layout Standard
3260 Called on each starting whole frame.
3263 \begin_layout Subsubsection
3264 Callback: on_startup()
3267 \begin_layout Standard
3268 Called when the emulator is starting (lsnes.rc and --run files has been run).
3271 \begin_layout Subsubsection
3272 Callback: on_rewind()
3275 \begin_layout Standard
3276 Called when rewind movie to beginning has completed.
3279 \begin_layout Subsubsection
3280 Callback: on_pre_load(string name)
3283 \begin_layout Standard
3284 Called just before savestate/movie load occurs (note: loads are always delayed,
3285 so this occurs even when load was initiated by lua).
3288 \begin_layout Subsubsection
3289 Callback: on_err_load(string name)
3292 \begin_layout Standard
3293 Called if loadstate goes wrong.
3296 \begin_layout Subsubsection
3297 Callback: on_post_load(string name, boolean was_savestate)
3300 \begin_layout Standard
3301 Called on successful loadstate.
3302 was_savestate gives if this was a savestate or a movie.
3305 \begin_layout Subsubsection
3306 Callback: on_pre_save(string name, boolean is_savestate)
3309 \begin_layout Standard
3310 Called just before savestate save occurs (note: movie saves are synchronous
3311 and won't trigger these callbacks if called from Lua).
3314 \begin_layout Subsubsection
3315 Callback: on_err_save(string name)
3318 \begin_layout Standard
3319 Called if savestate goes wrong.
3322 \begin_layout Subsubsection
3323 Callback: on_post_save(string name, boolean is_savestate)
3326 \begin_layout Standard
3327 Called on successful savaestate.
3328 is_savestate gives if this was a savestate or a movie.
3331 \begin_layout Subsubsection
3335 \begin_layout Standard
3336 Called when emulator is shutting down.
3339 \begin_layout Subsubsection
3340 Callback: on_input(boolean subframe)
3343 \begin_layout Standard
3344 Called when emulator is just sending input to bsnes core.
3345 Warning: This is called even in readonly mode, but the results are ignored.
3348 \begin_layout Subsubsection
3349 Callback: on_reset()
3352 \begin_layout Standard
3353 Called when SNES is reset.
3356 \begin_layout Subsubsection
3357 Callback: on_readwrite()
3360 \begin_layout Standard
3361 Called when moving into readwrite mode as result of
3362 \begin_inset Quotes eld
3366 \begin_inset Quotes erd
3369 command (note: moving to rwmode by Lua won't trigger this, as per recursive
3373 \begin_layout Subsubsection
3374 Callback: on_snoop(number port, number controller, number index, number
3378 \begin_layout Standard
3379 Called each time bsnes asks for input.
3380 The value is the final value to be sent to bsnes core (readonly mode, autohold
3381 and autofire have been taken into account).
3382 Might be useful when translating movies to format suitable for console
3384 Note: There is no way to modify the value to be sent.
3387 \begin_layout Subsubsection
3388 Callback: on_keyhook(string keyname, table state)
3391 \begin_layout Standard
3392 Sent when key that has keyhook events requested changes state.
3393 Keyname is name of the key (group) and state is the state (same kind as
3394 table values in input.raw).
3397 \begin_layout Subsubsection
3401 \begin_layout Standard
3402 Called when requested by set_idle_timeout(), the timeout has expired and
3403 emulator is waiting.
3406 \begin_layout Subsubsection
3407 Callback: on_timer()
3410 \begin_layout Standard
3411 Called when requested by set_idle_timeout() and the timeout has expired
3412 (regardless if emulator is waiting).
3415 \begin_layout Subsubsection
3416 Callback: on_set_rewind(UNSAFEREWIND r)
3419 \begin_layout Standard
3420 Called when unsafe rewind object has been constructed.
3423 \begin_layout Subsubsection
3424 Callback: on_pre_rewind()
3427 \begin_layout Standard
3428 Called just before unsafe rewind is about to occur.
3431 \begin_layout Subsubsection
3432 Callback: on_post_rewind()
3435 \begin_layout Standard
3436 Called just after unsafe rewind has occured.
3439 \begin_layout Section
3440 Memory watch expression syntax
3443 \begin_layout Standard
3444 Memory watch expressions are in RPN (Reverse Polish Notation).
3445 At the end of expression, the top entry on stack is taken as the final
3449 \begin_layout Standard
3453 \begin_layout Itemize
3454 Evaluation order is strictly left to right.
3457 \begin_layout Itemize
3458 a is the entry on top of stack
3461 \begin_layout Itemize
3462 b is the entry immediately below top of stack
3465 \begin_layout Itemize
3466 ; separates values to be pushed (no intermediate pop).
3469 \begin_layout Itemize
3470 After end of element, all used stack slots are popped and all results are
3474 \begin_layout Itemize
3475 When pushing multiple values, the pushes occur in order shown.
3478 \begin_layout Standard
3479 The following operators are available:
3482 \begin_layout Itemize
3486 \begin_layout Itemize
3490 \begin_layout Itemize
3494 \begin_layout Itemize
3498 \begin_layout Itemize
3502 \begin_layout Itemize
3506 \begin_layout Itemize
3507 b : read_signed_byte(a)
3510 \begin_layout Itemize
3514 \begin_layout Itemize
3515 d : read_signed_dword(a)
3518 \begin_layout Itemize
3522 \begin_layout Itemize
3524 \begin_inset Formula $\pi$
3530 \begin_layout Itemize
3531 q : read_signed_qword(a)
3534 \begin_layout Itemize
3538 \begin_layout Itemize
3542 \begin_layout Itemize
3546 \begin_layout Itemize
3550 \begin_layout Itemize
3551 w : read_signed_word(a)
3554 \begin_layout Itemize
3558 \begin_layout Itemize
3559 B : read_unsigned_byte(a)
3562 \begin_layout Itemize
3563 C<number>z : Push number <number> to stack.
3566 \begin_layout Itemize
3567 D : read_unsigned_dword(a)
3570 \begin_layout Itemize
3571 C0x<number>z : Push number <number> (hexadecimal) to stack.
3574 \begin_layout Itemize
3575 Q : read_unsigned_qword(a)
3578 \begin_layout Itemize
3579 R<digit> : round a to <digit> digits.
3582 \begin_layout Itemize
3583 W : read_unsigned_word(a)
3586 \begin_layout Subsection
3590 \begin_layout Standard
3591 C0x007e0878zWC0x007e002czW-
3594 \begin_layout Enumerate
3595 Push value 0x7e0878 on top of stack (C0x007e0878z).
3598 \begin_layout Enumerate
3599 Pop the value on top of stack (0x7e0878), read word value at that address
3600 and push the result,call it x1 (W).
3603 \begin_layout Enumerate
3604 Push value 0x7e002c on top of stack (C0x007e002cz).
3607 \begin_layout Enumerate
3608 Pop the value on top of stack (0x7e002c), read word value at that address
3609 and push the result,call it x2 (W).
3612 \begin_layout Enumerate
3613 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3617 \begin_layout Enumerate
3618 Since the expression ends, the final memory watch result is the top one
3619 on stack, which is x2 - x1.
3622 \begin_layout Section
3623 Modifier and key names:
3626 \begin_layout Subsection
3630 \begin_layout Subsubsection
3634 \begin_layout Standard
3635 Following modifier names are known:
3638 \begin_layout Itemize
3639 ctrl, lctrl, rctrl: Control keys
3642 \begin_layout Itemize
3643 alt, lalt, ralt: ALT keys.
3646 \begin_layout Itemize
3647 shift, lshift, rshift: Shift keys.
3650 \begin_layout Itemize
3651 meta, lmeta, rmeta: Meta keys.
3654 \begin_layout Itemize
3655 num, caps: Numlock/Capslock (these are sticky!)
3658 \begin_layout Itemize
3662 \begin_layout Subsubsection
3666 \begin_layout Standard
3667 Following key names are known:
3670 \begin_layout Itemize
3671 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3672 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3673 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3674 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3675 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3676 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3677 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3678 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3679 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3680 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3681 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3682 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3683 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3684 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3685 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3686 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3687 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3688 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3689 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3690 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3691 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3692 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3693 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3694 break, menu, power, euro, undo
3697 \begin_layout Itemize
3698 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3699 hardware-dependent scan code of <n> (useful to bind those keys that don't
3700 have symbolic names).
3703 \begin_layout Subsubsection
3704 Joystick pseudo-keys:
3707 \begin_layout Itemize
3708 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3711 \begin_layout Itemize
3712 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3715 \begin_layout Itemize
3716 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3719 \begin_layout Itemize
3720 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3723 \begin_layout Itemize
3724 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3727 \begin_layout Itemize
3728 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3729 position (axis modes axis and axis_inverse).
3732 \begin_layout Itemize
3733 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3734 position (axis modes axis and axis_inverse).
3737 \begin_layout Itemize
3738 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3742 \begin_layout Subsubsection
3746 \begin_layout Itemize
3747 Escape: Enter/Exit Command mode, cancel modal dialogs.
3750 \begin_layout Itemize
3751 Return (also KPEnter): Execute command, ok modal dialog.
3754 \begin_layout Itemize
3755 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3759 \begin_layout Itemize
3760 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3764 \begin_layout Itemize
3765 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3768 \begin_layout Itemize
3769 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3772 \begin_layout Itemize
3773 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3776 \begin_layout Itemize
3777 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3780 \begin_layout Itemize
3782 if no num lock; command mode): Delete character to right of cursor.
3785 \begin_layout Itemize
3786 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3790 \begin_layout Itemize
3791 Backspace (command mode): Delete character to left of cursor.
3794 \begin_layout Itemize
3795 CTRL+LEFT (also ALT+B; command mode): Previous word.
3798 \begin_layout Itemize
3799 CTRL+RIGHT (also ALT+F; command mode): Next word.
3802 \begin_layout Itemize
3803 ALT+D (also CTRL+W; command mode): Delete word.
3806 \begin_layout Itemize
3807 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3810 \begin_layout Subsection
3814 \begin_layout Subsubsection
3818 \begin_layout Standard
3819 Following modifier names are known:
3822 \begin_layout Itemize
3826 \begin_layout Itemize
3830 \begin_layout Itemize
3834 \begin_layout Itemize
3838 \begin_layout Itemize
3842 \begin_layout Subsubsection
3846 \begin_layout Standard
3847 Following key names are known:
3850 \begin_layout Itemize
3851 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3852 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3853 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3854 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3855 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3856 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3857 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3858 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3859 pause, capital, end, home, lefT, up, right, down, select, print, execute,
3860 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3861 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3862 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3863 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3864 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3865 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3866 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3867 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3868 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3869 windows_right, windows_menu, command, special1, special2, special3, special4,
3870 special5, special6, special7, special8, special9, special10, special11,
3871 special12, special13, special14, special15, special16, special17, special18,
3872 special19, special20
3875 \begin_layout Section
3879 \begin_layout Standard
3880 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3881 (note: If you recompress it, do not use compression methods other than
3882 store and deflate and especially do not use encryption of any kind).
3885 \begin_layout Subsection
3886 Detecting clean start/SRAM/Savestate
3889 \begin_layout Itemize
3891 \begin_inset Quotes eld
3895 \begin_inset Quotes erd
3898 it is savestate, otherwise:
3901 \begin_layout Itemize
3902 If file has members with names starting
3903 \begin_inset Quotes eld
3907 \begin_inset Quotes erd
3910 it is movie starting from SRAM, otherwise:
3913 \begin_layout Itemize
3914 It is movie starting from clear state.
3917 \begin_layout Subsection
3921 \begin_layout Standard
3922 Type of game ROM and region (as one line).
3926 \begin_layout Standard
3927 \begin_inset Tabular
3928 <lyxtabular version="3" rows="8" columns="3">
3929 <features tabularvalignment="middle">
3930 <column alignment="center" valignment="top" width="0">
3931 <column alignment="center" valignment="top" width="0">
3932 <column alignment="center" valignment="top" width="0">
3934 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3937 \begin_layout Plain Layout
3943 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3946 \begin_layout Plain Layout
3952 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3955 \begin_layout Plain Layout
3963 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3966 \begin_layout Plain Layout
3972 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3975 \begin_layout Plain Layout
3981 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3984 \begin_layout Plain Layout
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3995 \begin_layout Plain Layout
4001 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4004 \begin_layout Plain Layout
4010 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4013 \begin_layout Plain Layout
4021 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4024 \begin_layout Plain Layout
4030 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4033 \begin_layout Plain Layout
4039 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4042 \begin_layout Plain Layout
4050 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4053 \begin_layout Plain Layout
4059 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4062 \begin_layout Plain Layout
4068 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4071 \begin_layout Plain Layout
4079 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4082 \begin_layout Plain Layout
4088 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4091 \begin_layout Plain Layout
4097 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4100 \begin_layout Plain Layout
4108 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4111 \begin_layout Plain Layout
4117 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4120 \begin_layout Plain Layout
4126 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4129 \begin_layout Plain Layout
4137 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4140 \begin_layout Plain Layout
4146 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4149 \begin_layout Plain Layout
4155 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4158 \begin_layout Plain Layout
4172 \begin_layout Standard
4176 \begin_layout Standard
4177 \begin_inset Tabular
4178 <lyxtabular version="3" rows="3" columns="2">
4179 <features tabularvalignment="middle">
4180 <column alignment="center" valignment="top" width="0">
4181 <column alignment="center" valignment="top" width="0">
4183 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4186 \begin_layout Plain Layout
4192 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4195 \begin_layout Plain Layout
4203 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4206 \begin_layout Plain Layout
4212 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4215 \begin_layout Plain Layout
4223 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4226 \begin_layout Plain Layout
4232 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4235 \begin_layout Plain Layout
4249 \begin_layout Subsection
4253 \begin_layout Standard
4254 Contains type of port #1 (as one line).
4255 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4256 If not present, defaults to 'gamepad'.
4259 \begin_layout Subsection
4263 \begin_layout Standard
4264 Contains type of port #2 (as one line).
4265 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4266 'justifier' and 'justifiers'.
4267 If not present, defaults to 'none'.
4270 \begin_layout Subsection
4274 \begin_layout Standard
4275 Contains name of the game (as one line).
4278 \begin_layout Subsection
4282 \begin_layout Standard
4283 Contains authors, one per line.
4284 Part before '|' is the full name, part after is the nickname.
4287 \begin_layout Subsection
4291 \begin_layout Standard
4293 \begin_inset Quotes eld
4297 \begin_inset Quotes erd
4301 Used to reject other saves.
4304 \begin_layout Subsection
4305 Member: controlsversion
4308 \begin_layout Standard
4310 \begin_inset Quotes eld
4314 \begin_inset Quotes erd
4318 Used to identify what controls are there.
4321 \begin_layout Subsection
4323 \begin_inset Quotes eld
4327 \begin_inset Quotes erd
4333 \begin_layout Standard
4334 Contains bsnes core version number (as one line).
4337 \begin_layout Subsection
4341 \begin_layout Standard
4342 Contains project ID (as one line).
4343 Used to identify if two movies are part of the same project.
4346 \begin_layout Subsection
4347 Member: {rom,slota,slotb}{,xml}.sha256
4350 \begin_layout Standard
4351 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4352 Absent if corresponding file is absent.
4355 \begin_layout Subsection
4356 Member: moviesram.<name>
4359 \begin_layout Standard
4360 Raw binary startup SRAM of kind <name>.
4361 Only present in savestates and movies starting from SRAM.
4364 \begin_layout Subsection
4368 \begin_layout Standard
4369 Contains frame number (as one line) of frame movie was saved on.
4370 Only present in savestates.
4373 \begin_layout Subsection
4377 \begin_layout Standard
4378 Current value of lag counter (as one line).
4379 Only present in savestates.
4382 \begin_layout Subsection
4383 Member: pollcounters
4386 \begin_layout Standard
4387 Contains poll counters (currently 100 of them), one per line.
4388 Each line is raw poll count if DRDY is set for it.
4389 Otherwise it is negative poll count minus one.
4390 Only present in savestates.
4393 \begin_layout Subsection
4397 \begin_layout Standard
4398 Raw binary dump of host memory.
4399 Only present in savestates.
4402 \begin_layout Subsection
4406 \begin_layout Standard
4407 The raw binary savestate itself.
4408 Savestate detection uses this file, only present in savestates.
4411 \begin_layout Subsection
4415 \begin_layout Standard
4416 Screenshot of current frame.
4417 Only present in savestates.
4418 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4420 Height of image is inferred from the width and size of data.
4423 \begin_layout Subsection
4427 \begin_layout Standard
4428 Raw binary SRAM of kind <name> at time of savestate.
4429 Only present in savestates.
4432 \begin_layout Subsection
4436 \begin_layout Standard
4437 The actual input track, one line per subframe (blank lines are skipped).
4440 \begin_layout Itemize
4441 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4442 part of same frame as previous, otherwise it starts a new frame.
4445 \begin_layout Itemize
4446 First subframe must start a new frame.
4449 \begin_layout Standard
4450 Length of movie in frames is number of lines in input file that start a
4454 \begin_layout Subsection
4458 \begin_layout Standard
4463 \begin_layout Itemize
4464 Each line is in form <firstframe> <numframes> <text>.
4467 \begin_layout Itemize
4468 Linefeed is encoded as
4470 n, backslash is encoded as
4477 \begin_layout Subsection
4481 \begin_layout Standard
4482 Contains textual base-10 rerecord count (as one line; emulator just writes
4483 this, it doesn't read it) + 1.
4486 \begin_layout Subsection
4490 \begin_layout Standard
4491 This member stores set of load IDs.
4492 There is one load ID per rerecord (plus one corresponding to start of project).
4495 \begin_layout Itemize
4496 This member constists of concatenation of records
4499 \begin_layout Itemize
4500 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4504 \begin_layout Itemize
4505 IDs are interpretted as 256-bit big-endian integers with warparound.
4508 \begin_layout Itemize
4509 Initial predicted ID is all zeroes.
4512 \begin_layout Standard
4513 Format of each record is:
4516 \begin_layout Itemize
4517 1 byte: Opcode byte.
4518 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4522 \begin_layout Itemize
4523 32-prefixlen bytes of ID.
4526 \begin_layout Itemize
4527 countlen bytes of big-endian count (count).
4530 \begin_layout Standard
4531 Records are processed as follows:
4534 \begin_layout Itemize
4535 To form the first ID encoded by record, take the first prefixlen bytes predicted
4536 ID and append the read ID value to it.
4537 The result is the first ID encoded.
4540 \begin_layout Itemize
4541 If countlen is 0, record encodes 1 ID.
4544 \begin_layout Itemize
4545 If countlen is 1, record encodes 2+count IDs.
4548 \begin_layout Itemize
4549 If countlen is 2, record encodes 258+count IDs.
4552 \begin_layout Itemize
4553 If countlen is 3, record encodes 65794+count IDs.
4556 \begin_layout Itemize
4557 The new predicted ID is the next ID after last one encoded by the record.
4560 \begin_layout Standard
4561 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4565 \begin_layout Subsection
4566 Member: starttime.second
4569 \begin_layout Standard
4570 Movie starting time, second part.
4571 Epoch is Unix epoch.
4572 Default is 1,000,000,000.
4575 \begin_layout Subsection
4576 Member: starttime.subsecond
4579 \begin_layout Standard
4580 Movie starting time, subsecond part.
4585 \begin_layout Subsection
4586 Member: savetime.second
4589 \begin_layout Standard
4590 Movie saving time, second part.
4591 Default is starttime.second.
4592 Only present in savestates.
4595 \begin_layout Subsection
4596 Member: savetime.subsecond
4599 \begin_layout Standard
4600 Movie saving time, subsecond part.
4601 Default is starttime.subsecond.
4602 Only present in savestates.
4605 \begin_layout Section
4606 Known ROM extensions
4609 \begin_layout Itemize
4610 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4613 \begin_layout Itemize
4614 DMG cartridge ROMs: dmg, gb.
4617 \begin_layout Itemize
4618 GBC cartridge ROMs: cgb, gbc.
4621 \begin_layout Section
4625 \begin_layout Itemize
4626 The first line must be:
4627 \begin_inset Quotes eld
4631 \begin_inset Quotes erd
4637 \begin_layout Itemize
4638 There is one needed line:
4639 \begin_inset Quotes eld
4643 \begin_inset Quotes erd
4647 This sets system type to <systype>.
4648 The following system types are valid:
4652 \begin_layout Itemize
4656 \begin_layout Itemize
4657 bsx (BS-X non-slotted)
4660 \begin_layout Itemize
4661 bsxslotted (BS-X slotted)
4664 \begin_layout Itemize
4665 sufamiturbo (Sufami Turbo)
4668 \begin_layout Itemize
4669 sgb (Super Game Boy)
4672 \begin_layout Itemize
4676 \begin_layout Itemize
4677 gbc (Game Boy Color)
4680 \begin_layout Itemize
4681 gbc_gba (Game Boy Color with GBA initial register values)
4685 \begin_layout Itemize
4686 Optionally a region can be specified:
4687 \begin_inset Quotes eld
4691 \begin_inset Quotes erd
4695 The following values are valid:
4699 \begin_layout Itemize
4700 autodetect (Autodetect region: snes and sgb only)
4703 \begin_layout Itemize
4704 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4707 \begin_layout Itemize
4708 pal (PAL: snes, sgb)
4711 \begin_layout Itemize
4712 world (World: dmg, gbc, gbc_gba)
4716 \begin_layout Itemize
4717 ROM images are loaded as:
4718 \begin_inset Quotes eld
4722 \begin_inset Quotes erd
4726 The following types are valid:
4730 \begin_layout Itemize
4731 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4732 BIOS in bsx, bsxslotted, sufamiturbo)
4735 \begin_layout Itemize
4736 bsx (Cartridge ROM in bsx, bsxslotted)
4739 \begin_layout Itemize
4740 slot-a (Cartridge ROM in sufamiturbo)
4743 \begin_layout Itemize
4744 slot-b (Cartridge ROM in sufamiturbo)
4748 \begin_layout Itemize
4749 ROM markup can be loaded as:
4750 \begin_inset Quotes eld
4754 \begin_inset Quotes erd
4758 The types valid are the same as for ROMs.
4761 \begin_layout Itemize
4762 Patches can be loaded as
4763 \begin_inset Quotes eld
4766 patch[<offset>] <type> <file>
4767 \begin_inset Quotes erd
4771 The types are the same as for ROMs.
4775 \begin_layout Itemize
4776 Offset is given in form [+-]<number>.
4777 Usually offset is either +0 or -512.
4780 \begin_layout Itemize
4781 Default offset is +0.
4785 \begin_layout Subsection
4789 \begin_layout LyX-Code
4793 \begin_layout LyX-Code
4797 \begin_layout LyX-Code
4798 rom rom speedygonzales.sfc
4801 \begin_layout LyX-Code
4802 patch-512 rom sonicthehedgehog.ips
4805 \begin_layout Subsection
4809 \begin_layout LyX-Code
4813 \begin_layout LyX-Code
4817 \begin_layout LyX-Code
4818 rom rom supergameboy.sfc
4821 \begin_layout LyX-Code
4822 rom dmg megamanV.dmg
4825 \begin_layout Section
4826 Quick'n'dirty encode guide
4829 \begin_layout Enumerate
4830 Start the emulator and load the ROM and movie file.
4833 \begin_layout Enumerate
4834 Set large AVI option 'set-setting avi-large on'
4837 \begin_layout Enumerate
4838 Enable dumping 'dump-avi tmpdump'
4841 \begin_layout Enumerate
4842 Unpause and let it run until you want to end dumping.
4845 \begin_layout Enumerate
4846 Close the emulator (closing the window is the easiest way).
4850 \begin_layout Enumerate
4851 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4852 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4855 \begin_layout Enumerate
4856 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4859 \begin_layout Enumerate
4860 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4861 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4864 \begin_layout Enumerate
4865 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4866 Now final.mkv contains quick'n'dirty encode.
4869 \begin_layout Section
4870 Axis configurations for some gamepad types:
4873 \begin_layout Subsection
4877 \begin_layout Standard
4878 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4881 \begin_layout LyX-Code
4882 set-axis joystick0axis2 pressure-+
4885 \begin_layout LyX-Code
4886 set-axis joystick0axis5 pressure-+
4889 \begin_layout Itemize
4890 This is needed for SDL only.
4891 EVDEV sets those types correctly.
4894 \begin_layout Subsection
4896 \begin_inset Quotes eld
4900 \begin_inset Quotes erd
4906 \begin_layout Standard
4907 Axes 8-19 should be disabled.
4910 \begin_layout LyX-Code
4911 set-axis joystick0axis8 disabled
4914 \begin_layout LyX-Code
4915 set-axis joystick0axis9 disabled
4918 \begin_layout LyX-Code
4919 set-axis joystick0axis10 disabled
4922 \begin_layout LyX-Code
4923 set-axis joystick0axis11 disabled
4926 \begin_layout LyX-Code
4927 set-axis joystick0axis12 disabled
4930 \begin_layout LyX-Code
4931 set-axis joystick0axis13 disabled
4934 \begin_layout LyX-Code
4935 set-axis joystick0axis14 disabled
4938 \begin_layout LyX-Code
4939 set-axis joystick0axis15 disabled
4942 \begin_layout LyX-Code
4943 set-axis joystick0axis16 disabled
4946 \begin_layout LyX-Code
4947 set-axis joystick0axis17 disabled
4950 \begin_layout LyX-Code
4951 set-axis joystick0axis18 disabled
4954 \begin_layout LyX-Code
4955 set-axis joystick0axis19 disabled
4958 \begin_layout Section
4962 \begin_layout Subsection
4963 Problems from BSNES core:
4966 \begin_layout Itemize
4967 The whole pending save stuff.
4970 \begin_layout Itemize
4971 Lack of layer hiding.
4974 \begin_layout Itemize
4975 It is slow (especially accuracy).
4978 \begin_layout Itemize
4979 Firmwares can't be loaded from ZIP archives.
4982 \begin_layout Subsection
4986 \begin_layout Itemize
4987 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4990 \begin_layout Itemize
4991 Audio for last dumped frame is not itself dumped.
4994 \begin_layout Itemize
4995 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4998 \begin_layout Itemize
4999 No menus, command based interface (SDL).
5002 \begin_layout Itemize
5003 Long commands don't scroll.
5006 \begin_layout Section
5010 \begin_layout Subsection
5014 \begin_layout Itemize
5018 \begin_layout Itemize
5019 Fix dumper video corruption with levels 10-18.
5022 \begin_layout Subsection
5026 \begin_layout Itemize
5030 \begin_layout Itemize
5031 Lots of code cleanups
5034 \begin_layout Itemize
5035 Lua interface to settings
5038 \begin_layout Itemize
5039 Allow specifying AVI borders without Lua
5042 \begin_layout Itemize
5043 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5046 \begin_layout Itemize
5047 on_snoop lua callback
5050 \begin_layout Itemize
5051 Faster movie loading and saving.
5054 \begin_layout Subsection
5058 \begin_layout Itemize
5062 \begin_layout Subsection
5066 \begin_layout Itemize
5070 \begin_layout Itemize
5071 Save jukebox functionality.
5074 \begin_layout Subsection
5078 \begin_layout Itemize
5079 Try to fix some nasty failing movie load edge cases
5082 \begin_layout Itemize
5083 Allow specifying scripts to run on command line.
5086 \begin_layout Subsection
5090 \begin_layout Itemize
5091 Major source code reorganization.
5094 \begin_layout Itemize
5095 Backup savestates before overwriting.
5098 \begin_layout Itemize
5099 Don't crash if loading initial state fails.
5102 \begin_layout Subsection
5106 \begin_layout Itemize
5110 \begin_layout Itemize
5111 Fix author name parsing
5114 \begin_layout Itemize
5115 Fix rerecord counting
5118 \begin_layout Itemize
5119 (SDL) Print messages to console if SDL is uninitialized
5122 \begin_layout Itemize
5123 Add movieinfo program
5126 \begin_layout Itemize
5127 Fix loading movies starting from SRAM.
5130 \begin_layout Subsection
5134 \begin_layout Itemize
5135 Add support for unattended dumping
5138 \begin_layout Itemize
5139 Fix compiling for Win32
5142 \begin_layout Itemize
5143 Don't lock up if sound can't be initialized
5146 \begin_layout Itemize
5147 Strip trailing CR from commands
5150 \begin_layout Itemize
5151 Don't try to do dubious things in global ctors (fix crash on startup)
5154 \begin_layout Subsection
5158 \begin_layout Itemize
5159 Small documentation tweaking
5162 \begin_layout Itemize
5166 \begin_layout Itemize
5167 Fix major bug in modifier matching
5170 \begin_layout Subsection
5174 \begin_layout Itemize
5175 Lots of documentation fixes
5178 \begin_layout Itemize
5179 Use dedicated callbacks for event backcomm., not commands.
5182 \begin_layout Itemize
5183 Ensure that the watchdog is not hit when executing delayed reset.
5186 \begin_layout Itemize
5187 Remove errant tab from joystick message.
5190 \begin_layout Subsection
5194 \begin_layout Itemize
5195 Make autofire operate in absolute time, not linear time
5198 \begin_layout Itemize
5199 Reinitialize controls when resuming from loadstate
5202 \begin_layout Itemize
5203 Some more code cleanups
5206 \begin_layout Itemize
5207 If Lua allocator fails, call OOM_panic()
5210 \begin_layout Itemize
5211 Byte/word/dword/qword sized host memory write/read functions.
5214 \begin_layout Itemize
5215 Dump at correct framerate if dumping interlaced NTSC (height=448).
5218 \begin_layout Subsection
5222 \begin_layout Itemize
5223 Actually include the complete source code
5226 \begin_layout Itemize
5230 \begin_layout Subsection
5234 \begin_layout Itemize
5235 Document {save,start}time.{,sub}second.
5238 \begin_layout Itemize
5239 Intercept time() from bsnes core.
5242 \begin_layout Subsection
5246 \begin_layout Itemize
5247 Allow disabling time() interception (allow build on Mac OS X)
5250 \begin_layout Itemize
5251 Use SDLMain on Mac OS X (make SDL not crash)
5254 \begin_layout Itemize
5255 Disable delayed resets (just plain too buggy for now).
5258 \begin_layout Itemize
5262 \begin_layout Itemize
5263 Use 16-bit for graphics/video instead of 32-bit.
5266 \begin_layout Itemize
5267 gui.rectangle/gui.pixel
5270 \begin_layout Itemize
5274 \begin_layout Itemize
5275 New CSCD writer implementation.
5278 \begin_layout Subsection
5282 \begin_layout Itemize
5283 Fix interaction of * and +.
5286 \begin_layout Itemize
5290 \begin_layout Itemize
5291 Use gettimeofday()/usleep(), these seem portable enough.
5294 \begin_layout Itemize
5295 Move joystick axis manipulation to keymapper code.
5298 \begin_layout Itemize
5299 Changes to how read-only works.
5302 \begin_layout Itemize
5303 Refactor controller input code.
5306 \begin_layout Subsection
5310 \begin_layout Itemize
5311 Fix mouseclick scale compensation.
5314 \begin_layout Itemize
5315 Draw area boundaries correctly in SDL code.
5318 \begin_layout Itemize
5322 \begin_layout Itemize
5323 Fix CSCD output (buffer overrun and race condition).
5326 \begin_layout Subsection
5330 \begin_layout Itemize
5331 JMD dumping support.
5334 \begin_layout Itemize
5335 Allow unattended dumping to JMD.
5338 \begin_layout Itemize
5342 \begin_layout Itemize
5343 Switch back to 32-bit colors.
5346 \begin_layout Itemize
5347 Add Lua function gui.color.
5350 \begin_layout Itemize
5351 Use some new C++11 features in GCC 4.6.
5354 \begin_layout Itemize
5355 Be prepared for core frequency changes.
5358 \begin_layout Itemize
5359 Pass colors in one chunk from Lua.
5362 \begin_layout Subsection
5366 \begin_layout Itemize
5367 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5368 memory.read_vma() and memory.find_vma().
5371 \begin_layout Itemize
5372 Numerious documentation fixups
5375 \begin_layout Itemize
5376 RTC time format changed
5379 \begin_layout Itemize
5380 Reformat flags display
5383 \begin_layout Itemize
5384 Allow lua package name to be overridden
5387 \begin_layout Itemize
5388 SDUMP (high-quality dumping).
5391 \begin_layout Itemize
5392 Split platform support to plugins.
5395 \begin_layout Itemize
5396 Make all sound plugins support basic sound commands
5399 \begin_layout Itemize
5400 Support portaudio for sound.
5403 \begin_layout Itemize
5404 Allow disable Lua/SDL searching.
5407 \begin_layout Itemize
5408 Upconvert colors when copying lcscreen to screen.
5411 \begin_layout Itemize
5412 Reorganize source tree.
5415 \begin_layout Itemize
5416 Evdev joystick support.
5419 \begin_layout Itemize
5420 Refactor more code into generic window code.
5423 \begin_layout Subsection
5427 \begin_layout Itemize
5428 Refactor message handling.
5431 \begin_layout Itemize
5435 \begin_layout Itemize
5439 \begin_layout Itemize
5440 Finish pending saves before load/quit.
5443 \begin_layout Itemize
5444 Wxwidgets graphics plugin.
5447 \begin_layout Subsection
5451 \begin_layout Itemize
5452 Get rid of win32-crap.[ch]pp.
5455 \begin_layout Itemize
5456 Move files around a lot.
5459 \begin_layout Itemize
5460 Get rid of need for host C++ compiler.
5463 \begin_layout Itemize
5467 \begin_layout Itemize
5468 Refactor inter-component communication.
5471 \begin_layout Itemize
5475 \begin_layout Itemize
5476 Fix crash on multiline aliases.
5479 \begin_layout Itemize
5480 Load/Save settings in wxwidgets gui.
5483 \begin_layout Subsection
5487 \begin_layout Itemize
5488 Patch problems in bsnes core
5491 \begin_layout Itemize
5492 SNES is little-endian, not big-endian!
5495 \begin_layout Itemize
5496 Fix memory corruption in lcscreen::load()
5499 \begin_layout Subsection
5503 \begin_layout Itemize
5504 Fix interpretting repeat counts in rrdata loading.
5507 \begin_layout Itemize
5508 New lua callback: on_frame()
5511 \begin_layout Itemize
5512 Remove calls to runtosave() that aren't supposed to be there
5515 \begin_layout Itemize
5516 Lua function: movie.read_rtc()
5519 \begin_layout Itemize
5520 Ignore src/fonts/font.cpp
5523 \begin_layout Itemize
5524 Fix more bsnes core problems
5527 \begin_layout Itemize
5528 Control bsnes random seeding
5531 \begin_layout Itemize
5535 \begin_layout Itemize
5536 Some bsnes core debugging features (state dump and state hash)
5539 \begin_layout Itemize
5540 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5541 it was 'lsnes rr0-beta21').
5544 \begin_layout Subsection
5548 \begin_layout Itemize
5549 Fix memory corruption due to macro/field mixup
5552 \begin_layout Itemize
5553 search-memory update
5556 \begin_layout Itemize
5557 Allow direct-mapped framebuffer
5560 \begin_layout Itemize
5561 SDL: Use SDL_ANYFORMAT if possible
5564 \begin_layout Itemize
5565 SDMP2SOX: 2s delay modes.
5568 \begin_layout Itemize
5572 \begin_layout Itemize
5573 Use sed -E, not sed -r.
5574 Fixes building on Mac OS X.
5577 \begin_layout Itemize
5578 Wxwidgets: Save jukebox on exit
5581 \begin_layout Itemize
5582 Fix RTC if using load-movie on savestate.
5585 \begin_layout Itemize
5586 Fix crash related to full console mode.
5589 \begin_layout Subsection
5593 \begin_layout Itemize
5594 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5597 \begin_layout Itemize
5598 Wxwidgets: Allow compiling on Mac OS X.
5601 \begin_layout Itemize
5602 Use movie compare instead of movie hashing (faster save/load).
5605 \begin_layout Itemize
5609 \begin_layout Subsection
5613 \begin_layout Itemize
5614 sdmp2sox: Pad soundtrack if using -l or -L.
5617 \begin_layout Itemize
5618 sdmp2sox: Fix NTSC overscan.
5621 \begin_layout Itemize
5622 sdmp2sox: Add AR correction mode.
5625 \begin_layout Itemize
5626 call lua_close() when exiting.
5629 \begin_layout Itemize
5630 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5633 \begin_layout Subsection
5637 \begin_layout Itemize
5638 Fix IPS patching code (use bsnes core IPS patcher).
5641 \begin_layout Itemize
5642 Implement BPS patching (using bsnes core IPS patcher).
5645 \begin_layout Itemize
5646 Add feature to load headered ROMs.
5649 \begin_layout Subsection
5653 \begin_layout Itemize
5654 Show command names when showing keybindings
5657 \begin_layout Subsection
5661 \begin_layout Itemize
5662 Fix pause-on-end to be actually controllable
5665 \begin_layout Itemize
5666 SDL: Poll all events in queue, not just first one (fixes slowness in command
5670 \begin_layout Itemize
5671 Wxwidgets: Fix ROM loading.
5674 \begin_layout Subsection
5678 \begin_layout Itemize
5679 Lua: Add gui.textH, gui.textV, gui.textHV
5682 \begin_layout Itemize
5683 Fix text colors on SDL on Mac OS X
5686 \begin_layout Itemize
5687 Mode 'F' for finished in readonly mode.
5690 \begin_layout Itemize
5694 \begin_layout Itemize
5695 Reliably pause after skip poll
5698 \begin_layout Itemize
5699 Split UI and core into their own threads
5702 \begin_layout Subsection
5706 \begin_layout Itemize
5707 Remove leftover dummy SRAM slot
5710 \begin_layout Itemize
5711 Fix controller numbers.
5714 \begin_layout Subsection
5718 \begin_layout Itemize
5719 Fix lsnes-dumpavi after interface change.
5722 \begin_layout Itemize
5723 Also give BSNES patches for v085.
5726 \begin_layout Itemize
5727 Pack movie data in memory.
5730 \begin_layout Subsection
5734 \begin_layout Itemize
5735 Fix framecount/length given when loading movies.
5738 \begin_layout Itemize
5739 Controller command memory leak fixes.
5742 \begin_layout Itemize
5743 Don't leak palette if freeing screen object.
5746 \begin_layout Subsection
5750 \begin_layout Itemize
5754 \begin_layout Itemize
5755 Wxwidgets: Allow controlling dumper from the menu.
5758 \begin_layout Subsection
5762 \begin_layout Itemize
5763 Rewrite parts of manual
5766 \begin_layout Itemize
5767 Lua: Make it work with Lua 5.2.
5770 \begin_layout Subsection
5774 \begin_layout Itemize
5775 Win32: Fix compile errors.
5778 \begin_layout Subsection
5782 \begin_layout Itemize
5783 Refactor controller input code.
5786 \begin_layout Itemize
5787 Fix crash when using command line on SDL / Mac OS X.
5790 \begin_layout Subsection
5794 \begin_layout Itemize
5795 Delete core/coroutine (obsolete)
5798 \begin_layout Itemize
5799 Lag input display by one frame.
5802 \begin_layout Itemize
5803 Rewind movie to beginning function.
5806 \begin_layout Itemize
5807 Fix wrong frame number reported to Lua when repainting after loadstate
5810 \begin_layout Itemize
5811 Support UI editing of jukebox
5814 \begin_layout Itemize
5815 Wxwidgets: Save settings on exit.
5818 \begin_layout Itemize
5819 Support ${project} for filenames
5822 \begin_layout Itemize
5823 SDL: Fix command history
5826 \begin_layout Subsection
5830 \begin_layout Itemize
5831 Fix some order-of-global-ctor bugs.
5834 \begin_layout Subsection
5838 \begin_layout Itemize
5839 Fix crashes when quitting on Win32.
5842 \begin_layout Subsection
5846 \begin_layout Itemize
5847 EVDEV: Queue keypresses from joystick, don't send directly
5850 \begin_layout Itemize
5851 Wxwidgets: Load-Preserve that actually works.
5854 \begin_layout Subsection
5858 \begin_layout Itemize
5859 Wxwidgets: GUI for memory search.
5862 \begin_layout Itemize
5863 Warn about using synchronous queue in UI callback.
5866 \begin_layout Subsection
5870 \begin_layout Itemize
5871 Remember last saved file for each ROM
5874 \begin_layout Itemize
5875 Support MT dumping via boost.
5878 \begin_layout Itemize
5882 \begin_layout Itemize
5886 \begin_layout Itemize
5887 Make mouse be ordinary input instead of special-casing
5890 \begin_layout Itemize
5891 SDL: Don't screw up commands with NUL codepoints.
5894 \begin_layout Subsection
5898 \begin_layout Itemize
5899 Merge status panel and main window
5902 \begin_layout Itemize
5903 True movie slot support (the rest of it)
5906 \begin_layout Itemize
5907 SDL: Fix compilation error
5910 \begin_layout Itemize
5911 Elminate cross calls in dump menu code.
5914 \begin_layout Subsection
5918 \begin_layout Itemize
5919 Cancel pending saves command
5922 \begin_layout Itemize
5923 Wxwidgets: Code refactoring
5926 \begin_layout Itemize
5927 Wxwidgets: Fix system -> reset
5930 \begin_layout Itemize
5931 Wxwidgets: Read watch expressions in the right thread
5934 \begin_layout Subsection
5938 \begin_layout Itemize
5939 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5943 \begin_layout Itemize
5944 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5947 \begin_layout Itemize
5948 Don't append trailing '-' to prefix when saving movie.
5951 \begin_layout Itemize
5952 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5955 \begin_layout Subsection
5959 \begin_layout Itemize
5960 Document memory watch syntax.
5963 \begin_layout Subsection
5967 \begin_layout Itemize
5968 Fix unattended dumping (lsnes-dumpavi)
5971 \begin_layout Itemize
5975 \begin_layout Itemize
5976 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5979 \begin_layout Itemize
5980 Add option to control sample rate preturbation in AVI dumper
5983 \begin_layout Subsection
5987 \begin_layout Itemize
5988 Wxwidgets: Fix dumper submodes
5991 \begin_layout Itemize
5992 Set core controller types before loadstate
5995 \begin_layout Subsection
5999 \begin_layout Itemize
6000 Fix compiling with bsnes v086.
6003 \begin_layout Subsection
6007 \begin_layout Itemize
6008 Don't prompt before quitting
6011 \begin_layout Itemize
6012 Start unpaused, preserve pause/unpause over load.
6015 \begin_layout Itemize
6016 Try to autodetect if ROM is headered.
6019 \begin_layout Itemize
6020 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6023 \begin_layout Itemize
6024 Allow configuring some hotkeys.
6027 \begin_layout Subsection
6031 \begin_layout Itemize
6032 Lots of code cleanups
6035 \begin_layout Itemize
6036 Fix JMD compression (JMD dumping was broken)
6039 \begin_layout Itemize
6040 Don't crash if Lua C function throws an exception.
6043 \begin_layout Itemize
6044 Support bitmap drawing in Lua.
6047 \begin_layout Itemize
6048 Fix bsnes v085/v086 patches.
6051 \begin_layout Itemize
6052 Improve stability on win32.
6055 \begin_layout Subsection
6059 \begin_layout Itemize
6060 Don't corrupt movie if movie length is integer multiple of frames per page.
6063 \begin_layout Subsection
6067 \begin_layout Itemize
6068 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6071 \begin_layout Itemize
6072 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6073 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6077 \begin_layout Itemize
6078 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6081 \begin_layout Itemize
6082 Wxwidgets: Fix broken modifiers
6085 \begin_layout Itemize
6086 on_paint has parameter now.
6089 \begin_layout Itemize
6090 Optional initital fill for bitmaps
6093 \begin_layout Itemize
6094 Fix palette changing.
6097 \begin_layout Itemize
6098 Optimize rendering a bit.
6101 \begin_layout Itemize
6105 \begin_layout Subsection
6109 \begin_layout Itemize
6110 Movieinfo: Fix display of port #2 type.
6113 \begin_layout Itemize
6114 Call on_input() after loadstate.
6117 \begin_layout Subsection
6121 \begin_layout Itemize
6122 Fix writing port2 data to movie.
6125 \begin_layout Itemize
6126 Fix SRAM handling with Bsnes v087.
6129 \begin_layout Subsection
6133 \begin_layout Itemize
6134 Library loading support
6137 \begin_layout Itemize
6138 Built-in TSCC encoder
6141 \begin_layout Itemize
6142 Hi-color (256T colors) dumping.
6145 \begin_layout Itemize
6146 Dump over TCP/IP(v6)
6149 \begin_layout Itemize
6150 Hidable status panel
6153 \begin_layout Itemize
6157 \begin_layout Itemize
6158 Adjustable sound volume
6161 \begin_layout Itemize
6165 \begin_layout Itemize
6166 Allow DnD into filename boxes
6169 \begin_layout Itemize
6173 \begin_layout Itemize
6174 Portaudio: Fix speaker popping at start
6177 \begin_layout Itemize
6181 \begin_layout Itemize
6182 Speed adjustment menu
6185 \begin_layout Itemize
6186 Win32 joystick support
6189 \begin_layout Itemize
6190 Lua: gui.rainbow and gui.box
6193 \begin_layout Itemize
6194 Split key lists into classes (the key list was large!)
6197 \begin_layout Itemize
6198 More save slots support
6201 \begin_layout Itemize
6202 Wxwidgets (wxJoystick) joystick support
6205 \begin_layout Subsection
6209 \begin_layout Itemize
6210 Lots of internal joystick refactoring
6213 \begin_layout Itemize
6214 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6217 \begin_layout Itemize
6218 Wxwidgets: Settings mode (open settings without ROM)
6221 \begin_layout Itemize
6222 Wxwidgets: Prompt key to use option
6225 \begin_layout Itemize
6226 Wxwidgets: Fix crash if key goes away underneath
6229 \begin_layout Itemize
6230 Wxwidgets: Fix mouse position in presence of scaling
6233 \begin_layout Itemize
6234 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6237 \begin_layout Itemize
6238 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6239 seem to work well on WinXP)
6242 \begin_layout Itemize
6243 Start paused option.
6246 \begin_layout Subsection
6250 \begin_layout Itemize
6254 \begin_layout Itemize
6255 lsnes-dumpavi: Start Lua before starting dumper
6258 \begin_layout Itemize
6259 AVI: Fix secondary audio in mode 4.
6262 \begin_layout Subsection
6266 \begin_layout Itemize
6267 AVI: Refactor ZMBV a bit.
6270 \begin_layout Itemize
6271 Fix error reading analog values from movie file
6274 \begin_layout Subsection
6278 \begin_layout Itemize
6279 Delayed reset support
6282 \begin_layout Itemize
6283 Lua: memory.hash_region
6286 \begin_layout Subsection
6290 \begin_layout Itemize
6291 Rework the build system
6294 \begin_layout Itemize
6295 Typing input support
6298 \begin_layout Itemize
6299 Fix building with bsnes v086 and v087.
6302 \begin_layout Itemize
6303 SDL: Save settings on exit
6306 \begin_layout Itemize
6307 SDL: Command to enter command line mode with given command.
6310 \begin_layout Itemize
6311 SDL: More advanced command editing.
6314 \begin_layout Subsection
6318 \begin_layout Itemize
6320 \begin_inset Quotes eld
6323 arrow keys and enter don't work
6324 \begin_inset Quotes erd
6330 \begin_layout Itemize
6334 \begin_layout Itemize
6335 Show mode changes due to rewinding.
6338 \begin_layout Itemize
6339 Unsafe rewind support
6342 \begin_layout Itemize
6343 Fix directory transversal.
6346 \begin_layout Subsection
6350 \begin_layout Itemize
6351 AVI: Sound mode 5 (48kHz high-quality)
6354 \begin_layout Itemize
6358 \begin_layout Itemize
6359 Map the SNES bus into address space
6362 \begin_layout Itemize
6363 Fix loading memory watch files with CRLF line endings
6366 \begin_layout Subsection
6370 \begin_layout Itemize
6371 Map bsnes internal state into memory space
6374 \begin_layout Itemize
6376 \begin_inset Quotes eld
6379 click on panel wedges the emulator
6380 \begin_inset Quotes erd
6386 \begin_layout Itemize
6387 DnD movies/saves on the main window.
6390 \begin_layout Subsection
6394 \begin_layout Itemize
6395 Split core bindings into own module.
6398 \begin_layout Itemize
6399 Remember invalid settings
6402 \begin_layout Itemize
6403 Support for modified Gambatte core for GB/GBC emulation.
6406 \begin_layout Itemize
6407 Reload/swap ROM function
6410 \begin_layout Subsection
6414 \begin_layout Itemize
6415 Fix step poll function
6418 \begin_layout Subsection
6422 \begin_layout Itemize
6423 Non-insane savestate anchoring
6426 \begin_layout Subsection
6430 \begin_layout Itemize
6431 More Memory search methods
6434 \begin_layout Itemize
6435 Preserve movie if loading in RO mode.
6438 \begin_layout Itemize
6439 Fix a obscure case in timeline check
6442 \begin_layout Itemize
6443 Revamp the entiere ROM loading code
6446 \begin_layout Itemize
6450 \begin_layout Itemize
6454 \begin_layout Itemize
6455 Standalone hotkey config dialog
6458 \begin_layout Itemize
6459 Show bindings in more user-friendly format
6462 \begin_layout Subsection
6466 \begin_layout Itemize
6470 \begin_layout Itemize
6471 Fix uninitialized variables in bsnes v085
6474 \begin_layout Subsection
6478 \begin_layout Itemize
6479 Merge gambatte core into mainline (from its own branch)
6482 \begin_layout Itemize
6483 Wxwidgets: Show expected dump file formats
6486 \begin_layout Itemize
6487 Memory watch: Data typing
6490 \begin_layout Itemize
6491 lsnes internal MMIO area.
6494 \begin_layout Itemize
6495 Wxwidgets: New memory watch editor
6498 \begin_layout Itemize
6499 Hexadecimal memory watches
6502 \begin_layout Itemize
6503 Wxwidgets: Monospaced panel
6506 \begin_layout Itemize
6507 Wxwidgets: Split memory watches in panel
6510 \begin_layout Itemize
6511 Wxwidgets: Disable VMAs in memory search
6514 \begin_layout Itemize
6515 lsnes-dumpavi: Fix speed bug
6518 \begin_layout Itemize
6519 Movie subtitle support
6522 \begin_layout Itemize
6523 Fix rerecord count reporting
6526 \begin_layout Itemize
6527 Don't trash movie when loading in readonly mode.