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 libao (libao sound only)
146 \begin_layout Enumerate
147 Lua (if Lua support is needed).
151 \begin_layout Itemize
152 Version 5.1.X or 5.2X.
156 \begin_layout Enumerate
157 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
160 \begin_layout Section
164 \begin_layout Itemize
165 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
169 \begin_layout Itemize
170 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
173 \begin_layout Itemize
174 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
178 \begin_layout Itemize
179 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
180 ersion>', gambatte core)
183 \begin_layout Itemize
184 Edit options.build (or copy of that file)
187 \begin_layout Itemize
188 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
192 \begin_layout Section
196 \begin_layout Subsection
200 \begin_layout Subsubsection
201 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
204 \begin_layout Standard
208 \begin_layout Subsection
212 \begin_layout Subsubsection
216 \begin_layout Standard
220 \begin_layout Subsubsection
221 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
224 \begin_layout Standard
225 Load <filename> as movie or savestate file.
226 All other session options are ignored.
229 \begin_layout Subsubsection
230 --port1=<device> (lsnes/SDL, bsnes core only)
233 \begin_layout Standard
238 \begin_layout Itemize
239 none: No device connected
242 \begin_layout Itemize
243 gamepad: One gamepad (the default)
246 \begin_layout Itemize
247 multitap: Four gamepads (warning: makes most games refuse to start)
250 \begin_layout Itemize
254 \begin_layout Subsubsection
255 --port2=<type> (lsnes/SDL, bsnes core only)
258 \begin_layout Standard
263 \begin_layout Itemize
264 none: No device connected (the default)
267 \begin_layout Itemize
271 \begin_layout Itemize
272 multitap: Four gamepads.
275 \begin_layout Itemize
279 \begin_layout Itemize
280 superscope: Super Scope
283 \begin_layout Itemize
284 justifier: One justifier
287 \begin_layout Itemize
288 justifiers: Two justifiers
291 \begin_layout Subsubsection
292 --gamename=<name> (lsnes/SDL)
295 \begin_layout Standard
296 Set the name of game to <name>.
300 \begin_layout Subsubsection
301 --author=<name> (lsnes/SDL)
304 \begin_layout Standard
305 Add author with full name of <name> (no nickname).
308 \begin_layout Subsubsection
309 --author=|<name> (lsnes/SDL)
312 \begin_layout Standard
313 Add author with nickname of <name> (no full name).
316 \begin_layout Subsubsection
317 --author=<fullname>|<nickname> (lsnes/SDL)
320 \begin_layout Standard
321 Add author with full name of <fullname> and nickname of <nickname>.
324 \begin_layout Subsubsection
325 --rtc-second=<value> (lsnes/SDL)
328 \begin_layout Standard
329 Set RTC second (0 is 1st January 1970 00:00:00Z).
330 Default is 1,000,000,000.
333 \begin_layout Subsubsection
334 --rtc-subsecond=<value> (lsnes/SDL)
337 \begin_layout Standard
344 \begin_layout Subsubsection
345 --anchor-savestate=<file> (lsnes/SDL)
348 \begin_layout Standard
349 Set the anchor savestate file.
352 \begin_layout Subsubsection
353 --load=<file> (lsnes/wxwidgets)
356 \begin_layout Standard
357 After loading the ROM, load <file> as savestate/movie.
360 \begin_layout Subsection
365 \begin_layout Subsubsection
366 --run=<file> (lsnes/SDL)
369 \begin_layout Standard
370 After running main RC file, run this file.
371 If multiple are specified, these execute in order specified.
374 \begin_layout Subsection
375 dump options (lsnes-dumpavi only)
378 \begin_layout Subsubsection
382 \begin_layout Standard
383 Set the dumper to use (required).
384 Use 'list' for listing of known dumpers.
387 \begin_layout Subsubsection
391 \begin_layout Standard
392 Set the mode to use (required for dumpers with multiple modes, forbidden
394 Use 'list' for known modes.
397 \begin_layout Subsubsection
401 \begin_layout Standard
404 \begin_inset Quotes eld
408 \begin_inset Quotes erd
414 \begin_layout Subsubsection
415 --option=<name>=<value>
418 \begin_layout Standard
419 Set option <name> to value <value>.
422 \begin_layout Subsubsection
426 \begin_layout Standard
427 Set number of frames to dump.
431 \begin_layout Subsubsection
435 \begin_layout Standard
436 Run specified lua script (lsnes-dumpavi does not have initialization files).
439 \begin_layout Subsubsection
440 --load-library=<library>
443 \begin_layout Standard
444 Load the specified shared object / dynamic library / dynamic link library.
447 \begin_layout Section
448 Startup file lsnes.rc
451 \begin_layout Standard
452 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
453 This file is located in:
456 \begin_layout Itemize
461 lsnes.rc (if %APPDATA% exists)
464 \begin_layout Itemize
465 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
468 \begin_layout Itemize
469 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
472 \begin_layout Itemize
473 All: ./lsnes.rc (fallback default).
476 \begin_layout Standard
477 If leading directories do not exist, attempt to create them is made.
480 \begin_layout Section
484 \begin_layout Itemize
485 Commands beginning with '*' invoke the corresponding command without alias
489 \begin_layout Itemize
490 If command starts with '+' (after possible '*'), the command is executed
491 as-is when button is pressed, and when button is released, it is executed
492 with '+' replaced by '-'.
495 \begin_layout Itemize
496 Commands without '+' execute only on negative edge (release).
499 \begin_layout Subsection
503 \begin_layout Standard
504 Run <script> as if commands were entered on the command line.
507 \begin_layout Subsection
511 \begin_layout Standard
512 <address> may be decimal or hexadecimal (prefixed with '0x').
513 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
517 \begin_layout Standard
518 The available element <sizes> are:
521 \begin_layout Itemize
525 \begin_layout Itemize
529 \begin_layout Itemize
533 \begin_layout Itemize
537 \begin_layout Standard
538 When reading RAM and ROM, multi-byte reads/writes are big-endian.
539 When dealing with DSP memory, multi-byte reads/writes are native-endian
540 (do not use operand sizes exceeding DSP bitness, except dword is OK for
544 \begin_layout Subsubsection
545 read-<size> <address>
548 \begin_layout Standard
549 Read the value of byte in <address>.
552 \begin_layout Subsubsection
553 read-s<size> <address>
556 \begin_layout Standard
557 Read the value of signed byte in <address>.
560 \begin_layout Subsubsection
561 write-<size> <address> <value>
564 \begin_layout Standard
565 Write <value> to byte in address <address>.
568 \begin_layout Subsection
572 \begin_layout Standard
573 These commands are not available in lsnesrc, but are available after ROM
577 \begin_layout Subsubsection
581 \begin_layout Standard
582 Quits the emulator (asking for confirmation).
583 If /y is given, no confirmation is asked.
586 \begin_layout Subsubsection
590 \begin_layout Standard
591 Toggle paused/unpaused
594 \begin_layout Subsubsection
598 \begin_layout Standard
600 If the button is still held after configurable timeout expires, game unpauses
601 for the duration frame advance is held.
604 \begin_layout Subsubsection
608 \begin_layout Standard
610 If the button is still held after configurable timeout expires, game unpauses
611 for the duration frame advance is held.
614 \begin_layout Subsubsection
618 \begin_layout Standard
619 Skip to first poll in frame after current.
622 \begin_layout Subsubsection
626 \begin_layout Standard
627 Reset the SNES after this frame.
630 \begin_layout Subsubsection
634 \begin_layout Standard
635 Load savestate <filename> in current mode.
638 \begin_layout Subsubsection
639 load-state <filename>
642 \begin_layout Standard
643 Load savestate <filename> in readwrite mode.
646 \begin_layout Subsubsection
647 load-readonly <filename>
650 \begin_layout Standard
651 Load savestate <filename> in readonly mode.
654 \begin_layout Subsubsection
655 load-preserve <filename>
658 \begin_layout Standard
659 Load savestate <filename> in readonly mode, preserving current events.
662 \begin_layout Subsubsection
663 load-movie <filename>
666 \begin_layout Standard
667 Load savestate <filename>, ignoring save part in readonly mode.
670 \begin_layout Subsubsection
671 save-state <filename>
674 \begin_layout Standard
675 Save system state to <filename> as soon as possible.
678 \begin_layout Subsubsection
679 save-movie <filename>
682 \begin_layout Standard
683 Save movie to <filename>.
686 \begin_layout Subsubsection
690 \begin_layout Standard
694 \begin_layout Subsubsection
698 \begin_layout Standard
702 \begin_layout Subsubsection
706 \begin_layout Standard
707 Toggle between read-only and read-write modes.
710 \begin_layout Subsubsection
711 test-1, test-2, test-3
714 \begin_layout Standard
715 Internal test commands.
719 \begin_layout Subsubsection
720 take-screenshot <filename>
723 \begin_layout Standard
724 Save screenshot to <filename>.
727 \begin_layout Subsubsection
728 +controller <class>-<#>-<button>
731 \begin_layout Standard
732 Press button <button> on controller <num> of class <class>.
735 \begin_layout Itemize
736 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
737 ext0, ext1, ext2, ext3
740 \begin_layout Itemize
744 \begin_layout Itemize
745 Class 'superscope': trigger, cursor, turbo, pause
748 \begin_layout Itemize
749 Class 'justifier': trigger, start
752 \begin_layout Itemize
753 Class 'gb': A, B, select, start, up, down, left, right
756 \begin_layout Subsubsection
757 hold-controller <class>-<#>-<button>
760 \begin_layout Standard
761 Hold/unhold button <button> on controller <num> of class <class>.
764 \begin_layout Subsubsection
765 type-controller <class>-<#>-<button>
768 \begin_layout Standard
769 Hold/unhold button <button> on controller <num> of class <class> for the
771 See +controller for button names.
774 \begin_layout Standard
775 Cauntion: Does not work properly if outside frame advance.
778 \begin_layout Subsubsection
779 designate-position <class>-<#>-analog<n>
782 \begin_layout Standard
783 Designate position for analog pair.
784 <n> is only there if there are multiple axis pairs.
787 \begin_layout Subsubsection
788 autofire (<pattern>|-)...
791 \begin_layout Standard
792 Set autofire pattern.
793 Each parameter is comma-separated list of button names to hold on that
795 After reaching the end of pattern, the pattern restarts from the beginning.
798 \begin_layout Subsubsection
802 \begin_layout Standard
806 \begin_layout Subsection
810 \begin_layout Subsubsection
811 cycle-jukebox-backward
814 \begin_layout Standard
815 Cycle save jukebox backwards.
818 \begin_layout Subsubsection
819 cycle-jukebox-forward
822 \begin_layout Standard
823 Cycle save jukebox forwards
826 \begin_layout Subsubsection
830 \begin_layout Standard
831 Do load from jukebox (current mode).
834 \begin_layout Subsubsection
838 \begin_layout Standard
839 Do state save to jukebox.
842 \begin_layout Subsection
846 \begin_layout Standard
847 Only available if lua support is compiled in.
850 \begin_layout Subsubsection
851 evaluate-lua <luacode>
854 \begin_layout Standard
855 Run Lua code <luacode> using built-in Lua interpretter.
858 \begin_layout Subsubsection
862 \begin_layout Standard
863 Run specified lua file using built-in Lua interpretter.
866 \begin_layout Subsubsection
870 \begin_layout Standard
871 Clear the Lua VM state and restore to factory defaults.
874 \begin_layout Subsection
878 \begin_layout Subsubsection
879 add-watch <name> <expression>
882 \begin_layout Standard
883 Adds new watch (or modifies old one).
886 \begin_layout Subsubsection
890 \begin_layout Standard
894 \begin_layout Subsection
898 \begin_layout Subsubsection
899 enable-sound <on/off>
902 \begin_layout Standard
903 Enable/Disable sound.
906 \begin_layout Subsubsection
907 set-volume <multiplier>
910 \begin_layout Standard
911 Set the volume multiplier to <multiplier>.
912 1 is normal volume, and higher numbers are louder.
915 \begin_layout Subsubsection
916 set-volume <multiplier>%
919 \begin_layout Standard
920 Set the volume multiplier to <multiplier> percent.
921 100 is normal volume, and higher numbers are louder.
924 \begin_layout Subsubsection
925 set-volume <multiplier>dB
928 \begin_layout Standard
929 Set the volume multiplier to <multiplier> dB.
930 0 is normal volume, and higher numbers are louder.
931 The value may be negative.
934 \begin_layout Subsection
938 \begin_layout Subsubsection
942 \begin_layout Standard
943 Reloads the main ROM image from <file>.
946 \begin_layout Subsubsection
950 \begin_layout Standard
951 Tangent for recording voice for commentary track.
952 While pressed, record a stream.
955 \begin_layout Section
959 \begin_layout Subsection
963 \begin_layout Subsubsection
967 \begin_layout Standard
968 Set where bsnes looks for firmware files.
970 \begin_inset Quotes eld
974 \begin_inset Quotes erd
980 \begin_layout Subsubsection
984 \begin_layout Standard
986 Numeric, range is 0.001 to
987 \begin_inset Quotes eld
991 \begin_inset Quotes erd
995 Default is native framerate.
998 \begin_layout Subsubsection
1002 \begin_layout Standard
1003 Set save compression level (integer 0-9).
1004 Default is 7 (0 is no compression).
1007 \begin_layout Subsubsection
1011 \begin_layout Standard
1012 Set the frame advance timeout in milliseconds.
1013 Numeric integer, range is 0-999999999.
1017 \begin_layout Subsubsection
1018 allow-inconsistent-saves (bsnes only)
1021 \begin_layout Standard
1022 If true, save without synchronization.
1023 Makes games seriously unstable.
1026 \begin_layout Subsubsection
1027 save-every-frame (bsnes only)
1030 \begin_layout Standard
1031 If true, simulate saving on each frame.
1032 Trades off emulation accuracy for sync stability.
1033 Also needed if the movie assumes saving on each frame for rewind.
1036 \begin_layout Subsection
1040 \begin_layout Subsubsection
1044 \begin_layout Standard
1045 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1049 \begin_layout Subsubsection
1053 \begin_layout Standard
1054 AVI dumper: Set the default left border thickness (unless lua overrides)
1060 \begin_layout Subsubsection
1064 \begin_layout Standard
1065 AVI dumper: Set the default right border thickness (unless lua overrides)
1071 \begin_layout Subsubsection
1075 \begin_layout Standard
1076 AVI dumper: Set the default top border thickness (unless lua overrides)
1082 \begin_layout Subsubsection
1086 \begin_layout Standard
1087 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1093 \begin_layout Subsubsection
1097 \begin_layout Standard
1098 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1103 \begin_layout Subsubsection
1107 \begin_layout Standard
1108 AVI dumper: Compression level (0-18).
1111 \begin_layout Itemize
1112 Compression levels 10 and above are not compatible with stock CSCD codec.
1115 \begin_layout Itemize
1116 Recomended level is 7.
1119 \begin_layout Subsubsection
1123 \begin_layout Standard
1124 AVI dumper: Set method of determining the sound rate.
1127 \begin_layout Itemize
1128 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1129 128, 176.4 and 192 kHz.
1132 \begin_layout Itemize
1133 1: Round down to nearest integer.
1136 \begin_layout Itemize
1137 2: Round up to nearest ingeter.
1140 \begin_layout Subsection
1144 \begin_layout Subsubsection
1148 \begin_layout Standard
1149 JMD dumper: Compression level (0-9).
1152 \begin_layout Subsection
1153 SDL platform settings
1156 \begin_layout Subsubsection
1157 autorepeat-first-delay
1160 \begin_layout Standard
1161 Sets the delay for first character in typematic autorepeat.
1164 \begin_layout Subsubsection
1165 autorepeat-subsequent-delay
1168 \begin_layout Standard
1169 Sets the delay for subsequent characters in typematic autorepeat.
1172 \begin_layout Section
1176 \begin_layout Subsection
1177 Core (in main table)
1180 \begin_layout Subsubsection
1184 \begin_layout Standard
1185 Print line to message console.
1188 \begin_layout Subsubsection
1189 exec(string command)
1192 \begin_layout Standard
1193 Run command as it was entered on the command line
1196 \begin_layout Subsubsection
1200 \begin_layout Standard
1202 First is time since some epoch in seconds, the second is microseconds mod
1203 10^6 since that epoch.
1206 \begin_layout Subsubsection
1210 \begin_layout Standard
1211 Returns true if emulator has finished booting, false if not (on_startup()
1212 will be issued later).
1215 \begin_layout Subsubsection
1216 set_idle_timeout(number timeout)
1219 \begin_layout Standard
1220 Set number of microseconds to block idle for.
1221 After this timeout has expired, on_idle() will be called once.
1224 \begin_layout Subsubsection
1225 set_timer_timeout(number timeout)
1228 \begin_layout Standard
1229 Set number of microseconds to block timer for.
1230 After this timeout has expired, on_timer() will be called once.
1233 \begin_layout Subsubsection
1234 bus_address(number snesaddr)
1237 \begin_layout Standard
1238 Returns virtual address corresponding to specified address on SNES bus.
1241 \begin_layout Subsubsection
1242 loopwrapper(function fun, ...)
1245 \begin_layout Standard
1246 Calls function fun with function and specified arguments.
1247 The function passed suspends execution until the function returned is called.
1248 Handy for linear flow control among multiple invocations of a hook.
1252 \begin_layout LyX-Code
1253 on_paint = loopwrapper(function(wait)
1257 \begin_layout LyX-Code
1262 \begin_layout LyX-Code
1264 \begin_inset Quotes eld
1268 \begin_inset Quotes erd
1274 \begin_layout LyX-Code
1279 \begin_layout LyX-Code
1284 \begin_layout LyX-Code
1288 \begin_layout Subsection
1292 \begin_layout Standard
1293 Bitwise logical functions and related.
1296 \begin_layout Subsubsection
1297 bit.none(number...) / bit.bnot(number...)
1300 \begin_layout Standard
1301 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1305 \begin_layout Subsubsection
1306 bit.any(number...) / bit.bor(number...)
1309 \begin_layout Standard
1310 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1313 \begin_layout Subsubsection
1314 bit.all(number...) / bit.band(number...)
1317 \begin_layout Standard
1318 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1322 \begin_layout Subsubsection
1323 bit.parity(number...) / bit.bxor(number...)
1326 \begin_layout Standard
1327 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1331 \begin_layout Subsubsection
1332 bit.lrotate(number base[, number amount[, number bits]])
1335 \begin_layout Standard
1336 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1339 \begin_layout Subsubsection
1340 bit.rrotate(number base[, number amount[, number bits]])
1343 \begin_layout Standard
1344 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1348 \begin_layout Subsubsection
1349 bit.lshift(number base[, number amount[, number bits]])
1352 \begin_layout Standard
1353 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1354 The new bits are filled with zeroes.
1357 \begin_layout Subsubsection
1358 bit.lrshift(number base[, number amount[, number bits]])
1361 \begin_layout Standard
1362 Shift bits-bit (max 48, default 48) number logically right by amount (default
1364 The new bits are filled with zeroes.
1367 \begin_layout Subsubsection
1368 bit.arshift(number base[, number amount[, number bits]])
1371 \begin_layout Standard
1372 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1374 The new bits are shifted in with copy of the high bit.
1377 \begin_layout Subsubsection
1378 bit.extract(number base[, number bit0[, number bit1,...]])
1381 \begin_layout Standard
1382 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1385 \begin_layout Standard
1389 \begin_layout Itemize
1390 Bit numbers up to 51 should work reliably (then things start falling apart
1391 due to double precision issues).
1394 \begin_layout Itemize
1395 There are two special bit positions, true and false, standing for always
1396 set bit and always clear bit.
1399 \begin_layout Subsubsection
1400 bit.value([number bit1[, number bit2,...]])
1403 \begin_layout Standard
1404 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1406 As special value, nil argument is no-op.
1409 \begin_layout Subsection
1413 \begin_layout Standard
1414 Most of these functions can only be called in on_paint and on_video callbacks.
1415 Exceptions are noted.
1418 \begin_layout Standard
1420 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1421 16-23 are the red component, bits 24-31 are alpha component (0 is fully
1422 opaque, 255 is almost transparent).
1423 -1 is the fully transparent color.
1424 Alpha values greater than 127 do work.
1427 \begin_layout Standard
1428 Origin of coordinates is at top left corner of game display area.
1429 Left and top gaps correspond to negative coordinates.
1432 \begin_layout Subsubsection
1436 \begin_layout Standard
1437 Returns 2-tuple (hresolution, vresolution).
1440 \begin_layout Subsubsection
1441 gui.<class>_gap(number gap)
1444 \begin_layout Standard
1445 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1449 \begin_layout Subsubsection
1450 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1453 \begin_layout Standard
1454 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1459 \begin_layout Itemize
1460 x: X-coordinate to start the drawing from (and x-coordinate at begining
1464 \begin_layout Itemize
1465 y: Y-coordinate to start the drawing from.
1468 \begin_layout Itemize
1469 text: The text to draw.
1472 \begin_layout Itemize
1473 fgc: Text color (default is 0xFFFFFF (white))
1476 \begin_layout Itemize
1477 bgc: Background color (default is -1 (transparent))
1480 \begin_layout Subsubsection
1481 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1484 \begin_layout Standard
1485 Like gui.text, but draw using double-width.
1488 \begin_layout Subsubsection
1489 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1492 \begin_layout Standard
1493 Like gui.text, but draw using double-height.
1496 \begin_layout Subsubsection
1497 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
1500 \begin_layout Standard
1501 Like gui.text, but draw using double-width/double-height.
1504 \begin_layout Subsubsection
1505 gui.rectangle(number x, number y, number width, number height[, number thickness[
1506 , number outline[, number fill]]])
1509 \begin_layout Standard
1510 Draw rectangle on the GUI.
1514 \begin_layout Itemize
1515 x: X-coordinate of left edge.
1518 \begin_layout Itemize
1519 y: Y-coordinate of upper edge.
1522 \begin_layout Itemize
1523 width: Width of rectangle.
1526 \begin_layout Itemize
1527 height: Height of rectangle.
1530 \begin_layout Itemize
1531 thickness: Thickness of outline (default is 1).
1534 \begin_layout Itemize
1535 outline: Color of outline (default is 0xFFFFFF (white))
1538 \begin_layout Itemize
1539 fill: Color of fill (default is -1 (transparent))
1542 \begin_layout Subsubsection
1543 gui.box(number x, number y, number width, number height[, number thickness[,
1544 number outline1[,number outline2[, number fill]]]])
1547 \begin_layout Standard
1548 Draw rectangle with 3D effect on the GUI.
1552 \begin_layout Itemize
1553 x: X-coordinate of left edge.
1556 \begin_layout Itemize
1557 y: Y-coordinate of upper edge.
1560 \begin_layout Itemize
1561 width: Width of rectangle.
1564 \begin_layout Itemize
1565 height: Height of rectangle.
1568 \begin_layout Itemize
1569 thickness: Thickness of outline (default is 1).
1572 \begin_layout Itemize
1573 outline1: First color of outline (default is 0xFFFFFF (white))
1576 \begin_layout Itemize
1577 outline2: First color of outline (default is 0x808080 (dark gray))
1580 \begin_layout Itemize
1581 fill: Color of fill (default is 0xC0C0C0 (light grayy))
1584 \begin_layout Subsubsection
1585 gui.pixel(number x, number y[, number color])
1588 \begin_layout Standard
1589 Draw one pixel on the GUI.
1593 \begin_layout Itemize
1594 x: X-coordinate of the pixel
1597 \begin_layout Itemize
1598 y: Y-coordinate of the pixel
1601 \begin_layout Itemize
1602 color: Color of the pixel (default is 0xFFFFFF (white))
1605 \begin_layout Subsubsection
1606 gui.crosshair(number x, number y[, number length[, number color]])
1609 \begin_layout Standard
1614 \begin_layout Itemize
1615 x: X-coordinate of the crosshair
1618 \begin_layout Itemize
1619 y: Y-coordinate of the crosshair
1622 \begin_layout Itemize
1623 length: Length of the crosshair lines (default 10).
1626 \begin_layout Itemize
1627 color: Color of the crosshair (default is 0xFFFFFF (white))
1630 \begin_layout Subsubsection
1631 gui.line(number x1, number y1, number x2, number y2[, number color])
1634 \begin_layout Standard
1639 \begin_layout Itemize
1640 x1: X-coordinate of one end.
1643 \begin_layout Itemize
1644 y1: Y-coordinate of one end.
1647 \begin_layout Itemize
1648 x2: X-coordinate of the other end.
1651 \begin_layout Itemize
1652 y2: Y-coordinate of the other end.
1655 \begin_layout Itemize
1656 color: Color of the line (default is 0xFFFFFF (white)).
1659 \begin_layout Subsubsection
1660 gui.circle(number x, number y, number r[, number thick[, number border[,
1664 \begin_layout Standard
1669 \begin_layout Itemize
1670 x: X-coordinate of the center
1673 \begin_layout Itemize
1674 y: Y-coordinate of the center
1677 \begin_layout Itemize
1678 r: The radius of the circle
1681 \begin_layout Itemize
1682 thick: Border thickness
1685 \begin_layout Itemize
1686 border: Border color (default is 0xFFFFFF (white))
1689 \begin_layout Itemize
1690 fill: Fill color (default is -1 (transparent)).
1693 \begin_layout Subsubsection
1694 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
1697 \begin_layout Standard
1698 Draw a bitmap on screen with specified palette.
1702 \begin_layout Itemize
1703 x: X-coordinate of left edge.
1706 \begin_layout Itemize
1707 y: Y-coordinate of top edge.
1710 \begin_layout Itemize
1711 bitmap: The bitmap to draw
1714 \begin_layout Itemize
1715 palette: The palette to draw the bitmap using.
1718 \begin_layout Subsubsection
1719 gui.bitmap_draw(number x, number y, dbitmap bitmap)
1722 \begin_layout Standard
1723 Draw a bitmap on screen.
1727 \begin_layout Itemize
1728 x: X-coordinate of left edge.
1731 \begin_layout Itemize
1732 y: Y-coordinate of top edge.
1735 \begin_layout Itemize
1736 bitmap: The bitmap to draw
1739 \begin_layout Subsubsection
1743 \begin_layout Standard
1744 Returns a new palette (initially all transparent).
1745 Can be used anywhere.
1748 \begin_layout Subsubsection
1749 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
1752 \begin_layout Standard
1753 Returns a new bitmap/dbitmap.
1754 Can be used anywhere.
1758 \begin_layout Itemize
1759 w: The width of new bitmap
1762 \begin_layout Itemize
1763 h: The height of new bitmap
1766 \begin_layout Itemize
1767 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
1770 \begin_layout Itemize
1771 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
1774 \begin_layout Subsubsection
1775 gui.bitmap_load(string file)
1778 \begin_layout Standard
1779 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
1781 Can be used anywhere.
1785 \begin_layout Itemize
1786 file: The name of file to load.
1789 \begin_layout Subsubsection
1790 gui.palette_set(palette palette, number index, number color)
1793 \begin_layout Standard
1794 Sets color in palette.
1795 Can be used anywhere.
1799 \begin_layout Itemize
1800 palette: The palette to manipulate
1803 \begin_layout Itemize
1804 index: Index of color (0-65535).
1807 \begin_layout Itemize
1808 color: The color value.
1811 \begin_layout Subsubsection
1812 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
1815 \begin_layout Standard
1816 Sets specified pixel in bitmap.
1817 Can be used anywhere.
1821 \begin_layout Itemize
1822 bitmap: The bitmap to manipulate
1825 \begin_layout Itemize
1826 x: The x-coordinate of the pixel.
1829 \begin_layout Itemize
1830 y: The y-coordinate of the pixel.
1833 \begin_layout Itemize
1834 color: If bitmap is a bitmap, color index (0-65535).
1835 Otherwise color value.
1838 \begin_layout Subsubsection
1839 gui.bitmap_size(bitmap/dbitmap bitmap)
1842 \begin_layout Standard
1844 Can be used anywhere.
1848 \begin_layout Itemize
1849 bitmap: The bitmap to query.
1852 \begin_layout Standard
1853 The first return is the width, the second is the height.
1856 \begin_layout Subsubsection
1857 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
1858 src, number sx, number sy, number w, number h[, number ck])
1861 \begin_layout Standard
1862 Blit a part of bitmap to another.
1863 Can be used anywhere.
1867 \begin_layout Itemize
1868 dest: Destination to blit to.
1871 \begin_layout Itemize
1872 dx: left edge of target
1875 \begin_layout Itemize
1876 dy: Top edge of target
1879 \begin_layout Itemize
1880 src: The source to blit from.
1881 Must be of the same type as destination.
1884 \begin_layout Itemize
1885 sx: left edge of source
1888 \begin_layout Itemize
1889 sy: Top edge of source
1892 \begin_layout Itemize
1896 \begin_layout Itemize
1897 h: Height of region.
1900 \begin_layout Itemize
1902 Pixels of this color are not blitted.
1906 \begin_layout Itemize
1907 If bitmaps are bitmaps, this is color index of colorkey.
1908 Values outside range 0-65535 cause no key to be used as colorkey.
1911 \begin_layout Itemize
1912 If bitmaps are dbitmaps, this color value of colorkey.
1915 \begin_layout Itemize
1916 May be absent or nil for no colorkey blit.
1920 \begin_layout Subsubsection
1924 \begin_layout Standard
1925 Request on_repaint() to happen as soon as possible.
1926 Can be used anywhere.
1929 \begin_layout Subsubsection
1930 gui.subframe_update(boolean on)
1933 \begin_layout Standard
1934 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
1935 or not happen (on=false).
1936 Can be used anywhere.
1939 \begin_layout Subsubsection
1940 gui.screenshot(string filename)
1943 \begin_layout Standard
1944 Write PNG screenshot of the current frame (no drawings) to specified file.
1945 Can be used anywhere.
1948 \begin_layout Subsubsection
1949 gui.color(number r, number g, number b[, number a])
1952 \begin_layout Standard
1953 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
1954 each component in scale 0-255.
1955 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
1957 The default alpha is 256.
1960 \begin_layout Subsubsection
1961 gui.status(string name, string value)
1964 \begin_layout Standard
1966 \begin_inset Quotes eld
1970 \begin_inset Quotes erd
1973 to <value> in status area.
1974 Can be used anywhere.
1977 \begin_layout Subsubsection
1978 gui.rainbow(number step, number steps[, number color])
1981 \begin_layout Standard
1982 Perform hue rotation of color <color> (default bright red), by <step> steps.
1983 The number of steps per full rotation is given by absolute value of <steps>.
1986 \begin_layout Standard
1987 If <steps> is negative, the rotation will be counterclockwise.
1990 \begin_layout Subsubsection
1991 gui.screenshot(string filename)
1994 \begin_layout Standard
1995 Saves a screenshot into specified file.
1998 \begin_layout Subsection
2002 \begin_layout Standard
2004 Only available in on_input callback.
2007 \begin_layout Subsubsection
2008 input.get(number controller, number index)
2011 \begin_layout Standard
2012 Read the specified index (0-11) from specified controller (0-7).
2016 \begin_layout Itemize
2017 Uses physical controller numbering.
2018 Gamepad in port 2 is controller 4, not 1!
2021 \begin_layout Subsubsection
2022 input.set(number controller, number index, number value)
2025 \begin_layout Standard
2026 Write the specified index (0-11) from specified controller (0-7), storing
2031 \begin_layout Itemize
2032 Uses physical controller numbering.
2033 Gamepad in port 2 is controller 4, not 1!
2036 \begin_layout Subsubsection
2037 input.geta(number controller)
2040 \begin_layout Standard
2041 Get input state for entiere controller.
2042 Returns 13 return values.
2045 \begin_layout Itemize
2046 1st return value: Bitmask: bit i is set if i:th index is nonzero
2049 \begin_layout Itemize
2050 2nd-13th return value: value of i:th index.
2053 \begin_layout Subsubsection
2054 input.seta(number controller, number bitmask, number args...)
2057 \begin_layout Standard
2058 Set state for entiere controller.
2059 args is up to 12 values for indices (overriding values in bitmask if specified).
2062 \begin_layout Subsubsection
2063 input.controllertype(number controller)
2066 \begin_layout Standard
2067 Get the type of controller as string.
2071 \begin_layout Itemize
2075 \begin_layout Itemize
2079 \begin_layout Itemize
2083 \begin_layout Itemize
2087 \begin_layout Subsubsection
2088 input.reset([number cycles])
2091 \begin_layout Standard
2093 If cycles is greater than zero, do delayed reset.
2094 0 (or no value) causes immediate reset.
2097 \begin_layout Itemize
2098 Only available with subframe flag false.
2101 \begin_layout Subsubsection
2105 \begin_layout Standard
2106 Returns table of tables of all available keys and axes.
2107 The first table is indexed by key name (platform-dependent!), and the inner
2108 table has the following fields:
2111 \begin_layout Itemize
2112 value: Last reported value for control
2116 \begin_layout Itemize
2117 For keys: 1 for pressed, 0 for released.
2120 \begin_layout Itemize
2121 For axes: -32767...32767.
2124 \begin_layout Itemize
2125 For presure-sensitive buttons: 0...32767.
2128 \begin_layout Itemize
2129 For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
2132 \begin_layout Itemize
2133 For mouse: Coordinates relative to game area.
2137 \begin_layout Itemize
2138 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2139 pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2142 \begin_layout Subsubsection
2143 input.keyhook(string key, boolean state)
2146 \begin_layout Standard
2147 Requests that keyhook events to be sent for key (state=true) or not sent
2151 \begin_layout Subsubsection
2152 input.joyget(number controller)
2155 \begin_layout Standard
2156 Returns table for current controls for specified controller.
2157 The names of fields vary by controller type.
2160 \begin_layout Itemize
2161 The buttons have the same name as those are referred to in other contexts
2165 \begin_layout Itemize
2167 \begin_inset Quotes eld
2171 \begin_inset Quotes erd
2175 \begin_inset Quotes eld
2179 \begin_inset Quotes erd
2185 \begin_layout Subsubsection
2186 input.joyset(number controller, table controls)
2189 \begin_layout Standard
2190 Set the the state of specified controller to values specified in specified
2194 \begin_layout Subsubsection
2195 input.lcid_to_pcid(number controller)
2198 \begin_layout Standard
2199 Return the physical index, physical port and controller number in port for
2200 specified (1-based) logical controller.
2203 \begin_layout Subsection
2207 \begin_layout Standard
2208 Various keybinding-related functions
2211 \begin_layout Subsubsection
2212 keyboard.bind(string mod, string mask, string key, string cmd)
2215 \begin_layout Standard
2216 Bind specified key with specified modifers to specified command.
2219 \begin_layout Subsubsection
2220 keyboard.unbind(string mod, string mask, string key)
2223 \begin_layout Standard
2224 Unbind specified key with specified modifers.
2227 \begin_layout Subsubsection
2228 keyboard.alias(string alias, string expansion)
2231 \begin_layout Standard
2232 Set expansion of given command.
2235 \begin_layout Subsection
2239 \begin_layout Standard
2243 \begin_layout Subsubsection
2244 subtitle.byindex(number i)
2247 \begin_layout Standard
2248 Read the frame and length of ith subtitle.
2249 Returns nothing if not present.
2252 \begin_layout Subsubsection
2253 subtitle.set(number f, number l, string txt)
2256 \begin_layout Standard
2257 Set the text of subtitle.
2260 \begin_layout Subsubsection
2261 subtitle.get(number f, number l)
2264 \begin_layout Standard
2265 Get the text of subtitle.
2268 \begin_layout Subsubsection
2269 subtitle.delete(number f, number l)
2272 \begin_layout Standard
2273 Delete specified subtitle.
2276 \begin_layout Subsection
2280 \begin_layout Standard
2281 Host memory handling (extra memory saved to savestates).
2282 Host memory starts empty.
2285 \begin_layout Subsubsection
2286 hostmemory.read(number address)
2289 \begin_layout Standard
2290 Reads hostmemory slot address.
2291 Slot numbers out of range return false instead of numeric.
2294 \begin_layout Subsubsection
2295 hostmemory.write(number address, number value)
2298 \begin_layout Standard
2299 Writes hostmemory slot with 0-255.
2300 Slot numbers out of range cause extension of host memory slot space.
2303 \begin_layout Subsubsection
2304 hostmemory.readbyte(number address)
2307 \begin_layout Standard
2308 Read unsigned byte (1 element) from given address.
2309 Slots out of range return false.
2312 \begin_layout Subsubsection
2313 hostmemory.writebyte(number address, number value)
2316 \begin_layout Standard
2317 Write unsigned byte (1 element) to given slot.
2318 Slot numbers out of range cause extension.
2321 \begin_layout Subsubsection
2322 hostmemory.readsbyte(number address)
2325 \begin_layout Standard
2326 Read signed byte (1 element) from given address.
2327 Slots out of range return false.
2330 \begin_layout Subsubsection
2331 hostmemory.writesbyte(number address, number value)
2334 \begin_layout Standard
2335 Write signed byte (1 element) to given slot.
2336 Slot numbers out of range cause extension.
2339 \begin_layout Subsubsection
2340 hostmemory.readword(number address)
2343 \begin_layout Standard
2344 Read unsigned word (2 elements) from given address.
2345 Slots out of range return false.
2348 \begin_layout Subsubsection
2349 hostmemory.writeword(number address, number value)
2352 \begin_layout Standard
2353 Write unsigned word (2 elements) to given slot.
2354 Slot numbers out of range cause extension.
2357 \begin_layout Subsubsection
2358 hostmemory.readsword(number address)
2361 \begin_layout Standard
2362 Read signed word (2 elements) from given address.
2363 Slots out of range return false.
2366 \begin_layout Subsubsection
2367 hostmemory.writesword(number address, number value)
2370 \begin_layout Standard
2371 Write signed word (2 elements) to given slot.
2372 Slot numbers out of range cause extension.
2375 \begin_layout Subsubsection
2376 hostmemory.readdword(number address)
2379 \begin_layout Standard
2380 Read unsigned doubleword (4 elements) from given address.
2381 Slots out of range return false.
2384 \begin_layout Subsubsection
2385 hostmemory.writedword(number address, number value)
2388 \begin_layout Standard
2389 Write unsigned doubleword (4 elements) to given slot.
2390 Slot numbers out of range cause extension.
2393 \begin_layout Subsubsection
2394 hostmemory.readsdword(number address)
2397 \begin_layout Standard
2398 Read signed doubleword (4 elements) from given address.
2399 Slots out of range return false.
2402 \begin_layout Subsubsection
2403 hostmemory.writesdword(number address, number value)
2406 \begin_layout Standard
2407 Write signed doubleword (4 elements) to given slot.
2408 Slot numbers out of range cause extension.
2411 \begin_layout Subsubsection
2412 hostmemory.readqword(number address)
2415 \begin_layout Standard
2416 Read unsigned quadword (8 elements) from given address.
2417 Slots out of range return false.
2420 \begin_layout Subsubsection
2421 hostmemory.writeqword(number address, number value)
2424 \begin_layout Standard
2425 Write unsigned quadword (4 elements) to given slot.
2426 Slot numbers out of range cause extension.
2429 \begin_layout Subsubsection
2430 hostmemory.readsqword(number address)
2433 \begin_layout Standard
2434 Read signed quadword (8 elements) from given address.
2435 Slots out of range return false.
2438 \begin_layout Subsubsection
2439 hostmemory.writesqword(number address, number value)
2442 \begin_layout Standard
2443 Write signed quadword (8 elements) to given slot.
2444 Slot numbers out of range cause extension.
2447 \begin_layout Subsection
2451 \begin_layout Standard
2455 \begin_layout Subsubsection
2456 movie.currentframe()
2459 \begin_layout Standard
2460 Return number of current frame.
2463 \begin_layout Subsubsection
2467 \begin_layout Standard
2468 Return number of frames in movie.
2471 \begin_layout Subsubsection
2475 \begin_layout Standard
2476 Return true if in readonly mode, false if in readwrite.
2479 \begin_layout Subsubsection
2483 \begin_layout Standard
2484 Returns the current value of rerecord count.
2487 \begin_layout Subsubsection
2488 movie.set_readwrite()
2491 \begin_layout Standard
2492 Set readwrite mode (does not cause on_readwrite callback).
2495 \begin_layout Subsubsection
2496 movie.frame_subframes(number frame)
2499 \begin_layout Standard
2500 Count number of subframes in specified frame (frame numbers are 1-based)
2504 \begin_layout Subsubsection
2505 movie.read_subframe(number frame, number subframe)
2508 \begin_layout Standard
2509 Read specifed subframe in specified frame and return data as array (100
2510 elements, numbered 0-99 currently).
2513 \begin_layout Subsubsection
2517 \begin_layout Standard
2518 Returns the current value of the RTC as a pair (second, subsecond).
2521 \begin_layout Subsubsection
2522 movie.unsafe_rewind([UNSAFEREWIND state])
2525 \begin_layout Standard
2526 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2529 \begin_layout Itemize
2530 If called without argument, causes emulator to start process of setting
2531 unsafe rewind point.
2532 When this has finished, callback on_set_rewind occurs, passing the rewind
2533 state to lua script.
2536 \begin_layout Itemize
2537 If called with argument, causes emulator rewind to passed rewind point as
2539 Readwrite mode is implicitly activated.
2542 \begin_layout Standard
2543 The following warnings apply to unsafe rewinding:
2546 \begin_layout Itemize
2547 There are no safety checks against misuse (that's what
2548 \begin_inset Quotes eld
2552 \begin_inset Quotes erd
2558 \begin_layout Itemize
2559 Only call rewind from timeline rewind point was set from.
2562 \begin_layout Itemize
2563 Only call rewind from after the rewind point was set.
2566 \begin_layout Subsection
2570 \begin_layout Standard
2571 Routines for settings manipulation
2574 \begin_layout Subsubsection
2575 settings.get(string name)
2578 \begin_layout Standard
2579 Get value of setting.
2580 If setting is blank, returns false.
2581 If setting value can't be obtained, returns (nil, error message).
2584 \begin_layout Subsubsection
2585 settings.set(string name, string value)
2588 \begin_layout Standard
2589 Set value of setting.
2590 If setting can't be set, returns (nil, error message).
2593 \begin_layout Subsubsection
2594 settings.is_set(string name)
2597 \begin_layout Standard
2598 Returns if setting is set.
2599 If setting does not exist, returns (nil, error message).
2602 \begin_layout Subsubsection
2603 settings.blank(string name)
2606 \begin_layout Standard
2607 Blanks a setting and returns true.
2608 If setting can't be blanked, returns (nil, error message).
2611 \begin_layout Subsection
2615 \begin_layout Standard
2616 Contains various functions for managing memory
2619 \begin_layout Subsubsection
2623 \begin_layout Standard
2624 Returns the number of VMAs
2627 \begin_layout Subsubsection
2628 memory.read_vma(number index)
2631 \begin_layout Standard
2632 Reads the specified VMA (indices start from zero).
2633 Trying to read invalid VMA gives nil.
2634 The read VMA is table with the following fields:
2637 \begin_layout Itemize
2638 region_name (string): The readable name of the VMA
2641 \begin_layout Itemize
2642 baseaddr (number): Base address of the VMA
2645 \begin_layout Itemize
2646 lastaddr (number): Last address in the VMA.
2649 \begin_layout Itemize
2650 size (number): The size of VMA in bytes.
2653 \begin_layout Itemize
2654 readonly (boolean): True of the VMA corresponds to ROM.
2657 \begin_layout Itemize
2658 iospace (boolean): True if the VMA is I/O space.
2661 \begin_layout Itemize
2662 native_endian (boolean): True if the VMA has native endian as opposed to
2666 \begin_layout Subsubsection
2667 memory.find_vma(number address)
2670 \begin_layout Standard
2671 Finds the VMA containing specified address.
2672 Returns table in the same format as read_vma or nil if not found.
2675 \begin_layout Subsubsection
2676 memory.readbyte(number address)
2679 \begin_layout Standard
2680 Reads the specified address as unsigned byte and returns the result.
2683 \begin_layout Subsubsection
2684 memory.readsbyte(number address)
2687 \begin_layout Standard
2688 Reads the specified address as signed byte and returns the result.
2691 \begin_layout Subsubsection
2692 memory.writebyte(number address, number value)
2695 \begin_layout Standard
2696 Writes the specified value (negative values undergo 2's complement) to specified
2697 address (as a byte).
2700 \begin_layout Subsubsection
2701 memory.readword(number address)
2704 \begin_layout Standard
2705 Reads the specified address as unsigned word and returns the result.
2708 \begin_layout Subsubsection
2709 memory.readsword(number address)
2712 \begin_layout Standard
2713 Reads the specified address as signed word and returns the result.
2716 \begin_layout Subsubsection
2717 memory.writeword(number address, number value)
2720 \begin_layout Standard
2721 Writes the specified value (negative values undergo 2's complement) to specified
2722 address (as a word).
2725 \begin_layout Subsubsection
2726 memory.readdword(number address)
2729 \begin_layout Standard
2730 Reads the specified address as unsigned doubleword and returns the result.
2733 \begin_layout Subsubsection
2734 memory.readsdword(number address)
2737 \begin_layout Standard
2738 Reads the specified address as signed doubleword and returns the result.
2741 \begin_layout Subsubsection
2742 memory.writedword(number address, number value)
2745 \begin_layout Standard
2746 Writes the specified value (negative values undergo 2's complement) to specified
2747 address (as a doubleword).
2750 \begin_layout Subsubsection
2751 memory.readqword(number address)
2754 \begin_layout Standard
2755 Reads the specified address as unsigned quadword and returns the result.
2758 \begin_layout Subsubsection
2759 memory.readsqword(number address)
2762 \begin_layout Standard
2763 Reads the specified address as signed quadword and returns the result.
2766 \begin_layout Subsubsection
2767 memory.writeqword(number address, number value)
2770 \begin_layout Standard
2771 Writes the specified value (negative values undergo 2's complement) to specified
2772 address (as a quadword).
2775 \begin_layout Subsubsection
2776 memory.hash_region(number base, number size)
2779 \begin_layout Standard
2780 Hash specified number of bytes starting from specified address and return
2784 \begin_layout Subsubsection
2788 \begin_layout Standard
2789 Hash the current system state.
2790 Mainly useful for debugging savestates.
2793 \begin_layout Subsubsection
2794 memory.readregion(number base, number size)
2797 \begin_layout Standard
2798 Read a region of memory.
2801 \begin_layout Itemize
2802 Warning: If the region crosses VMA boundary, the results are undefined.
2805 \begin_layout Subsubsection
2806 memory.map<type>([number base, number size])
2809 \begin_layout Standard
2810 Returns a table mapping specified memory aperture for read/write.
2811 If parameters are omitted, entiere map space is the aperture.
2814 \begin_layout Itemize
2815 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2818 \begin_layout Subsubsection
2819 memory.writeregion(number base, number size, table data)
2822 \begin_layout Standard
2823 Write a region of memory.
2826 \begin_layout Itemize
2827 Warning: If the region crosses VMA boundary, the results are undefined.
2830 \begin_layout Subsubsection
2834 \begin_layout Standard
2835 Returns a new mapping structure (MMAP_STRUCT)
2838 \begin_layout Subsubsection
2839 MMAP_STRUCT(string key, number address, string type)
2842 \begin_layout Standard
2843 Bind key in mmap structure to specified address with specified type.
2846 \begin_layout Itemize
2847 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
2850 \begin_layout Subsubsection
2851 memory.read_expr(string expr)
2854 \begin_layout Standard
2855 Evaluate specified watch expression and return result
2858 \begin_layout Subsection
2862 \begin_layout Standard
2863 Contains functions for manipulating subtitles.
2866 \begin_layout Subsubsection
2867 subtitle.byindex(number index)
2870 \begin_layout Standard
2871 Get (basetime, length) pair of specified subtitle index or nothing if index
2875 \begin_layout Subsubsection
2876 subtitle.get(number basetime, number length)
2879 \begin_layout Standard
2880 Read the specified subtitle.
2882 \begin_inset Quotes eld
2886 \begin_inset Quotes erd
2889 if the subtitle does not exist.
2892 \begin_layout Subsubsection
2893 subtitle.set(number basetime, number length, string content)
2896 \begin_layout Standard
2897 Set the specified subtitle.
2900 \begin_layout Subsubsection
2901 subtitle.deltete(number basetime, number length)
2904 \begin_layout Standard
2905 Delete the specified subtitle.
2908 \begin_layout Subsection
2912 \begin_layout Standard
2913 Contains copy of global variables from time of Lua initialization.
2917 \begin_layout Subsection
2921 \begin_layout Standard
2922 Various callbacks to Lua that can occur.
2925 \begin_layout Subsubsection
2926 Callback: on_paint(bool not_synth)
2929 \begin_layout Standard
2930 Called when screen is being painted.
2931 Any gui.* calls requiring graphic context draw on the screen.
2934 \begin_layout Standard
2935 not_synth is true if this hook is being called in response to received frame,
2939 \begin_layout Subsubsection
2940 Callback: on_video()
2943 \begin_layout Standard
2944 Called when video dump frame is being painted.
2945 Any gui.* calls requiring graphic context draw on the video.
2948 \begin_layout Subsubsection
2949 Callback: on_frame_emulated()
2952 \begin_layout Standard
2953 Called when emulating frame has completed and on_paint()/on_video() calls
2954 are about to be issued.
2957 \begin_layout Subsubsection
2958 Callback: on_frame()
2961 \begin_layout Standard
2962 Called on each starting whole frame.
2965 \begin_layout Subsubsection
2966 Callback: on_startup()
2969 \begin_layout Standard
2970 Called when the emulator is starting (lsnes.rc and --run files has been run).
2973 \begin_layout Subsubsection
2974 Callback: on_rewind()
2977 \begin_layout Standard
2978 Called when rewind movie to beginning has completed.
2981 \begin_layout Subsubsection
2982 Callback: on_pre_load(string name)
2985 \begin_layout Standard
2986 Called just before savestate/movie load occurs (note: loads are always delayed,
2987 so this occurs even when load was initiated by lua).
2990 \begin_layout Subsubsection
2991 Callback: on_err_load(string name)
2994 \begin_layout Standard
2995 Called if loadstate goes wrong.
2998 \begin_layout Subsubsection
2999 Callback: on_post_load(string name, boolean was_savestate)
3002 \begin_layout Standard
3003 Called on successful loadstate.
3004 was_savestate gives if this was a savestate or a movie.
3007 \begin_layout Subsubsection
3008 Callback: on_pre_save(string name, boolean is_savestate)
3011 \begin_layout Standard
3012 Called just before savestate save occurs (note: movie saves are synchronous
3013 and won't trigger these callbacks if called from Lua).
3016 \begin_layout Subsubsection
3017 Callback: on_err_save(string name)
3020 \begin_layout Standard
3021 Called if savestate goes wrong.
3024 \begin_layout Subsubsection
3025 Callback: on_post_save(string name, boolean is_savestate)
3028 \begin_layout Standard
3029 Called on successful savaestate.
3030 is_savestate gives if this was a savestate or a movie.
3033 \begin_layout Subsubsection
3037 \begin_layout Standard
3038 Called when emulator is shutting down.
3041 \begin_layout Subsubsection
3042 Callback: on_input(boolean subframe)
3045 \begin_layout Standard
3046 Called when emulator is just sending input to bsnes core.
3047 Warning: This is called even in readonly mode, but the results are ignored.
3050 \begin_layout Subsubsection
3051 Callback: on_reset()
3054 \begin_layout Standard
3055 Called when SNES is reset.
3058 \begin_layout Subsubsection
3059 Callback: on_readwrite()
3062 \begin_layout Standard
3063 Called when moving into readwrite mode as result of
3064 \begin_inset Quotes eld
3068 \begin_inset Quotes erd
3071 command (note: moving to rwmode by Lua won't trigger this, as per recursive
3075 \begin_layout Subsubsection
3076 Callback: on_snoop(number port, number controller, number index, number
3080 \begin_layout Standard
3081 Called each time bsnes asks for input.
3082 The value is the final value to be sent to bsnes core (readonly mode, autohold
3083 and autofire have been taken into account).
3084 Might be useful when translating movies to format suitable for console
3086 Note: There is no way to modify the value to be sent.
3089 \begin_layout Subsubsection
3090 Callback: on_keyhook(string keyname, table state)
3093 \begin_layout Standard
3094 Sent when key that has keyhook events requested changes state.
3095 Keyname is name of the key (group) and state is the state (same kind as
3096 table values in input.raw).
3099 \begin_layout Subsubsection
3103 \begin_layout Standard
3104 Called when requested by set_idle_timeout(), the timeout has expired and
3105 emulator is waiting.
3108 \begin_layout Subsubsection
3109 Callback: on_timer()
3112 \begin_layout Standard
3113 Called when requested by set_idle_timeout() and the timeout has expired
3114 (regardless if emulator is waiting).
3117 \begin_layout Subsubsection
3118 Callback: on_set_rewind(UNSAFEREWIND r)
3121 \begin_layout Standard
3122 Called when unsafe rewind object has been constructed.
3125 \begin_layout Subsubsection
3126 Callback: on_pre_rewind()
3129 \begin_layout Standard
3130 Called just before unsafe rewind is about to occur.
3133 \begin_layout Subsubsection
3134 Callback: on_post_rewind()
3137 \begin_layout Standard
3138 Called just after unsafe rewind has occured.
3141 \begin_layout Section
3142 Memory watch expression syntax
3145 \begin_layout Standard
3146 Memory watch expressions are in RPN (Reverse Polish Notation).
3147 At the end of expression, the top entry on stack is taken as the final
3151 \begin_layout Standard
3155 \begin_layout Itemize
3156 Evaluation order is strictly left to right.
3159 \begin_layout Itemize
3160 a is the entry on top of stack
3163 \begin_layout Itemize
3164 b is the entry immediately below top of stack
3167 \begin_layout Itemize
3168 ; separates values to be pushed (no intermediate pop).
3171 \begin_layout Itemize
3172 After end of element, all used stack slots are popped and all results are
3176 \begin_layout Itemize
3177 When pushing multiple values, the pushes occur in order shown.
3180 \begin_layout Standard
3181 The following operators are available:
3184 \begin_layout Itemize
3188 \begin_layout Itemize
3192 \begin_layout Itemize
3196 \begin_layout Itemize
3200 \begin_layout Itemize
3204 \begin_layout Itemize
3208 \begin_layout Itemize
3209 b : read_signed_byte(a)
3212 \begin_layout Itemize
3216 \begin_layout Itemize
3217 d : read_signed_dword(a)
3220 \begin_layout Itemize
3224 \begin_layout Itemize
3226 \begin_inset Formula $\pi$
3232 \begin_layout Itemize
3233 q : read_signed_qword(a)
3236 \begin_layout Itemize
3240 \begin_layout Itemize
3244 \begin_layout Itemize
3248 \begin_layout Itemize
3252 \begin_layout Itemize
3253 w : read_signed_word(a)
3256 \begin_layout Itemize
3260 \begin_layout Itemize
3261 B : read_unsigned_byte(a)
3264 \begin_layout Itemize
3265 C<number>z : Push number <number> to stack.
3268 \begin_layout Itemize
3269 D : read_unsigned_dword(a)
3272 \begin_layout Itemize
3273 C0x<number>z : Push number <number> (hexadecimal) to stack.
3276 \begin_layout Itemize
3277 Q : read_unsigned_qword(a)
3280 \begin_layout Itemize
3281 R<digit> : round a to <digit> digits.
3284 \begin_layout Itemize
3285 W : read_unsigned_word(a)
3288 \begin_layout Subsection
3292 \begin_layout Standard
3293 C0x007e0878zWC0x007e002czW-
3296 \begin_layout Enumerate
3297 Push value 0x7e0878 on top of stack (C0x007e0878z).
3300 \begin_layout Enumerate
3301 Pop the value on top of stack (0x7e0878), read word value at that address
3302 and push the result,call it x1 (W).
3305 \begin_layout Enumerate
3306 Push value 0x7e002c on top of stack (C0x007e002cz).
3309 \begin_layout Enumerate
3310 Pop the value on top of stack (0x7e002c), read word value at that address
3311 and push the result,call it x2 (W).
3314 \begin_layout Enumerate
3315 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3319 \begin_layout Enumerate
3320 Since the expression ends, the final memory watch result is the top one
3321 on stack, which is x2 - x1.
3324 \begin_layout Section
3325 Modifier and key names:
3328 \begin_layout Subsection
3332 \begin_layout Subsubsection
3336 \begin_layout Standard
3337 Following modifier names are known:
3340 \begin_layout Itemize
3341 ctrl, lctrl, rctrl: Control keys
3344 \begin_layout Itemize
3345 alt, lalt, ralt: ALT keys.
3348 \begin_layout Itemize
3349 shift, lshift, rshift: Shift keys.
3352 \begin_layout Itemize
3353 meta, lmeta, rmeta: Meta keys.
3356 \begin_layout Itemize
3357 num, caps: Numlock/Capslock (these are sticky!)
3360 \begin_layout Itemize
3364 \begin_layout Subsubsection
3368 \begin_layout Standard
3369 Following key names are known:
3372 \begin_layout Itemize
3373 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3374 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3375 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3376 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3377 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3378 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3379 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3380 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3381 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3382 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3383 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3384 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3385 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3386 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3387 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3388 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3389 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3390 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3391 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3392 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3393 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3394 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3395 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3396 break, menu, power, euro, undo
3399 \begin_layout Itemize
3400 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3401 hardware-dependent scan code of <n> (useful to bind those keys that don't
3402 have symbolic names).
3405 \begin_layout Subsubsection
3406 Joystick pseudo-keys:
3409 \begin_layout Itemize
3410 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3413 \begin_layout Itemize
3414 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3417 \begin_layout Itemize
3418 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3421 \begin_layout Itemize
3422 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3425 \begin_layout Itemize
3426 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3429 \begin_layout Itemize
3430 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3431 position (axis modes axis and axis_inverse).
3434 \begin_layout Itemize
3435 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3436 position (axis modes axis and axis_inverse).
3439 \begin_layout Itemize
3440 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3444 \begin_layout Subsubsection
3448 \begin_layout Itemize
3449 Escape: Enter/Exit Command mode, cancel modal dialogs.
3452 \begin_layout Itemize
3453 Return (also KPEnter): Execute command, ok modal dialog.
3456 \begin_layout Itemize
3457 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3461 \begin_layout Itemize
3462 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3466 \begin_layout Itemize
3467 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3470 \begin_layout Itemize
3471 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3474 \begin_layout Itemize
3475 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3478 \begin_layout Itemize
3479 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3482 \begin_layout Itemize
3484 if no num lock; command mode): Delete character to right of cursor.
3487 \begin_layout Itemize
3488 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3492 \begin_layout Itemize
3493 Backspace (command mode): Delete character to left of cursor.
3496 \begin_layout Itemize
3497 CTRL+LEFT (also ALT+B; command mode): Previous word.
3500 \begin_layout Itemize
3501 CTRL+RIGHT (also ALT+F; command mode): Next word.
3504 \begin_layout Itemize
3505 ALT+D (also CTRL+W; command mode): Delete word.
3508 \begin_layout Itemize
3509 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3512 \begin_layout Subsection
3516 \begin_layout Subsubsection
3520 \begin_layout Standard
3521 Following modifier names are known:
3524 \begin_layout Itemize
3528 \begin_layout Itemize
3532 \begin_layout Itemize
3536 \begin_layout Itemize
3540 \begin_layout Itemize
3544 \begin_layout Subsubsection
3548 \begin_layout Standard
3549 Following key names are known:
3552 \begin_layout Itemize
3553 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3554 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3555 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3556 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3557 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3558 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3559 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3560 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3561 pause, capital, end, home, lefT, up, right, down, select, print, execute,
3562 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3563 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3564 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3565 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3566 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3567 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3568 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3569 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3570 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3571 windows_right, windows_menu, command, special1, special2, special3, special4,
3572 special5, special6, special7, special8, special9, special10, special11,
3573 special12, special13, special14, special15, special16, special17, special18,
3574 special19, special20
3577 \begin_layout Section
3581 \begin_layout Standard
3582 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3583 (note: If you recompress it, do not use compression methods other than
3584 store and deflate and especially do not use encryption of any kind).
3587 \begin_layout Subsection
3588 Detecting clean start/SRAM/Savestate
3591 \begin_layout Itemize
3593 \begin_inset Quotes eld
3597 \begin_inset Quotes erd
3600 it is savestate, otherwise:
3603 \begin_layout Itemize
3604 If file has members with names starting
3605 \begin_inset Quotes eld
3609 \begin_inset Quotes erd
3612 it is movie starting from SRAM, otherwise:
3615 \begin_layout Itemize
3616 It is movie starting from clear state.
3619 \begin_layout Subsection
3623 \begin_layout Standard
3624 Type of game ROM and region (as one line).
3628 \begin_layout Standard
3629 \begin_inset Tabular
3630 <lyxtabular version="3" rows="8" columns="3">
3631 <features tabularvalignment="middle">
3632 <column alignment="center" valignment="top" width="0">
3633 <column alignment="center" valignment="top" width="0">
3634 <column alignment="center" valignment="top" width="0">
3636 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3639 \begin_layout Plain Layout
3645 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3648 \begin_layout Plain Layout
3654 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3657 \begin_layout Plain Layout
3665 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3668 \begin_layout Plain Layout
3674 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3677 \begin_layout Plain Layout
3683 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3686 \begin_layout Plain Layout
3694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3697 \begin_layout Plain Layout
3703 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3706 \begin_layout Plain Layout
3712 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3715 \begin_layout Plain Layout
3723 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3726 \begin_layout Plain Layout
3732 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3735 \begin_layout Plain Layout
3741 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3744 \begin_layout Plain Layout
3752 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3755 \begin_layout Plain Layout
3761 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3764 \begin_layout Plain Layout
3770 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3773 \begin_layout Plain Layout
3781 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3784 \begin_layout Plain Layout
3790 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3793 \begin_layout Plain Layout
3799 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3802 \begin_layout Plain Layout
3810 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3813 \begin_layout Plain Layout
3819 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3822 \begin_layout Plain Layout
3828 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3831 \begin_layout Plain Layout
3839 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3842 \begin_layout Plain Layout
3848 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3851 \begin_layout Plain Layout
3857 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3860 \begin_layout Plain Layout
3874 \begin_layout Standard
3878 \begin_layout Standard
3879 \begin_inset Tabular
3880 <lyxtabular version="3" rows="3" columns="2">
3881 <features tabularvalignment="middle">
3882 <column alignment="center" valignment="top" width="0">
3883 <column alignment="center" valignment="top" width="0">
3885 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3888 \begin_layout Plain Layout
3894 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3897 \begin_layout Plain Layout
3905 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3908 \begin_layout Plain Layout
3914 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3917 \begin_layout Plain Layout
3925 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3928 \begin_layout Plain Layout
3934 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3937 \begin_layout Plain Layout
3951 \begin_layout Subsection
3955 \begin_layout Standard
3956 Contains type of port #1 (as one line).
3957 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3958 If not present, defaults to 'gamepad'.
3961 \begin_layout Subsection
3965 \begin_layout Standard
3966 Contains type of port #2 (as one line).
3967 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3968 'justifier' and 'justifiers'.
3969 If not present, defaults to 'none'.
3972 \begin_layout Subsection
3976 \begin_layout Standard
3977 Contains name of the game (as one line).
3980 \begin_layout Subsection
3984 \begin_layout Standard
3985 Contains authors, one per line.
3986 Part before '|' is the full name, part after is the nickname.
3989 \begin_layout Subsection
3993 \begin_layout Standard
3995 \begin_inset Quotes eld
3999 \begin_inset Quotes erd
4003 Used to reject other saves.
4006 \begin_layout Subsection
4007 Member: controlsversion
4010 \begin_layout Standard
4012 \begin_inset Quotes eld
4016 \begin_inset Quotes erd
4020 Used to identify what controls are there.
4023 \begin_layout Subsection
4025 \begin_inset Quotes eld
4029 \begin_inset Quotes erd
4035 \begin_layout Standard
4036 Contains bsnes core version number (as one line).
4039 \begin_layout Subsection
4043 \begin_layout Standard
4044 Contains project ID (as one line).
4045 Used to identify if two movies are part of the same project.
4048 \begin_layout Subsection
4049 Member: {rom,slota,slotb}{,xml}.sha256
4052 \begin_layout Standard
4053 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4054 Absent if corresponding file is absent.
4057 \begin_layout Subsection
4058 Member: moviesram.<name>
4061 \begin_layout Standard
4062 Raw binary startup SRAM of kind <name>.
4063 Only present in savestates and movies starting from SRAM.
4066 \begin_layout Subsection
4070 \begin_layout Standard
4071 Contains frame number (as one line) of frame movie was saved on.
4072 Only present in savestates.
4075 \begin_layout Subsection
4079 \begin_layout Standard
4080 Current value of lag counter (as one line).
4081 Only present in savestates.
4084 \begin_layout Subsection
4085 Member: pollcounters
4088 \begin_layout Standard
4089 Contains poll counters (currently 100 of them), one per line.
4090 Each line is raw poll count if DRDY is set for it.
4091 Otherwise it is negative poll count minus one.
4092 Only present in savestates.
4095 \begin_layout Subsection
4099 \begin_layout Standard
4100 Raw binary dump of host memory.
4101 Only present in savestates.
4104 \begin_layout Subsection
4108 \begin_layout Standard
4109 The raw binary savestate itself.
4110 Savestate detection uses this file, only present in savestates.
4113 \begin_layout Subsection
4117 \begin_layout Standard
4118 Screenshot of current frame.
4119 Only present in savestates.
4120 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4122 Height of image is inferred from the width and size of data.
4125 \begin_layout Subsection
4129 \begin_layout Standard
4130 Raw binary SRAM of kind <name> at time of savestate.
4131 Only present in savestates.
4134 \begin_layout Subsection
4138 \begin_layout Standard
4139 The actual input track, one line per subframe (blank lines are skipped).
4142 \begin_layout Itemize
4143 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4144 part of same frame as previous, otherwise it starts a new frame.
4147 \begin_layout Itemize
4148 First subframe must start a new frame.
4151 \begin_layout Standard
4152 Length of movie in frames is number of lines in input file that start a
4156 \begin_layout Subsection
4160 \begin_layout Standard
4165 \begin_layout Itemize
4166 Each line is in form <firstframe> <numframes> <text>.
4169 \begin_layout Itemize
4170 Linefeed is encoded as
4172 n, backslash is encoded as
4179 \begin_layout Subsection
4183 \begin_layout Standard
4184 Contains textual base-10 rerecord count (as one line; emulator just writes
4185 this, it doesn't read it) + 1.
4188 \begin_layout Subsection
4192 \begin_layout Standard
4193 This member stores set of load IDs.
4194 There is one load ID per rerecord (plus one corresponding to start of project).
4197 \begin_layout Itemize
4198 This member constists of concatenation of records
4201 \begin_layout Itemize
4202 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4206 \begin_layout Itemize
4207 IDs are interpretted as 256-bit big-endian integers with warparound.
4210 \begin_layout Itemize
4211 Initial predicted ID is all zeroes.
4214 \begin_layout Standard
4215 Format of each record is:
4218 \begin_layout Itemize
4219 1 byte: Opcode byte.
4220 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4224 \begin_layout Itemize
4225 32-prefixlen bytes of ID.
4228 \begin_layout Itemize
4229 countlen bytes of big-endian count (count).
4232 \begin_layout Standard
4233 Records are processed as follows:
4236 \begin_layout Itemize
4237 To form the first ID encoded by record, take the first prefixlen bytes predicted
4238 ID and append the read ID value to it.
4239 The result is the first ID encoded.
4242 \begin_layout Itemize
4243 If countlen is 0, record encodes 1 ID.
4246 \begin_layout Itemize
4247 If countlen is 1, record encodes 2+count IDs.
4250 \begin_layout Itemize
4251 If countlen is 2, record encodes 258+count IDs.
4254 \begin_layout Itemize
4255 If countlen is 3, record encodes 65794+count IDs.
4258 \begin_layout Itemize
4259 The new predicted ID is the next ID after last one encoded by the record.
4262 \begin_layout Standard
4263 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4267 \begin_layout Subsection
4268 Member: starttime.second
4271 \begin_layout Standard
4272 Movie starting time, second part.
4273 Epoch is Unix epoch.
4274 Default is 1,000,000,000.
4277 \begin_layout Subsection
4278 Member: starttime.subsecond
4281 \begin_layout Standard
4282 Movie starting time, subsecond part.
4287 \begin_layout Subsection
4288 Member: savetime.second
4291 \begin_layout Standard
4292 Movie saving time, second part.
4293 Default is starttime.second.
4294 Only present in savestates.
4297 \begin_layout Subsection
4298 Member: savetime.subsecond
4301 \begin_layout Standard
4302 Movie saving time, subsecond part.
4303 Default is starttime.subsecond.
4304 Only present in savestates.
4307 \begin_layout Section
4308 lsvs file format (commentary tracks)
4311 \begin_layout Subsection
4315 \begin_layout Itemize
4316 Each cluster is 8kB (8192 bytes) in size.
4319 \begin_layout Itemize
4320 Cluster n starts at offset 8192*n in file.
4323 \begin_layout Itemize
4324 The following clusters are system special:
4328 \begin_layout Itemize
4329 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4332 \begin_layout Itemize
4333 Cluster 1 (superblock)
4337 \begin_layout Subsection
4341 \begin_layout Itemize
4342 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4346 \begin_layout Itemize
4347 This cluster table consists of 2048 4-byte big-endian integers.
4350 \begin_layout Itemize
4351 Each entry describes a cluster in 16MB supercluster, in order.
4354 \begin_layout Itemize
4355 The valid values for entries are:
4359 \begin_layout Itemize
4360 0x00000000: Free cluster
4363 \begin_layout Itemize
4364 0x00000001: Last cluster in chain.
4367 \begin_layout Itemize
4368 0xFFFFFFFF: System cluster (cluster tables and superblock)
4371 \begin_layout Itemize
4372 (anything else): Number of next cluster in chain.
4373 Must not be multiple of 2048.
4377 \begin_layout Itemize
4378 Due to limitations of the format, there can be at most 2097052 superclusters,
4379 giving maximum file size of 16TB.
4382 \begin_layout Subsection
4386 \begin_layout Itemize
4387 The stream table chain always starts in cluster 2.
4390 \begin_layout Itemize
4391 Otherwise, it follows normal chaining.
4394 \begin_layout Itemize
4395 The stream table consists of 16-byte entries:
4399 \begin_layout Itemize
4400 The first 8 bytes of entry give big-endian beginning position of stream
4401 in units of 1/48000 s.
4404 \begin_layout Itemize
4405 The next 4 bytes of entry give big-endian beginning cluster for control
4407 0 here marks the entry as not present.
4410 \begin_layout Itemize
4411 The last 4 bytes of entry give big-endian beginning cluster for codec data.
4415 \begin_layout Itemize
4416 Stream table clusters are normal clusters, following normal chaining.
4419 \begin_layout Itemize
4420 The stream begnning position is not guarenteed unique.
4421 There can be multiple streams with the same starting position in the file.
4424 \begin_layout Subsection
4428 \begin_layout Itemize
4429 The stream control data consists of entries 4 bytes each:
4433 \begin_layout Itemize
4434 The first 2 bytes of entry gives big-endian length of packet
4437 \begin_layout Itemize
4438 The next byte of entry gives audio length of packet in units of 1/400 s.
4441 \begin_layout Itemize
4442 The last byte is control byte.
4446 \begin_layout Itemize
4447 0 means this entry is not present and the control data ends.
4450 \begin_layout Itemize
4451 1 is valid control entry.
4456 \begin_layout Itemize
4457 The stream control data can also end by running into end of the readable
4462 \begin_layout Itemize
4463 This happens if there happens to be exact multiple of 2048 packets in stream
4464 and number of packets is nonzero.
4468 \begin_layout Itemize
4469 These clusters follow normal chaining.
4472 \begin_layout Subsection
4476 \begin_layout Itemize
4477 Stream codec data consists of raw Opus data packets packed back to back
4478 with nothing in between.
4481 \begin_layout Itemize
4482 Warning: Due to internal limitations, this data must reside in the first
4483 65536 superclusters (that is, the first 1TB of the file).
4486 \begin_layout Subsection
4490 \begin_layout Itemize
4491 The superblock is stored in cluster 1.
4495 \begin_layout Itemize
4496 The first 11 bytes are
4497 \begin_inset Quotes eld
4501 \begin_inset Quotes erd
4507 \begin_layout Itemize
4508 The rest are unused.
4511 \begin_layout Itemize
4512 This cluster 1 is marked as system special.
4515 \begin_layout Section
4516 Known ROM extensions
4519 \begin_layout Itemize
4520 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4523 \begin_layout Itemize
4524 DMG cartridge ROMs: dmg, gb.
4527 \begin_layout Itemize
4528 GBC cartridge ROMs: cgb, gbc.
4531 \begin_layout Section
4535 \begin_layout Itemize
4536 The first line must be:
4537 \begin_inset Quotes eld
4541 \begin_inset Quotes erd
4547 \begin_layout Itemize
4548 There is one needed line:
4549 \begin_inset Quotes eld
4553 \begin_inset Quotes erd
4557 This sets system type to <systype>.
4558 The following system types are valid:
4562 \begin_layout Itemize
4566 \begin_layout Itemize
4567 bsx (BS-X non-slotted)
4570 \begin_layout Itemize
4571 bsxslotted (BS-X slotted)
4574 \begin_layout Itemize
4575 sufamiturbo (Sufami Turbo)
4578 \begin_layout Itemize
4579 sgb (Super Game Boy)
4582 \begin_layout Itemize
4586 \begin_layout Itemize
4587 gbc (Game Boy Color)
4590 \begin_layout Itemize
4591 gbc_gba (Game Boy Color with GBA initial register values)
4595 \begin_layout Itemize
4596 Optionally a region can be specified:
4597 \begin_inset Quotes eld
4601 \begin_inset Quotes erd
4605 The following values are valid:
4609 \begin_layout Itemize
4610 autodetect (Autodetect region: snes and sgb only)
4613 \begin_layout Itemize
4614 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4617 \begin_layout Itemize
4618 pal (PAL: snes, sgb)
4621 \begin_layout Itemize
4622 world (World: dmg, gbc, gbc_gba)
4626 \begin_layout Itemize
4627 ROM images are loaded as:
4628 \begin_inset Quotes eld
4632 \begin_inset Quotes erd
4636 The following types are valid:
4640 \begin_layout Itemize
4641 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4642 BIOS in bsx, bsxslotted, sufamiturbo)
4645 \begin_layout Itemize
4646 bsx (Cartridge ROM in bsx, bsxslotted)
4649 \begin_layout Itemize
4650 slot-a (Cartridge ROM in sufamiturbo)
4653 \begin_layout Itemize
4654 slot-b (Cartridge ROM in sufamiturbo)
4658 \begin_layout Itemize
4659 ROM markup can be loaded as:
4660 \begin_inset Quotes eld
4664 \begin_inset Quotes erd
4668 The types valid are the same as for ROMs.
4671 \begin_layout Itemize
4672 Patches can be loaded as
4673 \begin_inset Quotes eld
4676 patch[<offset>] <type> <file>
4677 \begin_inset Quotes erd
4681 The types are the same as for ROMs.
4685 \begin_layout Itemize
4686 Offset is given in form [+-]<number>.
4687 Usually offset is either +0 or -512.
4690 \begin_layout Itemize
4691 Default offset is +0.
4695 \begin_layout Subsection
4699 \begin_layout LyX-Code
4703 \begin_layout LyX-Code
4707 \begin_layout LyX-Code
4708 rom rom speedygonzales.sfc
4711 \begin_layout LyX-Code
4712 patch-512 rom sonicthehedgehog.ips
4715 \begin_layout Subsection
4719 \begin_layout LyX-Code
4723 \begin_layout LyX-Code
4727 \begin_layout LyX-Code
4728 rom rom supergameboy.sfc
4731 \begin_layout LyX-Code
4732 rom dmg megamanV.dmg
4735 \begin_layout Section
4736 Quick'n'dirty encode guide
4739 \begin_layout Enumerate
4740 Start the emulator and load the ROM and movie file.
4743 \begin_layout Enumerate
4744 Set large AVI option 'set-setting avi-large on'
4747 \begin_layout Enumerate
4748 Enable dumping 'dump-avi tmpdump'
4751 \begin_layout Enumerate
4752 Unpause and let it run until you want to end dumping.
4755 \begin_layout Enumerate
4756 Close the emulator (closing the window is the easiest way).
4760 \begin_layout Enumerate
4761 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4762 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4765 \begin_layout Enumerate
4766 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4769 \begin_layout Enumerate
4770 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4771 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4774 \begin_layout Enumerate
4775 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4776 Now final.mkv contains quick'n'dirty encode.
4779 \begin_layout Section
4780 Axis configurations for some gamepad types:
4783 \begin_layout Subsection
4787 \begin_layout Standard
4788 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4791 \begin_layout LyX-Code
4792 set-axis joystick0axis2 pressure-+
4795 \begin_layout LyX-Code
4796 set-axis joystick0axis5 pressure-+
4799 \begin_layout Itemize
4800 This is needed for SDL only.
4801 EVDEV sets those types correctly.
4804 \begin_layout Subsection
4806 \begin_inset Quotes eld
4810 \begin_inset Quotes erd
4816 \begin_layout Standard
4817 Axes 8-19 should be disabled.
4820 \begin_layout LyX-Code
4821 set-axis joystick0axis8 disabled
4824 \begin_layout LyX-Code
4825 set-axis joystick0axis9 disabled
4828 \begin_layout LyX-Code
4829 set-axis joystick0axis10 disabled
4832 \begin_layout LyX-Code
4833 set-axis joystick0axis11 disabled
4836 \begin_layout LyX-Code
4837 set-axis joystick0axis12 disabled
4840 \begin_layout LyX-Code
4841 set-axis joystick0axis13 disabled
4844 \begin_layout LyX-Code
4845 set-axis joystick0axis14 disabled
4848 \begin_layout LyX-Code
4849 set-axis joystick0axis15 disabled
4852 \begin_layout LyX-Code
4853 set-axis joystick0axis16 disabled
4856 \begin_layout LyX-Code
4857 set-axis joystick0axis17 disabled
4860 \begin_layout LyX-Code
4861 set-axis joystick0axis18 disabled
4864 \begin_layout LyX-Code
4865 set-axis joystick0axis19 disabled
4868 \begin_layout Section
4872 \begin_layout Subsection
4873 Problems from BSNES core:
4876 \begin_layout Itemize
4877 The whole pending save stuff.
4880 \begin_layout Itemize
4881 Lack of layer hiding.
4884 \begin_layout Itemize
4885 It is slow (especially accuracy).
4888 \begin_layout Itemize
4889 Firmwares can't be loaded from ZIP archives.
4892 \begin_layout Subsection
4896 \begin_layout Itemize
4897 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4900 \begin_layout Itemize
4901 Audio for last dumped frame is not itself dumped.
4904 \begin_layout Itemize
4905 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4908 \begin_layout Itemize
4909 No menus, command based interface (SDL).
4912 \begin_layout Itemize
4913 Long commands don't scroll.
4916 \begin_layout Section
4920 \begin_layout Subsection
4924 \begin_layout Itemize
4928 \begin_layout Itemize
4929 Fix dumper video corruption with levels 10-18.
4932 \begin_layout Subsection
4936 \begin_layout Itemize
4940 \begin_layout Itemize
4941 Lots of code cleanups
4944 \begin_layout Itemize
4945 Lua interface to settings
4948 \begin_layout Itemize
4949 Allow specifying AVI borders without Lua
4952 \begin_layout Itemize
4953 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4956 \begin_layout Itemize
4957 on_snoop lua callback
4960 \begin_layout Itemize
4961 Faster movie loading and saving.
4964 \begin_layout Subsection
4968 \begin_layout Itemize
4972 \begin_layout Subsection
4976 \begin_layout Itemize
4980 \begin_layout Itemize
4981 Save jukebox functionality.
4984 \begin_layout Subsection
4988 \begin_layout Itemize
4989 Try to fix some nasty failing movie load edge cases
4992 \begin_layout Itemize
4993 Allow specifying scripts to run on command line.
4996 \begin_layout Subsection
5000 \begin_layout Itemize
5001 Major source code reorganization.
5004 \begin_layout Itemize
5005 Backup savestates before overwriting.
5008 \begin_layout Itemize
5009 Don't crash if loading initial state fails.
5012 \begin_layout Subsection
5016 \begin_layout Itemize
5020 \begin_layout Itemize
5021 Fix author name parsing
5024 \begin_layout Itemize
5025 Fix rerecord counting
5028 \begin_layout Itemize
5029 (SDL) Print messages to console if SDL is uninitialized
5032 \begin_layout Itemize
5033 Add movieinfo program
5036 \begin_layout Itemize
5037 Fix loading movies starting from SRAM.
5040 \begin_layout Subsection
5044 \begin_layout Itemize
5045 Add support for unattended dumping
5048 \begin_layout Itemize
5049 Fix compiling for Win32
5052 \begin_layout Itemize
5053 Don't lock up if sound can't be initialized
5056 \begin_layout Itemize
5057 Strip trailing CR from commands
5060 \begin_layout Itemize
5061 Don't try to do dubious things in global ctors (fix crash on startup)
5064 \begin_layout Subsection
5068 \begin_layout Itemize
5069 Small documentation tweaking
5072 \begin_layout Itemize
5076 \begin_layout Itemize
5077 Fix major bug in modifier matching
5080 \begin_layout Subsection
5084 \begin_layout Itemize
5085 Lots of documentation fixes
5088 \begin_layout Itemize
5089 Use dedicated callbacks for event backcomm., not commands.
5092 \begin_layout Itemize
5093 Ensure that the watchdog is not hit when executing delayed reset.
5096 \begin_layout Itemize
5097 Remove errant tab from joystick message.
5100 \begin_layout Subsection
5104 \begin_layout Itemize
5105 Make autofire operate in absolute time, not linear time
5108 \begin_layout Itemize
5109 Reinitialize controls when resuming from loadstate
5112 \begin_layout Itemize
5113 Some more code cleanups
5116 \begin_layout Itemize
5117 If Lua allocator fails, call OOM_panic()
5120 \begin_layout Itemize
5121 Byte/word/dword/qword sized host memory write/read functions.
5124 \begin_layout Itemize
5125 Dump at correct framerate if dumping interlaced NTSC (height=448).
5128 \begin_layout Subsection
5132 \begin_layout Itemize
5133 Actually include the complete source code
5136 \begin_layout Itemize
5140 \begin_layout Subsection
5144 \begin_layout Itemize
5145 Document {save,start}time.{,sub}second.
5148 \begin_layout Itemize
5149 Intercept time() from bsnes core.
5152 \begin_layout Subsection
5156 \begin_layout Itemize
5157 Allow disabling time() interception (allow build on Mac OS X)
5160 \begin_layout Itemize
5161 Use SDLMain on Mac OS X (make SDL not crash)
5164 \begin_layout Itemize
5165 Disable delayed resets (just plain too buggy for now).
5168 \begin_layout Itemize
5172 \begin_layout Itemize
5173 Use 16-bit for graphics/video instead of 32-bit.
5176 \begin_layout Itemize
5177 gui.rectangle/gui.pixel
5180 \begin_layout Itemize
5184 \begin_layout Itemize
5185 New CSCD writer implementation.
5188 \begin_layout Subsection
5192 \begin_layout Itemize
5193 Fix interaction of * and +.
5196 \begin_layout Itemize
5200 \begin_layout Itemize
5201 Use gettimeofday()/usleep(), these seem portable enough.
5204 \begin_layout Itemize
5205 Move joystick axis manipulation to keymapper code.
5208 \begin_layout Itemize
5209 Changes to how read-only works.
5212 \begin_layout Itemize
5213 Refactor controller input code.
5216 \begin_layout Subsection
5220 \begin_layout Itemize
5221 Fix mouseclick scale compensation.
5224 \begin_layout Itemize
5225 Draw area boundaries correctly in SDL code.
5228 \begin_layout Itemize
5232 \begin_layout Itemize
5233 Fix CSCD output (buffer overrun and race condition).
5236 \begin_layout Subsection
5240 \begin_layout Itemize
5241 JMD dumping support.
5244 \begin_layout Itemize
5245 Allow unattended dumping to JMD.
5248 \begin_layout Itemize
5252 \begin_layout Itemize
5253 Switch back to 32-bit colors.
5256 \begin_layout Itemize
5257 Add Lua function gui.color.
5260 \begin_layout Itemize
5261 Use some new C++11 features in GCC 4.6.
5264 \begin_layout Itemize
5265 Be prepared for core frequency changes.
5268 \begin_layout Itemize
5269 Pass colors in one chunk from Lua.
5272 \begin_layout Subsection
5276 \begin_layout Itemize
5277 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5278 memory.read_vma() and memory.find_vma().
5281 \begin_layout Itemize
5282 Numerious documentation fixups
5285 \begin_layout Itemize
5286 RTC time format changed
5289 \begin_layout Itemize
5290 Reformat flags display
5293 \begin_layout Itemize
5294 Allow lua package name to be overridden
5297 \begin_layout Itemize
5298 SDUMP (high-quality dumping).
5301 \begin_layout Itemize
5302 Split platform support to plugins.
5305 \begin_layout Itemize
5306 Make all sound plugins support basic sound commands
5309 \begin_layout Itemize
5310 Support portaudio for sound.
5313 \begin_layout Itemize
5314 Allow disable Lua/SDL searching.
5317 \begin_layout Itemize
5318 Upconvert colors when copying lcscreen to screen.
5321 \begin_layout Itemize
5322 Reorganize source tree.
5325 \begin_layout Itemize
5326 Evdev joystick support.
5329 \begin_layout Itemize
5330 Refactor more code into generic window code.
5333 \begin_layout Subsection
5337 \begin_layout Itemize
5338 Refactor message handling.
5341 \begin_layout Itemize
5345 \begin_layout Itemize
5349 \begin_layout Itemize
5350 Finish pending saves before load/quit.
5353 \begin_layout Itemize
5354 Wxwidgets graphics plugin.
5357 \begin_layout Subsection
5361 \begin_layout Itemize
5362 Get rid of win32-crap.[ch]pp.
5365 \begin_layout Itemize
5366 Move files around a lot.
5369 \begin_layout Itemize
5370 Get rid of need for host C++ compiler.
5373 \begin_layout Itemize
5377 \begin_layout Itemize
5378 Refactor inter-component communication.
5381 \begin_layout Itemize
5385 \begin_layout Itemize
5386 Fix crash on multiline aliases.
5389 \begin_layout Itemize
5390 Load/Save settings in wxwidgets gui.
5393 \begin_layout Subsection
5397 \begin_layout Itemize
5398 Patch problems in bsnes core
5401 \begin_layout Itemize
5402 SNES is little-endian, not big-endian!
5405 \begin_layout Itemize
5406 Fix memory corruption in lcscreen::load()
5409 \begin_layout Subsection
5413 \begin_layout Itemize
5414 Fix interpretting repeat counts in rrdata loading.
5417 \begin_layout Itemize
5418 New lua callback: on_frame()
5421 \begin_layout Itemize
5422 Remove calls to runtosave() that aren't supposed to be there
5425 \begin_layout Itemize
5426 Lua function: movie.read_rtc()
5429 \begin_layout Itemize
5430 Ignore src/fonts/font.cpp
5433 \begin_layout Itemize
5434 Fix more bsnes core problems
5437 \begin_layout Itemize
5438 Control bsnes random seeding
5441 \begin_layout Itemize
5445 \begin_layout Itemize
5446 Some bsnes core debugging features (state dump and state hash)
5449 \begin_layout Itemize
5450 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5451 it was 'lsnes rr0-beta21').
5454 \begin_layout Subsection
5458 \begin_layout Itemize
5459 Fix memory corruption due to macro/field mixup
5462 \begin_layout Itemize
5463 search-memory update
5466 \begin_layout Itemize
5467 Allow direct-mapped framebuffer
5470 \begin_layout Itemize
5471 SDL: Use SDL_ANYFORMAT if possible
5474 \begin_layout Itemize
5475 SDMP2SOX: 2s delay modes.
5478 \begin_layout Itemize
5482 \begin_layout Itemize
5483 Use sed -E, not sed -r.
5484 Fixes building on Mac OS X.
5487 \begin_layout Itemize
5488 Wxwidgets: Save jukebox on exit
5491 \begin_layout Itemize
5492 Fix RTC if using load-movie on savestate.
5495 \begin_layout Itemize
5496 Fix crash related to full console mode.
5499 \begin_layout Subsection
5503 \begin_layout Itemize
5504 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5507 \begin_layout Itemize
5508 Wxwidgets: Allow compiling on Mac OS X.
5511 \begin_layout Itemize
5512 Use movie compare instead of movie hashing (faster save/load).
5515 \begin_layout Itemize
5519 \begin_layout Subsection
5523 \begin_layout Itemize
5524 sdmp2sox: Pad soundtrack if using -l or -L.
5527 \begin_layout Itemize
5528 sdmp2sox: Fix NTSC overscan.
5531 \begin_layout Itemize
5532 sdmp2sox: Add AR correction mode.
5535 \begin_layout Itemize
5536 call lua_close() when exiting.
5539 \begin_layout Itemize
5540 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5543 \begin_layout Subsection
5547 \begin_layout Itemize
5548 Fix IPS patching code (use bsnes core IPS patcher).
5551 \begin_layout Itemize
5552 Implement BPS patching (using bsnes core IPS patcher).
5555 \begin_layout Itemize
5556 Add feature to load headered ROMs.
5559 \begin_layout Subsection
5563 \begin_layout Itemize
5564 Show command names when showing keybindings
5567 \begin_layout Subsection
5571 \begin_layout Itemize
5572 Fix pause-on-end to be actually controllable
5575 \begin_layout Itemize
5576 SDL: Poll all events in queue, not just first one (fixes slowness in command
5580 \begin_layout Itemize
5581 Wxwidgets: Fix ROM loading.
5584 \begin_layout Subsection
5588 \begin_layout Itemize
5589 Lua: Add gui.textH, gui.textV, gui.textHV
5592 \begin_layout Itemize
5593 Fix text colors on SDL on Mac OS X
5596 \begin_layout Itemize
5597 Mode 'F' for finished in readonly mode.
5600 \begin_layout Itemize
5604 \begin_layout Itemize
5605 Reliably pause after skip poll
5608 \begin_layout Itemize
5609 Split UI and core into their own threads
5612 \begin_layout Subsection
5616 \begin_layout Itemize
5617 Remove leftover dummy SRAM slot
5620 \begin_layout Itemize
5621 Fix controller numbers.
5624 \begin_layout Subsection
5628 \begin_layout Itemize
5629 Fix lsnes-dumpavi after interface change.
5632 \begin_layout Itemize
5633 Also give BSNES patches for v085.
5636 \begin_layout Itemize
5637 Pack movie data in memory.
5640 \begin_layout Subsection
5644 \begin_layout Itemize
5645 Fix framecount/length given when loading movies.
5648 \begin_layout Itemize
5649 Controller command memory leak fixes.
5652 \begin_layout Itemize
5653 Don't leak palette if freeing screen object.
5656 \begin_layout Subsection
5660 \begin_layout Itemize
5664 \begin_layout Itemize
5665 Wxwidgets: Allow controlling dumper from the menu.
5668 \begin_layout Subsection
5672 \begin_layout Itemize
5673 Rewrite parts of manual
5676 \begin_layout Itemize
5677 Lua: Make it work with Lua 5.2.
5680 \begin_layout Subsection
5684 \begin_layout Itemize
5685 Win32: Fix compile errors.
5688 \begin_layout Subsection
5692 \begin_layout Itemize
5693 Refactor controller input code.
5696 \begin_layout Itemize
5697 Fix crash when using command line on SDL / Mac OS X.
5700 \begin_layout Subsection
5704 \begin_layout Itemize
5705 Delete core/coroutine (obsolete)
5708 \begin_layout Itemize
5709 Lag input display by one frame.
5712 \begin_layout Itemize
5713 Rewind movie to beginning function.
5716 \begin_layout Itemize
5717 Fix wrong frame number reported to Lua when repainting after loadstate
5720 \begin_layout Itemize
5721 Support UI editing of jukebox
5724 \begin_layout Itemize
5725 Wxwidgets: Save settings on exit.
5728 \begin_layout Itemize
5729 Support ${project} for filenames
5732 \begin_layout Itemize
5733 SDL: Fix command history
5736 \begin_layout Subsection
5740 \begin_layout Itemize
5741 Fix some order-of-global-ctor bugs.
5744 \begin_layout Subsection
5748 \begin_layout Itemize
5749 Fix crashes when quitting on Win32.
5752 \begin_layout Subsection
5756 \begin_layout Itemize
5757 EVDEV: Queue keypresses from joystick, don't send directly
5760 \begin_layout Itemize
5761 Wxwidgets: Load-Preserve that actually works.
5764 \begin_layout Subsection
5768 \begin_layout Itemize
5769 Wxwidgets: GUI for memory search.
5772 \begin_layout Itemize
5773 Warn about using synchronous queue in UI callback.
5776 \begin_layout Subsection
5780 \begin_layout Itemize
5781 Remember last saved file for each ROM
5784 \begin_layout Itemize
5785 Support MT dumping via boost.
5788 \begin_layout Itemize
5792 \begin_layout Itemize
5796 \begin_layout Itemize
5797 Make mouse be ordinary input instead of special-casing
5800 \begin_layout Itemize
5801 SDL: Don't screw up commands with NUL codepoints.
5804 \begin_layout Subsection
5808 \begin_layout Itemize
5809 Merge status panel and main window
5812 \begin_layout Itemize
5813 True movie slot support (the rest of it)
5816 \begin_layout Itemize
5817 SDL: Fix compilation error
5820 \begin_layout Itemize
5821 Elminate cross calls in dump menu code.
5824 \begin_layout Subsection
5828 \begin_layout Itemize
5829 Cancel pending saves command
5832 \begin_layout Itemize
5833 Wxwidgets: Code refactoring
5836 \begin_layout Itemize
5837 Wxwidgets: Fix system -> reset
5840 \begin_layout Itemize
5841 Wxwidgets: Read watch expressions in the right thread
5844 \begin_layout Subsection
5848 \begin_layout Itemize
5849 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5853 \begin_layout Itemize
5854 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5857 \begin_layout Itemize
5858 Don't append trailing '-' to prefix when saving movie.
5861 \begin_layout Itemize
5862 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5865 \begin_layout Subsection
5869 \begin_layout Itemize
5870 Document memory watch syntax.
5873 \begin_layout Subsection
5877 \begin_layout Itemize
5878 Fix unattended dumping (lsnes-dumpavi)
5881 \begin_layout Itemize
5885 \begin_layout Itemize
5886 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5889 \begin_layout Itemize
5890 Add option to control sample rate preturbation in AVI dumper
5893 \begin_layout Subsection
5897 \begin_layout Itemize
5898 Wxwidgets: Fix dumper submodes
5901 \begin_layout Itemize
5902 Set core controller types before loadstate
5905 \begin_layout Subsection
5909 \begin_layout Itemize
5910 Fix compiling with bsnes v086.
5913 \begin_layout Subsection
5917 \begin_layout Itemize
5918 Don't prompt before quitting
5921 \begin_layout Itemize
5922 Start unpaused, preserve pause/unpause over load.
5925 \begin_layout Itemize
5926 Try to autodetect if ROM is headered.
5929 \begin_layout Itemize
5930 Wxwidgets: Only bring up ROM patching screen if specifically requested.
5933 \begin_layout Itemize
5934 Allow configuring some hotkeys.
5937 \begin_layout Subsection
5941 \begin_layout Itemize
5942 Lots of code cleanups
5945 \begin_layout Itemize
5946 Fix JMD compression (JMD dumping was broken)
5949 \begin_layout Itemize
5950 Don't crash if Lua C function throws an exception.
5953 \begin_layout Itemize
5954 Support bitmap drawing in Lua.
5957 \begin_layout Itemize
5958 Fix bsnes v085/v086 patches.
5961 \begin_layout Itemize
5962 Improve stability on win32.
5965 \begin_layout Subsection
5969 \begin_layout Itemize
5970 Don't corrupt movie if movie length is integer multiple of frames per page.
5973 \begin_layout Subsection
5977 \begin_layout Itemize
5978 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
5981 \begin_layout Itemize
5982 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
5983 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
5987 \begin_layout Itemize
5988 Wxwidgets: Fix internal focus lost (hotkeys stop working)
5991 \begin_layout Itemize
5992 Wxwidgets: Fix broken modifiers
5995 \begin_layout Itemize
5996 on_paint has parameter now.
5999 \begin_layout Itemize
6000 Optional initital fill for bitmaps
6003 \begin_layout Itemize
6004 Fix palette changing.
6007 \begin_layout Itemize
6008 Optimize rendering a bit.
6011 \begin_layout Itemize
6015 \begin_layout Subsection
6019 \begin_layout Itemize
6020 Movieinfo: Fix display of port #2 type.
6023 \begin_layout Itemize
6024 Call on_input() after loadstate.
6027 \begin_layout Subsection
6031 \begin_layout Itemize
6032 Fix writing port2 data to movie.
6035 \begin_layout Itemize
6036 Fix SRAM handling with Bsnes v087.
6039 \begin_layout Subsection
6043 \begin_layout Itemize
6044 Library loading support
6047 \begin_layout Itemize
6048 Built-in TSCC encoder
6051 \begin_layout Itemize
6052 Hi-color (256T colors) dumping.
6055 \begin_layout Itemize
6056 Dump over TCP/IP(v6)
6059 \begin_layout Itemize
6060 Hidable status panel
6063 \begin_layout Itemize
6067 \begin_layout Itemize
6068 Adjustable sound volume
6071 \begin_layout Itemize
6075 \begin_layout Itemize
6076 Allow DnD into filename boxes
6079 \begin_layout Itemize
6083 \begin_layout Itemize
6084 Portaudio: Fix speaker popping at start
6087 \begin_layout Itemize
6091 \begin_layout Itemize
6092 Speed adjustment menu
6095 \begin_layout Itemize
6096 Win32 joystick support
6099 \begin_layout Itemize
6100 Lua: gui.rainbow and gui.box
6103 \begin_layout Itemize
6104 Split key lists into classes (the key list was large!)
6107 \begin_layout Itemize
6108 More save slots support
6111 \begin_layout Itemize
6112 Wxwidgets (wxJoystick) joystick support
6115 \begin_layout Subsection
6119 \begin_layout Itemize
6120 Lots of internal joystick refactoring
6123 \begin_layout Itemize
6124 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6127 \begin_layout Itemize
6128 Wxwidgets: Settings mode (open settings without ROM)
6131 \begin_layout Itemize
6132 Wxwidgets: Prompt key to use option
6135 \begin_layout Itemize
6136 Wxwidgets: Fix crash if key goes away underneath
6139 \begin_layout Itemize
6140 Wxwidgets: Fix mouse position in presence of scaling
6143 \begin_layout Itemize
6144 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6147 \begin_layout Itemize
6148 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6149 seem to work well on WinXP)
6152 \begin_layout Itemize
6153 Start paused option.
6156 \begin_layout Subsection
6160 \begin_layout Itemize
6164 \begin_layout Itemize
6165 lsnes-dumpavi: Start Lua before starting dumper
6168 \begin_layout Itemize
6169 AVI: Fix secondary audio in mode 4.
6172 \begin_layout Subsection
6176 \begin_layout Itemize
6177 AVI: Refactor ZMBV a bit.
6180 \begin_layout Itemize
6181 Fix error reading analog values from movie file
6184 \begin_layout Subsection
6188 \begin_layout Itemize
6189 Delayed reset support
6192 \begin_layout Itemize
6193 Lua: memory.hash_region
6196 \begin_layout Subsection
6200 \begin_layout Itemize
6201 Rework the build system
6204 \begin_layout Itemize
6205 Typing input support
6208 \begin_layout Itemize
6209 Fix building with bsnes v086 and v087.
6212 \begin_layout Itemize
6213 SDL: Save settings on exit
6216 \begin_layout Itemize
6217 SDL: Command to enter command line mode with given command.
6220 \begin_layout Itemize
6221 SDL: More advanced command editing.
6224 \begin_layout Subsection
6228 \begin_layout Itemize
6230 \begin_inset Quotes eld
6233 arrow keys and enter don't work
6234 \begin_inset Quotes erd
6240 \begin_layout Itemize
6244 \begin_layout Itemize
6245 Show mode changes due to rewinding.
6248 \begin_layout Itemize
6249 Unsafe rewind support
6252 \begin_layout Itemize
6253 Fix directory transversal.
6256 \begin_layout Subsection
6260 \begin_layout Itemize
6261 AVI: Sound mode 5 (48kHz high-quality)
6264 \begin_layout Itemize
6268 \begin_layout Itemize
6269 Map the SNES bus into address space
6272 \begin_layout Itemize
6273 Fix loading memory watch files with CRLF line endings
6276 \begin_layout Subsection
6280 \begin_layout Itemize
6281 Map bsnes internal state into memory space
6284 \begin_layout Itemize
6286 \begin_inset Quotes eld
6289 click on panel wedges the emulator
6290 \begin_inset Quotes erd
6296 \begin_layout Itemize
6297 DnD movies/saves on the main window.
6300 \begin_layout Subsection
6304 \begin_layout Itemize
6305 Split core bindings into own module.
6308 \begin_layout Itemize
6309 Remember invalid settings
6312 \begin_layout Itemize
6313 Support for modified Gambatte core for GB/GBC emulation.
6316 \begin_layout Itemize
6317 Reload/swap ROM function
6320 \begin_layout Subsection
6324 \begin_layout Itemize
6325 Fix step poll function
6328 \begin_layout Subsection
6332 \begin_layout Itemize
6333 Non-insane savestate anchoring
6336 \begin_layout Subsection
6340 \begin_layout Itemize
6341 More Memory search methods
6344 \begin_layout Itemize
6345 Preserve movie if loading in RO mode.
6348 \begin_layout Itemize
6349 Fix a obscure case in timeline check
6352 \begin_layout Itemize
6353 Revamp the entiere ROM loading code
6356 \begin_layout Itemize
6360 \begin_layout Itemize
6364 \begin_layout Itemize
6365 Standalone hotkey config dialog
6368 \begin_layout Itemize
6369 Show bindings in more user-friendly format
6372 \begin_layout Subsection
6376 \begin_layout Itemize
6380 \begin_layout Itemize
6381 Fix uninitialized variables in bsnes v085
6384 \begin_layout Subsection
6388 \begin_layout Itemize
6389 Merge gambatte core into mainline (from its own branch)
6392 \begin_layout Itemize
6393 Wxwidgets: Show expected dump file formats
6396 \begin_layout Itemize
6397 Memory watch: Data typing
6400 \begin_layout Itemize
6401 lsnes internal MMIO area.
6404 \begin_layout Itemize
6405 Wxwidgets: New memory watch editor
6408 \begin_layout Itemize
6409 Hexadecimal memory watches
6412 \begin_layout Itemize
6413 Wxwidgets: Monospaced panel
6416 \begin_layout Itemize
6417 Wxwidgets: Split memory watches in panel
6420 \begin_layout Itemize
6421 Wxwidgets: Disable VMAs in memory search
6424 \begin_layout Itemize
6425 lsnes-dumpavi: Fix speed bug
6428 \begin_layout Itemize
6429 Movie subtitle support
6432 \begin_layout Itemize
6433 Fix rerecord count reporting
6436 \begin_layout Itemize
6437 Don't trash movie when loading in readonly mode.
6440 \begin_layout Subsection
6444 \begin_layout Itemize
6445 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
6448 \begin_layout Itemize
6449 Fix build on Mac OS X.
6452 \begin_layout Itemize
6456 \begin_layout Itemize
6457 Wxwidgets: Hidable messages window
6460 \begin_layout Itemize
6464 \begin_layout Itemize
6465 Bsnes: Support inconsistent saves
6468 \begin_layout Itemize
6469 Bsnes: Allow simulating saving every frame
6472 \begin_layout Itemize
6473 Fix desync if savestate is loaded in readonly mode in certain conditions.
6476 \begin_layout Itemize
6477 Wxwidgets: Fix save dialogs on Mac OS X.
6480 \begin_layout Itemize
6481 Wxwidgets: Fix insane status width on Win32.
6484 \begin_layout Itemize
6485 Wxwidgets: Fix autohold processing to be faster.
6488 \begin_layout Itemize
6489 Wxwidgets: Allow loading ROMs and movies from commandline.
6492 \begin_layout Subsection
6496 \begin_layout Itemize
6497 Be a bit smarter with --load
6500 \begin_layout Itemize
6501 Rewrote higher-level parts of audio system
6504 \begin_layout Itemize
6505 Tool to build commentary tracks
6508 \begin_layout Itemize
6512 \begin_layout Itemize
6513 Gambatte: Add support for SVN358
6516 \begin_layout Itemize
6517 Use builtin font when rendering status panel.
6520 \begin_layout Itemize
6521 Option to detach memory watch to its own window.
6524 \begin_layout Itemize
6525 Recent ROMs/Movies menu
6528 \begin_layout Itemize
6532 \begin_layout Itemize
6533 Useful lag counter for SNES games that autopoll
6536 \begin_layout Itemize
6537 Fix buffer overflow in gambatte sound output
6540 \begin_layout Subsection
6544 \begin_layout Itemize
6545 Don't blow up on wxGTK if the window is hidden somehow
6548 \begin_layout Itemize
6549 Support simultaneous drop of ROM and movie.
6552 \begin_layout Itemize
6553 Gambatte: Don't save spurious SRAMs.
6556 \begin_layout Itemize
6557 Make SGB ROMs actually usable.
6560 \begin_layout Itemize
6561 Fix so that saved movies appear in recent movies.
6564 \begin_layout Itemize
6565 Don't open multiple commentary editors at once.
6568 \begin_layout Subsection
6572 \begin_layout Itemize
6573 Lua: memory.readregion/memory.writeregion
6576 \begin_layout Itemize
6577 Lua: memory.map{,s}{byte,word,dword,qword}
6580 \begin_layout Itemize
6581 Lua: memory.map_structure
6584 \begin_layout Itemize
6585 Lua: Fix bus_address for gambatte
6588 \begin_layout Itemize
6589 Fix features dependent of bsnes debugger
6592 \begin_layout Itemize
6593 Cleanup bsnes debugger logic
6596 \begin_layout Itemize
6597 Fix resets in presence of save every frame
6600 \begin_layout Subsection
6604 \begin_layout Itemize
6605 Lua: input.lcid_to_pcid
6608 \begin_layout Itemize
6609 Fix off-by-one bug with slot hashes
6612 \begin_layout Itemize
6613 Fix crashes on certain memory watch expressions
6616 \begin_layout Itemize
6617 Lua: memory.read_expr
6620 \begin_layout Itemize
6621 Lua: Fix memory.read_expr on nil argument
6624 \begin_layout Itemize
6625 Fix the code to compile on G++ 4.7
6628 \begin_layout Itemize
6629 Change button_id to be a function pointer field, not a virtual method
6632 \begin_layout Itemize
6633 Add bsnes patches to fix libsnes to compile on GCC 4.7
6636 \begin_layout Itemize
6637 Gambatte: Always use legacy lag counting
6640 \begin_layout Itemize
6641 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
6644 \begin_layout Itemize
6645 Fix analog controllers
6648 \begin_layout Itemize
6652 \begin_layout Itemize
6653 Fix button symbols in input display
6656 \begin_layout Itemize
6657 Compensate for nuts bsnes superscope/justifier handling
6660 \begin_layout Itemize
6661 Lua: Fix bit.extract boolean handling