lsnes/manual.txt
2013-08-03 14:31:19 +03:00

2333 lines
49 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1 Introduction
lsnes is SNES rerecording emulator based on bsnes core.
2 Dependencies
1. bsnes libsnes (for bsnes SNES core)
(a) v084-v087 (v084 or v085 for delayreset support)
(b) accuracy or compatiblity core with debugger enabled.
(c) Patched version (using included 7 patches)
2. gambatte (for gambatte core)
(a) SVN r320, r358 or r364
(b) Patched with included patches
3. Zlib
4. boost_iostreams
5. boost_filesystem
6. boost_thread (if native std::thread is not available)
7. libsdl (SDL only)
8. sdlmain (SDL only, part of SDL)
9. boost_conversion (this is header-only library)
10. libswscale (wxwidgets graphics only)
11. Portaudio (portaudio sound only)
12. libao (libao sound only)
13. Lua version 5.1.X or 5.2.X
14. G++ 4.6 or 4.7
15. libopus (optional, for commentary track tool)
3 Building
• Copy bsnes sources (the bsnes subdirectory) to subdirectory
'bsnes' (for bsnes core).
• Copy gambatte sources to subdirectory 'gambatte' (for gambatte
core).
• Patch the bsnes sources with included patches (directory
'bsnes-patches/<version>', bsnes core)
• Patch the gambatte sources with included patches (directory
'gambatte-patches/<version>', gambatte core)
• Edit options.build (or copy of that file)
• Run make (passing 'OPTIONS=<filename>' if using something else
than options.build).
4 Command line options
4.1 Wxwidgets options
4.1.1 --rom=<file>
Load <file> as ROM.
4.1.2 <file>
Load <file> as ROM.
4.1.3 --load=<file>
Load <file> as movie or savestate file on startup.
4.1.4 --settings
Instead of starting the emulator, only display the settings.
4.1.5 --lua=<file>
Run this Lua file on startup
4.2 dump options (lsnes-dumpavi only)
4.2.1 --rom=<file>
Load <file> as ROM. Required.
4.2.2 <filename>
Load <filename> as movie or savestate file on startup. Required.
4.2.3 --dumper=<dumper>
Set the dumper to use (required). Use 'list' for listing of known
dumpers.
4.2.4 --firmware-path=<path>
Set path to look for firmware.
4.2.5 --mode=<mode>
Set the mode to use (required for dumpers with multiple modes,
forbidden otherwise). Use 'list' for known modes.
4.2.6 --prefix=<prefix>
Set dump prefix. Default is “avidump”.
4.2.7 --option=<name>=<value>
Set option <name> to value <value>.
4.2.8 --length=<length>
Set number of frames to dump. Mandatory.
4.2.9 --lua=<script>
Run specified lua script (lsnes-dumpavi does not have
initialization files).
4.2.10 --load-library=<library>
Load the specified shared object / dynamic library / dynamic link
library.
4.3 lsnes settings directory
The lsnes settings directory is (in order of decreasing
perference):
• Windows: %APPDATA%\lsnes (if %APPDATA% exists)
• Unix: $XDG_CONFIG_HOME/lsnes (if $XDG_CONFIG_HOME exists)
• Unix: $HOME/.config/lsnes (if $HOME exists)
• All: . (fallback default).
If leading directories do not exist, attempt to create them is
made.
5 Internal commands
• Commands beginning with '*' invoke the corresponding command
without alias expansion.
• If command starts with '+' (after possible '*'), the command is
executed as-is when button is pressed, and when button is
released, it is executed with '+' replaced by '-'.
• Commands without '+' execute only on negative edge (release).
5.1 run-script <script>
Run <script> as if commands were entered on the command line.
5.2 Memory manipulation
<address> may be decimal or hexadecimal (prefixed with '0x').
<value> can be hexadecimal (prefixed with '0x'), unsigned or
signed (prefixed with '-') decimal.
The available element <sizes> are:
• byte: 1 byte
• word: 2 bytes
• dword: 4 bytes
• qword: 8 bytes
When reading RAM and ROM, multi-byte reads/writes are big-endian.
When dealing with DSP memory, multi-byte reads/writes are
native-endian (do not use operand sizes exceeding DSP bitness,
except dword is OK for 24-bit memory).
5.2.1 read-<size> <address>
Read the value of byte in <address>.
5.2.2 read-s<size> <address>
Read the value of signed byte in <address>.
5.2.3 write-<size> <address> <value>
Write <value> to byte in address <address>.
5.3 Main commands
These commands are not available in lsnesrc, but are available
after ROM has been loaded.
5.3.1 quit-emulator
Quits the emulator.
5.3.2 pause-emulator
Toggle paused/unpaused
5.3.3 +advance-frame
Advance frame. If the button is still held after configurable
timeout expires, game unpauses for the duration frame advance is
held.
5.3.4 +advance-poll
Advance subframe. If the button is still held after configurable
timeout expires, game unpauses for the duration frame advance is
held.
5.3.5 advance-skiplag
Skip to first poll in frame after current.
5.3.6 reset
Reset the SNES after this frame.
5.3.7 load <filename>
Load savestate <filename> in current mode.
5.3.8 load-state <filename>
Load savestate <filename> in readwrite mode.
5.3.9 load-readonly <filename>
Load savestate <filename> in readonly mode.
5.3.10 load-preserve <filename>
Load savestate <filename> in readonly mode, preserving current
events.
5.3.11 load-movie <filename>
Load savestate <filename>, ignoring save part in readonly mode.
5.3.12 save-state <filename>
Save system state to <filename> as soon as possible.
5.3.13 save-movie <filename>
Save movie to <filename>.
5.3.14 set-rwmode
Set read-write mode.
5.3.15 set-romode
Set read-only mode
5.3.16 toggle-rwmode
Toggle between read-only and read-write modes.
5.3.17 test-1, test-2, test-3
Internal test commands. Don't use.
5.3.18 take-screenshot <filename>
Save screenshot to <filename>.
5.3.19 +controller <class>-<#>-<button>
Press button <button> on controller <num> of class <class>.
• Class 'gamepad': A, B, X, Y, L, R, select, start, up, down,
left, right, ext0, ext1, ext2, ext3
• Class 'mouse': L, R
• Class 'superscope': trigger, cursor, turbo, pause
• Class 'justifier': trigger, start
• Class 'gb': A, B, select, start, up, down, left, right
5.3.20 hold-controller <class>-<#>-<button>
Hold/unhold button <button> on controller <num> of class <class>.
5.3.21 type-controller <class>-<#>-<button>
Hold/unhold button <button> on controller <num> of class <class>
for the next frame. See +controller for button names.
Cauntion: Does not work properly if outside frame advance.
5.3.22 +autofire-controller <class>-<#>-<button> [[<duty>]
<cyclelen>]
Start autofire. If duty is not specified, defaults to 1. If
<cyclelen> is not specified, defaults to 2.
5.3.23 -autofire-controller <class>-<#>-<button> [[<duty>]
<cyclelen>]
End autofire.
5.3.24 autofire-controller <class>-<#>-<button> [[<duty>]
<cyclelen>]
Toggle autofire. If autofire is turned on, specified cycle is
used.
5.3.25 designate-position <class>-<#>-analog<n>
Designate position for analog pair. <n> is only there if there
are multiple axis pairs.
5.3.26 repaint
Force a repaint.
5.3.27 toggle-pause-on-end
Toggle pause on end flag.
5.3.28 set-pause-on-end
Set pause on end flag.
5.3.29 clear-pause-on-end
Clear pause on end flag.
5.3.30 action <action> [<parameters>]
Run specified core action.
5.4 Save jukebox
5.4.1 cycle-jukebox-backward
Cycle save jukebox backwards.
5.4.2 cycle-jukebox-forward
Cycle save jukebox forwards
5.4.3 load-jukebox
Do load from jukebox (current mode).
5.4.4 save-jukebox
Do state save to jukebox.
5.5 Lua
5.5.1 evaluate-lua <luacode>
Run Lua code <luacode> using built-in Lua interpretter.
5.5.2 L <luacode>
Synonym for evaluate-lua.
5.5.3 run-lua <script>
Run specified lua file using built-in Lua interpretter.
5.5.4 reset-lua
Clear the Lua VM state and restore to factory defaults.
5.6 Memory watch
5.6.1 add-watch <name> <expression>
Adds new watch (or modifies old one).
5.6.2 remove-watch <name>
Remove a watch.
5.7 Sound
5.7.1 enable-sound <on/off>
Enable/Disable sound.
5.8 Misc.
5.8.1 reload-rom [<file>]
Reloads the main ROM image from <file>.
5.8.2 +tangent
Tangent for recording voice for commentary track. While pressed,
record a stream.
5.8.3 advance-subframe-timeout
Subframe advance timeout in milliseconds. Default is 100.
6 Settings
6.1 Core settings
6.2 AVI dumper settings
6.2.1 avi-large
AVI dumper: Always dump at 512x448 or 512x478 regardless of what
the console outputs.
6.2.2 avi-left-border
AVI dumper: Set the default left border thickness (unless lua
overrides) for dumps. Range 0-8191. Default is 0.
6.2.3 avi-right-border
AVI dumper: Set the default right border thickness (unless lua
overrides) for dumps. Range 0-8191. Default is 0.
6.2.4 avi-top-border
AVI dumper: Set the default top border thickness (unless lua
overrides) for dumps. Range 0-8191. Default is 0.
6.2.5 avi-bottom-border
AVI dumper: Set the default bottom border thickness (unless lua
overrides) for dumps. Range 0-8191. Default is 0.
6.2.6 avi-maxframes
AVI dumper: Maximum number of frames per dump segment (0 =>
unlimited). Range 0-999999999. Default is 0.
6.2.7 avi-compresison
AVI dumper: Compression level (0-18).
• Compression levels 10 and above are not compatible with stock
CSCD codec.
• Recomended level is 7.
6.2.8 avi-soundrate
AVI dumper: Set method of determining the sound rate.
• 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48,
64, 88.2, 96, 128, 176.4 and 192 kHz.
• 1: Round down to nearest integer.
• 2: Round up to nearest ingeter.
• 3: Multiply by denominator.
• 4: High quality 44.1kHz (SRC needed).
• 5: High quality 48kHz (SRC needed).
6.3 JMD options
6.3.1 jmd-compression
JMD dumper: Compression level (0-9).
7 Movie editor
• The editor edits in-memory movie.
• Because past can't be edited and readwrite mode doesn't allow
future, editing only works in read only mode.
• Keyboard triggers the normal hotkeys and bindings.
7.1 Left button actions
• Clicking on cell in future (indicated by lack of redish
background) toggles it (if it is a button) or prompts for a
value (if it is an axis)
• Dragging vertically toggles sequence of buttons or changes a
sequence of axis values.
7.2 Right button actions
The right mouse button pops up a context-sensitive menu:
• Toggle <something>: Toggle this button
• Change <something>: Change this axis value
• Insert frame after: Insert a frame after this frame
• Append frame: Append a frame to movie
• Append frames: Append specified number of frames to movie
• Delete frame: Delete this frame
• Delete subframe: Delete this subframe
• Truncate movie: Delete this subframe and everything after it.
• Scroll to frame: Prompt for a frame and scroll the display to
that frame.
• Scroll to current frame: Scroll the display to current position
• Run to frame: Prompts for frame and runs the emulation to that
frame.
• Change number of lines visible: Change the height of the movie
display (1 to 255).
• Lock scroll to playback: While playing back or rewinding
movies, the display will follow if enabled.
8 Memory watch expression syntax
Memory watch expressions are in RPN (Reverse Polish Notation). At
the end of expression, the top entry on stack is taken as the
final result.
Notations:
• Evaluation order is strictly left to right.
• a is the entry on top of stack
• b is the entry immediately below top of stack
• ; separates values to be pushed (no intermediate pop).
• After end of element, all used stack slots are popped and all
results are pushed.
• When pushing multiple values, the pushes occur in order shown.
The following operators are available:
• + : a + b
• - : a - b
• * : a * b
• / : a / b
• % : a % b
• a : atan(a)
• b : read_signed_byte(a)
• c : cos(a)
• d : read_signed_dword(a)
• i : quotent(a / b)
• p :\pi
• q : read_signed_qword(a)
• r : sqrt(a)
• s : sin(a)
• t : tan(a)
• u : a; a
• w : read_signed_word(a)
• A : atan2(a, b)
• B : read_unsigned_byte(a)
• C<number>z : Push number <number> to stack.
• D : read_unsigned_dword(a)
• C0x<number>z : Push number <number> (hexadecimal) to stack.
• H<digit> : Set hexadecimal mode with specified number of digits
(use A-G for 10-16 digits).
• Q : read_unsigned_qword(a)
• R<digit> : round a to <digit> digits.
• W : read_unsigned_word(a)
8.1 Example:
C0x007e0878zWC0x007e002czW-
1. Push value 0x7e0878 on top of stack (C0x007e0878z).
2. Pop the value on top of stack (0x7e0878), read word value at
that address and push the result,call it x1 (W).
3. Push value 0x7e002c on top of stack (C0x007e002cz).
4. Pop the value on top of stack (0x7e002c), read word value at
that address and push the result,call it x2 (W).
5. Pop the two top numbers on stack, x1 and x2, substract x1 from
x2 and push x2 - x1 (-).
6. Since the expression ends, the final memory watch result is
the top one on stack, which is x2 - x1.
9 Modifier and key names:
9.1 wxWidgets platform
9.1.1 Modifier names:
Following modifier names are known:
• alt
• ctrl
• shift
• meta
• cmd (Mac OS X only)
9.1.2 Key names:
Following key names are known:
• back, tab, return, escape, space, exclaim, quotedbl, hash,
dollar, percent, ampersand, quote, leftparen, rightparen,
asterisk, plus, comma, minus, period, slash, 0, 1, 2, 3, 4, 5,
6, 7, 8, 9, colon, semicolon, less, equals, greater, question,
at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t,
u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m,
n, o, p, q, r, s, t, u, v, w, x, y, z, leftcurly, pipe,
rightcurly, tilde, delete, start, lbutton, rbutton, cancel,
mbutton, clear, shift, alt, control, menu, pause, capital, end,
home, lefT, up, right, down, select, print, execute, snapshot,
insert, help, numpad0, numpad1, numpad2, numpad3, numpad4,
numpad5, numpad6, numpad7, numpad8, numpad9, multiply, add,
separator, subtract, decimal, divide, f1, f2, f3, f4, f5, f6,
f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19,
f20, f21, f22, f23, f24, numlock, scroll, pageup, pagedown,
numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up,
numpad_right, numpad_down, numpad_pageup, numpad_pagedown,
numpad_end, numpad_begin, numpad_insert, numpad_delete,
numpad_equal, numpad_multiply, numpad_add, numpad_separator,
numpad_subtract, numpad_decimal, numpad_divide, windows_left,
windows_right, windows_menu, command, special1, special2,
special3, special4, special5, special6, special7, special8,
special9, special10, special11, special12, special13,
special14, special15, special16, special17, special18,
special19, special20
10 Movie file format
Movie file is .zip archive in itself, normal ZIP archive tools
work on it (note: If you recompress it, do not use compression
methods other than store and deflate and especially do not use
encryption of any kind).
10.1 Detecting clean start/SRAM/Savestate
• If file has member “savestate” it is savestate, otherwise:
• If file has members with names starting “moviesram.” it is
movie starting from SRAM, otherwise:
• It is movie starting from clear state.
10.2 Member: gametype
Type of game ROM and region (as one line). Valid values are:
+--------------+---------------------+--------+
| Value | System | Region |
+--------------+---------------------+--------+
+--------------+---------------------+--------+
| snes_pal | Super NES | PAL |
+--------------+---------------------+--------+
| sgb_pal | Super Game Boy | PAL |
+--------------+---------------------+--------+
| snes_ntsc | Super NES | NTSC |
+--------------+---------------------+--------+
| sgb_ntsc | Super Game Boy | NTSC |
+--------------+---------------------+--------+
| bsx | BS-X (non-slotted) | NTSC |
+--------------+---------------------+--------+
| bsxslotted | BS-X (slotted) | NTSC |
+--------------+---------------------+--------+
| sufamiturbo | Sufami Turbo | NTSC |
+--------------+---------------------+--------+
Frame rates are:
+---------+-----------------+
| Region | Framerate (fps) |
+---------+-----------------+
+---------+-----------------+
| PAL | 322445/6448 |
+---------+-----------------+
| NTSC | 10738636/178683 |
+---------+-----------------+
10.3 Member: port1
Contains type of port #1 (as one line). Valid values are 'none',
'gamepad', 'multitap' and 'mouse'. If not present, defaults to
'gamepad'.
10.4 Member: port2
Contains type of port #2 (as one line). Valid values are 'none',
'gamepad', 'multitap', 'mouse', 'superscope', 'justifier' and
'justifiers'. If not present, defaults to 'none'.
10.5 Member: gamename
Contains name of the game (as one line).
10.6 Member: authors
Contains authors, one per line. Part before '|' is the full name,
part after is the nickname.
10.7 Member: systemid
Always “lsnes-rr1” (one line). Used to reject other saves.
10.8 Member: controlsversion
Always “0” (one line). Used to identify what controls are there.
10.9 Member: “coreversion”
Contains bsnes core version number (as one line).
10.10 Member: projectid
Contains project ID (as one line). Used to identify if two movies
are part of the same project.
10.11 Member: {rom,slota,slotb}{,xml}.sha256
Contains SHA-256 of said ROM or ROM mapping file (as one line).
Absent if corresponding file is absent.
10.12 Member: moviesram.<name>
Raw binary startup SRAM of kind <name>. Only present in
savestates and movies starting from SRAM.
10.13 Member: saveframe
Contains frame number (as one line) of frame movie was saved on.
Only present in savestates.
10.14 Member: lagcounter
Current value of lag counter (as one line). Only present in
savestates.
10.15 Member: pollcounters
Contains poll counters (currently 100 of them), one per line.
Each line is raw poll count if DRDY is set for it. Otherwise it
is negative poll count minus one. Only present in savestates.
10.16 Member: hostmemory
Raw binary dump of host memory. Only present in savestates.
10.17 Member: savestate
The raw binary savestate itself. Savestate detection uses this
file, only present in savestates.
10.18 Member: screenshot
Screenshot of current frame. Only present in savestates. First 2
bytes are big-endian width of image, rest are 24-bit RGB image
data. Height of image is inferred from the width and size of
data.
10.19 Member: sram.<name>
Raw binary SRAM of kind <name> at time of savestate. Only present
in savestates.
10.20 Member: input
The actual input track, one line per subframe (blank lines are
skipped).
• If the first byte of each line is '.', ' ', <tab> or '|', then
the line is part of same frame as previous, otherwise it starts
a new frame.
• First subframe must start a new frame.
Length of movie in frames is number of lines in input file that
start a new frame.
10.21 Member: subtitles
Subtitle track. Optional.
• Each line is in form <firstframe> <numframes> <text>.
• Linefeed is encoded as \n, backslash is encoded as \\.
10.22 Member: rerecords
Contains textual base-10 rerecord count (as one line; emulator
just writes this, it doesn't read it) + 1.
10.23 Member: rrdata
This member stores set of load IDs. There is one load ID per
rerecord (plus one corresponding to start of project).
• This member constists of concatenation of records
• Each record is 2-36 bytes long and can represent 1-16,843,009
consequtive IDs.
• IDs are interpretted as 256-bit big-endian integers with
warparound.
• Initial predicted ID is all zeroes.
Format of each record is:
• 1 byte: Opcode byte. Bits 0-4 are prefix length (prefixlen),
bits 5-6 are count length (countlen). Bit 7 is unused.
• 32-prefixlen bytes of ID.
• countlen bytes of big-endian count (count).
Records are processed as follows:
• To form the first ID encoded by record, take the first
prefixlen bytes predicted ID and append the read ID value to
it. The result is the first ID encoded.
• If countlen is 0, record encodes 1 ID.
• If countlen is 1, record encodes 2+count IDs.
• If countlen is 2, record encodes 258+count IDs.
• If countlen is 3, record encodes 65794+count IDs.
• The new predicted ID is the next ID after last one encoded by
the record.
The number of rerecords + 1 is equal to the sum of number of IDs
encoded by all records.
10.24 Member: starttime.second
Movie starting time, second part. Epoch is Unix epoch. Default is
1,000,000,000.
10.25 Member: starttime.subsecond
Movie starting time, subsecond part. Unit is CPU clocks. Default
is 0.
10.26 Member: savetime.second
Movie saving time, second part. Default is starttime.second. Only
present in savestates.
10.27 Member: savetime.subsecond
Movie saving time, subsecond part. Default is
starttime.subsecond. Only present in savestates.
11 lsvs file format (commentary tracks)
11.1 Clusters
• Each cluster is 8kB (8192 bytes) in size.
• Cluster n starts at offset 8192*n in file.
• The following clusters are system special:
Cluster 0 and all clusters with number multiple of 2048
(cluster tables)
Cluster 1 (superblock)
11.2 Cluster tables
• The cluster table describing cluster n is stored in cluster n &
~0x7FF (zero last 11 bits of n).
• This cluster table consists of 2048 4-byte big-endian integers.
• Each entry describes a cluster in 16MB supercluster, in order.
• The valid values for entries are:
0x00000000: Free cluster
0x00000001: Last cluster in chain.
0xFFFFFFFF: System cluster (cluster tables and superblock)
(anything else): Number of next cluster in chain. Must not be
multiple of 2048.
• Due to limitations of the format, there can be at most 2097052
superclusters, giving maximum file size of 16TB.
11.3 Stream table
• The stream table chain always starts in cluster 2.
• Otherwise, it follows normal chaining.
• The stream table consists of 16-byte entries:
The first 8 bytes of entry give big-endian beginning position
of stream in units of 1/48000 s.
The next 4 bytes of entry give big-endian beginning cluster
for control data. 0 here marks the entry as not present.
The last 4 bytes of entry give big-endian beginning cluster
for codec data.
• Stream table clusters are normal clusters, following normal
chaining.
• The stream begnning position is not guarenteed unique. There
can be multiple streams with the same starting position in the
file.
11.4 Stream control data
• The stream control data consists of entries 4 bytes each:
The first 2 bytes of entry gives big-endian length of packet
The next byte of entry gives audio length of packet in units
of 1/400 s.
The last byte is control byte.
0 means this entry is not present and the control data
ends.
1 is valid control entry.
• The stream control data can also end by running into end of the
readable chain.
This happens if there happens to be exact multiple of 2048
packets in stream and number of packets is nonzero.
• These clusters follow normal chaining.
11.5 Stream codec data
• Stream codec data consists of raw Opus data packets packed back
to back with nothing in between.
• Warning: Due to internal limitations, this data must reside in
the first 65536 superclusters (that is, the first 1TB of the
file).
11.6 Superblock
• The superblock is stored in cluster 1.
• The first 11 bytes are “sefs-magic”<NUL>.
• The rest are unused.
• This cluster 1 is marked as system special.
12 Known ROM extensions
• SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7,
dx2, mgd, mgh.
• DMG cartridge ROMs: dmg, gb.
• GBC cartridge ROMs: cgb, gbc.
13 Gamepack files
• The first line must be: “[GAMEPACK FILE]”.
• There is one needed line: “type <systype>”. This sets system
type to <systype>. The following system types are valid:
snes (SNES)
bsx (BS-X non-slotted)
bsxslotted (BS-X slotted)
sufamiturbo (Sufami Turbo)
sgb (Super Game Boy)
dmg (Game Boy)
gbc (Game Boy Color)
gbc_gba (Game Boy Color with GBA initial register values)
• Optionally a region can be specified: “region <region>”. The
following values are valid:
autodetect (Autodetect region: snes and sgb only)
ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
pal (PAL: snes, sgb)
world (World: dmg, gbc, gbc_gba)
• ROM images are loaded as: “rom <type> <file>”. The following
types are valid:
rom (Cartridge ROM in snes, dmg, gbc, gbc_gba. BIOS in bsx,
bsxslotted, sufamiturbo)
bsx (Cartridge ROM in bsx, bsxslotted)
slot-a (Cartridge ROM in sufamiturbo)
slot-b (Cartridge ROM in sufamiturbo)
• ROM markup can be loaded as: “xml <type> <file>”. The types
valid are the same as for ROMs.
• Patches can be loaded as “patch[<offset>] <type> <file>”. The
types are the same as for ROMs.
Offset is given in form [+-]<number>. Usually offset is
either +0 or -512.
Default offset is +0.
13.1 Example:
[GAMEPACK FILE]
type snes
rom rom speedygonzales.sfc
patch-512 rom sonicthehedgehog.ips
13.2 Example 2:
[GAMEPACK FILE]
type sgb
rom rom supergameboy.sfc
rom dmg megamanV.dmg
14 Quick'n'dirty encode guide
1. Start the emulator and load the ROM and movie file.
2. Set large AVI option 'set-setting avi-large on'
3. Enable dumping 'dump-avi tmpdump'
4. Unpause and let it run until you want to end dumping.
5. Close the emulator (closing the window is the easiest way). Or
use 'end-avi'.
6. For each tmpdump*.avi file created, on command prompt, do
'x264 --crf 10 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
7. Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
8. Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv +
tmpdump_0000001.mkv + tmpdump_0000002.mkv' (list every
tmpdump_<numbers>.mkv, with + in between).
9. Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'. Now
final.mkv contains quick'n'dirty encode.
15 Axis configurations for some gamepad types:
15.1 XBox360 controller:
Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be
set to pressure-+.
set-axis joystick0axis2 pressure-+
set-axis joystick0axis5 pressure-+
• This is needed for SDL only. EVDEV sets those types correctly.
15.2 PS3 “sixaxis” controller:
Axes 8-19 should be disabled.
set-axis joystick0axis8 disabled
set-axis joystick0axis9 disabled
set-axis joystick0axis10 disabled
set-axis joystick0axis11 disabled
set-axis joystick0axis12 disabled
set-axis joystick0axis13 disabled
set-axis joystick0axis14 disabled
set-axis joystick0axis15 disabled
set-axis joystick0axis16 disabled
set-axis joystick0axis17 disabled
set-axis joystick0axis18 disabled
set-axis joystick0axis19 disabled
16 Errata:
16.1 Problems from BSNES core:
• The whole pending save stuff.
• Lack of layer hiding.
• It is slow (especially accuracy).
• Firmwares can't be loaded from ZIP archives.
16.2 Other problems:
• Modifiers don't work with pseudo-keys (SDL, EVDEV).
• Audio for last dumped frame is not itself dumped.
• Audio in UI is pretty bad in quality if game doesn't run at
full speed.
• No menus, command based interface (SDL).
• Long commands don't scroll.
17 Changelog:
17.1 rr0-beta1
• Fix -Wall warnings
• Fix dumper video corruption with levels 10-18.
17.2 rr0-beta2
• Autofire
• Lots of code cleanups
• Lua interface to settings
• Allow specifying AVI borders without Lua
• Fix scaling if vscale > 1 and originx > 0 (left border exists)
• on_snoop lua callback
• Faster movie loading and saving.
17.3 rr0-beta3
• Joystick support
17.4 rr0-beta4
• Fix multi-buttons
• Save jukebox functionality.
17.5 rr0-beta5
• Try to fix some nasty failing movie load edge cases
• Allow specifying scripts to run on command line.
17.6 rr0-beta6
• Major source code reorganization.
• Backup savestates before overwriting.
• Don't crash if loading initial state fails.
17.7 rr0-beta7
• Fix firmware lookup
• Fix author name parsing
• Fix rerecord counting
• (SDL) Print messages to console if SDL is uninitialized
• Add movieinfo program
• Fix loading movies starting from SRAM.
17.8 rr0-beta8
• Add support for unattended dumping
• Fix compiling for Win32
• Don't lock up if sound can't be initialized
• Strip trailing CR from commands
• Don't try to do dubious things in global ctors (fix crash on
startup)
17.9 rr0-beta9
• Small documentation tweaking
• Fix make clean
• Fix major bug in modifier matching
17.10 rr0-beta10
• Lots of documentation fixes
• Use dedicated callbacks for event backcomm., not commands.
• Ensure that the watchdog is not hit when executing delayed
reset.
• Remove errant tab from joystick message.
17.11 rr0-beta11
• Make autofire operate in absolute time, not linear time
• Reinitialize controls when resuming from loadstate
• Some more code cleanups
• If Lua allocator fails, call OOM_panic()
• Byte/word/dword/qword sized host memory write/read functions.
• Dump at correct framerate if dumping interlaced NTSC
(height=448).
17.12 rr0-beta12
• Actually include the complete source code
• Keep track of RTC
17.13 rr0-beta13
• Document {save,start}time.{,sub}second.
• Intercept time() from bsnes core.
17.14 rr0-beta14
• Allow disabling time() interception (allow build on Mac OS X)
• Use SDLMain on Mac OS X (make SDL not crash)
• Disable delayed resets (just plain too buggy for now).
• Code cleanups
• Use 16-bit for graphics/video instead of 32-bit.
• gui.rectangle/gui.pixel
• gui.crosshair
• New CSCD writer implementation.
17.15 rr0-beta15
• Fix interaction of * and +.
• Manual improvements
• Use gettimeofday()/usleep(), these seem portable enough.
• Move joystick axis manipulation to keymapper code.
• Changes to how read-only works.
• Refactor controller input code.
17.16 rr0-beta16
• Fix mouseclick scale compensation.
• Draw area boundaries correctly in SDL code.
• gui.screenshot.
• Fix CSCD output (buffer overrun and race condition).
17.17 rr0-beta17
• JMD dumping support.
• Allow unattended dumping to JMD.
• Move to BSNES v083.
• Switch back to 32-bit colors.
• Add Lua function gui.color.
• Use some new C++11 features in GCC 4.6.
• Be prepared for core frequency changes.
• Pass colors in one chunk from Lua.
17.18 rr0-beta18
• New lua functions gui.line(), gui.status() and gui.circle(),
memory.vma_count(), memory.read_vma() and memory.find_vma().
• Numerious documentation fixups
• RTC time format changed
• Reformat flags display
• Allow lua package name to be overridden
• SDUMP (high-quality dumping).
• Split platform support to plugins.
• Make all sound plugins support basic sound commands
• Support portaudio for sound.
• Allow disable Lua/SDL searching.
• Upconvert colors when copying lcscreen to screen.
• Reorganize source tree.
• Evdev joystick support.
• Refactor more code into generic window code.
17.19 rr0-beta19
• Refactor message handling.
• Rework makefile
• Documentation fixes
• Finish pending saves before load/quit.
• Wxwidgets graphics plugin.
17.20 rr0-beta20
• Get rid of win32-crap.[ch]pp.
• Move files around a lot.
• Get rid of need for host C++ compiler.
• Bsnes v084 core.
• Refactor inter-component communication.
• Fix zero luma.
• Fix crash on multiline aliases.
• Load/Save settings in wxwidgets gui.
17.21 rr0-beta21
• Patch problems in bsnes core
• SNES is little-endian, not big-endian!
• Fix memory corruption in lcscreen::load()
17.22 rr0-beta22
• Fix interpretting repeat counts in rrdata loading.
• New lua callback: on_frame()
• Remove calls to runtosave() that aren't supposed to be there
• Lua function: movie.read_rtc()
• Ignore src/fonts/font.cpp
• Fix more bsnes core problems
• Control bsnes random seeding
• Pause-on-end
• Some bsnes core debugging features (state dump and state hash)
• Fix titlebar version number (no, the last version wasn't
'lsnes-0-beta21', it was 'lsnes rr0-beta21').
17.23 rr0-beta23
• Fix memory corruption due to macro/field mixup
• search-memory update
• Allow direct-mapped framebuffer
• SDL: Use SDL_ANYFORMAT if possible
• SDMP2SOX: 2s delay modes.
• Wxwidgets: Cleanups
• Use sed -E, not sed -r. Fixes building on Mac OS X.
• Wxwidgets: Save jukebox on exit
• Fix RTC if using load-movie on savestate.
• Fix crash related to full console mode.
17.24 rr0-beta24
• Wxwidgets: Allow bringing application to foreground on Mac OS
X.
• Wxwidgets: Allow compiling on Mac OS X.
• Use movie compare instead of movie hashing (faster save/load).
• Lua: _SYSTEM table.
17.25 rr0-beta25
• sdmp2sox: Pad soundtrack if using -l or -L.
• sdmp2sox: Fix NTSC overscan.
• sdmp2sox: Add AR correction mode.
• call lua_close() when exiting.
• Fix zip_writer bug causing warnings from info-zip and error
from advzip.
17.26 rr0-beta26
• Fix IPS patching code (use bsnes core IPS patcher).
• Implement BPS patching (using bsnes core IPS patcher).
• Add feature to load headered ROMs.
17.27 rr0-beta27
• Show command names when showing keybindings
17.28 rr0
• Fix pause-on-end to be actually controllable
• SDL: Poll all events in queue, not just first one (fixes
slowness in command typing)
• Wxwidgets: Fix ROM loading.
17.29 rr1-beta0
• Lua: Add gui.textH, gui.textV, gui.textHV
• Fix text colors on SDL on Mac OS X
• Mode 'F' for finished in readonly mode.
• Fix some WS errors.
• Reliably pause after skip poll
• Split UI and core into their own threads
17.30 rr1-beta1
• Remove leftover dummy SRAM slot
• Fix controller numbers.
17.31 rr1-beta2
• Fix lsnes-dumpavi after interface change.
• Also give BSNES patches for v085.
• Pack movie data in memory.
17.32 rr1-beta3
• Fix framecount/length given when loading movies.
• Controller command memory leak fixes.
• Don't leak palette if freeing screen object.
17.33 rr1-beta4
• Detect revisions.
• Wxwidgets: Allow controlling dumper from the menu.
17.34 rr1-beta5
• Rewrite parts of manual
• Lua: Make it work with Lua 5.2.
17.35 rr1-beta6
• Win32: Fix compile errors.
17.36 rr1-beta7
• Refactor controller input code.
• Fix crash when using command line on SDL / Mac OS X.
17.37 rr1-beta8
• Delete core/coroutine (obsolete)
• Lag input display by one frame.
• Rewind movie to beginning function.
• Fix wrong frame number reported to Lua when repainting after
loadstate
• Support UI editing of jukebox
• Wxwidgets: Save settings on exit.
• Support ${project} for filenames
• SDL: Fix command history
17.38 rr1-beta9
• Fix some order-of-global-ctor bugs.
17.39 rr1-beta10
• Fix crashes when quitting on Win32.
17.40 rr1-beta11
• EVDEV: Queue keypresses from joystick, don't send directly
• Wxwidgets: Load-Preserve that actually works.
17.41 rr1-beta12
• Wxwidgets: GUI for memory search.
• Warn about using synchronous queue in UI callback.
17.42 rr1-beta13
• Remember last saved file for each ROM
• Support MT dumping via boost.
• Lua: input.raw
• Lua: input.keyhook
• Make mouse be ordinary input instead of special-casing
• SDL: Don't screw up commands with NUL codepoints.
17.43 rr1-beta14
• Merge status panel and main window
• True movie slot support (the rest of it)
• SDL: Fix compilation error
• Elminate cross calls in dump menu code.
17.44 rr1-beta15
• Cancel pending saves command
• Wxwidgets: Code refactoring
• Wxwidgets: Fix system -> reset
• Wxwidgets: Read watch expressions in the right thread
17.45 rr1-beta16
• Wxwidgets: Don't prompt for member when running Lua script (Lua
doesn't support that).
• Wxwidgets: 128 -> 1024 Autohold slots (in case more are
needed).
• Don't append trailing '-' to prefix when saving movie.
• Fix ROM/savestate handling (don't let user mismatch ROM and
savestates).
17.46 rr1
• Document memory watch syntax.
17.47 rr1-delta1
• Fix unattended dumping (lsnes-dumpavi)
• Support RAW dumping
• Use adv_dumper instead of the old interface in lsnes-dumpavi
(changes syntax)
• Add option to control sample rate preturbation in AVI dumper
17.48 rr1-delta2
• Wxwidgets: Fix dumper submodes
• Set core controller types before loadstate
17.49 rr1-delta2epsilon1
• Fix compiling with bsnes v086.
17.50 rr1-delta3
• Don't prompt before quitting
• Start unpaused, preserve pause/unpause over load.
• Try to autodetect if ROM is headered.
• Wxwidgets: Only bring up ROM patching screen if specifically
requested.
• Allow configuring some hotkeys.
17.51 rr1-delta4
• Lots of code cleanups
• Fix JMD compression (JMD dumping was broken)
• Don't crash if Lua C function throws an exception.
• Support bitmap drawing in Lua.
• Fix bsnes v085/v086 patches.
• Improve stability on win32.
17.52 rr1-delta4epsilon1
• Don't corrupt movie if movie length is integer multiple of
frames per page.
17.53 rr1-delta5
• New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
• New Lua functions: emulator_ready(), utime(),
set_idle_timeout(), set_timer_timeout(), bit.extract(),
bit.value(), input.geta(), input.seta() and
input.controllertype()
• Wxwidgets: Fix internal focus lost (hotkeys stop working)
• Wxwidgets: Fix broken modifiers
• on_paint has parameter now.
• Optional initital fill for bitmaps
• Fix palette changing.
• Optimize rendering a bit.
• Bsnes v087 support.
17.54 rr1-delta5epsilon1
• Movieinfo: Fix display of port #2 type.
• Call on_input() after loadstate.
17.55 rr1-delta5epsilon2
• Fix writing port2 data to movie.
• Fix SRAM handling with Bsnes v087.
17.56 rr1-delta6
• Library loading support
• Built-in TSCC encoder
• Hi-color (256T colors) dumping.
• Dump over TCP/IP(v6)
• Hidable status panel
• Turbo toggle/hold
• Adjustable sound volume
• Screen scaling
• Allow DnD into filename boxes
• Configurable paths
• Portaudio: Fix speaker popping at start
• Lots of UI changes
• Speed adjustment menu
• Win32 joystick support
• Lua: gui.rainbow and gui.box
• Split key lists into classes (the key list was large!)
• More save slots support
• Wxwidgets (wxJoystick) joystick support
17.57 rr1-delta7
• Lots of internal joystick refactoring
• Evdev: Add mapping for BTN_TOOL_QUINTTAP
• Wxwidgets: Settings mode (open settings without ROM)
• Wxwidgets: Prompt key to use option
• Wxwidgets: Fix crash if key goes away underneath
• Wxwidgets: Fix mouse position in presence of scaling
• AVI dumper: Mode 4 (high-quality resampling to common rate
using SRC)
• Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree
control doesn't seem to work well on WinXP)
• Start paused option.
17.58 rr1-delta7epsilon1
• AVI: ZMBV support
• lsnes-dumpavi: Start Lua before starting dumper
• AVI: Fix secondary audio in mode 4.
17.59 rr1-delta7epsilon2
• AVI: Refactor ZMBV a bit.
• Fix error reading analog values from movie file
17.60 rr1-delta8
• Delayed reset support
• Lua: memory.hash_region
17.61 rr1-delta8epsilon1
• Rework the build system
• Typing input support
• Fix building with bsnes v086 and v087.
• SDL: Save settings on exit
• SDL: Command to enter command line mode with given command.
• SDL: More advanced command editing.
17.62 rr1-delta9
• wxMSW: Fix the “arrow keys and enter don't work” problem
• MSU-1 support
• Show mode changes due to rewinding.
• Unsafe rewind support
• Fix directory transversal.
17.63 rr1-delta10
• AVI: Sound mode 5 (48kHz high-quality)
• Lua: Reset Lua VM
• Map the SNES bus into address space
• Fix loading memory watch files with CRLF line endings
17.64 rr1-delta10epsilon1
• Map bsnes internal state into memory space
• Fix the “click on panel wedges the emulator” for real.
• DnD movies/saves on the main window.
17.65 rr1-delta11
• Split core bindings into own module.
• Remember invalid settings
• Support for modified Gambatte core for GB/GBC emulation.
• Reload/swap ROM function
17.66 rr1-delta11epsilon1
• Fix step poll function
17.67 rr1-delta12
• Non-insane savestate anchoring
17.68 rr1-delta13
• More Memory search methods
• Preserve movie if loading in RO mode.
• Fix a obscure case in timeline check
• Revamp the entiere ROM loading code
• Support DnD on ROMs
• Revamp menu layout
• Standalone hotkey config dialog
• Show bindings in more user-friendly format
17.69 rr1-delta13epsilon1
• Pipedec support
• Fix uninitialized variables in bsnes v085
17.70 rr1-delta14
• Merge gambatte core into mainline (from its own branch)
• Wxwidgets: Show expected dump file formats
• Memory watch: Data typing
• lsnes internal MMIO area.
• Wxwidgets: New memory watch editor
• Hexadecimal memory watches
• Wxwidgets: Monospaced panel
• Wxwidgets: Split memory watches in panel
• Wxwidgets: Disable VMAs in memory search
• lsnes-dumpavi: Fix speed bug
• Movie subtitle support
• Fix rerecord count reporting
• Don't trash movie when loading in readonly mode.
17.71 rr1-delta14epsilon1
• Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
• Fix build on Mac OS X.
• Lua: loopwrapper
• Wxwidgets: Hidable messages window
• Lua: input.joyset
• Bsnes: Support inconsistent saves
• Bsnes: Allow simulating saving every frame
• Fix desync if savestate is loaded in readonly mode in certain
conditions.
• Wxwidgets: Fix save dialogs on Mac OS X.
• Wxwidgets: Fix insane status width on Win32.
• Wxwidgets: Fix autohold processing to be faster.
• Wxwidgets: Allow loading ROMs and movies from commandline.
17.72 rr1-delta15
• Be a bit smarter with --load
• Rewrote higher-level parts of audio system
• Tool to build commentary tracks
• Lua: input.joyget
• Gambatte: Add support for SVN358
• Use builtin font when rendering status panel.
• Option to detach memory watch to its own window.
• Recent ROMs/Movies menu
• Libao support
• Useful lag counter for SNES games that autopoll
• Fix buffer overflow in gambatte sound output
17.73 rr1-delta15epsilon1
• Don't blow up on wxGTK if the window is hidden somehow
• Support simultaneous drop of ROM and movie.
• Gambatte: Don't save spurious SRAMs.
• Make SGB ROMs actually usable.
• Fix so that saved movies appear in recent movies.
• Don't open multiple commentary editors at once.
17.74 rr1-delta15epsilon2
• Lua: memory.readregion/memory.writeregion
• Lua: memory.map{,s}{byte,word,dword,qword}
• Lua: memory.map_structure
• Lua: Fix bus_address for gambatte
• Fix features dependent of bsnes debugger
• Cleanup bsnes debugger logic
• Fix resets in presence of save every frame
17.75 rr1-delta15epsilon3
• Lua: input.lcid_to_pcid
• Fix off-by-one bug with slot hashes
• Fix crashes on certain memory watch expressions
• Lua: memory.read_expr
• Lua: Fix memory.read_expr on nil argument
• Fix the code to compile on G++ 4.7
• Change button_id to be a function pointer field, not a virtual
method
• Add bsnes patches to fix libsnes to compile on GCC 4.7
• Gambatte: Always use legacy lag counting
• Memory commands: Memory addresses are up to 16 hex digits, not
up to 8
• Fix analog controllers
• Fix autohold menus
• Fix button symbols in input display
• Compensate for nuts bsnes superscope/justifier handling
• Lua: Fix bit.extract boolean handling
17.76 rr2-beta0
• Split emulation cores more from the rest
• Support having multiple emulation cores compiled at once
• Support arbitrary number of ports (well, up to 31 anyway).
• SNES debugger support
• Support 16-button controllers
• Remove old SDL front end
• Data-driven controller buttons
• Generate the port code from defines
17.77 rr2-beta1
• Update libgambatte to SVN364
• Get rid of partial linking (building with MXE works)
• Load XML even without gamepack files
• Support screen rotate & flip
• Fix bug when changing controller key to another subkey of the
same key
17.78 rr1-delta16
• Stop at movie end: Don't off-by-one
• Fix crash closing lsnes with voice playback active.
• Import/Export OggOpus for commentary tracks
• 16-button controllers.
• Don't show nonexistent controllers in input display
• Set voice record/playback volume from UI
• Patches for gambatte SVN364.
• Load markup (if exists) even without gamepack file.
• Screen rotation & flipping
• Lua: Some new bit functions
• Auto-refresh voice streams on change.
• Auto-refresh subtitles on change & new subtitle editor.
• Fix music volume adjustment.
17.79 rr2-beta2
• Use system threads instead of platform threads
• Cleanup build by allowing dummy and real drivers to link
together.
• Split duplex support
17.80 rr1-delta16epsilon1
• Wxwidgets: Fix memory watch rendering.
• Wxwidgets: Allow setting voice stream gain.
• Wxwidgets: VU meters and volume adjustment.
• Lua: Custom fonts support.
• Lua: Fix methods stopping working when resetting Lua.
• Fix loading standard-format movies in preserve (readonly) mode.
17.81 rr1-delta17
• Primitive movie editor
• Fix VU meter with no sound device.
• Fix various undefined return values.
• Show rates in VU meter window.
17.82 rr2-beta3
• Lua: Render queues as objects
• Bsnes: support hard resets
• Dedicated sound devices dialog
• Change the default AVI sound mode to 2 or 5.
• Fix totally borked movie saving.
• Portaudio: Use split duplex with different devices.
• Fix controls with gambatte core.
• Modify save slot set handling.
• lsnes-dumpavi: --firmware-path.
• Fix lots of compiler warnings.
17.83 rr1-delta17epsilon1
• Commentary tool: Set nominal bit rate and limit max bit rate.
• Lua: Unconditionally reload host memory on loadstate
• Lua: Query bindings, manipulate aliases, create inverse
bindings
• Lua: Fix crashes with resetting VM while some types of paint
requests are in flight.
• Lua: gui.text: Clip the text properly instead of corrupting
memory in some cases.
• Save screenshot header reliably
• Lua: Backport input.get2 and input.set2
• Lua: New controller info functions.
• Movie editor: Fix reset delay counters to be the right way
around.
• Lua: on_snoop2
• Lua: on_button and input.veto_button.
17.84 rr2-beta4
• Revert memory leak fix breaking input
• Refactor Opus handling
• Restrict member picking only to .zip files
• Fix reading of host-endian VMAs.
• Fix rlow and rhigh to be the right way around.
• Lua: Don't wedge VM if callback fails with an exception
• Refactor Ogg handling.
17.85 rr1-delta17epsilon2
• Fix saving PNG screenshots on Win32.
• Movie editor: Sweep axis.
• Load selected slot in ro/rw/preserve/movie mode.
• input.joyset: Preserve and invert user input.
• Allow immediate saving at point of save (transfer saves).
• Wxwidgets: Filter filenames in dialogs, autoappend extensions.
• data/verysmall.font: Add missing glyph 70 (“F”).
• Lua: Allow painting custom fonts with halo.
• Fix memory value search to work on byte types.
17.86 rr2-beta5
• Reject oggopus files with incomplete pregap
• Fix multistream and ogg demuxing
• Workaround bug with screen >1024 pixels wide.
• Allow on_input to force/veto system controls.
• Dedicated autohold/autofire window.
• Support per-button autofire.
• Fix crash on trying to frameadvance/exit with no ROM loaded.
• Fix nonexistent controller key warnings.
• Movie editor: Fix mouse editing (TYPE_RAXIS)
• TAS input plugin
• Analog passthrough.
• Add throttle axes (TYPE_TAXIS).
• Fix movie reading with first port having multiple controllers.
• Move some info from status panel to statusbar.
17.87 rr1-delta17epsilon3
• Fix status panel (and movie editor) flicker
• Show effects of Lua in input display
• Offer lsmv.backup as file filter too for load lsmv
• Allow slowing down subframe advance
• Display current save slot information
• Add snes9x fonts
• Fix hotkeys stopping working after X-ing settings dialog
• Movie editor: Fix bug if extending finished movie
• Cap current_frame_first_subframe to movie size when recounting
movie
• Movie editor: Interpret ctrl+click as right click
17.88 rr2-beta6
• Autofire: Fix false status indications
• Fix subframe counter
• Fix print() after Lua reset
• New settings framework
• Remove some unused leftover stuff
• Fix race condition causing possible crash on startup
• Fix compiling if uint64_t and size_t are not compatible
• Lua: Don't crash if input.[gs]et{,a} is called outside on_input
17.89 rr2-beta7
• Fix bug causing crash if triple has invalid button