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 Standard
197 <kind> in the following can be one of:
200 \begin_layout Itemize
201 rom: Cartridge ROM (BIOS for special carts).
206 \begin_layout Itemize
207 bsx: BS-X (non-slotted) Game flash ROM.
211 \begin_layout Itemize
212 bsxslotted: BS-X (slotted) Game flash ROM.
216 \begin_layout Itemize
217 dmg: DMG game ROM (bsnes)
220 \begin_layout Itemize
221 slot-a: Sufami Turbo Slot A ROM (bsnes)
224 \begin_layout Itemize
225 slot-b: Sufami Turbo Slot B ROM (bsnes)
228 \begin_layout Itemize
229 gbrom: Game Boy ROM (gambatte)
232 \begin_layout Itemize
233 gbcrom: Game Boy Color ROM (gambatte)
236 \begin_layout Itemize
237 gbcarom: Game Boy Color ROM (Use GBA initial registers, gambatte)
240 \begin_layout Subsubsection
241 --<kind>=<file> (lsnes/SDL, lsnes-avidump)
244 \begin_layout Standard
245 Load <file> as specified ROM (SFC/BS/DMG/GB/GBC/ST file format).
248 \begin_layout Subsubsection
249 --<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
252 \begin_layout Standard
253 Override hardware detection for ROM, reading the values from <file> (BSNES
254 XML format or gambatte extra flags).
257 \begin_layout Subsubsection
258 --ips-<kind>=<file> (lsnes/SDL, lsnes-avidump)
261 \begin_layout Standard
262 Apply BPS/IPS patch <file> to ROM <kind>.
263 If specified multiple times, the patches are applied in order.
266 \begin_layout Subsubsection
267 --ips-<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
270 \begin_layout Standard
271 Apply BPS/IPS patch <file> to XML of ROM <kind>.
272 If specified multiple times, the patches are applied in order.
275 \begin_layout Subsubsection
276 --ips-offset=<offset> (lsnes/SDL, lsnes-avidump)
279 \begin_layout Standard
280 Set offset to apply to IPS patches.
282 Handy for applying headered IPS patches (use offset of -512 for this).
283 The offset must be 0 for BPS patches.
286 \begin_layout Subsubsection
287 --region=pal (BSNES core only)
290 \begin_layout Standard
291 Force ROM to be considered PAL-only.
294 \begin_layout Itemize
295 Only works on SNES and SGB ROMs (not BS-X or Sufami Turbo).
298 \begin_layout Itemize
299 Attempting to load NTSC movie file will error out.
302 \begin_layout Subsubsection
303 --region=ntsc (BSNES core only)
306 \begin_layout Standard
307 Force ROM to be considered NTSC-only.
310 \begin_layout Itemize
311 Attempting to load PAL movie file will error out.
314 \begin_layout Subsection
318 \begin_layout Subsubsection
322 \begin_layout Standard
326 \begin_layout Subsubsection
327 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
330 \begin_layout Standard
331 Load <filename> as movie or savestate file.
332 All other session options are ignored.
335 \begin_layout Subsubsection
336 --port1=<device> (lsnes/SDL, bsnes core only)
339 \begin_layout Standard
344 \begin_layout Itemize
345 none: No device connected
348 \begin_layout Itemize
349 gamepad: One gamepad (the default)
352 \begin_layout Itemize
353 multitap: Four gamepads (warning: makes most games refuse to start)
356 \begin_layout Itemize
360 \begin_layout Subsubsection
361 --port2=<type> (lsnes/SDL, bsnes core only)
364 \begin_layout Standard
369 \begin_layout Itemize
370 none: No device connected (the default)
373 \begin_layout Itemize
377 \begin_layout Itemize
378 multitap: Four gamepads.
381 \begin_layout Itemize
385 \begin_layout Itemize
386 superscope: Super Scope
389 \begin_layout Itemize
390 justifier: One justifier
393 \begin_layout Itemize
394 justifiers: Two justifiers
397 \begin_layout Subsubsection
398 --gamename=<name> (lsnes/SDL)
401 \begin_layout Standard
402 Set the name of game to <name>.
406 \begin_layout Subsubsection
407 --author=<name> (lsnes/SDL)
410 \begin_layout Standard
411 Add author with full name of <name> (no nickname).
414 \begin_layout Subsubsection
415 --author=|<name> (lsnes/SDL)
418 \begin_layout Standard
419 Add author with nickname of <name> (no full name).
422 \begin_layout Subsubsection
423 --author=<fullname>|<nickname> (lsnes/SDL)
426 \begin_layout Standard
427 Add author with full name of <fullname> and nickname of <nickname>.
430 \begin_layout Subsubsection
431 --rtc-second=<value> (lsnes/SDL)
434 \begin_layout Standard
435 Set RTC second (0 is 1st January 1970 00:00:00Z).
436 Default is 1,000,000,000.
439 \begin_layout Subsubsection
440 --rtc-subsecond=<value> (lsnes/SDL)
443 \begin_layout Standard
450 \begin_layout Subsection
455 \begin_layout Subsubsection
456 --run=<file> (lsnes/SDL)
459 \begin_layout Standard
460 After running main RC file, run this file.
461 If multiple are specified, these execute in order specified.
464 \begin_layout Subsection
465 dump options (lsnes-dumpavi only)
468 \begin_layout Subsubsection
472 \begin_layout Standard
473 Set the dumper to use (required).
474 Use 'list' for listing of known dumpers.
477 \begin_layout Subsubsection
481 \begin_layout Standard
482 Set the mode to use (required for dumpers with multiple modes, forbidden
484 Use 'list' for known modes.
487 \begin_layout Subsubsection
491 \begin_layout Standard
494 \begin_inset Quotes eld
498 \begin_inset Quotes erd
504 \begin_layout Subsubsection
505 --option=<name>=<value>
508 \begin_layout Standard
509 Set option <name> to value <value>.
512 \begin_layout Subsubsection
516 \begin_layout Standard
517 Set number of frames to dump.
521 \begin_layout Subsubsection
525 \begin_layout Standard
526 Run specified lua script (lsnes-dumpavi does not have initialization files).
529 \begin_layout Subsubsection
530 --load-library=<library>
533 \begin_layout Standard
534 Load the specified shared object / dynamic library / dynamic link library.
537 \begin_layout Section
538 Startup file lsnes.rc
541 \begin_layout Standard
542 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
543 This file is located in:
546 \begin_layout Itemize
551 lsnes.rc (if %APPDATA% exists)
554 \begin_layout Itemize
555 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
558 \begin_layout Itemize
559 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
562 \begin_layout Itemize
563 All: ./lsnes.rc (fallback default).
566 \begin_layout Standard
567 If leading directories do not exist, attempt to create them is made.
570 \begin_layout Section
574 \begin_layout Itemize
575 Commands beginning with '*' invoke the corresponding command without alias
579 \begin_layout Itemize
580 If command starts with '+' (after possible '*'), the command is executed
581 as-is when button is pressed, and when button is released, it is executed
582 with '+' replaced by '-'.
585 \begin_layout Itemize
586 Commands without '+' execute only on negative edge (release).
589 \begin_layout Subsection
593 \begin_layout Standard
594 Settings control various aspects of emulator behaviour.
597 \begin_layout Subsubsection
598 set-setting <setting> <value>
601 \begin_layout Standard
602 Sets setting <setting> to value <value> (may be empty).
605 \begin_layout Subsubsection
606 unset-setting <setting>
609 \begin_layout Standard
610 Try to unset setting <setting> (not all settings can be unset).
613 \begin_layout Subsubsection
614 get-setting <setting>
617 \begin_layout Standard
618 Read value of setting <setting>
621 \begin_layout Subsubsection
625 \begin_layout Standard
626 Print names and values of all settings.
629 \begin_layout Subsection
633 \begin_layout Standard
634 Keybindings bind commands or aliases to keys (or pseudo-keys).
638 \begin_layout Standard
642 \begin_layout Itemize
643 Do not bind edge active (+/-) commands to keys with modifiers, that won't
647 \begin_layout Itemize
648 Names of keys and modifiers are platform-dependent.
651 \begin_layout Itemize
652 Be careful before binding pseudo-keys (such as joystick axes, buttons or
653 hats) with modifiers.
654 That may or may not work right.
657 \begin_layout Subsubsection
658 bind-key [<mod>/<modmask>] <key> <command>
661 \begin_layout Standard
662 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
663 ed list) are set as <mod> (comma-seperated list).
666 \begin_layout Standard
667 The names of keys and modifiers are platform-dependent.
670 \begin_layout Subsubsection
671 unbind-key [<mod>/<modmask>] <key>
674 \begin_layout Standard
675 Unbind command from <key> (with specified <mod> and <modmask>).
678 \begin_layout Subsubsection
679 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
680 | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
681 [plus=<val>] [tolerance=<val>]
684 \begin_layout Standard
685 Set axis parameters for axis <axis>.
688 \begin_layout Itemize
689 disabled: Disable axis
692 \begin_layout Itemize
696 \begin_layout Itemize
697 axis-inverse: Inverse axis
700 \begin_layout Itemize
701 pressure0-: Pressure sensitive.
702 Released at 0, pressed at -.
705 \begin_layout Itemize
706 pressure0+: Pressure sensitive.
707 Released at 0, pressed at +.
710 \begin_layout Itemize
711 pressure-0: Pressure sensitive.
712 Released at -, pressed at 0.
715 \begin_layout Itemize
716 pressure-+: Pressure sensitive.
717 Released at -, pressed at +.
720 \begin_layout Itemize
721 pressure+0: Pressure sensitive.
722 Released at +, pressed at 0.
725 \begin_layout Itemize
726 pressure+-: Pressure sensitive.
727 Released at +, pressed at -.
730 \begin_layout Itemize
731 minus=<val>: Calibration at extreme minus position (-32768-32767)
734 \begin_layout Itemize
735 zero=<val>: Calibration at neutral position (-32768-32767)
738 \begin_layout Itemize
739 plus=<val>: Calibration at extreme plus position (-32768-32767)
742 \begin_layout Itemize
743 tolerance=<value>: Center band tolerance (0<x<1).
744 The smaller the value, the more sensitive the control is.
747 \begin_layout Subsubsection
751 \begin_layout Standard
752 Print all key bindings in effect.
755 \begin_layout Subsection
759 \begin_layout Standard
760 Aliases bind command to sequence of commands.
761 After alias has been defined, it replaces the command it shadows.
764 \begin_layout Standard
768 \begin_layout Itemize
769 You can't alias command to itself.
772 \begin_layout Itemize
773 Aliases starting with +/- are edge active just like ordinary commands starting
777 \begin_layout Itemize
778 One command can be aliased to multiple commands.
781 \begin_layout Subsubsection
782 alias-command <command> <expansion>
785 \begin_layout Standard
786 Append <expansion> to alias <command>.
787 If alias does not already exist, it is created.
790 \begin_layout Subsubsection
791 unalias-command <command>
794 \begin_layout Standard
795 Clear alias expansion for <command>.
798 \begin_layout Subsubsection
802 \begin_layout Standard
803 Print all aliases and their expansions in effect.
806 \begin_layout Subsection
810 \begin_layout Standard
811 Run <script> as if commands were entered on the command line.
814 \begin_layout Subsection
818 \begin_layout Standard
819 Following commands control video dumping:
822 \begin_layout Subsubsection
823 start-dump <dumper> [<mode>] <prefix/filename>
826 \begin_layout Standard
827 Start dumping using dumper <dumper>.
828 If mode is present or not and if prefix or filename is present depends
829 on the dumper and dumper mode.
832 \begin_layout Standard
833 The following dumpers are available:
836 \begin_layout Itemize
837 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
841 \begin_layout Itemize
842 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
846 \begin_layout Itemize
847 Mode: cscd/pcm: CSCD video, PCM audio.
852 \begin_layout Itemize
853 INTERNAL-JMD: Internal .jmd dumper.
857 \begin_layout Itemize
861 \begin_layout Itemize
866 \begin_layout Itemize
867 INTERNAL-RAW: Internal RAW dumper.
871 \begin_layout Itemize
875 \begin_layout Itemize
879 \begin_layout Itemize
880 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
883 \begin_layout Itemize
884 Video is always upscaled to double resolution (512x448 / 512 x 478).
887 \begin_layout Itemize
888 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
893 \begin_layout Itemize
894 INTERNAL-SDMP: Internal SDMP dumper.
898 \begin_layout Itemize
899 Mode 'ms': Multi-segment.
903 \begin_layout Itemize
904 Mode 'ss': Single-segment.
909 \begin_layout Subsubsection
913 \begin_layout Standard
914 End dumping using <dumper>
917 \begin_layout Subsubsection
918 show-dumpers [<dumper>]
921 \begin_layout Standard
922 Show the list of dumpers or list of modes for <dumper>
925 \begin_layout Subsection
929 \begin_layout Standard
930 <address> may be decimal or hexadecimal (prefixed with '0x').
931 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
935 \begin_layout Standard
936 The available element <sizes> are:
939 \begin_layout Itemize
943 \begin_layout Itemize
947 \begin_layout Itemize
951 \begin_layout Itemize
955 \begin_layout Standard
956 When reading RAM and ROM, multi-byte reads/writes are big-endian.
957 When dealing with DSP memory, multi-byte reads/writes are native-endian
958 (do not use operand sizes exceeding DSP bitness, except dword is OK for
962 \begin_layout Subsubsection
963 read-<size> <address>
966 \begin_layout Standard
967 Read the value of byte in <address>.
970 \begin_layout Subsubsection
971 read-s<size> <address>
974 \begin_layout Standard
975 Read the value of signed byte in <address>.
978 \begin_layout Subsubsection
979 write-<size> <address> <value>
982 \begin_layout Standard
983 Write <value> to byte in address <address>.
986 \begin_layout Subsubsection
990 \begin_layout Standard
991 Reset the memory search
994 \begin_layout Subsubsection
998 \begin_layout Standard
999 Print number of candidates remaining
1002 \begin_layout Subsubsection
1006 \begin_layout Standard
1007 Print all candidates remaining
1010 \begin_layout Subsubsection
1011 search-memory <usflag><sizeflag><op>
1014 \begin_layout Standard
1015 Searches memory for addresses satisfying criteria.
1018 \begin_layout Standard
1022 \begin_layout Itemize
1026 \begin_layout Itemize
1030 \begin_layout Standard
1034 \begin_layout Itemize
1038 \begin_layout Itemize
1042 \begin_layout Itemize
1046 \begin_layout Itemize
1050 \begin_layout Standard
1054 \begin_layout Itemize
1055 lt: < previous value.
1058 \begin_layout Itemize
1059 le: <= previous value.
1062 \begin_layout Itemize
1063 eq: = previous value.
1066 \begin_layout Itemize
1067 ne: != previous value.
1070 \begin_layout Itemize
1071 ge: >= previous value.
1074 \begin_layout Itemize
1075 gt: > previous value.
1078 \begin_layout Subsubsection
1079 search-memory <sizeflag> <value>
1082 \begin_layout Standard
1083 Searches for addresses that currently have value <value>.
1084 <sizeflag> is as in previous command.
1087 \begin_layout Subsection
1091 \begin_layout Standard
1092 These commands are not available in lsnesrc, but are available after ROM
1096 \begin_layout Subsubsection
1100 \begin_layout Standard
1101 Quits the emulator (asking for confirmation).
1102 If /y is given, no confirmation is asked.
1105 \begin_layout Subsubsection
1109 \begin_layout Standard
1110 Toggle paused/unpaused
1113 \begin_layout Subsubsection
1117 \begin_layout Standard
1119 If the button is still held after configurable timeout expires, game unpauses
1120 for the duration frame advance is held.
1123 \begin_layout Subsubsection
1127 \begin_layout Standard
1129 If the button is still held after configurable timeout expires, game unpauses
1130 for the duration frame advance is held.
1133 \begin_layout Subsubsection
1137 \begin_layout Standard
1138 Skip to first poll in frame after current.
1141 \begin_layout Subsubsection
1145 \begin_layout Standard
1146 Reset the SNES after this frame.
1149 \begin_layout Subsubsection
1153 \begin_layout Standard
1154 Load savestate <filename> in current mode.
1157 \begin_layout Subsubsection
1158 load-state <filename>
1161 \begin_layout Standard
1162 Load savestate <filename> in readwrite mode.
1165 \begin_layout Subsubsection
1166 load-readonly <filename>
1169 \begin_layout Standard
1170 Load savestate <filename> in readonly mode.
1173 \begin_layout Subsubsection
1174 load-preserve <filename>
1177 \begin_layout Standard
1178 Load savestate <filename> in readonly mode, preserving current events.
1181 \begin_layout Subsubsection
1182 load-movie <filename>
1185 \begin_layout Standard
1186 Load savestate <filename>, ignoring save part in readonly mode.
1189 \begin_layout Subsubsection
1190 save-state <filename>
1193 \begin_layout Standard
1194 Save system state to <filename> as soon as possible.
1197 \begin_layout Subsubsection
1198 save-movie <filename>
1201 \begin_layout Standard
1202 Save movie to <filename>.
1205 \begin_layout Subsubsection
1209 \begin_layout Standard
1210 Set read-write mode.
1213 \begin_layout Subsubsection
1217 \begin_layout Standard
1221 \begin_layout Subsubsection
1225 \begin_layout Standard
1226 Toggle between read-only and read-write modes.
1229 \begin_layout Subsubsection
1233 \begin_layout Standard
1234 Set name of the game to <name>
1237 \begin_layout Subsubsection
1241 \begin_layout Standard
1242 Print the name of the game.
1245 \begin_layout Subsubsection
1249 \begin_layout Standard
1250 Adds new author <author>.
1251 If <author> does not contain '|' it is full name.
1252 If it contains '|', '|' splits the full name and nickname.
1255 \begin_layout Subsubsection
1256 edit-author <num> <author>
1259 \begin_layout Standard
1260 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1264 \begin_layout Subsubsection
1268 \begin_layout Standard
1269 Remove author in slot <num>
1272 \begin_layout Subsubsection
1276 \begin_layout Standard
1280 \begin_layout Subsubsection
1281 test-1, test-2, test-3
1284 \begin_layout Standard
1285 Internal test commands.
1289 \begin_layout Subsubsection
1290 take-screenshot <filename>
1293 \begin_layout Standard
1294 Save screenshot to <filename>.
1297 \begin_layout Subsubsection
1298 +controller<num><button>
1301 \begin_layout Standard
1302 Press button <button> on controller <num> (1-8).
1303 The following button names are known:
1306 \begin_layout Itemize
1310 \begin_layout Itemize
1314 \begin_layout Itemize
1318 \begin_layout Itemize
1322 \begin_layout Itemize
1326 \begin_layout Itemize
1330 \begin_layout Itemize
1334 \begin_layout Itemize
1338 \begin_layout Itemize
1342 \begin_layout Itemize
1346 \begin_layout Itemize
1350 \begin_layout Itemize
1354 \begin_layout Itemize
1358 \begin_layout Itemize
1362 \begin_layout Itemize
1366 \begin_layout Itemize
1370 \begin_layout Subsubsection
1371 controllerh<num><button>
1374 \begin_layout Standard
1375 Hold/unhold button <button> on controller <num> (1-8).
1376 See +controller for button names.
1379 \begin_layout Subsubsection
1380 controllerf<num><button>
1383 \begin_layout Standard
1384 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1385 See +controller for button names.
1388 \begin_layout Standard
1389 Cauntion: Does not work properly if outside frame advance.
1392 \begin_layout Subsubsection
1393 autofire (<pattern>|-)...
1396 \begin_layout Standard
1397 Set autofire pattern.
1398 Each parameter is comma-separated list of button names (in form of 1start,
1399 1A, 2B, etc..) to hold on that frame.
1400 After reaching the end of pattern, the pattern restarts from the beginning.
1403 \begin_layout Subsubsection
1407 \begin_layout Standard
1411 \begin_layout Subsection
1415 \begin_layout Subsubsection
1416 cycle-jukebox-backward
1419 \begin_layout Standard
1420 Cycle save jukebox backwards.
1423 \begin_layout Subsubsection
1424 cycle-jukebox-forward
1427 \begin_layout Standard
1428 Cycle save jukebox forwards
1431 \begin_layout Subsubsection
1435 \begin_layout Standard
1436 Do load from jukebox (current mode).
1439 \begin_layout Subsubsection
1443 \begin_layout Standard
1444 Do state save to jukebox.
1447 \begin_layout Subsection
1451 \begin_layout Standard
1452 Only available if lua support is compiled in.
1455 \begin_layout Subsubsection
1456 evaluate-lua <luacode>
1459 \begin_layout Standard
1460 Run Lua code <luacode> using built-in Lua interpretter.
1463 \begin_layout Subsubsection
1467 \begin_layout Standard
1468 Run specified lua file using built-in Lua interpretter.
1471 \begin_layout Subsubsection
1475 \begin_layout Standard
1476 Clear the Lua VM state and restore to factory defaults.
1479 \begin_layout Subsection
1483 \begin_layout Subsubsection
1484 add-watch <name> <expression>
1487 \begin_layout Standard
1488 Adds new watch (or modifies old one).
1491 \begin_layout Subsubsection
1495 \begin_layout Standard
1499 \begin_layout Subsection
1503 \begin_layout Subsubsection
1504 enable-sound <on/off>
1507 \begin_layout Standard
1508 Enable/Disable sound.
1511 \begin_layout Subsubsection
1512 set-sound-device <device>
1515 \begin_layout Standard
1516 Set sound device to <device>
1519 \begin_layout Subsubsection
1523 \begin_layout Standard
1524 Show status of sound system.
1527 \begin_layout Subsubsection
1531 \begin_layout Standard
1532 Show all available devices.
1535 \begin_layout Subsubsection
1536 set-volume <multiplier>
1539 \begin_layout Standard
1540 Set the volume multiplier to <multiplier>.
1541 1 is normal volume, and higher numbers are louder.
1544 \begin_layout Subsubsection
1545 set-volume <multiplier>%
1548 \begin_layout Standard
1549 Set the volume multiplier to <multiplier> percent.
1550 100 is normal volume, and higher numbers are louder.
1553 \begin_layout Subsubsection
1554 set-volume <multiplier>dB
1557 \begin_layout Standard
1558 Set the volume multiplier to <multiplier> dB.
1559 0 is normal volume, and higher numbers are louder.
1560 The value may be negative.
1563 \begin_layout Subsection
1567 \begin_layout Subsubsection
1571 \begin_layout Standard
1572 Reloads the main ROM image from <file>.
1575 \begin_layout Subsection
1576 SDL Platform commands
1579 \begin_layout Standard
1580 The following are valid on SDL platform.
1583 \begin_layout Subsubsection
1587 \begin_layout Standard
1588 Asks to press a key and then identifies that (pseudo-)key.
1591 \begin_layout Subsubsection
1595 \begin_layout Standard
1596 Toggle between windowed/fullscreen console.
1599 \begin_layout Subsubsection
1603 \begin_layout Standard
1604 Scroll messages window as far back as it goes.
1607 \begin_layout Subsubsection
1611 \begin_layout Standard
1612 Scroll messages window as far forward as it goes.
1615 \begin_layout Subsubsection
1619 \begin_layout Standard
1620 Scroll messages window back one screenful.
1623 \begin_layout Subsubsection
1627 \begin_layout Standard
1628 Scroll messages window forward one screenful.
1631 \begin_layout Subsubsection
1632 prompt-command <command>
1635 \begin_layout Standard
1636 Enter command prompt, with prompt prepopulated with specified command.
1639 \begin_layout Section
1643 \begin_layout Subsection
1647 \begin_layout Subsubsection
1651 \begin_layout Standard
1652 Set where bsnes looks for firmware files.
1654 \begin_inset Quotes eld
1658 \begin_inset Quotes erd
1664 \begin_layout Subsubsection
1668 \begin_layout Standard
1670 Numeric, range is 0.001 to
1671 \begin_inset Quotes eld
1675 \begin_inset Quotes erd
1679 Default is native framerate.
1682 \begin_layout Subsubsection
1686 \begin_layout Standard
1687 Set save compression level (integer 0-9).
1688 Default is 7 (0 is no compression).
1691 \begin_layout Subsubsection
1695 \begin_layout Standard
1696 Set the frame advance timeout in milliseconds.
1697 Numeric integer, range is 0-999999999.
1701 \begin_layout Subsection
1705 \begin_layout Subsubsection
1709 \begin_layout Standard
1710 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1714 \begin_layout Subsubsection
1718 \begin_layout Standard
1719 AVI dumper: Set the default left border thickness (unless lua overrides)
1725 \begin_layout Subsubsection
1729 \begin_layout Standard
1730 AVI dumper: Set the default right border thickness (unless lua overrides)
1736 \begin_layout Subsubsection
1740 \begin_layout Standard
1741 AVI dumper: Set the default top border thickness (unless lua overrides)
1747 \begin_layout Subsubsection
1751 \begin_layout Standard
1752 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1758 \begin_layout Subsubsection
1762 \begin_layout Standard
1763 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1768 \begin_layout Subsubsection
1772 \begin_layout Standard
1773 AVI dumper: Compression level (0-18).
1776 \begin_layout Itemize
1777 Compression levels 10 and above are not compatible with stock CSCD codec.
1780 \begin_layout Itemize
1781 Recomended level is 7.
1784 \begin_layout Subsubsection
1788 \begin_layout Standard
1789 AVI dumper: Set method of determining the sound rate.
1792 \begin_layout Itemize
1793 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1794 128, 176.4 and 192 kHz.
1797 \begin_layout Itemize
1798 1: Round down to nearest integer.
1801 \begin_layout Itemize
1802 2: Round up to nearest ingeter.
1805 \begin_layout Subsection
1809 \begin_layout Subsubsection
1813 \begin_layout Standard
1814 JMD dumper: Compression level (0-9).
1817 \begin_layout Subsection
1818 SDL platform settings
1821 \begin_layout Subsubsection
1822 autorepeat-first-delay
1825 \begin_layout Standard
1826 Sets the delay for first character in typematic autorepeat.
1829 \begin_layout Subsubsection
1830 autorepeat-subsequent-delay
1833 \begin_layout Standard
1834 Sets the delay for subsequent characters in typematic autorepeat.
1837 \begin_layout Section
1841 \begin_layout Subsection
1842 Core (in main table)
1845 \begin_layout Subsubsection
1849 \begin_layout Standard
1850 Print line to message console.
1853 \begin_layout Subsubsection
1854 exec(string command)
1857 \begin_layout Standard
1858 Run command as it was entered on the command line
1861 \begin_layout Subsubsection
1865 \begin_layout Standard
1867 First is time since some epoch in seconds, the second is microseconds mod
1868 10^6 since that epoch.
1871 \begin_layout Subsubsection
1875 \begin_layout Standard
1876 Returns true if emulator has finished booting, false if not (on_startup()
1877 will be issued later).
1880 \begin_layout Subsubsection
1881 set_idle_timeout(number timeout)
1884 \begin_layout Standard
1885 Set number of microseconds to block idle for.
1886 After this timeout has expired, on_idle() will be called once.
1889 \begin_layout Subsubsection
1890 set_timer_timeout(number timeout)
1893 \begin_layout Standard
1894 Set number of microseconds to block timer for.
1895 After this timeout has expired, on_timer() will be called once.
1898 \begin_layout Subsubsection
1899 bus_address(number snesaddr)
1902 \begin_layout Standard
1903 Returns virtual address corresponding to specified address on SNES bus.
1906 \begin_layout Subsection
1910 \begin_layout Standard
1911 Bitwise logical functions and related.
1914 \begin_layout Subsubsection
1915 bit.none(number...) / bit.bnot(number...)
1918 \begin_layout Standard
1919 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1923 \begin_layout Subsubsection
1924 bit.any(number...) / bit.bor(number...)
1927 \begin_layout Standard
1928 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1931 \begin_layout Subsubsection
1932 bit.all(number...) / bit.band(number...)
1935 \begin_layout Standard
1936 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1940 \begin_layout Subsubsection
1941 bit.parity(number...) / bit.bxor(number...)
1944 \begin_layout Standard
1945 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1949 \begin_layout Subsubsection
1950 bit.lrotate(number base[, number amount[, number bits]])
1953 \begin_layout Standard
1954 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1957 \begin_layout Subsubsection
1958 bit.rrotate(number base[, number amount[, number bits]])
1961 \begin_layout Standard
1962 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1966 \begin_layout Subsubsection
1967 bit.lshift(number base[, number amount[, number bits]])
1970 \begin_layout Standard
1971 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1972 The new bits are filled with zeroes.
1975 \begin_layout Subsubsection
1976 bit.lrshift(number base[, number amount[, number bits]])
1979 \begin_layout Standard
1980 Shift bits-bit (max 48, default 48) number logically right by amount (default
1982 The new bits are filled with zeroes.
1985 \begin_layout Subsubsection
1986 bit.arshift(number base[, number amount[, number bits]])
1989 \begin_layout Standard
1990 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1992 The new bits are shifted in with copy of the high bit.
1995 \begin_layout Subsubsection
1996 bit.extract(number base[, number bit0[, number bit1,...]])
1999 \begin_layout Standard
2000 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2003 \begin_layout Standard
2007 \begin_layout Itemize
2008 Bit numbers up to 51 should work reliably (then things start falling apart
2009 due to double precision issues).
2012 \begin_layout Itemize
2013 There are two special bit positions, true and false, standing for always
2014 set bit and always clear bit.
2017 \begin_layout Subsubsection
2018 bit.value([number bit1[, number bit2,...]])
2021 \begin_layout Standard
2022 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2024 As special value, nil argument is no-op.
2027 \begin_layout Subsection
2031 \begin_layout Standard
2032 Most of these functions can only be called in on_paint and on_video callbacks.
2033 Exceptions are noted.
2036 \begin_layout Standard
2038 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2039 16-23 are the red component, bits 24-31 are alpha component (0 is fully
2040 opaque, 255 is almost transparent).
2041 -1 is the fully transparent color.
2042 Alpha values greater than 127 do work.
2045 \begin_layout Standard
2046 Origin of coordinates is at top left corner of game display area.
2047 Left and top gaps correspond to negative coordinates.
2050 \begin_layout Subsubsection
2054 \begin_layout Standard
2055 Returns 2-tuple (hresolution, vresolution).
2058 \begin_layout Subsubsection
2059 gui.<class>_gap(number gap)
2062 \begin_layout Standard
2063 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2067 \begin_layout Subsubsection
2068 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2071 \begin_layout Standard
2072 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2077 \begin_layout Itemize
2078 x: X-coordinate to start the drawing from (and x-coordinate at begining
2082 \begin_layout Itemize
2083 y: Y-coordinate to start the drawing from.
2086 \begin_layout Itemize
2087 text: The text to draw.
2090 \begin_layout Itemize
2091 fgc: Text color (default is 0xFFFFFF (white))
2094 \begin_layout Itemize
2095 bgc: Background color (default is -1 (transparent))
2098 \begin_layout Subsubsection
2099 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2102 \begin_layout Standard
2103 Like gui.text, but draw using double-width.
2106 \begin_layout Subsubsection
2107 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2110 \begin_layout Standard
2111 Like gui.text, but draw using double-height.
2114 \begin_layout Subsubsection
2115 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2118 \begin_layout Standard
2119 Like gui.text, but draw using double-width/double-height.
2122 \begin_layout Subsubsection
2123 gui.rectangle(number x, number y, number width, number height[, number thickness[
2124 , number outline[, number fill]]])
2127 \begin_layout Standard
2128 Draw rectangle on the GUI.
2132 \begin_layout Itemize
2133 x: X-coordinate of left edge.
2136 \begin_layout Itemize
2137 y: Y-coordinate of upper edge.
2140 \begin_layout Itemize
2141 width: Width of rectangle.
2144 \begin_layout Itemize
2145 height: Height of rectangle.
2148 \begin_layout Itemize
2149 thickness: Thickness of outline (default is 1).
2152 \begin_layout Itemize
2153 outline: Color of outline (default is 0xFFFFFF (white))
2156 \begin_layout Itemize
2157 fill: Color of fill (default is -1 (transparent))
2160 \begin_layout Subsubsection
2161 gui.box(number x, number y, number width, number height[, number thickness[,
2162 number outline1[,number outline2[, number fill]]]])
2165 \begin_layout Standard
2166 Draw rectangle with 3D effect on the GUI.
2170 \begin_layout Itemize
2171 x: X-coordinate of left edge.
2174 \begin_layout Itemize
2175 y: Y-coordinate of upper edge.
2178 \begin_layout Itemize
2179 width: Width of rectangle.
2182 \begin_layout Itemize
2183 height: Height of rectangle.
2186 \begin_layout Itemize
2187 thickness: Thickness of outline (default is 1).
2190 \begin_layout Itemize
2191 outline1: First color of outline (default is 0xFFFFFF (white))
2194 \begin_layout Itemize
2195 outline2: First color of outline (default is 0x808080 (dark gray))
2198 \begin_layout Itemize
2199 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2202 \begin_layout Subsubsection
2203 gui.pixel(number x, number y[, number color])
2206 \begin_layout Standard
2207 Draw one pixel on the GUI.
2211 \begin_layout Itemize
2212 x: X-coordinate of the pixel
2215 \begin_layout Itemize
2216 y: Y-coordinate of the pixel
2219 \begin_layout Itemize
2220 color: Color of the pixel (default is 0xFFFFFF (white))
2223 \begin_layout Subsubsection
2224 gui.crosshair(number x, number y[, number length[, number color]])
2227 \begin_layout Standard
2232 \begin_layout Itemize
2233 x: X-coordinate of the crosshair
2236 \begin_layout Itemize
2237 y: Y-coordinate of the crosshair
2240 \begin_layout Itemize
2241 length: Length of the crosshair lines (default 10).
2244 \begin_layout Itemize
2245 color: Color of the crosshair (default is 0xFFFFFF (white))
2248 \begin_layout Subsubsection
2249 gui.line(number x1, number y1, number x2, number y2[, number color])
2252 \begin_layout Standard
2257 \begin_layout Itemize
2258 x1: X-coordinate of one end.
2261 \begin_layout Itemize
2262 y1: Y-coordinate of one end.
2265 \begin_layout Itemize
2266 x2: X-coordinate of the other end.
2269 \begin_layout Itemize
2270 y2: Y-coordinate of the other end.
2273 \begin_layout Itemize
2274 color: Color of the line (default is 0xFFFFFF (white)).
2277 \begin_layout Subsubsection
2278 gui.circle(number x, number y, number r[, number thick[, number border[,
2282 \begin_layout Standard
2287 \begin_layout Itemize
2288 x: X-coordinate of the center
2291 \begin_layout Itemize
2292 y: Y-coordinate of the center
2295 \begin_layout Itemize
2296 r: The radius of the circle
2299 \begin_layout Itemize
2300 thick: Border thickness
2303 \begin_layout Itemize
2304 border: Border color (default is 0xFFFFFF (white))
2307 \begin_layout Itemize
2308 fill: Fill color (default is -1 (transparent)).
2311 \begin_layout Subsubsection
2312 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2315 \begin_layout Standard
2316 Draw a bitmap on screen with specified palette.
2320 \begin_layout Itemize
2321 x: X-coordinate of left edge.
2324 \begin_layout Itemize
2325 y: Y-coordinate of top edge.
2328 \begin_layout Itemize
2329 bitmap: The bitmap to draw
2332 \begin_layout Itemize
2333 palette: The palette to draw the bitmap using.
2336 \begin_layout Subsubsection
2337 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2340 \begin_layout Standard
2341 Draw a bitmap on screen.
2345 \begin_layout Itemize
2346 x: X-coordinate of left edge.
2349 \begin_layout Itemize
2350 y: Y-coordinate of top edge.
2353 \begin_layout Itemize
2354 bitmap: The bitmap to draw
2357 \begin_layout Subsubsection
2361 \begin_layout Standard
2362 Returns a new palette (initially all transparent).
2363 Can be used anywhere.
2366 \begin_layout Subsubsection
2367 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2370 \begin_layout Standard
2371 Returns a new bitmap/dbitmap.
2372 Can be used anywhere.
2376 \begin_layout Itemize
2377 w: The width of new bitmap
2380 \begin_layout Itemize
2381 h: The height of new bitmap
2384 \begin_layout Itemize
2385 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2388 \begin_layout Itemize
2389 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2392 \begin_layout Subsubsection
2393 gui.bitmap_load(string file)
2396 \begin_layout Standard
2397 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2399 Can be used anywhere.
2403 \begin_layout Itemize
2404 file: The name of file to load.
2407 \begin_layout Subsubsection
2408 gui.palette_set(palette palette, number index, number color)
2411 \begin_layout Standard
2412 Sets color in palette.
2413 Can be used anywhere.
2417 \begin_layout Itemize
2418 palette: The palette to manipulate
2421 \begin_layout Itemize
2422 index: Index of color (0-65535).
2425 \begin_layout Itemize
2426 color: The color value.
2429 \begin_layout Subsubsection
2430 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2433 \begin_layout Standard
2434 Sets specified pixel in bitmap.
2435 Can be used anywhere.
2439 \begin_layout Itemize
2440 bitmap: The bitmap to manipulate
2443 \begin_layout Itemize
2444 x: The x-coordinate of the pixel.
2447 \begin_layout Itemize
2448 y: The y-coordinate of the pixel.
2451 \begin_layout Itemize
2452 color: If bitmap is a bitmap, color index (0-65535).
2453 Otherwise color value.
2456 \begin_layout Subsubsection
2457 gui.bitmap_size(bitmap/dbitmap bitmap)
2460 \begin_layout Standard
2462 Can be used anywhere.
2466 \begin_layout Itemize
2467 bitmap: The bitmap to query.
2470 \begin_layout Standard
2471 The first return is the width, the second is the height.
2474 \begin_layout Subsubsection
2475 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2476 src, number sx, number sy, number w, number h[, number ck])
2479 \begin_layout Standard
2480 Blit a part of bitmap to another.
2481 Can be used anywhere.
2485 \begin_layout Itemize
2486 dest: Destination to blit to.
2489 \begin_layout Itemize
2490 dx: left edge of target
2493 \begin_layout Itemize
2494 dy: Top edge of target
2497 \begin_layout Itemize
2498 src: The source to blit from.
2499 Must be of the same type as destination.
2502 \begin_layout Itemize
2503 sx: left edge of source
2506 \begin_layout Itemize
2507 sy: Top edge of source
2510 \begin_layout Itemize
2514 \begin_layout Itemize
2515 h: Height of region.
2518 \begin_layout Itemize
2520 Pixels of this color are not blitted.
2524 \begin_layout Itemize
2525 If bitmaps are bitmaps, this is color index of colorkey.
2526 Values outside range 0-65535 cause no key to be used as colorkey.
2529 \begin_layout Itemize
2530 If bitmaps are dbitmaps, this color value of colorkey.
2533 \begin_layout Itemize
2534 May be absent or nil for no colorkey blit.
2538 \begin_layout Subsubsection
2542 \begin_layout Standard
2543 Request on_repaint() to happen as soon as possible.
2544 Can be used anywhere.
2547 \begin_layout Subsubsection
2548 gui.subframe_update(boolean on)
2551 \begin_layout Standard
2552 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2553 or not happen (on=false).
2554 Can be used anywhere.
2557 \begin_layout Subsubsection
2558 gui.screenshot(string filename)
2561 \begin_layout Standard
2562 Write PNG screenshot of the current frame (no drawings) to specified file.
2563 Can be used anywhere.
2566 \begin_layout Subsubsection
2567 gui.color(number r, number g, number b[, number a])
2570 \begin_layout Standard
2571 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2572 each component in scale 0-255.
2573 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2575 The default alpha is 256.
2578 \begin_layout Subsubsection
2579 gui.status(string name, string value)
2582 \begin_layout Standard
2584 \begin_inset Quotes eld
2588 \begin_inset Quotes erd
2591 to <value> in status area.
2592 Can be used anywhere.
2595 \begin_layout Subsubsection
2596 gui.rainbow(number step, number steps[, number color])
2599 \begin_layout Standard
2600 Perform hue rotation of color <color> (default bright red), by <step> steps.
2601 The number of steps per full rotation is given by absolute value of <steps>.
2604 \begin_layout Standard
2605 If <steps> is negative, the rotation will be counterclockwise.
2608 \begin_layout Subsection
2612 \begin_layout Standard
2614 Only available in on_input callback.
2617 \begin_layout Subsubsection
2618 input.get(number controller, number index)
2621 \begin_layout Standard
2622 Read the specified index (0-11) from specified controller (0-7).
2626 \begin_layout Itemize
2627 Uses physical controller numbering.
2628 Gamepad in port 2 is controller 4, not 1!
2631 \begin_layout Subsubsection
2632 input.set(number controller, number index, number value)
2635 \begin_layout Standard
2636 Write the specified index (0-11) from specified controller (0-7), storing
2641 \begin_layout Itemize
2642 Uses physical controller numbering.
2643 Gamepad in port 2 is controller 4, not 1!
2646 \begin_layout Subsubsection
2647 input.geta(number controller)
2650 \begin_layout Standard
2651 Get input state for entiere controller.
2652 Returns 13 return values.
2655 \begin_layout Itemize
2656 1st return value: Bitmask: bit i is set if i:th index is nonzero
2659 \begin_layout Itemize
2660 2nd-13th return value: value of i:th index.
2663 \begin_layout Subsubsection
2664 input.seta(number controller, number bitmask, number args...)
2667 \begin_layout Standard
2668 Set state for entiere controller.
2669 args is up to 12 values for indices (overriding values in bitmask if specified).
2672 \begin_layout Subsubsection
2673 input.controllertype(number controller)
2676 \begin_layout Standard
2677 Get the type of controller as string.
2681 \begin_layout Itemize
2685 \begin_layout Itemize
2689 \begin_layout Itemize
2693 \begin_layout Itemize
2697 \begin_layout Subsubsection
2698 input.reset([number cycles])
2701 \begin_layout Standard
2703 If cycles is greater than zero, do delayed reset.
2704 0 (or no value) causes immediate reset.
2707 \begin_layout Itemize
2708 Only available with subframe flag false.
2711 \begin_layout Subsubsection
2715 \begin_layout Standard
2716 Returns table of tables of all available keys and axes.
2717 The first table is indexed by key name (platform-dependent!), and the inner
2718 table has the following fields:
2721 \begin_layout Itemize
2722 last_rawval: Last reported raw value for control.
2725 \begin_layout Itemize
2726 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2727 pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2730 \begin_layout Itemize
2731 cal_left: Minimum calibration value.
2732 Only meaningful with axis and pressure types.
2735 \begin_layout Itemize
2736 cal_center: Center calibration value.
2737 Only meaningful with axis and pressure types.
2740 \begin_layout Itemize
2741 cal_right: Maximum calibration value.
2742 Only meaningful with axis and pressure types.
2745 \begin_layout Itemize
2746 cal_tolerance: Dead zone tolerance.
2747 Only meaningful with axis and pressure types.
2750 \begin_layout Subsubsection
2751 input.keyhook(key, state)
2754 \begin_layout Standard
2755 Requests that keyhook events to be sent for key (state=true) or not sent
2759 \begin_layout Subsection
2763 \begin_layout Standard
2764 Host memory handling (extra memory saved to savestates).
2765 Host memory starts empty.
2768 \begin_layout Subsubsection
2769 hostmemory.read(number address)
2772 \begin_layout Standard
2773 Reads hostmemory slot address.
2774 Slot numbers out of range return false instead of numeric.
2777 \begin_layout Subsubsection
2778 hostmemory.write(number address, number value)
2781 \begin_layout Standard
2782 Writes hostmemory slot with 0-255.
2783 Slot numbers out of range cause extension of host memory slot space.
2786 \begin_layout Subsubsection
2787 hostmemory.readbyte(number address)
2790 \begin_layout Standard
2791 Read unsigned byte (1 element) from given address.
2792 Slots out of range return false.
2795 \begin_layout Subsubsection
2796 hostmemory.writebyte(number address, number value)
2799 \begin_layout Standard
2800 Write unsigned byte (1 element) to given slot.
2801 Slot numbers out of range cause extension.
2804 \begin_layout Subsubsection
2805 hostmemory.readsbyte(number address)
2808 \begin_layout Standard
2809 Read signed byte (1 element) from given address.
2810 Slots out of range return false.
2813 \begin_layout Subsubsection
2814 hostmemory.writesbyte(number address, number value)
2817 \begin_layout Standard
2818 Write signed byte (1 element) to given slot.
2819 Slot numbers out of range cause extension.
2822 \begin_layout Subsubsection
2823 hostmemory.readword(number address)
2826 \begin_layout Standard
2827 Read unsigned word (2 elements) from given address.
2828 Slots out of range return false.
2831 \begin_layout Subsubsection
2832 hostmemory.writeword(number address, number value)
2835 \begin_layout Standard
2836 Write unsigned word (2 elements) to given slot.
2837 Slot numbers out of range cause extension.
2840 \begin_layout Subsubsection
2841 hostmemory.readsword(number address)
2844 \begin_layout Standard
2845 Read signed word (2 elements) from given address.
2846 Slots out of range return false.
2849 \begin_layout Subsubsection
2850 hostmemory.writesword(number address, number value)
2853 \begin_layout Standard
2854 Write signed word (2 elements) to given slot.
2855 Slot numbers out of range cause extension.
2858 \begin_layout Subsubsection
2859 hostmemory.readdword(number address)
2862 \begin_layout Standard
2863 Read unsigned doubleword (4 elements) from given address.
2864 Slots out of range return false.
2867 \begin_layout Subsubsection
2868 hostmemory.writedword(number address, number value)
2871 \begin_layout Standard
2872 Write unsigned doubleword (4 elements) to given slot.
2873 Slot numbers out of range cause extension.
2876 \begin_layout Subsubsection
2877 hostmemory.readsdword(number address)
2880 \begin_layout Standard
2881 Read signed doubleword (4 elements) from given address.
2882 Slots out of range return false.
2885 \begin_layout Subsubsection
2886 hostmemory.writesdword(number address, number value)
2889 \begin_layout Standard
2890 Write signed doubleword (4 elements) to given slot.
2891 Slot numbers out of range cause extension.
2894 \begin_layout Subsubsection
2895 hostmemory.readqword(number address)
2898 \begin_layout Standard
2899 Read unsigned quadword (8 elements) from given address.
2900 Slots out of range return false.
2903 \begin_layout Subsubsection
2904 hostmemory.writeqword(number address, number value)
2907 \begin_layout Standard
2908 Write unsigned quadword (4 elements) to given slot.
2909 Slot numbers out of range cause extension.
2912 \begin_layout Subsubsection
2913 hostmemory.readsqword(number address)
2916 \begin_layout Standard
2917 Read signed quadword (8 elements) from given address.
2918 Slots out of range return false.
2921 \begin_layout Subsubsection
2922 hostmemory.writesqword(number address, number value)
2925 \begin_layout Standard
2926 Write signed quadword (8 elements) to given slot.
2927 Slot numbers out of range cause extension.
2930 \begin_layout Subsection
2934 \begin_layout Standard
2938 \begin_layout Subsubsection
2939 movie.currentframe()
2942 \begin_layout Standard
2943 Return number of current frame.
2946 \begin_layout Subsubsection
2950 \begin_layout Standard
2951 Return number of frames in movie.
2954 \begin_layout Subsubsection
2958 \begin_layout Standard
2959 Return true if in readonly mode, false if in readwrite.
2962 \begin_layout Subsubsection
2963 movie.set_readwrite()
2966 \begin_layout Standard
2967 Set readwrite mode (does not cause on_readwrite callback).
2970 \begin_layout Subsubsection
2971 movie.frame_subframes(number frame)
2974 \begin_layout Standard
2975 Count number of subframes in specified frame (frame numbers are 1-based)
2979 \begin_layout Subsubsection
2980 movie.read_subframe(number frame, number subframe)
2983 \begin_layout Standard
2984 Read specifed subframe in specified frame and return data as array (100
2985 elements, numbered 0-99 currently).
2988 \begin_layout Subsubsection
2989 movie.unsafe_rewind([UNSAFEREWIND state])
2992 \begin_layout Standard
2993 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2996 \begin_layout Itemize
2997 If called without argument, causes emulator to start process of setting
2998 unsafe rewind point.
2999 When this has finished, callback on_set_rewind occurs, passing the rewind
3000 state to lua script.
3003 \begin_layout Itemize
3004 If called with argument, causes emulator rewind to passed rewind point as
3006 Readwrite mode is implicitly activated.
3009 \begin_layout Standard
3010 The following warnings apply to unsafe rewinding:
3013 \begin_layout Itemize
3014 There are no safety checks against misuse (that's what
3015 \begin_inset Quotes eld
3019 \begin_inset Quotes erd
3025 \begin_layout Itemize
3026 Only call rewind from timeline rewind point was set from.
3029 \begin_layout Itemize
3030 Only call rewind from after the rewind point was set.
3033 \begin_layout Subsection
3037 \begin_layout Standard
3038 Routines for settings manipulation
3041 \begin_layout Subsubsection
3042 settings.get(string name)
3045 \begin_layout Standard
3046 Get value of setting.
3047 If setting is blank, returns false.
3048 If setting value can't be obtained, returns (nil, error message).
3051 \begin_layout Subsubsection
3052 settings.set(string name, string value)
3055 \begin_layout Standard
3056 Set value of setting.
3057 If setting can't be set, returns (nil, error message).
3060 \begin_layout Subsubsection
3061 settings.is_set(string name)
3064 \begin_layout Standard
3065 Returns if setting is set.
3066 If setting does not exist, returns (nil, error message).
3069 \begin_layout Subsubsection
3070 settings.blank(string name)
3073 \begin_layout Standard
3074 Blanks a setting and returns true.
3075 If setting can't be blanked, returns (nil, error message).
3078 \begin_layout Subsection
3082 \begin_layout Standard
3083 Contains various functions for managing memory
3086 \begin_layout Subsubsection
3090 \begin_layout Standard
3091 Returns the number of VMAs
3094 \begin_layout Subsubsection
3095 memory.read_vma(number index)
3098 \begin_layout Standard
3099 Reads the specified VMA (indices start from zero).
3100 Trying to read invalid VMA gives nil.
3101 The read VMA is table with the following fields:
3104 \begin_layout Itemize
3105 region_name (string): The readable name of the VMA
3108 \begin_layout Itemize
3109 baseaddr (number): Base address of the VMA
3112 \begin_layout Itemize
3113 lastaddr (number): Last address in the VMA.
3116 \begin_layout Itemize
3117 size (number): The size of VMA in bytes.
3120 \begin_layout Itemize
3121 readonly (boolean): True of the VMA corresponds to ROM.
3124 \begin_layout Itemize
3125 iospace (boolean): True if the VMA is I/O space.
3128 \begin_layout Itemize
3129 native_endian (boolean): True if the VMA has native endian as opposed to
3133 \begin_layout Subsubsection
3134 memory.find_vma(number address)
3137 \begin_layout Standard
3138 Finds the VMA containing specified address.
3139 Returns table in the same format as read_vma or nil if not found.
3142 \begin_layout Subsubsection
3143 memory.readbyte(number address)
3146 \begin_layout Standard
3147 Reads the specified address as unsigned byte and returns the result.
3150 \begin_layout Subsubsection
3151 memory.readsbyte(number address)
3154 \begin_layout Standard
3155 Reads the specified address as signed byte and returns the result.
3158 \begin_layout Subsubsection
3159 memory.writebyte(number address, number value)
3162 \begin_layout Standard
3163 Writes the specified value (negative values undergo 2's complement) to specified
3164 address (as a byte).
3167 \begin_layout Subsubsection
3168 memory.readword(number address)
3171 \begin_layout Standard
3172 Reads the specified address as unsigned word and returns the result.
3175 \begin_layout Subsubsection
3176 memory.readsword(number address)
3179 \begin_layout Standard
3180 Reads the specified address as signed word and returns the result.
3183 \begin_layout Subsubsection
3184 memory.writeword(number address, number value)
3187 \begin_layout Standard
3188 Writes the specified value (negative values undergo 2's complement) to specified
3189 address (as a word).
3192 \begin_layout Subsubsection
3193 memory.readdword(number address)
3196 \begin_layout Standard
3197 Reads the specified address as unsigned doubleword and returns the result.
3200 \begin_layout Subsubsection
3201 memory.readsdword(number address)
3204 \begin_layout Standard
3205 Reads the specified address as signed doubleword and returns the result.
3208 \begin_layout Subsubsection
3209 memory.writedword(number address, number value)
3212 \begin_layout Standard
3213 Writes the specified value (negative values undergo 2's complement) to specified
3214 address (as a doubleword).
3217 \begin_layout Subsubsection
3218 memory.readqword(number address)
3221 \begin_layout Standard
3222 Reads the specified address as unsigned quadword and returns the result.
3225 \begin_layout Subsubsection
3226 memory.readsqword(number address)
3229 \begin_layout Standard
3230 Reads the specified address as signed quadword and returns the result.
3233 \begin_layout Subsubsection
3234 memory.writeqword(number address, number value)
3237 \begin_layout Standard
3238 Writes the specified value (negative values undergo 2's complement) to specified
3239 address (as a quadword).
3242 \begin_layout Subsubsection
3243 memory.hash_region(number base, number size)
3246 \begin_layout Standard
3247 Hash specified number of bytes starting from specified address and return
3251 \begin_layout Subsection
3255 \begin_layout Standard
3256 Contains copy of global variables from time of Lua initialization.
3260 \begin_layout Subsection
3264 \begin_layout Standard
3265 Various callbacks to Lua that can occur.
3268 \begin_layout Subsubsection
3269 Callback: on_paint(bool not_synth)
3272 \begin_layout Standard
3273 Called when screen is being painted.
3274 Any gui.* calls requiring graphic context draw on the screen.
3277 \begin_layout Standard
3278 not_synth is true if this hook is being called in response to received frame,
3282 \begin_layout Subsubsection
3283 Callback: on_video()
3286 \begin_layout Standard
3287 Called when video dump frame is being painted.
3288 Any gui.* calls requiring graphic context draw on the video.
3291 \begin_layout Subsubsection
3292 Callback: on_frame_emulated()
3295 \begin_layout Standard
3296 Called when emulating frame has completed and on_paint()/on_video() calls
3297 are about to be issued.
3300 \begin_layout Subsubsection
3301 Callback: on_frame()
3304 \begin_layout Standard
3305 Called on each starting whole frame.
3308 \begin_layout Subsubsection
3309 Callback: on_startup()
3312 \begin_layout Standard
3313 Called when the emulator is starting (lsnes.rc and --run files has been run).
3316 \begin_layout Subsubsection
3317 Callback: on_rewind()
3320 \begin_layout Standard
3321 Called when rewind movie to beginning has completed.
3324 \begin_layout Subsubsection
3325 Callback: on_pre_load(string name)
3328 \begin_layout Standard
3329 Called just before savestate/movie load occurs (note: loads are always delayed,
3330 so this occurs even when load was initiated by lua).
3333 \begin_layout Subsubsection
3334 Callback: on_err_load(string name)
3337 \begin_layout Standard
3338 Called if loadstate goes wrong.
3341 \begin_layout Subsubsection
3342 Callback: on_post_load(string name, boolean was_savestate)
3345 \begin_layout Standard
3346 Called on successful loadstate.
3347 was_savestate gives if this was a savestate or a movie.
3350 \begin_layout Subsubsection
3351 Callback: on_pre_save(string name, boolean is_savestate)
3354 \begin_layout Standard
3355 Called just before savestate save occurs (note: movie saves are synchronous
3356 and won't trigger these callbacks if called from Lua).
3359 \begin_layout Subsubsection
3360 Callback: on_err_save(string name)
3363 \begin_layout Standard
3364 Called if savestate goes wrong.
3367 \begin_layout Subsubsection
3368 Callback: on_post_save(string name, boolean is_savestate)
3371 \begin_layout Standard
3372 Called on successful savaestate.
3373 is_savestate gives if this was a savestate or a movie.
3376 \begin_layout Subsubsection
3380 \begin_layout Standard
3381 Called when emulator is shutting down.
3384 \begin_layout Subsubsection
3385 Callback: on_input(boolean subframe)
3388 \begin_layout Standard
3389 Called when emulator is just sending input to bsnes core.
3390 Warning: This is called even in readonly mode, but the results are ignored.
3393 \begin_layout Subsubsection
3394 Callback: on_reset()
3397 \begin_layout Standard
3398 Called when SNES is reset.
3401 \begin_layout Subsubsection
3402 Callback: on_readwrite()
3405 \begin_layout Standard
3406 Called when moving into readwrite mode as result of
3407 \begin_inset Quotes eld
3411 \begin_inset Quotes erd
3414 command (note: moving to rwmode by Lua won't trigger this, as per recursive
3418 \begin_layout Subsubsection
3419 Callback: on_snoop(number port, number controller, number index, number
3423 \begin_layout Standard
3424 Called each time bsnes asks for input.
3425 The value is the final value to be sent to bsnes core (readonly mode, autohold
3426 and autofire have been taken into account).
3427 Might be useful when translating movies to format suitable for console
3429 Note: There is no way to modify the value to be sent.
3432 \begin_layout Subsubsection
3433 Callback: on_keyhook(string keyname, table state)
3436 \begin_layout Standard
3437 Sent when key that has keyhook events requested changes state.
3438 Keyname is name of the key (group) and state is the state (same kind as
3439 table values in input.raw).
3442 \begin_layout Subsubsection
3446 \begin_layout Standard
3447 Called when requested by set_idle_timeout(), the timeout has expired and
3448 emulator is waiting.
3451 \begin_layout Subsubsection
3452 Callback: on_timer()
3455 \begin_layout Standard
3456 Called when requested by set_idle_timeout() and the timeout has expired
3457 (regardless if emulator is waiting).
3460 \begin_layout Subsubsection
3461 Callback: on_set_rewind(UNSAFEREWIND r)
3464 \begin_layout Standard
3465 Called when unsafe rewind object has been constructed.
3468 \begin_layout Subsubsection
3469 Callback: on_pre_rewind()
3472 \begin_layout Standard
3473 Called just before unsafe rewind is about to occur.
3476 \begin_layout Subsubsection
3477 Callback: on_post_rewind()
3480 \begin_layout Standard
3481 Called just after unsafe rewind has occured.
3484 \begin_layout Section
3485 Memory watch expression syntax
3488 \begin_layout Standard
3489 Memory watch expressions are in RPN (Reverse Polish Notation).
3490 At the end of expression, the top entry on stack is taken as the final
3494 \begin_layout Standard
3498 \begin_layout Itemize
3499 Evaluation order is strictly left to right.
3502 \begin_layout Itemize
3503 a is the entry on top of stack
3506 \begin_layout Itemize
3507 b is the entry immediately below top of stack
3510 \begin_layout Itemize
3511 ; separates values to be pushed (no intermediate pop).
3514 \begin_layout Itemize
3515 After end of element, all used stack slots are popped and all results are
3519 \begin_layout Itemize
3520 When pushing multiple values, the pushes occur in order shown.
3523 \begin_layout Standard
3524 The following operators are available:
3527 \begin_layout Itemize
3531 \begin_layout Itemize
3535 \begin_layout Itemize
3539 \begin_layout Itemize
3543 \begin_layout Itemize
3547 \begin_layout Itemize
3551 \begin_layout Itemize
3552 b : read_signed_byte(a)
3555 \begin_layout Itemize
3559 \begin_layout Itemize
3560 d : read_signed_dword(a)
3563 \begin_layout Itemize
3567 \begin_layout Itemize
3569 \begin_inset Formula $\pi$
3575 \begin_layout Itemize
3576 q : read_signed_qword(a)
3579 \begin_layout Itemize
3583 \begin_layout Itemize
3587 \begin_layout Itemize
3591 \begin_layout Itemize
3595 \begin_layout Itemize
3596 w : read_signed_word(a)
3599 \begin_layout Itemize
3603 \begin_layout Itemize
3604 B : read_unsigned_byte(a)
3607 \begin_layout Itemize
3608 C<number>z : Push number <number> to stack.
3611 \begin_layout Itemize
3612 D : read_unsigned_dword(a)
3615 \begin_layout Itemize
3616 C0x<number>z : Push number <number> (hexadecimal) to stack.
3619 \begin_layout Itemize
3620 Q : read_unsigned_qword(a)
3623 \begin_layout Itemize
3624 R<digit> : round a to <digit> digits.
3627 \begin_layout Itemize
3628 W : read_unsigned_word(a)
3631 \begin_layout Subsection
3635 \begin_layout Standard
3636 C0x007e0878zWC0x007e002czW-
3639 \begin_layout Enumerate
3640 Push value 0x7e0878 on top of stack (C0x007e0878z).
3643 \begin_layout Enumerate
3644 Pop the value on top of stack (0x7e0878), read word value at that address
3645 and push the result,call it x1 (W).
3648 \begin_layout Enumerate
3649 Push value 0x7e002c on top of stack (C0x007e002cz).
3652 \begin_layout Enumerate
3653 Pop the value on top of stack (0x7e002c), read word value at that address
3654 and push the result,call it x2 (W).
3657 \begin_layout Enumerate
3658 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3662 \begin_layout Enumerate
3663 Since the expression ends, the final memory watch result is the top one
3664 on stack, which is x2 - x1.
3667 \begin_layout Section
3668 Modifier and key names:
3671 \begin_layout Subsection
3675 \begin_layout Subsubsection
3679 \begin_layout Standard
3680 Following modifier names are known:
3683 \begin_layout Itemize
3684 ctrl, lctrl, rctrl: Control keys
3687 \begin_layout Itemize
3688 alt, lalt, ralt: ALT keys.
3691 \begin_layout Itemize
3692 shift, lshift, rshift: Shift keys.
3695 \begin_layout Itemize
3696 meta, lmeta, rmeta: Meta keys.
3699 \begin_layout Itemize
3700 num, caps: Numlock/Capslock (these are sticky!)
3703 \begin_layout Itemize
3707 \begin_layout Subsubsection
3711 \begin_layout Standard
3712 Following key names are known:
3715 \begin_layout Itemize
3716 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3717 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3718 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3719 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3720 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3721 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3722 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3723 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3724 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3725 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3726 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3727 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3728 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3729 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3730 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3731 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3732 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3733 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3734 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3735 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3736 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3737 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3738 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3739 break, menu, power, euro, undo
3742 \begin_layout Itemize
3743 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3744 hardware-dependent scan code of <n> (useful to bind those keys that don't
3745 have symbolic names).
3748 \begin_layout Subsubsection
3749 Joystick pseudo-keys:
3752 \begin_layout Itemize
3753 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3756 \begin_layout Itemize
3757 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3760 \begin_layout Itemize
3761 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3764 \begin_layout Itemize
3765 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3768 \begin_layout Itemize
3769 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3772 \begin_layout Itemize
3773 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3774 position (axis modes axis and axis_inverse).
3777 \begin_layout Itemize
3778 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3779 position (axis modes axis and axis_inverse).
3782 \begin_layout Itemize
3783 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3787 \begin_layout Subsubsection
3791 \begin_layout Itemize
3792 Escape: Enter/Exit Command mode, cancel modal dialogs.
3795 \begin_layout Itemize
3796 Return (also KPEnter): Execute command, ok modal dialog.
3799 \begin_layout Itemize
3800 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3804 \begin_layout Itemize
3805 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3809 \begin_layout Itemize
3810 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3813 \begin_layout Itemize
3814 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3817 \begin_layout Itemize
3818 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3821 \begin_layout Itemize
3822 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3825 \begin_layout Itemize
3827 if no num lock; command mode): Delete character to right of cursor.
3830 \begin_layout Itemize
3831 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3835 \begin_layout Itemize
3836 Backspace (command mode): Delete character to left of cursor.
3839 \begin_layout Itemize
3840 CTRL+LEFT (also ALT+B; command mode): Previous word.
3843 \begin_layout Itemize
3844 CTRL+RIGHT (also ALT+F; command mode): Next word.
3847 \begin_layout Itemize
3848 ALT+D (also CTRL+W; command mode): Delete word.
3851 \begin_layout Itemize
3852 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3855 \begin_layout Subsection
3859 \begin_layout Subsubsection
3863 \begin_layout Standard
3864 Following modifier names are known:
3867 \begin_layout Itemize
3871 \begin_layout Itemize
3875 \begin_layout Itemize
3879 \begin_layout Itemize
3883 \begin_layout Itemize
3887 \begin_layout Subsubsection
3891 \begin_layout Standard
3892 Following key names are known:
3895 \begin_layout Itemize
3896 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3897 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3898 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3899 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3900 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3901 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3902 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3903 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3904 pause, capital, end, home, lefT, up, right, down, select, print, execute,
3905 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3906 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3907 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3908 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3909 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3910 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3911 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3912 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3913 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3914 windows_right, windows_menu, command, special1, special2, special3, special4,
3915 special5, special6, special7, special8, special9, special10, special11,
3916 special12, special13, special14, special15, special16, special17, special18,
3917 special19, special20
3920 \begin_layout Section
3924 \begin_layout Standard
3925 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3926 (note: If you recompress it, do not use compression methods other than
3927 store and deflate and especially do not use encryption of any kind).
3930 \begin_layout Subsection
3931 Detecting clean start/SRAM/Savestate
3934 \begin_layout Itemize
3936 \begin_inset Quotes eld
3940 \begin_inset Quotes erd
3943 it is savestate, otherwise:
3946 \begin_layout Itemize
3947 If file has members with names starting
3948 \begin_inset Quotes eld
3952 \begin_inset Quotes erd
3955 it is movie starting from SRAM, otherwise:
3958 \begin_layout Itemize
3959 It is movie starting from clear state.
3962 \begin_layout Subsection
3966 \begin_layout Standard
3967 Type of game ROM and region (as one line).
3971 \begin_layout Standard
3972 \begin_inset Tabular
3973 <lyxtabular version="3" rows="8" columns="3">
3974 <features tabularvalignment="middle">
3975 <column alignment="center" valignment="top" width="0">
3976 <column alignment="center" valignment="top" width="0">
3977 <column alignment="center" valignment="top" width="0">
3979 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3982 \begin_layout Plain Layout
3988 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3991 \begin_layout Plain Layout
3997 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4000 \begin_layout Plain Layout
4008 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4011 \begin_layout Plain Layout
4017 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4020 \begin_layout Plain Layout
4026 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4029 \begin_layout Plain Layout
4037 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4040 \begin_layout Plain Layout
4046 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4049 \begin_layout Plain Layout
4055 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4058 \begin_layout Plain Layout
4066 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4069 \begin_layout Plain Layout
4075 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4078 \begin_layout Plain Layout
4084 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4087 \begin_layout Plain Layout
4095 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4098 \begin_layout Plain Layout
4104 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4107 \begin_layout Plain Layout
4113 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4116 \begin_layout Plain Layout
4124 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4127 \begin_layout Plain Layout
4133 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4136 \begin_layout Plain Layout
4142 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4145 \begin_layout Plain Layout
4153 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4156 \begin_layout Plain Layout
4162 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4165 \begin_layout Plain Layout
4171 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4174 \begin_layout Plain Layout
4182 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4185 \begin_layout Plain Layout
4191 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4194 \begin_layout Plain Layout
4200 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4203 \begin_layout Plain Layout
4217 \begin_layout Standard
4221 \begin_layout Standard
4222 \begin_inset Tabular
4223 <lyxtabular version="3" rows="3" columns="2">
4224 <features tabularvalignment="middle">
4225 <column alignment="center" valignment="top" width="0">
4226 <column alignment="center" valignment="top" width="0">
4228 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4231 \begin_layout Plain Layout
4237 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4240 \begin_layout Plain Layout
4248 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4251 \begin_layout Plain Layout
4257 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4260 \begin_layout Plain Layout
4268 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4271 \begin_layout Plain Layout
4277 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4280 \begin_layout Plain Layout
4294 \begin_layout Subsection
4298 \begin_layout Standard
4299 Contains type of port #1 (as one line).
4300 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4301 If not present, defaults to 'gamepad'.
4304 \begin_layout Subsection
4308 \begin_layout Standard
4309 Contains type of port #2 (as one line).
4310 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4311 'justifier' and 'justifiers'.
4312 If not present, defaults to 'none'.
4315 \begin_layout Subsection
4319 \begin_layout Standard
4320 Contains name of the game (as one line).
4323 \begin_layout Subsection
4327 \begin_layout Standard
4328 Contains authors, one per line.
4329 Part before '|' is the full name, part after is the nickname.
4332 \begin_layout Subsection
4336 \begin_layout Standard
4338 \begin_inset Quotes eld
4342 \begin_inset Quotes erd
4346 Used to reject other saves.
4349 \begin_layout Subsection
4350 Member: controlsversion
4353 \begin_layout Standard
4355 \begin_inset Quotes eld
4359 \begin_inset Quotes erd
4363 Used to identify what controls are there.
4366 \begin_layout Subsection
4368 \begin_inset Quotes eld
4372 \begin_inset Quotes erd
4378 \begin_layout Standard
4379 Contains bsnes core version number (as one line).
4382 \begin_layout Subsection
4386 \begin_layout Standard
4387 Contains project ID (as one line).
4388 Used to identify if two movies are part of the same project.
4391 \begin_layout Subsection
4392 Member: {rom,slota,slotb}{,xml}.sha256
4395 \begin_layout Standard
4396 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4397 Absent if corresponding file is absent.
4400 \begin_layout Subsection
4401 Member: moviesram.<name>
4404 \begin_layout Standard
4405 Raw binary startup SRAM of kind <name>.
4406 Only present in savestates and movies starting from SRAM.
4409 \begin_layout Subsection
4413 \begin_layout Standard
4414 Contains frame number (as one line) of frame movie was saved on.
4415 Only present in savestates.
4418 \begin_layout Subsection
4422 \begin_layout Standard
4423 Current value of lag counter (as one line).
4424 Only present in savestates.
4427 \begin_layout Subsection
4428 Member: pollcounters
4431 \begin_layout Standard
4432 Contains poll counters (currently 100 of them), one per line.
4433 Each line is raw poll count if DRDY is set for it.
4434 Otherwise it is negative poll count minus one.
4435 Only present in savestates.
4438 \begin_layout Subsection
4442 \begin_layout Standard
4443 Raw binary dump of host memory.
4444 Only present in savestates.
4447 \begin_layout Subsection
4451 \begin_layout Standard
4452 The raw binary savestate itself.
4453 Savestate detection uses this file, only present in savestates.
4456 \begin_layout Subsection
4460 \begin_layout Standard
4461 Screenshot of current frame.
4462 Only present in savestates.
4463 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4465 Height of image is inferred from the width and size of data.
4468 \begin_layout Subsection
4472 \begin_layout Standard
4473 Raw binary SRAM of kind <name> at time of savestate.
4474 Only present in savestates.
4477 \begin_layout Subsection
4481 \begin_layout Standard
4482 The actual input track, one line per subframe (blank lines are skipped).
4485 \begin_layout Itemize
4486 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4487 part of same frame as previous, otherwise it starts a new frame.
4490 \begin_layout Itemize
4491 First subframe must start a new frame.
4494 \begin_layout Standard
4495 Length of movie in frames is number of lines in input file that start a
4499 \begin_layout Subsection
4503 \begin_layout Standard
4504 Contains textual base-10 rerecord count (as one line; emulator just writes
4505 this, it doesn't read it) + 1.
4508 \begin_layout Subsection
4512 \begin_layout Standard
4513 This member stores set of load IDs.
4514 There is one load ID per rerecord (plus one corresponding to start of project).
4517 \begin_layout Itemize
4518 This member constists of concatenation of records
4521 \begin_layout Itemize
4522 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4526 \begin_layout Itemize
4527 IDs are interpretted as 256-bit big-endian integers with warparound.
4530 \begin_layout Itemize
4531 Initial predicted ID is all zeroes.
4534 \begin_layout Standard
4535 Format of each record is:
4538 \begin_layout Itemize
4539 1 byte: Opcode byte.
4540 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4544 \begin_layout Itemize
4545 32-prefixlen bytes of ID.
4548 \begin_layout Itemize
4549 countlen bytes of big-endian count (count).
4552 \begin_layout Standard
4553 Records are processed as follows:
4556 \begin_layout Itemize
4557 To form the first ID encoded by record, take the first prefixlen bytes predicted
4558 ID and append the read ID value to it.
4559 The result is the first ID encoded.
4562 \begin_layout Itemize
4563 If countlen is 0, record encodes 1 ID.
4566 \begin_layout Itemize
4567 If countlen is 1, record encodes 2+count IDs.
4570 \begin_layout Itemize
4571 If countlen is 2, record encodes 258+count IDs.
4574 \begin_layout Itemize
4575 If countlen is 3, record encodes 65794+count IDs.
4578 \begin_layout Itemize
4579 The new predicted ID is the next ID after last one encoded by the record.
4582 \begin_layout Standard
4583 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4587 \begin_layout Subsection
4588 Member: starttime.second
4591 \begin_layout Standard
4592 Movie starting time, second part.
4593 Epoch is Unix epoch.
4594 Default is 1,000,000,000.
4597 \begin_layout Subsection
4598 Member: starttime.subsecond
4601 \begin_layout Standard
4602 Movie starting time, subsecond part.
4607 \begin_layout Subsection
4608 Member: savetime.second
4611 \begin_layout Standard
4612 Movie saving time, second part.
4613 Default is starttime.second.
4614 Only present in savestates.
4617 \begin_layout Subsection
4618 Member: savetime.subsecond
4621 \begin_layout Standard
4622 Movie saving time, subsecond part.
4623 Default is starttime.subsecond.
4624 Only present in savestates.
4627 \begin_layout Section
4628 Quick'n'dirty encode guide
4631 \begin_layout Enumerate
4632 Start the emulator and load the movie file.
4635 \begin_layout Enumerate
4636 Set large AVI option 'set-setting avi-large on'
4639 \begin_layout Enumerate
4640 Enable dumping 'dump-avi tmpdump'
4643 \begin_layout Enumerate
4644 Unpause and let it run until you want to end dumping.
4647 \begin_layout Enumerate
4648 Close the emulator (closing the window is the easiest way).
4652 \begin_layout Enumerate
4653 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4654 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4657 \begin_layout Enumerate
4658 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4661 \begin_layout Enumerate
4662 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4663 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4666 \begin_layout Enumerate
4667 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4668 Now final.mkv contains quick'n'dirty encode.
4671 \begin_layout Section
4672 Axis configurations for some gamepad types:
4675 \begin_layout Subsection
4679 \begin_layout Standard
4680 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4683 \begin_layout LyX-Code
4684 set-axis joystick0axis2 pressure-+
4687 \begin_layout LyX-Code
4688 set-axis joystick0axis5 pressure-+
4691 \begin_layout Itemize
4692 This is needed for SDL only.
4693 EVDEV sets those types correctly.
4696 \begin_layout Subsection
4698 \begin_inset Quotes eld
4702 \begin_inset Quotes erd
4708 \begin_layout Standard
4709 Axes 8-19 should be disabled.
4712 \begin_layout LyX-Code
4713 set-axis joystick0axis8 disabled
4716 \begin_layout LyX-Code
4717 set-axis joystick0axis9 disabled
4720 \begin_layout LyX-Code
4721 set-axis joystick0axis10 disabled
4724 \begin_layout LyX-Code
4725 set-axis joystick0axis11 disabled
4728 \begin_layout LyX-Code
4729 set-axis joystick0axis12 disabled
4732 \begin_layout LyX-Code
4733 set-axis joystick0axis13 disabled
4736 \begin_layout LyX-Code
4737 set-axis joystick0axis14 disabled
4740 \begin_layout LyX-Code
4741 set-axis joystick0axis15 disabled
4744 \begin_layout LyX-Code
4745 set-axis joystick0axis16 disabled
4748 \begin_layout LyX-Code
4749 set-axis joystick0axis17 disabled
4752 \begin_layout LyX-Code
4753 set-axis joystick0axis18 disabled
4756 \begin_layout LyX-Code
4757 set-axis joystick0axis19 disabled
4760 \begin_layout Section
4764 \begin_layout Subsection
4765 Problems from BSNES core:
4768 \begin_layout Itemize
4769 The whole pending save stuff.
4772 \begin_layout Itemize
4773 Lack of layer hiding.
4776 \begin_layout Itemize
4777 It is slow (especially accuracy).
4780 \begin_layout Itemize
4781 Firmwares can't be loaded from ZIP archives.
4784 \begin_layout Subsection
4788 \begin_layout Itemize
4789 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4792 \begin_layout Itemize
4793 Audio for last dumped frame is not itself dumped.
4796 \begin_layout Itemize
4797 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4800 \begin_layout Itemize
4801 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4804 \begin_layout Itemize
4805 No menus, command based interface (SDL).
4808 \begin_layout Itemize
4809 Long commands don't scroll.
4812 \begin_layout Itemize
4813 Wxwidgets UI is still buggy.
4816 \begin_layout Section
4820 \begin_layout Subsection
4824 \begin_layout Itemize
4828 \begin_layout Itemize
4829 Fix dumper video corruption with levels 10-18.
4832 \begin_layout Subsection
4836 \begin_layout Itemize
4840 \begin_layout Itemize
4841 Lots of code cleanups
4844 \begin_layout Itemize
4845 Lua interface to settings
4848 \begin_layout Itemize
4849 Allow specifying AVI borders without Lua
4852 \begin_layout Itemize
4853 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4856 \begin_layout Itemize
4857 on_snoop lua callback
4860 \begin_layout Itemize
4861 Faster movie loading and saving.
4864 \begin_layout Subsection
4868 \begin_layout Itemize
4872 \begin_layout Subsection
4876 \begin_layout Itemize
4880 \begin_layout Itemize
4881 Save jukebox functionality.
4884 \begin_layout Subsection
4888 \begin_layout Itemize
4889 Try to fix some nasty failing movie load edge cases
4892 \begin_layout Itemize
4893 Allow specifying scripts to run on command line.
4896 \begin_layout Subsection
4900 \begin_layout Itemize
4901 Major source code reorganization.
4904 \begin_layout Itemize
4905 Backup savestates before overwriting.
4908 \begin_layout Itemize
4909 Don't crash if loading initial state fails.
4912 \begin_layout Subsection
4916 \begin_layout Itemize
4920 \begin_layout Itemize
4921 Fix author name parsing
4924 \begin_layout Itemize
4925 Fix rerecord counting
4928 \begin_layout Itemize
4929 (SDL) Print messages to console if SDL is uninitialized
4932 \begin_layout Itemize
4933 Add movieinfo program
4936 \begin_layout Itemize
4937 Fix loading movies starting from SRAM.
4940 \begin_layout Subsection
4944 \begin_layout Itemize
4945 Add support for unattended dumping
4948 \begin_layout Itemize
4949 Fix compiling for Win32
4952 \begin_layout Itemize
4953 Don't lock up if sound can't be initialized
4956 \begin_layout Itemize
4957 Strip trailing CR from commands
4960 \begin_layout Itemize
4961 Don't try to do dubious things in global ctors (fix crash on startup)
4964 \begin_layout Subsection
4968 \begin_layout Itemize
4969 Small documentation tweaking
4972 \begin_layout Itemize
4976 \begin_layout Itemize
4977 Fix major bug in modifier matching
4980 \begin_layout Subsection
4984 \begin_layout Itemize
4985 Lots of documentation fixes
4988 \begin_layout Itemize
4989 Use dedicated callbacks for event backcomm., not commands.
4992 \begin_layout Itemize
4993 Ensure that the watchdog is not hit when executing delayed reset.
4996 \begin_layout Itemize
4997 Remove errant tab from joystick message.
5000 \begin_layout Subsection
5004 \begin_layout Itemize
5005 Make autofire operate in absolute time, not linear time
5008 \begin_layout Itemize
5009 Reinitialize controls when resuming from loadstate
5012 \begin_layout Itemize
5013 Some more code cleanups
5016 \begin_layout Itemize
5017 If Lua allocator fails, call OOM_panic()
5020 \begin_layout Itemize
5021 Byte/word/dword/qword sized host memory write/read functions.
5024 \begin_layout Itemize
5025 Dump at correct framerate if dumping interlaced NTSC (height=448).
5028 \begin_layout Subsection
5032 \begin_layout Itemize
5033 Actually include the complete source code
5036 \begin_layout Itemize
5040 \begin_layout Subsection
5044 \begin_layout Itemize
5045 Document {save,start}time.{,sub}second.
5048 \begin_layout Itemize
5049 Intercept time() from bsnes core.
5052 \begin_layout Subsection
5056 \begin_layout Itemize
5057 Allow disabling time() interception (allow build on Mac OS X)
5060 \begin_layout Itemize
5061 Use SDLMain on Mac OS X (make SDL not crash)
5064 \begin_layout Itemize
5065 Disable delayed resets (just plain too buggy for now).
5068 \begin_layout Itemize
5072 \begin_layout Itemize
5073 Use 16-bit for graphics/video instead of 32-bit.
5076 \begin_layout Itemize
5077 gui.rectangle/gui.pixel
5080 \begin_layout Itemize
5084 \begin_layout Itemize
5085 New CSCD writer implementation.
5088 \begin_layout Subsection
5092 \begin_layout Itemize
5093 Fix interaction of * and +.
5096 \begin_layout Itemize
5100 \begin_layout Itemize
5101 Use gettimeofday()/usleep(), these seem portable enough.
5104 \begin_layout Itemize
5105 Move joystick axis manipulation to keymapper code.
5108 \begin_layout Itemize
5109 Changes to how read-only works.
5112 \begin_layout Itemize
5113 Refactor controller input code.
5116 \begin_layout Subsection
5120 \begin_layout Itemize
5121 Fix mouseclick scale compensation.
5124 \begin_layout Itemize
5125 Draw area boundaries correctly in SDL code.
5128 \begin_layout Itemize
5132 \begin_layout Itemize
5133 Fix CSCD output (buffer overrun and race condition).
5136 \begin_layout Subsection
5140 \begin_layout Itemize
5141 JMD dumping support.
5144 \begin_layout Itemize
5145 Allow unattended dumping to JMD.
5148 \begin_layout Itemize
5152 \begin_layout Itemize
5153 Switch back to 32-bit colors.
5156 \begin_layout Itemize
5157 Add Lua function gui.color.
5160 \begin_layout Itemize
5161 Use some new C++11 features in GCC 4.6.
5164 \begin_layout Itemize
5165 Be prepared for core frequency changes.
5168 \begin_layout Itemize
5169 Pass colors in one chunk from Lua.
5172 \begin_layout Subsection
5176 \begin_layout Itemize
5177 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5178 memory.read_vma() and memory.find_vma().
5181 \begin_layout Itemize
5182 Numerious documentation fixups
5185 \begin_layout Itemize
5186 RTC time format changed
5189 \begin_layout Itemize
5190 Reformat flags display
5193 \begin_layout Itemize
5194 Allow lua package name to be overridden
5197 \begin_layout Itemize
5198 SDUMP (high-quality dumping).
5201 \begin_layout Itemize
5202 Split platform support to plugins.
5205 \begin_layout Itemize
5206 Make all sound plugins support basic sound commands
5209 \begin_layout Itemize
5210 Support portaudio for sound.
5213 \begin_layout Itemize
5214 Allow disable Lua/SDL searching.
5217 \begin_layout Itemize
5218 Upconvert colors when copying lcscreen to screen.
5221 \begin_layout Itemize
5222 Reorganize source tree.
5225 \begin_layout Itemize
5226 Evdev joystick support.
5229 \begin_layout Itemize
5230 Refactor more code into generic window code.
5233 \begin_layout Subsection
5237 \begin_layout Itemize
5238 Refactor message handling.
5241 \begin_layout Itemize
5245 \begin_layout Itemize
5249 \begin_layout Itemize
5250 Finish pending saves before load/quit.
5253 \begin_layout Itemize
5254 Wxwidgets graphics plugin.
5257 \begin_layout Subsection
5261 \begin_layout Itemize
5262 Get rid of win32-crap.[ch]pp.
5265 \begin_layout Itemize
5266 Move files around a lot.
5269 \begin_layout Itemize
5270 Get rid of need for host C++ compiler.
5273 \begin_layout Itemize
5277 \begin_layout Itemize
5278 Refactor inter-component communication.
5281 \begin_layout Itemize
5285 \begin_layout Itemize
5286 Fix crash on multiline aliases.
5289 \begin_layout Itemize
5290 Load/Save settings in wxwidgets gui.
5293 \begin_layout Subsection
5297 \begin_layout Itemize
5298 Patch problems in bsnes core
5301 \begin_layout Itemize
5302 SNES is little-endian, not big-endian!
5305 \begin_layout Itemize
5306 Fix memory corruption in lcscreen::load()
5309 \begin_layout Subsection
5313 \begin_layout Itemize
5314 Fix interpretting repeat counts in rrdata loading.
5317 \begin_layout Itemize
5318 New lua callback: on_frame()
5321 \begin_layout Itemize
5322 Remove calls to runtosave() that aren't supposed to be there
5325 \begin_layout Itemize
5326 Lua function: movie.read_rtc()
5329 \begin_layout Itemize
5330 Ignore src/fonts/font.cpp
5333 \begin_layout Itemize
5334 Fix more bsnes core problems
5337 \begin_layout Itemize
5338 Control bsnes random seeding
5341 \begin_layout Itemize
5345 \begin_layout Itemize
5346 Some bsnes core debugging features (state dump and state hash)
5349 \begin_layout Itemize
5350 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5351 it was 'lsnes rr0-beta21').
5354 \begin_layout Subsection
5358 \begin_layout Itemize
5359 Fix memory corruption due to macro/field mixup
5362 \begin_layout Itemize
5363 search-memory update
5366 \begin_layout Itemize
5367 Allow direct-mapped framebuffer
5370 \begin_layout Itemize
5371 SDL: Use SDL_ANYFORMAT if possible
5374 \begin_layout Itemize
5375 SDMP2SOX: 2s delay modes.
5378 \begin_layout Itemize
5382 \begin_layout Itemize
5383 Use sed -E, not sed -r.
5384 Fixes building on Mac OS X.
5387 \begin_layout Itemize
5388 Wxwidgets: Save jukebox on exit
5391 \begin_layout Itemize
5392 Fix RTC if using load-movie on savestate.
5395 \begin_layout Itemize
5396 Fix crash related to full console mode.
5399 \begin_layout Subsection
5403 \begin_layout Itemize
5404 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5407 \begin_layout Itemize
5408 Wxwidgets: Allow compiling on Mac OS X.
5411 \begin_layout Itemize
5412 Use movie compare instead of movie hashing (faster save/load).
5415 \begin_layout Itemize
5419 \begin_layout Subsection
5423 \begin_layout Itemize
5424 sdmp2sox: Pad soundtrack if using -l or -L.
5427 \begin_layout Itemize
5428 sdmp2sox: Fix NTSC overscan.
5431 \begin_layout Itemize
5432 sdmp2sox: Add AR correction mode.
5435 \begin_layout Itemize
5436 call lua_close() when exiting.
5439 \begin_layout Itemize
5440 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5443 \begin_layout Subsection
5447 \begin_layout Itemize
5448 Fix IPS patching code (use bsnes core IPS patcher).
5451 \begin_layout Itemize
5452 Implement BPS patching (using bsnes core IPS patcher).
5455 \begin_layout Itemize
5456 Add feature to load headered ROMs.
5459 \begin_layout Subsection
5463 \begin_layout Itemize
5464 Show command names when showing keybindings
5467 \begin_layout Subsection
5471 \begin_layout Itemize
5472 Fix pause-on-end to be actually controllable
5475 \begin_layout Itemize
5476 SDL: Poll all events in queue, not just first one (fixes slowness in command
5480 \begin_layout Itemize
5481 Wxwidgets: Fix ROM loading.
5484 \begin_layout Subsection
5488 \begin_layout Itemize
5489 Lua: Add gui.textH, gui.textV, gui.textHV
5492 \begin_layout Itemize
5493 Fix text colors on SDL on Mac OS X
5496 \begin_layout Itemize
5497 Mode 'F' for finished in readonly mode.
5500 \begin_layout Itemize
5504 \begin_layout Itemize
5505 Reliably pause after skip poll
5508 \begin_layout Itemize
5509 Split UI and core into their own threads
5512 \begin_layout Subsection
5516 \begin_layout Itemize
5517 Remove leftover dummy SRAM slot
5520 \begin_layout Itemize
5521 Fix controller numbers.
5524 \begin_layout Subsection
5528 \begin_layout Itemize
5529 Fix lsnes-dumpavi after interface change.
5532 \begin_layout Itemize
5533 Also give BSNES patches for v085.
5536 \begin_layout Itemize
5537 Pack movie data in memory.
5540 \begin_layout Subsection
5544 \begin_layout Itemize
5545 Fix framecount/length given when loading movies.
5548 \begin_layout Itemize
5549 Controller command memory leak fixes.
5552 \begin_layout Itemize
5553 Don't leak palette if freeing screen object.
5556 \begin_layout Subsection
5560 \begin_layout Itemize
5564 \begin_layout Itemize
5565 Wxwidgets: Allow controlling dumper from the menu.
5568 \begin_layout Subsection
5572 \begin_layout Itemize
5573 Rewrite parts of manual
5576 \begin_layout Itemize
5577 Lua: Make it work with Lua 5.2.
5580 \begin_layout Subsection
5584 \begin_layout Itemize
5585 Win32: Fix compile errors.
5588 \begin_layout Subsection
5592 \begin_layout Itemize
5593 Refactor controller input code.
5596 \begin_layout Itemize
5597 Fix crash when using command line on SDL / Mac OS X.
5600 \begin_layout Subsection
5604 \begin_layout Itemize
5605 Delete core/coroutine (obsolete)
5608 \begin_layout Itemize
5609 Lag input display by one frame.
5612 \begin_layout Itemize
5613 Rewind movie to beginning function.
5616 \begin_layout Itemize
5617 Fix wrong frame number reported to Lua when repainting after loadstate
5620 \begin_layout Itemize
5621 Support UI editing of jukebox
5624 \begin_layout Itemize
5625 Wxwidgets: Save settings on exit.
5628 \begin_layout Itemize
5629 Support ${project} for filenames
5632 \begin_layout Itemize
5633 SDL: Fix command history
5636 \begin_layout Subsection
5640 \begin_layout Itemize
5641 Fix some order-of-global-ctor bugs.
5644 \begin_layout Subsection
5648 \begin_layout Itemize
5649 Fix crashes when quitting on Win32.
5652 \begin_layout Subsection
5656 \begin_layout Itemize
5657 EVDEV: Queue keypresses from joystick, don't send directly
5660 \begin_layout Itemize
5661 Wxwidgets: Load-Preserve that actually works.
5664 \begin_layout Subsection
5668 \begin_layout Itemize
5669 Wxwidgets: GUI for memory search.
5672 \begin_layout Itemize
5673 Warn about using synchronous queue in UI callback.
5676 \begin_layout Subsection
5680 \begin_layout Itemize
5681 Remember last saved file for each ROM
5684 \begin_layout Itemize
5685 Support MT dumping via boost.
5688 \begin_layout Itemize
5692 \begin_layout Itemize
5696 \begin_layout Itemize
5697 Make mouse be ordinary input instead of special-casing
5700 \begin_layout Itemize
5701 SDL: Don't screw up commands with NUL codepoints.
5704 \begin_layout Subsection
5708 \begin_layout Itemize
5709 Merge status panel and main window
5712 \begin_layout Itemize
5713 True movie slot support (the rest of it)
5716 \begin_layout Itemize
5717 SDL: Fix compilation error
5720 \begin_layout Itemize
5721 Elminate cross calls in dump menu code.
5724 \begin_layout Subsection
5728 \begin_layout Itemize
5729 Cancel pending saves command
5732 \begin_layout Itemize
5733 Wxwidgets: Code refactoring
5736 \begin_layout Itemize
5737 Wxwidgets: Fix system -> reset
5740 \begin_layout Itemize
5741 Wxwidgets: Read watch expressions in the right thread
5744 \begin_layout Subsection
5748 \begin_layout Itemize
5749 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5753 \begin_layout Itemize
5754 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5757 \begin_layout Itemize
5758 Don't append trailing '-' to prefix when saving movie.
5761 \begin_layout Itemize
5762 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5765 \begin_layout Subsection
5769 \begin_layout Itemize
5770 Document memory watch syntax.
5773 \begin_layout Subsection
5777 \begin_layout Itemize
5778 Fix unattended dumping (lsnes-dumpavi)
5781 \begin_layout Itemize
5785 \begin_layout Itemize
5786 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5789 \begin_layout Itemize
5790 Add option to control sample rate preturbation in AVI dumper
5793 \begin_layout Subsection
5797 \begin_layout Itemize
5798 Wxwidgets: Fix dumper submodes
5801 \begin_layout Itemize
5802 Set core controller types before loadstate
5805 \begin_layout Subsection
5809 \begin_layout Itemize
5810 Fix compiling with bsnes v086.
5813 \begin_layout Subsection
5817 \begin_layout Itemize
5818 Don't prompt before quitting
5821 \begin_layout Itemize
5822 Start unpaused, preserve pause/unpause over load.
5825 \begin_layout Itemize
5826 Try to autodetect if ROM is headered.
5829 \begin_layout Itemize
5830 Wxwidgets: Only bring up ROM patching screen if specifically requested.
5833 \begin_layout Itemize
5834 Allow configuring some hotkeys.
5837 \begin_layout Subsection
5841 \begin_layout Itemize
5842 Lots of code cleanups
5845 \begin_layout Itemize
5846 Fix JMD compression (JMD dumping was broken)
5849 \begin_layout Itemize
5850 Don't crash if Lua C function throws an exception.
5853 \begin_layout Itemize
5854 Support bitmap drawing in Lua.
5857 \begin_layout Itemize
5858 Fix bsnes v085/v086 patches.
5861 \begin_layout Itemize
5862 Improve stability on win32.
5865 \begin_layout Subsection
5869 \begin_layout Itemize
5870 Don't corrupt movie if movie length is integer multiple of frames per page.
5873 \begin_layout Subsection
5877 \begin_layout Itemize
5878 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
5881 \begin_layout Itemize
5882 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
5883 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
5887 \begin_layout Itemize
5888 Wxwidgets: Fix internal focus lost (hotkeys stop working)
5891 \begin_layout Itemize
5892 Wxwidgets: Fix broken modifiers
5895 \begin_layout Itemize
5896 on_paint has parameter now.
5899 \begin_layout Itemize
5900 Optional initital fill for bitmaps
5903 \begin_layout Itemize
5904 Fix palette changing.
5907 \begin_layout Itemize
5908 Optimize rendering a bit.
5911 \begin_layout Itemize
5915 \begin_layout Subsection
5919 \begin_layout Itemize
5920 Movieinfo: Fix display of port #2 type.
5923 \begin_layout Itemize
5924 Call on_input() after loadstate.
5927 \begin_layout Subsection
5931 \begin_layout Itemize
5932 Fix writing port2 data to movie.
5935 \begin_layout Itemize
5936 Fix SRAM handling with Bsnes v087.
5939 \begin_layout Subsection
5943 \begin_layout Itemize
5944 Library loading support
5947 \begin_layout Itemize
5948 Built-in TSCC encoder
5951 \begin_layout Itemize
5952 Hi-color (256T colors) dumping.
5955 \begin_layout Itemize
5956 Dump over TCP/IP(v6)
5959 \begin_layout Itemize
5960 Hidable status panel
5963 \begin_layout Itemize
5967 \begin_layout Itemize
5968 Adjustable sound volume
5971 \begin_layout Itemize
5975 \begin_layout Itemize
5976 Allow DnD into filename boxes
5979 \begin_layout Itemize
5983 \begin_layout Itemize
5984 Portaudio: Fix speaker popping at start
5987 \begin_layout Itemize
5991 \begin_layout Itemize
5992 Speed adjustment menu
5995 \begin_layout Itemize
5996 Win32 joystick support
5999 \begin_layout Itemize
6000 Lua: gui.rainbow and gui.box
6003 \begin_layout Itemize
6004 Split key lists into classes (the key list was large!)
6007 \begin_layout Itemize
6008 More save slots support
6011 \begin_layout Itemize
6012 Wxwidgets (wxJoystick) joystick support
6015 \begin_layout Subsection
6019 \begin_layout Itemize
6020 Lots of internal joystick refactoring
6023 \begin_layout Itemize
6024 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6027 \begin_layout Itemize
6028 Wxwidgets: Settings mode (open settings without ROM)
6031 \begin_layout Itemize
6032 Wxwidgets: Prompt key to use option
6035 \begin_layout Itemize
6036 Wxwidgets: Fix crash if key goes away underneath
6039 \begin_layout Itemize
6040 Wxwidgets: Fix mouse position in presence of scaling
6043 \begin_layout Itemize
6044 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6047 \begin_layout Itemize
6048 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6049 seem to work well on WinXP)
6052 \begin_layout Itemize
6053 Start paused option.
6056 \begin_layout Subsection
6060 \begin_layout Itemize
6064 \begin_layout Itemize
6065 lsnes-dumpavi: Start Lua before starting dumper
6068 \begin_layout Itemize
6069 AVI: Fix secondary audio in mode 4.
6072 \begin_layout Subsection
6076 \begin_layout Itemize
6077 AVI: Refactor ZMBV a bit.
6080 \begin_layout Itemize
6081 Fix error reading analog values from movie file
6084 \begin_layout Subsection
6088 \begin_layout Itemize
6089 Delayed reset support
6092 \begin_layout Itemize
6093 Lua: memory.hash_region
6096 \begin_layout Subsection
6100 \begin_layout Itemize
6101 Rework the build system
6104 \begin_layout Itemize
6105 Typing input support
6108 \begin_layout Itemize
6109 Fix building with bsnes v086 and v087.
6112 \begin_layout Itemize
6113 SDL: Save settings on exit
6116 \begin_layout Itemize
6117 SDL: Command to enter command line mode with given command.
6120 \begin_layout Itemize
6121 SDL: More advanced command editing.
6124 \begin_layout Subsection
6128 \begin_layout Itemize
6130 \begin_inset Quotes eld
6133 arrow keys and enter don't work
6134 \begin_inset Quotes erd
6140 \begin_layout Itemize
6144 \begin_layout Itemize
6145 Show mode changes due to rewinding.
6148 \begin_layout Itemize
6149 Unsafe rewind support
6152 \begin_layout Itemize
6153 Fix directory transversal.
6156 \begin_layout Subsection
6160 \begin_layout Itemize
6161 AVI: Sound mode 5 (48kHz high-quality)
6164 \begin_layout Itemize
6168 \begin_layout Itemize
6169 Map the SNES bus into address space
6172 \begin_layout Itemize
6173 Fix loading memory watch files with CRLF line endings
6176 \begin_layout Subsection
6180 \begin_layout Itemize
6181 Map bsnes internal state into memory space
6184 \begin_layout Itemize
6186 \begin_inset Quotes eld
6189 click on panel wedges the emulator
6190 \begin_inset Quotes erd
6196 \begin_layout Itemize
6197 DnD movies/saves on the main window.
6200 \begin_layout Subsection
6204 \begin_layout Itemize
6205 Split core bindings into own module.
6208 \begin_layout Itemize
6209 Remember invalid settings
6212 \begin_layout Itemize
6213 Support for modified Gambatte core for GB/GBC emulation.
6216 \begin_layout Itemize
6217 Reload/swap ROM function
6220 \begin_layout Subsection
6224 \begin_layout Itemize
6225 Fix step poll function