lsnes/manual.lyx

7610 lines
143 KiB
Text
Raw Normal View History

#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language finnish
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 1
\index Hakusana
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
2011-09-23 22:46:43 +03:00
\begin_layout Section
Introduction
\end_layout
\begin_layout Standard
lsnes is SNES rerecording emulator based on bsnes core.
\end_layout
\begin_layout Section
2012-01-11 15:05:01 +02:00
Dependencies
\end_layout
\begin_layout Enumerate
bsnes libsnes (for bsnes SNES core)
2012-01-11 15:05:01 +02:00
\end_layout
\begin_deeper
\begin_layout Enumerate
v084-v087 (v084 or v085 for delayreset support)
2012-01-11 15:05:01 +02:00
\end_layout
\begin_layout Enumerate
accuracy or compatiblity core with debugger enabled.
2012-01-11 15:05:01 +02:00
\end_layout
\begin_layout Enumerate
Patched version (using included 7 patches)
2012-01-11 15:05:01 +02:00
\end_layout
\end_deeper
\begin_layout Enumerate
gambatte (for gambatte core)
\end_layout
\begin_deeper
\begin_layout Enumerate
2013-02-09 12:39:25 +02:00
SVN r320, r358 or r364
\end_layout
\begin_layout Enumerate
Patched with included patches
\end_layout
2012-01-11 15:05:01 +02:00
\end_deeper
\begin_layout Enumerate
Zlib
\end_layout
\begin_layout Enumerate
boost_iostreams
\end_layout
\begin_layout Enumerate
boost_filesystem
\end_layout
2012-01-17 01:01:52 +02:00
\begin_layout Enumerate
boost_thread (if native std::thread is not available)
2012-01-17 01:01:52 +02:00
\end_layout
2012-01-11 15:05:01 +02:00
\begin_layout Enumerate
libsdl (SDL only)
\end_layout
\begin_layout Enumerate
sdlmain (SDL only, part of SDL)
\end_layout
\begin_layout Enumerate
boost_conversion (this is header-only library)
\end_layout
\begin_layout Enumerate
libswscale (wxwidgets graphics only)
\end_layout
\begin_layout Enumerate
Portaudio (portaudio sound only)
\end_layout
2012-09-26 00:24:12 +03:00
\begin_layout Enumerate
libao (libao sound only)
\end_layout
2012-01-11 16:41:23 +02:00
\begin_layout Enumerate
2013-02-09 13:02:04 +02:00
Lua version 5.1.X or 5.2.X
2012-01-11 16:41:23 +02:00
\end_layout
2013-02-09 12:39:25 +02:00
\begin_layout Enumerate
G++ 4.6 or 4.7
2012-01-11 15:05:01 +02:00
\end_layout
\begin_layout Enumerate
2013-02-09 12:39:25 +02:00
libopus (optional, for commentary track tool)
2012-01-11 15:05:01 +02:00
\end_layout
\begin_layout Section
Building
2012-01-11 15:05:01 +02:00
\end_layout
2012-05-12 13:16:27 +03:00
\begin_layout Itemize
Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
bsnes core).
\end_layout
\begin_layout Itemize
Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
2012-05-12 13:16:27 +03:00
\end_layout
\begin_layout Itemize
Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
>', bsnes core)
\end_layout
\begin_layout Itemize
Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
ersion>', gambatte core)
2012-05-12 13:16:27 +03:00
\end_layout
2012-01-11 15:05:01 +02:00
\begin_layout Itemize
Edit options.build (or copy of that file)
2012-01-11 15:05:01 +02:00
\end_layout
\begin_layout Itemize
Run make (passing 'OPTIONS=<filename>' if using something else than options.build
).
2012-01-11 15:05:01 +02:00
\end_layout
\begin_layout Section
Command line options
\end_layout
\begin_layout Subsection
2013-02-09 23:29:33 +02:00
Wxwidgets options
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Subsubsection
2013-02-09 23:29:33 +02:00
--rom=<file>
\end_layout
\begin_layout Standard
2012-08-24 21:39:58 +03:00
Load <file> as ROM.
\end_layout
\begin_layout Subsubsection
2013-02-11 00:32:56 +02:00
<file>
2013-02-11 00:11:52 +02:00
\end_layout
\begin_layout Standard
Load <file> as ROM.
\end_layout
\begin_layout Subsubsection
2013-02-11 00:32:56 +02:00
--load=<file>
\end_layout
\begin_layout Standard
2013-02-09 23:29:33 +02:00
Load <file> as movie or savestate file on startup.
\end_layout
\begin_layout Subsubsection
2013-02-09 23:29:33 +02:00
--settings
\end_layout
\begin_layout Standard
2013-02-09 23:29:33 +02:00
Instead of starting the emulator, only display the settings.
\end_layout
\begin_layout Subsubsection
2013-02-11 00:32:56 +02:00
--lua=<file>
\end_layout
\begin_layout Standard
2013-02-11 00:32:56 +02:00
Run this Lua file on startup
2012-07-20 00:23:40 +03:00
\end_layout
2013-02-09 23:29:33 +02:00
\begin_layout Subsection
dump options (lsnes-dumpavi only)
2011-09-23 22:46:43 +03:00
\end_layout
2012-07-20 00:23:40 +03:00
\begin_layout Subsubsection
2013-02-09 23:29:33 +02:00
--rom=<file>
2012-07-20 00:23:40 +03:00
\end_layout
\begin_layout Standard
2013-02-09 23:29:33 +02:00
Load <file> as ROM.
Required.
2012-07-20 00:23:40 +03:00
\end_layout
2012-09-21 05:50:00 +03:00
\begin_layout Subsubsection
2013-02-09 23:29:33 +02:00
<filename>
2012-09-21 05:50:00 +03:00
\end_layout
\begin_layout Standard
2013-02-09 23:29:33 +02:00
Load <filename> as movie or savestate file on startup.
Required.
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Subsubsection
2013-02-09 23:29:33 +02:00
--dumper=<dumper>
\end_layout
2011-09-20 22:05:49 +03:00
\begin_layout Standard
2013-02-09 23:29:33 +02:00
Set the dumper to use (required).
Use 'list' for listing of known dumpers.
2011-09-20 22:05:49 +03:00
\end_layout
\begin_layout Subsubsection
2013-02-09 23:29:33 +02:00
--firmware-path=<path>
\end_layout
\begin_layout Standard
2013-02-09 23:29:33 +02:00
Set path to look for firmware.
\end_layout
\begin_layout Subsubsection
--mode=<mode>
\end_layout
\begin_layout Standard
Set the mode to use (required for dumpers with multiple modes, forbidden
otherwise).
Use 'list' for known modes.
\end_layout
2011-09-20 22:05:49 +03:00
\begin_layout Subsubsection
--prefix=<prefix>
\end_layout
\begin_layout Standard
Set dump prefix.
Default is
\begin_inset Quotes eld
\end_inset
avidump
\begin_inset Quotes erd
\end_inset
.
\end_layout
\begin_layout Subsubsection
--option=<name>=<value>
2011-09-20 22:05:49 +03:00
\end_layout
\begin_layout Standard
Set option <name> to value <value>.
2011-09-20 22:05:49 +03:00
\end_layout
\begin_layout Subsubsection
--length=<length>
\end_layout
\begin_layout Standard
Set number of frames to dump.
Mandatory.
\end_layout
\begin_layout Subsubsection
--lua=<script>
\end_layout
\begin_layout Standard
2012-01-11 15:05:01 +02:00
Run specified lua script (lsnes-dumpavi does not have initialization files).
2011-09-20 22:05:49 +03:00
\end_layout
\begin_layout Subsubsection
--load-library=<library>
\end_layout
\begin_layout Standard
Load the specified shared object / dynamic library / dynamic link library.
\end_layout
2013-02-09 23:29:33 +02:00
\begin_layout Subsection
lsnes settings directory
\end_layout
\begin_layout Standard
2013-02-09 23:29:33 +02:00
The lsnes settings directory is (in order of decreasing perference):
\end_layout
\begin_layout Itemize
Windows: %APPDATA%
\backslash
2013-02-09 23:29:33 +02:00
lsnes (if %APPDATA% exists)
\end_layout
\begin_layout Itemize
2013-02-09 23:29:33 +02:00
Unix: $XDG_CONFIG_HOME/lsnes (if $XDG_CONFIG_HOME exists)
\end_layout
\begin_layout Itemize
2013-02-09 23:29:33 +02:00
Unix: $HOME/.config/lsnes (if $HOME exists)
\end_layout
\begin_layout Itemize
2013-02-09 23:29:33 +02:00
All: .
(fallback default).
\end_layout
\begin_layout Standard
If leading directories do not exist, attempt to create them is made.
\end_layout
\begin_layout Section
2012-01-11 15:05:01 +02:00
Internal commands
\end_layout
\begin_layout Itemize
Commands beginning with '*' invoke the corresponding command without alias
expansion.
\end_layout
\begin_layout Itemize
2011-10-01 21:03:32 +03:00
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 '-'.
\end_layout
2012-01-11 15:05:01 +02:00
\begin_layout Itemize
Commands without '+' execute only on negative edge (release).
\end_layout
\begin_layout Subsection
2012-01-11 15:05:01 +02:00
run-script <script>
\end_layout
\begin_layout Standard
2011-09-23 22:46:43 +03:00
Run <script> as if commands were entered on the command line.
\end_layout
\begin_layout Subsection
Memory manipulation
\end_layout
\begin_layout Standard
<address> may be decimal or hexadecimal (prefixed with '0x').
<value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
with '-') decimal.
\end_layout
\begin_layout Standard
The available element <sizes> are:
\end_layout
\begin_layout Itemize
byte: 1 byte
\end_layout
\begin_layout Itemize
word: 2 bytes
\end_layout
\begin_layout Itemize
dword: 4 bytes
\end_layout
\begin_layout Itemize
qword: 8 bytes
\end_layout
\begin_layout Standard
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).
\end_layout
\begin_layout Subsubsection
read-<size> <address>
\end_layout
\begin_layout Standard
Read the value of byte in <address>.
\end_layout
\begin_layout Subsubsection
read-s<size> <address>
\end_layout
\begin_layout Standard
Read the value of signed byte in <address>.
\end_layout
\begin_layout Subsubsection
write-<size> <address> <value>
\end_layout
\begin_layout Standard
Write <value> to byte in address <address>.
\end_layout
\begin_layout Subsection
Main commands
\end_layout
\begin_layout Standard
These commands are not available in lsnesrc, but are available after ROM
has been loaded.
\end_layout
\begin_layout Subsubsection
2013-02-09 23:29:33 +02:00
quit-emulator
\end_layout
\begin_layout Standard
2013-02-09 23:29:33 +02:00
Quits the emulator.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
pause-emulator
\end_layout
\begin_layout Standard
Toggle paused/unpaused
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
+advance-frame
\end_layout
\begin_layout Standard
Advance frame.
If the button is still held after configurable timeout expires, game unpauses
for the duration frame advance is held.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
+advance-poll
\end_layout
\begin_layout Standard
Advance subframe.
If the button is still held after configurable timeout expires, game unpauses
for the duration frame advance is held.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
advance-skiplag
\end_layout
\begin_layout Standard
Skip to first poll in frame after current.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
reset
\end_layout
\begin_layout Standard
Reset the SNES after this frame.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
load <filename>
\end_layout
\begin_layout Standard
Load savestate <filename> in current mode.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
load-state <filename>
\end_layout
\begin_layout Standard
Load savestate <filename> in readwrite mode.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
load-readonly <filename>
\end_layout
\begin_layout Standard
Load savestate <filename> in readonly mode.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
load-preserve <filename>
\end_layout
\begin_layout Standard
Load savestate <filename> in readonly mode, preserving current events.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
load-movie <filename>
\end_layout
\begin_layout Standard
Load savestate <filename>, ignoring save part in readonly mode.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
save-state <filename>
\end_layout
\begin_layout Standard
Save system state to <filename> as soon as possible.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
save-movie <filename>
\end_layout
\begin_layout Standard
Save movie to <filename>.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
set-rwmode
\end_layout
\begin_layout Standard
Set read-write mode.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
set-romode
\end_layout
\begin_layout Standard
Set read-only mode
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
toggle-rwmode
\end_layout
\begin_layout Standard
Toggle between read-only and read-write modes.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:24:36 +02:00
test-1, test-2, test-3
\end_layout
\begin_layout Standard
2011-09-23 22:46:43 +03:00
Internal test commands.
Don't use.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
take-screenshot <filename>
\end_layout
\begin_layout Standard
Save screenshot to <filename>.
\end_layout
\begin_layout Subsubsection
2013-01-04 20:41:11 +02:00
+controller <class>-<#>-<button>
\end_layout
\begin_layout Standard
2013-01-04 20:41:11 +02:00
Press button <button> on controller <num> of class <class>.
\end_layout
\begin_layout Itemize
2013-01-04 20:41:11 +02:00
Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
ext0, ext1, ext2, ext3
\end_layout
\begin_layout Itemize
2013-01-04 20:41:11 +02:00
Class 'mouse': L, R
\end_layout
\begin_layout Itemize
2013-01-04 20:41:11 +02:00
Class 'superscope': trigger, cursor, turbo, pause
\end_layout
\begin_layout Itemize
2013-01-04 20:41:11 +02:00
Class 'justifier': trigger, start
\end_layout
\begin_layout Itemize
Class 'gb': A, B, select, start, up, down, left, right
\end_layout
2013-01-04 20:41:11 +02:00
\begin_layout Subsubsection
hold-controller <class>-<#>-<button>
\end_layout
2013-01-04 20:41:11 +02:00
\begin_layout Standard
Hold/unhold button <button> on controller <num> of class <class>.
\end_layout
\begin_layout Subsubsection
2013-01-04 20:41:11 +02:00
type-controller <class>-<#>-<button>
\end_layout
\begin_layout Standard
2013-01-04 20:41:11 +02:00
Hold/unhold button <button> on controller <num> of class <class> for the
next frame.
See +controller for button names.
\end_layout
2013-01-04 20:41:11 +02:00
\begin_layout Standard
Cauntion: Does not work properly if outside frame advance.
\end_layout
2013-01-04 20:41:11 +02:00
\begin_layout Subsubsection
2013-03-14 00:15:43 +02:00
+autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
\end_layout
2012-05-16 23:33:54 +03:00
\begin_layout Standard
2013-03-14 00:15:43 +02:00
Start autofire.
If duty is not specified, defaults to 1.
If <cyclelen> is not specified, defaults to 2.
\end_layout
\begin_layout Subsubsection
-autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
\end_layout
\begin_layout Standard
End autofire.
2012-05-16 23:33:54 +03:00
\end_layout
\begin_layout Subsubsection
2013-03-14 00:15:43 +02:00
autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
2011-09-17 13:43:22 +03:00
\end_layout
\begin_layout Standard
2013-03-14 00:15:43 +02:00
Toggle autofire.
If autofire is turned on, specified cycle is used.
\end_layout
\begin_layout Subsubsection
designate-position <class>-<#>-analog<n>
\end_layout
\begin_layout Standard
Designate position for analog pair.
<n> is only there if there are multiple axis pairs.
2011-09-17 13:43:22 +03:00
\end_layout
\begin_layout Subsubsection
2012-01-11 15:24:36 +02:00
repaint
\end_layout
\begin_layout Standard
Force a repaint.
\end_layout
2013-02-09 23:46:17 +02:00
\begin_layout Subsubsection
toggle-pause-on-end
\end_layout
\begin_layout Standard
Toggle pause on end flag.
\end_layout
\begin_layout Subsubsection
set-pause-on-end
\end_layout
\begin_layout Standard
Set pause on end flag.
\end_layout
\begin_layout Subsubsection
clear-pause-on-end
\end_layout
\begin_layout Standard
Clear pause on end flag.
\end_layout
\begin_layout Subsubsection
action <action> [<parameters>]
\end_layout
\begin_layout Standard
Run specified core action.
\end_layout
\begin_layout Subsection
2012-01-11 15:05:01 +02:00
Save jukebox
\end_layout
\begin_layout Subsubsection
2012-01-11 15:24:36 +02:00
cycle-jukebox-backward
\end_layout
\begin_layout Standard
Cycle save jukebox backwards.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:24:36 +02:00
cycle-jukebox-forward
\end_layout
\begin_layout Standard
Cycle save jukebox forwards
\end_layout
\begin_layout Subsubsection
2012-01-11 15:24:36 +02:00
load-jukebox
\end_layout
\begin_layout Standard
Do load from jukebox (current mode).
\end_layout
\begin_layout Subsubsection
2012-01-11 15:24:36 +02:00
save-jukebox
\end_layout
\begin_layout Standard
Do state save to jukebox.
\end_layout
\begin_layout Subsection
2012-01-11 15:05:01 +02:00
Lua
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
evaluate-lua <luacode>
\end_layout
\begin_layout Standard
Run Lua code <luacode> using built-in Lua interpretter.
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
run-lua <script>
\end_layout
\begin_layout Standard
Run specified lua file using built-in Lua interpretter.
\end_layout
\begin_layout Subsubsection
reset-lua
\end_layout
\begin_layout Standard
Clear the Lua VM state and restore to factory defaults.
\end_layout
\begin_layout Subsection
Memory watch
\end_layout
\begin_layout Subsubsection
add-watch <name> <expression>
\end_layout
\begin_layout Standard
Adds new watch (or modifies old one).
\end_layout
\begin_layout Subsubsection
remove-watch <name>
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Standard
Remove a watch.
\end_layout
\begin_layout Subsection
2012-01-11 15:05:01 +02:00
Sound
\end_layout
\begin_layout Subsubsection
2012-01-11 15:05:01 +02:00
enable-sound <on/off>
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Standard
Enable/Disable sound.
2011-09-23 22:46:43 +03:00
\end_layout
2012-07-09 01:08:08 +03:00
\begin_layout Subsection
Misc.
\end_layout
\begin_layout Subsubsection
reload-rom [<file>]
\end_layout
\begin_layout Standard
Reloads the main ROM image from <file>.
\end_layout
2012-09-23 19:16:30 +03:00
\begin_layout Subsubsection
+tangent
\end_layout
\begin_layout Standard
Tangent for recording voice for commentary track.
While pressed, record a stream.
2012-09-23 19:16:30 +03:00
\end_layout
2012-09-21 05:50:00 +03:00
\begin_layout Subsubsection
2013-04-17 15:55:24 +03:00
advance-subframe-timeout
2012-09-21 05:50:00 +03:00
\end_layout
\begin_layout Standard
2013-04-17 15:55:24 +03:00
Subframe advance timeout in milliseconds.
Default is 100.
2012-09-21 05:50:00 +03:00
\end_layout
\begin_layout Section
Settings
\end_layout
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
Core settings
\end_layout
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
AVI dumper settings
\end_layout
\begin_layout Subsubsection
avi-large
\end_layout
\begin_layout Standard
AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
outputs.
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Subsubsection
avi-left-border
\end_layout
\begin_layout Standard
AVI dumper: Set the default left border thickness (unless lua overrides)
for dumps.
Range 0-8191.
Default is 0.
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Subsubsection
avi-right-border
\end_layout
\begin_layout Standard
AVI dumper: Set the default right border thickness (unless lua overrides)
for dumps.
Range 0-8191.
Default is 0.
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Subsubsection
avi-top-border
\end_layout
\begin_layout Standard
AVI dumper: Set the default top border thickness (unless lua overrides)
for dumps.
Range 0-8191.
Default is 0.
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Subsubsection
avi-bottom-border
\end_layout
\begin_layout Standard
AVI dumper: Set the default bottom border thickness (unless lua overrides)
for dumps.
Range 0-8191.
Default is 0.
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Subsubsection
avi-maxframes
\end_layout
\begin_layout Standard
AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
Range 0-999999999.
Default is 0.
\end_layout
2012-01-11 15:24:36 +02:00
\begin_layout Subsubsection
avi-compresison
\end_layout
\begin_layout Standard
AVI dumper: Compression level (0-18).
\end_layout
\begin_layout Itemize
Compression levels 10 and above are not compatible with stock CSCD codec.
\end_layout
\begin_layout Itemize
Recomended level is 7.
\end_layout
\begin_layout Subsubsection
avi-soundrate
\end_layout
\begin_layout Standard
AVI dumper: Set method of determining the sound rate.
\end_layout
\begin_layout Itemize
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.
\end_layout
\begin_layout Itemize
1: Round down to nearest integer.
\end_layout
\begin_layout Itemize
2: Round up to nearest ingeter.
\end_layout
2013-02-09 23:29:33 +02:00
\begin_layout Itemize
3: Multiply by denominator.
2012-01-11 15:24:36 +02:00
\end_layout
2013-02-09 23:29:33 +02:00
\begin_layout Itemize
4: High quality 44.1kHz (SRC needed).
2012-01-11 15:24:36 +02:00
\end_layout
2013-02-09 23:29:33 +02:00
\begin_layout Itemize
5: High quality 48kHz (SRC needed).
2012-01-11 15:24:36 +02:00
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Subsection
2013-02-09 23:29:33 +02:00
JMD options
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Subsubsection
2013-02-09 23:29:33 +02:00
jmd-compression
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Standard
2013-02-09 23:29:33 +02:00
JMD dumper: Compression level (0-9).
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Section
Lua functions
\end_layout
\begin_layout Subsection
Core (in main table)
\end_layout
\begin_layout Subsubsection
print
\end_layout
\begin_layout Standard
Print line to message console.
\end_layout
\begin_layout Subsubsection
exec(string command)
\end_layout
\begin_layout Standard
Run command as it was entered on the command line
\end_layout
2012-03-06 08:43:21 +02:00
\begin_layout Subsubsection
utime()
\end_layout
\begin_layout Standard
Returns two values.
First is time since some epoch in seconds, the second is microseconds mod
10^6 since that epoch.
\end_layout
\begin_layout Subsubsection
emulator_ready()
\end_layout
\begin_layout Standard
Returns true if emulator has finished booting, false if not (on_startup()
will be issued later).
\end_layout
2012-03-06 18:21:17 +02:00
\begin_layout Subsubsection
set_idle_timeout(number timeout)
\end_layout
\begin_layout Standard
Set number of microseconds to block idle for.
After this timeout has expired, on_idle() will be called once.
\end_layout
\begin_layout Subsubsection
set_timer_timeout(number timeout)
\end_layout
\begin_layout Standard
Set number of microseconds to block timer for.
After this timeout has expired, on_timer() will be called once.
\end_layout
\begin_layout Subsubsection
bus_address(number snesaddr)
\end_layout
\begin_layout Standard
Returns virtual address corresponding to specified address on SNES bus.
\end_layout
2012-09-17 22:36:10 +03:00
\begin_layout Subsubsection
loopwrapper(function fun, ...)
\end_layout
\begin_layout Standard
Calls function fun with function and specified arguments.
The function passed suspends execution until the function returned is called.
Handy for linear flow control among multiple invocations of a hook.
Example code:
\end_layout
\begin_layout LyX-Code
on_paint = loopwrapper(function(wait)
\end_layout
\begin_deeper
\begin_layout LyX-Code
while true do
\end_layout
\begin_deeper
\begin_layout LyX-Code
gui.text(0, 0,
\begin_inset Quotes eld
\end_inset
Test!
\begin_inset Quotes erd
\end_inset
);
\end_layout
\begin_layout LyX-Code
wait();
\end_layout
\end_deeper
\begin_layout LyX-Code
end
\end_layout
\end_deeper
\begin_layout LyX-Code
end);
\end_layout
\begin_layout Subsubsection
list_bindings([string cmd])
\end_layout
\begin_layout Standard
Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
If command is specified, the table is limited to that command.
2013-02-27 22:40:47 +02:00
Also searches for controller keys.
\end_layout
\begin_layout Subsubsection
get_alias(string aname)
\end_layout
\begin_layout Standard
Get expansion of given alias.
\end_layout
\begin_layout Subsubsection
set_alias(string aname, string value)
\end_layout
\begin_layout Standard
Set expansion of given alias.
\end_layout
\begin_layout Subsubsection
create_ibind(string name, string cmd)
\end_layout
\begin_layout Standard
Return object representing inverse binding with specified name and specified
command.
\end_layout
\begin_layout Itemize
To create press/release commands, use aliases +foo and -foo .
\end_layout
\begin_layout Itemize
Keep the returned object around.
\end_layout
2013-05-04 18:26:18 +03:00
\begin_layout Subsubsection
create_command(string name, function a[, function b])
\end_layout
\begin_layout Standard
Return object representing a command (pair).
\end_layout
\begin_layout Itemize
If b is NIL, the command is level-sensitive, a is callback.
\end_layout
\begin_layout Itemize
If b is function, the function is edge-sensitive, a is positive edge callback
and b is negative edge callback.
\end_layout
\begin_layout Itemize
All callbacks get single argument: The parameters passed.
\end_layout
\begin_layout Itemize
Keep the returned object around.
\end_layout
\begin_layout Subsection
Table bit:
\end_layout
\begin_layout Standard
Bitwise logical functions and related.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.none(number...) / bit.bnot(number...)
\end_layout
\begin_layout Standard
48-bit bitwise NOT / NONE function (set bits that are set in none of the
arguments).
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.any(number...) / bit.bor(number...)
\end_layout
\begin_layout Standard
48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.all(number...) / bit.band(number...)
\end_layout
\begin_layout Standard
48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
).
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.parity(number...) / bit.bxor(number...)
\end_layout
\begin_layout Standard
48-bit bitwise XOR / PARITY function (set bits that are set in odd number
of the arguments).
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.lrotate(number base[, number amount[, number bits]])
\end_layout
\begin_layout Standard
Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.rrotate(number base[, number amount[, number bits]])
\end_layout
\begin_layout Standard
Rotate bits-bit (max 48, default 48) number right by amount (default 1)
places.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.lshift(number base[, number amount[, number bits]])
\end_layout
\begin_layout Standard
Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
The new bits are filled with zeroes.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.lrshift(number base[, number amount[, number bits]])
\end_layout
\begin_layout Standard
Shift bits-bit (max 48, default 48) number logically right by amount (default
1) places.
The new bits are filled with zeroes.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
bit.arshift(number base[, number amount[, number bits]])
\end_layout
\begin_layout Standard
Shift bits-bit (max 48, default 48) number arithmetically right by amount
(default 1) places.
The new bits are shifted in with copy of the high bit.
\end_layout
2012-03-07 12:35:46 +02:00
\begin_layout Subsubsection
bit.extract(number base[, number bit0[, number bit1,...]])
\end_layout
\begin_layout Standard
Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
\end_layout
\begin_layout Standard
Notes:
\end_layout
\begin_layout Itemize
Bit numbers up to 51 should work reliably (then things start falling apart
due to double precision issues).
\end_layout
\begin_layout Itemize
There are two special bit positions, true and false, standing for always
set bit and always clear bit.
\end_layout
2012-03-08 08:00:19 +02:00
\begin_layout Subsubsection
bit.value([number bit1[, number bit2,...]])
\end_layout
\begin_layout Standard
Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
places and so on.
As special value, nil argument is no-op.
\end_layout
2013-01-21 20:29:36 +02:00
\begin_layout Subsubsection
bit.test_any(number a, number b)
\end_layout
\begin_layout Standard
Returns true if bitwise and of a and b is nonzero, otherwise false.
\end_layout
\begin_layout Subsubsection
bit.test_all(number a, number b)
\end_layout
\begin_layout Standard
Returns true if bitwise and of a and b is equals b, otherwise false.
\end_layout
2013-01-21 20:35:23 +02:00
\begin_layout Subsubsection
bit.popcount(number a)
\end_layout
\begin_layout Standard
Returns number of set bits in a.
\end_layout
2013-01-21 23:13:45 +02:00
\begin_layout Subsubsection
bit.clshift(number a, number b, [number amount,[number bits]])
\end_layout
\begin_layout Standard
Does chained left shift on a, b by amount positions, assuming numbers to
be of specified number of bits.
\end_layout
\begin_layout Subsubsection
bit.crshift(number a, number b, [number amount,[number bits]])
\end_layout
\begin_layout Standard
Does chained right shift on a, b by amount positions, assuming numbers to
be of specified number of bits.
\end_layout
2013-01-21 23:57:19 +02:00
\begin_layout Subsubsection
bit.flagdecode(number a, number bits, [string on, [string off]])
\end_layout
\begin_layout Standard
Return string of length bits where ith character is ith character of on
if bit i is on, otherwise ith character of off.
Out of range reads give last character, or '*'/'-' if empty.
\end_layout
2013-01-23 08:48:27 +02:00
\begin_layout Subsubsection
bit.rflagdecode(number a, number bits, [string on, [string off]])
\end_layout
\begin_layout Standard
Like bit.flagdecode, but outputs the string in the opposite order (most significa
nt bit first).
\end_layout
\begin_layout Subsection
Table gui:
\end_layout
\begin_layout Standard
Most of these functions can only be called in on_paint and on_video callbacks.
Exceptions are noted.
\end_layout
2011-09-28 00:14:27 +03:00
\begin_layout Standard
2011-10-22 12:25:37 +03:00
Colors are 32-bit.
Bits 0-7 are the blue component, bits 8-15 are the green component, bits
16-23 are the red component, bits 24-31 are alpha component (0 is fully
opaque, 255 is almost transparent).
-1 is the fully transparent color.
Alpha values greater than 127 do work.
2011-09-28 00:14:27 +03:00
\end_layout
\begin_layout Standard
Origin of coordinates is at top left corner of game display area.
Left and top gaps correspond to negative coordinates.
\end_layout
\begin_layout Subsubsection
gui.resolution()
\end_layout
\begin_layout Standard
Returns 2-tuple (hresolution, vresolution).
\end_layout
\begin_layout Subsubsection
gui.<class>_gap(number gap)
\end_layout
\begin_layout Standard
Set the <class> (left, right, top, bottom) gap to specified value (max gap
is 8191).
2013-05-15 17:34:26 +03:00
If successful, old gap is returned.
\end_layout
\begin_layout Subsubsection
gui.delta_<class>_gap(number gap)
\end_layout
\begin_layout Standard
Increase the <class> (left, right, top, bottom) gap by specified value (max
gap is 8191) and return the old gap (returns nothing on error).
\end_layout
\begin_layout Subsubsection
gui.text(number x, number y, string text[, number fgc[, number bgc]])
\end_layout
\begin_layout Standard
2011-09-28 00:14:27 +03:00
Draw specified text on the GUI (each character cell is 8 or 16 wide and
16 high).
Parameters:
\end_layout
\begin_layout Itemize
x: X-coordinate to start the drawing from (and x-coordinate at begining
of the lines).
\end_layout
\begin_layout Itemize
2011-09-28 00:14:27 +03:00
y: Y-coordinate to start the drawing from.
\end_layout
\begin_layout Itemize
2011-09-28 00:14:27 +03:00
text: The text to draw.
\end_layout
\begin_layout Itemize
fgc: Text color (default is 0xFFFFFF (white))
\end_layout
\begin_layout Itemize
bgc: Background color (default is -1 (transparent))
\end_layout
\begin_layout Subsubsection
gui.textH(number x, number y, string text[, number fgc[, number bgc]])
\end_layout
\begin_layout Standard
Like gui.text, but draw using double-width.
\end_layout
\begin_layout Subsubsection
gui.textV(number x, number y, string text[, number fgc[, number bgc]])
\end_layout
\begin_layout Standard
Like gui.text, but draw using double-height.
\end_layout
\begin_layout Subsubsection
gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
\end_layout
\begin_layout Standard
Like gui.text, but draw using double-width/double-height.
\end_layout
2011-09-27 00:29:44 +03:00
\begin_layout Subsubsection
gui.rectangle(number x, number y, number width, number height[, number thickness[
, number outline[, number fill]]])
2011-09-27 00:29:44 +03:00
\end_layout
\begin_layout Standard
Draw rectangle on the GUI.
2011-09-28 00:14:27 +03:00
Parameters:
\end_layout
\begin_layout Itemize
x: X-coordinate of left edge.
\end_layout
\begin_layout Itemize
y: Y-coordinate of upper edge.
\end_layout
\begin_layout Itemize
width: Width of rectangle.
\end_layout
\begin_layout Itemize
height: Height of rectangle.
\end_layout
\begin_layout Itemize
thickness: Thickness of outline (default is 1).
\end_layout
\begin_layout Itemize
outline: Color of outline (default is 0xFFFFFF (white))
2011-09-28 00:14:27 +03:00
\end_layout
\begin_layout Itemize
fill: Color of fill (default is -1 (transparent))
\end_layout
\begin_layout Subsubsection
gui.box(number x, number y, number width, number height[, number thickness[,
number outline1[,number outline2[, number fill]]]])
\end_layout
\begin_layout Standard
Draw rectangle with 3D effect on the GUI.
Parameters:
\end_layout
\begin_layout Itemize
x: X-coordinate of left edge.
\end_layout
\begin_layout Itemize
y: Y-coordinate of upper edge.
\end_layout
\begin_layout Itemize
width: Width of rectangle.
\end_layout
\begin_layout Itemize
height: Height of rectangle.
\end_layout
\begin_layout Itemize
thickness: Thickness of outline (default is 1).
\end_layout
\begin_layout Itemize
outline1: First color of outline (default is 0xFFFFFF (white))
\end_layout
\begin_layout Itemize
outline2: First color of outline (default is 0x808080 (dark gray))
\end_layout
\begin_layout Itemize
fill: Color of fill (default is 0xC0C0C0 (light grayy))
2011-09-27 00:29:44 +03:00
\end_layout
\begin_layout Subsubsection
gui.pixel(number x, number y[, number color])
2011-09-27 00:29:44 +03:00
\end_layout
\begin_layout Standard
Draw one pixel on the GUI.
2011-09-28 00:14:27 +03:00
Parameters:
\end_layout
\begin_layout Itemize
x: X-coordinate of the pixel
\end_layout
\begin_layout Itemize
y: Y-coordinate of the pixel
\end_layout
\begin_layout Itemize
color: Color of the pixel (default is 0xFFFFFF (white))
2011-09-28 00:14:27 +03:00
\end_layout
\begin_layout Subsubsection
2011-10-22 12:25:37 +03:00
gui.crosshair(number x, number y[, number length[, number color]])
2011-09-28 00:14:27 +03:00
\end_layout
\begin_layout Standard
Draw a crosshair.
Parameters:
\end_layout
\begin_layout Itemize
x: X-coordinate of the crosshair
\end_layout
\begin_layout Itemize
y: Y-coordinate of the crosshair
\end_layout
\begin_layout Itemize
length: Length of the crosshair lines (default 10).
\end_layout
\begin_layout Itemize
color: Color of the crosshair (default is 0xFFFFFF (white))
2011-09-27 00:29:44 +03:00
\end_layout
2011-10-22 12:25:37 +03:00
\begin_layout Subsubsection
gui.line(number x1, number y1, number x2, number y2[, number color])
\end_layout
\begin_layout Standard
Draw a thin line.
Parameters:
\end_layout
\begin_layout Itemize
x1: X-coordinate of one end.
\end_layout
\begin_layout Itemize
y1: Y-coordinate of one end.
\end_layout
\begin_layout Itemize
x2: X-coordinate of the other end.
\end_layout
\begin_layout Itemize
y2: Y-coordinate of the other end.
\end_layout
\begin_layout Itemize
color: Color of the line (default is 0xFFFFFF (white)).
\end_layout
2011-10-22 15:15:18 +03:00
\begin_layout Subsubsection
gui.circle(number x, number y, number r[, number thick[, number border[,
number fil]]])
\end_layout
\begin_layout Standard
Draw a circle.
Parameters.
\end_layout
\begin_layout Itemize
x: X-coordinate of the center
\end_layout
\begin_layout Itemize
y: Y-coordinate of the center
\end_layout
\begin_layout Itemize
r: The radius of the circle
\end_layout
\begin_layout Itemize
thick: Border thickness
\end_layout
\begin_layout Itemize
border: Border color (default is 0xFFFFFF (white))
\end_layout
\begin_layout Itemize
fill: Fill color (default is -1 (transparent)).
\end_layout
2012-03-03 11:27:26 +02:00
\begin_layout Subsubsection
gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
\end_layout
\begin_layout Standard
Draw a bitmap on screen with specified palette.
Parameters:
\end_layout
\begin_layout Itemize
x: X-coordinate of left edge.
\end_layout
\begin_layout Itemize
y: Y-coordinate of top edge.
\end_layout
\begin_layout Itemize
bitmap: The bitmap to draw
\end_layout
\begin_layout Itemize
palette: The palette to draw the bitmap using.
\end_layout
\begin_layout Subsubsection
gui.bitmap_draw(number x, number y, dbitmap bitmap)
\end_layout
\begin_layout Standard
Draw a bitmap on screen.
Parameters:
\end_layout
\begin_layout Itemize
x: X-coordinate of left edge.
\end_layout
\begin_layout Itemize
y: Y-coordinate of top edge.
\end_layout
\begin_layout Itemize
bitmap: The bitmap to draw
\end_layout
\begin_layout Subsubsection
gui.palette_new()
\end_layout
\begin_layout Standard
Returns a new palette (initially all transparent).
Can be used anywhere.
\end_layout
\begin_layout Subsubsection
2012-03-08 08:00:19 +02:00
gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2012-03-03 11:27:26 +02:00
\end_layout
\begin_layout Standard
Returns a new bitmap/dbitmap.
Can be used anywhere.
Parameters:
\end_layout
\begin_layout Itemize
w: The width of new bitmap
\end_layout
\begin_layout Itemize
h: The height of new bitmap
\end_layout
\begin_layout Itemize
direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
\end_layout
2012-03-08 08:00:19 +02:00
\begin_layout Itemize
icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
\end_layout
2012-03-03 11:27:26 +02:00
\begin_layout Subsubsection
gui.bitmap_load(string file)
\end_layout
\begin_layout Standard
Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
for bitmap).
Can be used anywhere.
Parameters:
\end_layout
\begin_layout Itemize
file: The name of file to load.
\end_layout
\begin_layout Subsubsection
gui.palette_set(palette palette, number index, number color)
\end_layout
\begin_layout Standard
Sets color in palette.
Can be used anywhere.
Parameters:
\end_layout
\begin_layout Itemize
palette: The palette to manipulate
\end_layout
\begin_layout Itemize
index: Index of color (0-65535).
\end_layout
\begin_layout Itemize
color: The color value.
\end_layout
\begin_layout Subsubsection
gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
\end_layout
\begin_layout Standard
Sets specified pixel in bitmap.
Can be used anywhere.
Parameters:
\end_layout
\begin_layout Itemize
bitmap: The bitmap to manipulate
\end_layout
\begin_layout Itemize
x: The x-coordinate of the pixel.
\end_layout
\begin_layout Itemize
y: The y-coordinate of the pixel.
\end_layout
\begin_layout Itemize
color: If bitmap is a bitmap, color index (0-65535).
Otherwise color value.
\end_layout
\begin_layout Subsubsection
gui.bitmap_size(bitmap/dbitmap bitmap)
\end_layout
\begin_layout Standard
Get size of bitmap.
Can be used anywhere.
Parameters:
\end_layout
\begin_layout Itemize
bitmap: The bitmap to query.
\end_layout
\begin_layout Standard
The first return is the width, the second is the height.
\end_layout
\begin_layout Subsubsection
gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
src, number sx, number sy, number w, number h[, number ck])
\end_layout
\begin_layout Standard
Blit a part of bitmap to another.
Can be used anywhere.
Parameters:
\end_layout
\begin_layout Itemize
dest: Destination to blit to.
\end_layout
\begin_layout Itemize
dx: left edge of target
\end_layout
\begin_layout Itemize
dy: Top edge of target
\end_layout
\begin_layout Itemize
src: The source to blit from.
Must be of the same type as destination.
\end_layout
\begin_layout Itemize
sx: left edge of source
\end_layout
\begin_layout Itemize
sy: Top edge of source
\end_layout
\begin_layout Itemize
w: Width of region
\end_layout
\begin_layout Itemize
h: Height of region.
\end_layout
\begin_layout Itemize
ck: Color key.
Pixels of this color are not blitted.
\end_layout
\begin_deeper
\begin_layout Itemize
If bitmaps are bitmaps, this is color index of colorkey.
Values outside range 0-65535 cause no key to be used as colorkey.
\end_layout
\begin_layout Itemize
If bitmaps are dbitmaps, this color value of colorkey.
\end_layout
\begin_layout Itemize
May be absent or nil for no colorkey blit.
\end_layout
\end_deeper
2013-07-17 11:01:44 +03:00
\begin_layout Subsubsection
gui.bitmap_load_png(string filename)
\end_layout
\begin_layout Standard
Load a bitmap from PNG file.
Parameters:
\end_layout
\begin_layout Itemize
filename: The name of file to load the bitmap frame.
\end_layout
\begin_layout Standard
Return value:
\end_layout
\begin_layout Itemize
If the PNG is of color type 3 (PALETTE), returns two value.
First is BITMAP containing the image data from the PNG and second is PALETTE
containg the palette data from the PNG.
\end_layout
\begin_layout Itemize
For color types 0 (GRAY), 2 (RGB), 4 (GRAY_ALPHA) and 6 (RGBA), returns
one DBITMAP containg the image data loaded from the PNG.
\end_layout
\begin_layout Subsubsection
gui.bitmap_load_pal(string filename)
\end_layout
\begin_layout Standard
Load a palette from file.
Parameters:
\end_layout
\begin_layout Itemize
filename: The name of the file.
\end_layout
\begin_layout Standard
The kinds of lines supported
\end_layout
\begin_layout Itemize
Blank or just whitespace: Ignored
\end_layout
\begin_layout Itemize
First non-whitespace is '#': Ignored
\end_layout
\begin_layout Itemize
<r> <g> <b>: Fully opaque color with specified RGB values (0-255)
\end_layout
\begin_layout Itemize
<r> <g> <b> <a>: Color with specified RGB values (0-255) and specified alpha
(0-256, 0 being fully transparent and 256 fully opaque).
\end_layout
\begin_layout Itemize
transparent: Fully transparent color
\end_layout
\begin_layout Subsubsection
gui.bitmap_load_str(string content)
\end_layout
\begin_layout Standard
Like gui.bitmap_load, but reads the specified string directly as content.
\end_layout
\begin_layout Subsubsection
gui.bitmap_load_png_str(string base64content)
\end_layout
\begin_layout Standard
Like gui.bitmap_load_png, but reads the specified string (as base64-encoded)
directly as content.
\end_layout
\begin_layout Subsubsection
gui.bitmap_load_pal_str(string content)
\end_layout
\begin_layout Standard
Like gui.bitmap_load_pal, but reads the specified string directly as content.
\end_layout
\begin_layout Subsubsection
gui.repaint()
\end_layout
\begin_layout Standard
Request on_repaint() to happen as soon as possible.
Can be used anywhere.
\end_layout
\begin_layout Subsubsection
gui.subframe_update(boolean on)
\end_layout
\begin_layout Standard
Request subframe updates (calling on_paint() on subframes) to happen (on=true)
or not happen (on=false).
Can be used anywhere.
\end_layout
2011-10-09 02:55:36 +03:00
\begin_layout Subsubsection
gui.screenshot(string filename)
\end_layout
\begin_layout Standard
Write PNG screenshot of the current frame (no drawings) to specified file.
2011-10-19 18:16:34 +03:00
Can be used anywhere.
\end_layout
\begin_layout Subsubsection
gui.color(number r, number g, number b[, number a])
2011-10-19 18:16:34 +03:00
\end_layout
\begin_layout Standard
Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
each component in scale 0-255.
If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
opaque).
The default alpha is 256.
2011-10-09 02:55:36 +03:00
\end_layout
2011-10-22 18:45:33 +03:00
\begin_layout Subsubsection
gui.status(string name, string value)
\end_layout
\begin_layout Standard
Set status field
\begin_inset Quotes eld
\end_inset
L[<name>]
\begin_inset Quotes erd
\end_inset
to <value> in status area.
Can be used anywhere.
\end_layout
\begin_layout Subsubsection
gui.rainbow(number step, number steps[, number color])
\end_layout
\begin_layout Standard
Perform hue rotation of color <color> (default bright red), by <step> steps.
The number of steps per full rotation is given by absolute value of <steps>.
\end_layout
\begin_layout Standard
If <steps> is negative, the rotation will be counterclockwise.
\end_layout
\begin_layout Subsubsection
gui.screenshot(string filename)
\end_layout
\begin_layout Standard
Saves a screenshot into specified file.
\end_layout
2013-01-26 23:55:50 +02:00
\begin_layout Subsubsection
gui.renderq_new(number width, number height)
\end_layout
\begin_layout Standard
Create render queue with specified reported size and return it.
\end_layout
\begin_layout Subsubsection
gui.renderq_clear(RENDERQUEUE queue)
\end_layout
\begin_layout Standard
Clear specified render queue.
\end_layout
\begin_layout Subsubsection
gui.renderq_set(RENDERQUEUE queue)
\end_layout
\begin_layout Standard
Switch to specified render queue.
Use nil as queue to switch to default queue.
\end_layout
\begin_layout Itemize
When switched to another queue, all drawing functions work and draw there,
even outside on_video/on_paint.
\end_layout
\begin_layout Subsubsection
gui.renderq_run(RENDERQUEUE queue)
\end_layout
\begin_layout Standard
Run specified render queue, copying the objects to current render queue.
\end_layout
\begin_layout Itemize
Warning: Don't try to run the current render queue.
\end_layout
2013-02-01 21:52:27 +02:00
\begin_layout Subsubsection
gui.loadfont(string filename)
\end_layout
\begin_layout Standard
Loads font from specified file (CUSTOMFONT object).
\end_layout
\begin_layout Subsubsection
CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc[, number
hlc]]])
2013-02-01 21:52:27 +02:00
\end_layout
\begin_layout Standard
Draw string with custom font to screen.
The parameters are the same as in gui.text, except hlc is the halo color
(default is no halo).
2013-02-01 21:52:27 +02:00
\end_layout
\begin_layout Subsection
table input
\end_layout
\begin_layout Standard
Input handling.
Only available in on_input callback.
\end_layout
2011-10-31 18:38:58 +02:00
\begin_layout Subsubsection
input.get(number controller, number index)
\end_layout
\begin_layout Standard
Read the specified index (0-11) from specified controller (0-7).
Notes:
\end_layout
\begin_layout Itemize
Uses physical controller numbering.
Gamepad in port 2 is controller 4, not 1!
\end_layout
2011-10-31 18:38:58 +02:00
\begin_layout Subsubsection
input.set(number controller, number index, number value)
\end_layout
\begin_layout Standard
Write the specified index (0-11) from specified controller (0-7), storing
value.
Notes:
\end_layout
\begin_layout Itemize
Uses physical controller numbering.
Gamepad in port 2 is controller 4, not 1!
\end_layout
\begin_layout Subsubsection
input.get2(number port, number controller, number index)
\end_layout
\begin_layout Standard
Read the specified input tuple.
\end_layout
\begin_layout Itemize
Port 0 is system port.
\end_layout
\begin_layout Subsubsection
input.set2(number port, number controller, number index, number value)
\end_layout
\begin_layout Standard
Write the specified input tuple.
\end_layout
\begin_layout Itemize
Port 0 is system port.
\end_layout
\begin_layout Subsubsection
input.lcid_to_pcid2(number lcid)
\end_layout
\begin_layout Standard
Look up physical pcid pair (port, controller) corresponding to specified
logical controller (1-based).
Returns nothing if controller does not exist.
\end_layout
\begin_layout Subsubsection
input.port_type(number port)
\end_layout
\begin_layout Standard
Return type of specified port.
\end_layout
2013-03-03 08:31:40 +02:00
\begin_layout Subsubsection
input.controller_info(number port, number controller)
\end_layout
\begin_layout Standard
Get controller info for specified controller.
If controller does not exist, returns nil.
Otherwise returns a table with following fields:
\end_layout
\begin_layout Itemize
type (string): Type of the controller.
\end_layout
\begin_layout Itemize
class (string): Class of the controller.
\end_layout
\begin_layout Itemize
classnum (number): Number of the controller within its class (1-based)
\end_layout
\begin_layout Itemize
lcid (number): Logical controller number of the controller.
\end_layout
\begin_layout Itemize
button_count (number): Number of buttons on controller
\end_layout
\begin_layout Itemize
buttons (array): Array of following info about each button:
\end_layout
\begin_deeper
\begin_layout Itemize
type (string): Type of button.
Currently one of
\begin_inset Quotes eld
\end_inset
null
\begin_inset Quotes erd
\end_inset
,
\begin_inset Quotes eld
\end_inset
button
\begin_inset Quotes erd
\end_inset
,
\begin_inset Quotes eld
\end_inset
axis
\begin_inset Quotes erd
\end_inset
,
\begin_inset Quotes eld
\end_inset
raxis
\begin_inset Quotes erd
\end_inset
.
\end_layout
\begin_layout Itemize
name (string): Name of button.
\end_layout
\begin_layout Itemize
symbol (string): Symbol of button.
Only present for type
\begin_inset Quotes eld
\end_inset
button
\begin_inset Quotes erd
\end_inset
.
\end_layout
\begin_layout Itemize
hidden (boolean): True if hidden button.
\end_layout
\end_deeper
2013-03-03 09:09:41 +02:00
\begin_layout Subsubsection
input.veto_button()
\end_layout
\begin_layout Standard
Signals that the button event should be vetoed.
Only valid in on_button callback.
\end_layout
2012-03-06 18:21:17 +02:00
\begin_layout Subsubsection
input.geta(number controller)
\end_layout
\begin_layout Standard
Get input state for entiere controller.
Returns 13 return values.
\end_layout
\begin_layout Itemize
1st return value: Bitmask: bit i is set if i:th index is nonzero
\end_layout
\begin_layout Itemize
2nd-13th return value: value of i:th index.
\end_layout
\begin_layout Subsubsection
input.seta(number controller, number bitmask, number args...)
\end_layout
\begin_layout Standard
Set state for entiere controller.
args is up to 12 values for indices (overriding values in bitmask if specified).
\end_layout
2012-03-08 15:28:42 +02:00
\begin_layout Subsubsection
input.controllertype(number controller)
\end_layout
\begin_layout Standard
Get the type of controller as string.
Valid values are:
\end_layout
\begin_layout Itemize
gamepad
\end_layout
\begin_layout Itemize
mouse
\end_layout
\begin_layout Itemize
justifier
\end_layout
\begin_layout Itemize
superscope
\end_layout
2011-10-31 18:38:58 +02:00
\begin_layout Subsubsection
input.reset([number cycles])
\end_layout
\begin_layout Standard
Execute reset.
If cycles is greater than zero, do delayed reset.
2011-09-23 22:46:43 +03:00
0 (or no value) causes immediate reset.
\end_layout
\begin_layout Itemize
Only available with subframe flag false.
\end_layout
\begin_layout Subsubsection
input.raw()
\end_layout
\begin_layout Standard
Returns table of tables of all available keys and axes.
The first table is indexed by key name (platform-dependent!), and the inner
table has the following fields:
\end_layout
\begin_layout Itemize
2012-12-16 20:45:16 +02:00
value: Last reported value for control
\end_layout
2012-12-16 20:45:16 +02:00
\begin_deeper
\begin_layout Itemize
2012-12-16 20:45:16 +02:00
For keys: 1 for pressed, 0 for released.
\end_layout
\begin_layout Itemize
2012-12-16 20:45:16 +02:00
For axes: -32767...32767.
\end_layout
\begin_layout Itemize
2012-12-16 20:45:16 +02:00
For presure-sensitive buttons: 0...32767.
\end_layout
\begin_layout Itemize
2012-12-16 20:45:16 +02:00
For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
\end_layout
\begin_layout Itemize
2012-12-16 20:45:16 +02:00
For mouse: Coordinates relative to game area.
\end_layout
\end_deeper
\begin_layout Itemize
ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
\end_layout
2012-01-17 21:35:49 +02:00
\begin_layout Subsubsection
input.keyhook(string key, boolean state)
2012-01-17 21:35:49 +02:00
\end_layout
\begin_layout Standard
Requests that keyhook events to be sent for key (state=true) or not sent
(state=false).
\end_layout
\begin_layout Subsubsection
input.joyget(number controller)
\end_layout
\begin_layout Standard
Returns table for current controls for specified controller.
The names of fields vary by controller type.
\end_layout
\begin_layout Itemize
The buttons have the same name as those are referred to in other contexts
in the emulator
\end_layout
\begin_layout Itemize
The analog axes are
\begin_inset Quotes eld
\end_inset
xaxis
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
yaxis
\begin_inset Quotes erd
\end_inset
.
\end_layout
\begin_layout Subsubsection
input.joyset(number controller, table controls)
\end_layout
\begin_layout Standard
Set the the state of specified controller to values specified in specified
table.
\end_layout
2012-10-01 23:23:08 +03:00
\begin_layout Subsubsection
input.lcid_to_pcid(number controller)
\end_layout
\begin_layout Standard
Return the physical index, physical port and controller number in port for
specified (1-based) logical controller.
\end_layout
2012-12-16 23:22:53 +02:00
\begin_layout Subsection
Table keyboard
\end_layout
\begin_layout Standard
Various keybinding-related functions
\end_layout
\begin_layout Subsubsection
keyboard.bind(string mod, string mask, string key, string cmd)
\end_layout
\begin_layout Standard
Bind specified key with specified modifers to specified command.
\end_layout
\begin_layout Subsubsection
keyboard.unbind(string mod, string mask, string key)
\end_layout
\begin_layout Standard
Unbind specified key with specified modifers.
\end_layout
\begin_layout Itemize
nil does not change value
\end_layout
\begin_layout Itemize
true/false (buttons) and integers (axes) force value.
\end_layout
\begin_layout Itemize
string (button) inverts the input.
\end_layout
2012-12-16 23:22:53 +02:00
\begin_layout Subsubsection
keyboard.alias(string alias, string expansion)
\end_layout
\begin_layout Standard
Set expansion of given command.
\end_layout
2012-09-08 21:02:27 +03:00
\begin_layout Subsection
Table subtitle
\end_layout
\begin_layout Standard
Subtitle handling
\end_layout
\begin_layout Subsubsection
subtitle.byindex(number i)
\end_layout
\begin_layout Standard
Read the frame and length of ith subtitle.
Returns nothing if not present.
\end_layout
\begin_layout Subsubsection
subtitle.set(number f, number l, string txt)
\end_layout
\begin_layout Standard
Set the text of subtitle.
\end_layout
\begin_layout Subsubsection
subtitle.get(number f, number l)
\end_layout
\begin_layout Standard
Get the text of subtitle.
\end_layout
\begin_layout Subsubsection
subtitle.delete(number f, number l)
\end_layout
\begin_layout Standard
Delete specified subtitle.
\end_layout
\begin_layout Subsection
Table hostmemory
\end_layout
\begin_layout Standard
Host memory handling (extra memory saved to savestates).
Host memory starts empty.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.read(number address)
\end_layout
\begin_layout Standard
Reads hostmemory slot address.
Slot numbers out of range return false instead of numeric.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.write(number address, number value)
\end_layout
\begin_layout Standard
Writes hostmemory slot with 0-255.
Slot numbers out of range cause extension of host memory slot space.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.readbyte(number address)
\end_layout
\begin_layout Standard
Read unsigned byte (1 element) from given address.
Slots out of range return false.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.writebyte(number address, number value)
\end_layout
\begin_layout Standard
Write unsigned byte (1 element) to given slot.
Slot numbers out of range cause extension.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.readsbyte(number address)
\end_layout
\begin_layout Standard
Read signed byte (1 element) from given address.
Slots out of range return false.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.writesbyte(number address, number value)
\end_layout
\begin_layout Standard
Write signed byte (1 element) to given slot.
Slot numbers out of range cause extension.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.readword(number address)
\end_layout
\begin_layout Standard
Read unsigned word (2 elements) from given address.
Slots out of range return false.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.writeword(number address, number value)
\end_layout
\begin_layout Standard
Write unsigned word (2 elements) to given slot.
Slot numbers out of range cause extension.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.readsword(number address)
\end_layout
\begin_layout Standard
Read signed word (2 elements) from given address.
Slots out of range return false.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.writesword(number address, number value)
\end_layout
\begin_layout Standard
Write signed word (2 elements) to given slot.
Slot numbers out of range cause extension.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.readdword(number address)
\end_layout
\begin_layout Standard
Read unsigned doubleword (4 elements) from given address.
Slots out of range return false.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.writedword(number address, number value)
\end_layout
\begin_layout Standard
Write unsigned doubleword (4 elements) to given slot.
Slot numbers out of range cause extension.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.readsdword(number address)
\end_layout
\begin_layout Standard
Read signed doubleword (4 elements) from given address.
Slots out of range return false.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.writesdword(number address, number value)
\end_layout
\begin_layout Standard
Write signed doubleword (4 elements) to given slot.
Slot numbers out of range cause extension.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.readqword(number address)
\end_layout
\begin_layout Standard
Read unsigned quadword (8 elements) from given address.
Slots out of range return false.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.writeqword(number address, number value)
\end_layout
\begin_layout Standard
Write unsigned quadword (4 elements) to given slot.
Slot numbers out of range cause extension.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.readsqword(number address)
\end_layout
\begin_layout Standard
Read signed quadword (8 elements) from given address.
Slots out of range return false.
\end_layout
\begin_layout Subsubsection
2011-10-31 18:38:58 +02:00
hostmemory.writesqword(number address, number value)
\end_layout
\begin_layout Standard
Write signed quadword (8 elements) to given slot.
Slot numbers out of range cause extension.
\end_layout
\begin_layout Subsection
Table movie
\end_layout
\begin_layout Standard
Movie handling
\end_layout
\begin_layout Subsubsection
movie.currentframe()
\end_layout
\begin_layout Standard
Return number of current frame.
\end_layout
\begin_layout Subsubsection
movie.framecount()
\end_layout
\begin_layout Standard
Return number of frames in movie.
\end_layout
\begin_layout Subsubsection
movie.readonly()
\end_layout
\begin_layout Standard
Return true if in readonly mode, false if in readwrite.
\end_layout
\begin_layout Subsubsection
movie.rerecords()
\end_layout
\begin_layout Standard
Returns the current value of rerecord count.
\end_layout
\begin_layout Subsubsection
movie.set_readwrite()
\end_layout
\begin_layout Standard
Set readwrite mode (does not cause on_readwrite callback).
\end_layout
\begin_layout Subsubsection
movie.frame_subframes(number frame)
\end_layout
\begin_layout Standard
Count number of subframes in specified frame (frame numbers are 1-based)
and return that.
\end_layout
\begin_layout Subsubsection
movie.read_subframes(number frame, number subframe)
\end_layout
\begin_layout Standard
Read specifed subframe in specified frame and return data as array (100
elements, numbered 0-99 currently).
\end_layout
\begin_layout Subsubsection
movie.read_rtc()
\end_layout
\begin_layout Standard
Returns the current value of the RTC as a pair (second, subsecond).
\end_layout
\begin_layout Subsubsection
movie.unsafe_rewind([UNSAFEREWIND state])
\end_layout
\begin_layout Standard
Start setting point for unsafe rewind or jump to point of unsafe rewind.
\end_layout
\begin_layout Itemize
If called without argument, causes emulator to start process of setting
unsafe rewind point.
When this has finished, callback on_set_rewind occurs, passing the rewind
state to lua script.
\end_layout
\begin_layout Itemize
If called with argument, causes emulator rewind to passed rewind point as
soon as possible.
Readwrite mode is implicitly activated.
\end_layout
\begin_layout Standard
The following warnings apply to unsafe rewinding:
\end_layout
\begin_layout Itemize
There are no safety checks against misuse (that's what
\begin_inset Quotes eld
\end_inset
unsafe
\begin_inset Quotes erd
\end_inset
comes from)!
\end_layout
\begin_layout Itemize
Only call rewind from timeline rewind point was set from.
\end_layout
\begin_layout Itemize
Only call rewind from after the rewind point was set.
\end_layout
\begin_layout Subsection
Table settings
\end_layout
\begin_layout Standard
Routines for settings manipulation
\end_layout
\begin_layout Subsubsection
2011-10-31 11:56:24 +02:00
settings.get(string name)
\end_layout
\begin_layout Standard
Get value of setting.
If setting is blank, returns false.
If setting value can't be obtained, returns (nil, error message).
\end_layout
\begin_layout Subsubsection
2011-10-31 11:56:24 +02:00
settings.set(string name, string value)
\end_layout
\begin_layout Standard
Set value of setting.
If setting can't be set, returns (nil, error message).
\end_layout
\begin_layout Subsubsection
2011-10-31 11:56:24 +02:00
settings.is_set(string name)
\end_layout
\begin_layout Standard
Returns if setting is set.
If setting does not exist, returns (nil, error message).
\end_layout
\begin_layout Subsubsection
2011-10-31 11:56:24 +02:00
settings.blank(string name)
\end_layout
\begin_layout Standard
Blanks a setting and returns true.
If setting can't be blanked, returns (nil, error message).
\end_layout
\begin_layout Subsection
Table memory
\end_layout
\begin_layout Standard
Contains various functions for managing memory
\end_layout
\begin_layout Subsubsection
2011-10-31 11:56:24 +02:00
memory.vma_count()
\end_layout
\begin_layout Standard
Returns the number of VMAs
\end_layout
\begin_layout Subsubsection
2011-10-31 11:56:24 +02:00
memory.read_vma(number index)
\end_layout
\begin_layout Standard
Reads the specified VMA (indices start from zero).
Trying to read invalid VMA gives nil.
The read VMA is table with the following fields:
\end_layout
\begin_layout Itemize
region_name (string): The readable name of the VMA
\end_layout
\begin_layout Itemize
baseaddr (number): Base address of the VMA
\end_layout
\begin_layout Itemize
lastaddr (number): Last address in the VMA.
\end_layout
\begin_layout Itemize
size (number): The size of VMA in bytes.
\end_layout
\begin_layout Itemize
readonly (boolean): True of the VMA corresponds to ROM.
\end_layout
\begin_layout Itemize
iospace (boolean): True if the VMA is I/O space.
\end_layout
\begin_layout Itemize
native_endian (boolean): True if the VMA has native endian as opposed to
2011-11-09 19:18:40 +02:00
little endian.
\end_layout
\begin_layout Subsubsection
2011-10-31 11:56:24 +02:00
memory.find_vma(number address)
\end_layout
\begin_layout Standard
Finds the VMA containing specified address.
Returns table in the same format as read_vma or nil if not found.
\end_layout
\begin_layout Subsubsection
memory.readbyte([string vma, ]number address)
\end_layout
\begin_layout Standard
Reads the specified address as unsigned byte and returns the result.
\end_layout
\begin_layout Subsubsection
memory.readsbyte([string vma, ]number address)
\end_layout
\begin_layout Standard
Reads the specified address as signed byte and returns the result.
\end_layout
\begin_layout Subsubsection
memory.writebyte([string vma, ]number address, number value)
\end_layout
\begin_layout Standard
Writes the specified value (negative values undergo 2's complement) to specified
address (as a byte).
\end_layout
\begin_layout Subsubsection
memory.readword([string vma, ]number address)
\end_layout
\begin_layout Standard
Reads the specified address as unsigned word and returns the result.
\end_layout
\begin_layout Subsubsection
memory.readsword([string vma, ]number address)
\end_layout
\begin_layout Standard
Reads the specified address as signed word and returns the result.
\end_layout
\begin_layout Subsubsection
memory.writeword([string vma, ]number address, number value)
\end_layout
\begin_layout Standard
Writes the specified value (negative values undergo 2's complement) to specified
address (as a word).
\end_layout
\begin_layout Subsubsection
memory.readdword([string vma, ]number address)
\end_layout
\begin_layout Standard
Reads the specified address as unsigned doubleword and returns the result.
\end_layout
\begin_layout Subsubsection
memory.readsdword([string vma, ]number address)
\end_layout
\begin_layout Standard
Reads the specified address as signed doubleword and returns the result.
\end_layout
\begin_layout Subsubsection
memory.writedword([string vma, ]number address, number value)
\end_layout
\begin_layout Standard
Writes the specified value (negative values undergo 2's complement) to specified
address (as a doubleword).
\end_layout
\begin_layout Subsubsection
memory.readqword([string vma, ]number address)
\end_layout
\begin_layout Standard
Reads the specified address as unsigned quadword and returns the result.
\end_layout
\begin_layout Subsubsection
memory.readsqword([string vma, ]number address)
\end_layout
\begin_layout Standard
Reads the specified address as signed quadword and returns the result.
\end_layout
\begin_layout Subsubsection
memory.writeqword([string vma, ]number address, number value)
\end_layout
\begin_layout Standard
Writes the specified value (negative values undergo 2's complement) to specified
address (as a quadword).
\end_layout
2012-05-10 15:28:54 +03:00
\begin_layout Subsubsection
memory.hash_region([string vma, ]number base, number size)
2012-05-10 15:28:54 +03:00
\end_layout
\begin_layout Standard
Hash specified number of bytes starting from specified address and return
the SHA-256.
\end_layout
\begin_layout Subsubsection
memory.hash_state()
\end_layout
\begin_layout Standard
Hash the current system state.
Mainly useful for debugging savestates.
\end_layout
\begin_layout Subsubsection
memory.readregion([string vma, ]number base, number size)
\end_layout
\begin_layout Standard
Read a region of memory.
\end_layout
\begin_layout Itemize
Warning: If the region crosses VMA boundary, the results are undefined.
\end_layout
2012-09-29 09:14:09 +03:00
\begin_layout Subsubsection
memory.map<type>([[string vma, ]number base, number size])
2012-09-29 09:14:09 +03:00
\end_layout
\begin_layout Standard
Returns a table mapping specified memory aperture for read/write.
If parameters are omitted, entiere map space is the aperture.
\end_layout
\begin_layout Itemize
Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
\end_layout
\begin_layout Subsubsection
memory.writeregion([string vma, ]number base, number size, table data)
\end_layout
\begin_layout Standard
Write a region of memory.
\end_layout
\begin_layout Itemize
Warning: If the region crosses VMA boundary, the results are undefined.
\end_layout
2012-09-29 11:56:18 +03:00
\begin_layout Subsubsection
memory.map_structure()
2012-09-29 11:56:18 +03:00
\end_layout
\begin_layout Standard
Returns a new mapping structure (MMAP_STRUCT)
\end_layout
\begin_layout Subsubsection
MMAP_STRUCT(string key, [string vma, ]number address, string type)
2012-09-29 11:56:18 +03:00
\end_layout
\begin_layout Standard
Bind key in mmap structure to specified address with specified type.
\end_layout
\begin_layout Itemize
Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
\end_layout
2012-10-07 15:12:46 +03:00
\begin_layout Subsubsection
memory.read_expr(string expr)
\end_layout
\begin_layout Standard
Evaluate specified watch expression and return result
\end_layout
\begin_layout Subsubsection
memory.action(string action, [<params>])
\end_layout
\begin_layout Standard
Run core action.
The different models expect parameters as:
\end_layout
\begin_layout Itemize
string: String
\end_layout
\begin_layout Itemize
numeric: numeric
\end_layout
\begin_layout Itemize
enumeration: String
\end_layout
\begin_layout Itemize
boolean: String
\end_layout
\begin_layout Itemize
toggle: None.
\end_layout
\begin_layout Subsubsection
memory.get_lag_flag()
\end_layout
\begin_layout Standard
Get the value of core lag flag.
True if this frame has been lag so far, false if poll has been detected.
\end_layout
\begin_layout Subsubsection
memory.set_lag_flag(boolean flag)
\end_layout
\begin_layout Standard
Set the value of core lag flag.
This flag automatically gets cleared if poll is detected, but can be forcibly
set if game so requires.
Should only be used in on_frame_emulated callback.
\end_layout
\begin_layout Standard
Setting or clearing this affects the emulator lag counter.
\end_layout
2013-05-12 16:15:18 +03:00
\begin_layout Subsection
Table memory2
\end_layout
\begin_layout Standard
Contains newer memory functions.
\end_layout
\begin_layout Subsubsection
memory2()
\end_layout
\begin_layout Standard
Returns array of all valid VMA names.
\end_layout
\begin_layout Subsubsection
memory2.<vma>:info()
\end_layout
\begin_layout Standard
Return table describing given VMA.
Includes fields address, size, last, readonly, special and endian.
\end_layout
\begin_layout Subsubsection
memory2.<vma>:<op>(number offset)
\end_layout
\begin_layout Standard
Read from given VMA at given offset (must be in-range).
Op is of form:
\end_layout
\begin_layout Itemize
[i][s]<type>, where <type> is one of 'byte', 'word', 'dword', 'qword'.
'i' signifies that the value is treated as opposite-to-normal endianess,
's' signifies that value is treated as signed.
\end_layout
\begin_layout Subsubsection
memory2.<vma>:<op>(number offset, number value)
\end_layout
\begin_layout Standard
Write value to given VMA at given offset (must be in-range).
See above for form of op.
\end_layout
\begin_layout Subsection
Table subtitle
\end_layout
\begin_layout Standard
Contains functions for manipulating subtitles.
\end_layout
\begin_layout Subsubsection
subtitle.byindex(number index)
\end_layout
\begin_layout Standard
Get (basetime, length) pair of specified subtitle index or nothing if index
isn't valid.
\end_layout
\begin_layout Subsubsection
subtitle.get(number basetime, number length)
\end_layout
\begin_layout Standard
Read the specified subtitle.
Returns
\begin_inset Quotes eld
\end_inset
\begin_inset Quotes erd
\end_inset
if the subtitle does not exist.
\end_layout
\begin_layout Subsubsection
subtitle.set(number basetime, number length, string content)
\end_layout
\begin_layout Standard
Set the specified subtitle.
\end_layout
\begin_layout Subsubsection
subtitle.deltete(number basetime, number length)
\end_layout
\begin_layout Standard
Delete the specified subtitle.
\end_layout
2011-11-26 05:10:44 +02:00
\begin_layout Subsection
Table _SYSTEM
\end_layout
\begin_layout Standard
Contains copy of global variables from time of Lua initialization.
Non-writeable.
\end_layout
\begin_layout Subsection
Callbacks
\end_layout
\begin_layout Standard
Various callbacks to Lua that can occur.
\end_layout
\begin_layout Subsubsection
2012-03-06 08:43:21 +02:00
Callback: on_paint(bool not_synth)
\end_layout
\begin_layout Standard
Called when screen is being painted.
Any gui.* calls requiring graphic context draw on the screen.
\end_layout
2012-03-06 08:43:21 +02:00
\begin_layout Standard
not_synth is true if this hook is being called in response to received frame,
false otherwise.
\end_layout
\begin_layout Subsubsection
Callback: on_video()
\end_layout
\begin_layout Standard
Called when video dump frame is being painted.
Any gui.* calls requiring graphic context draw on the video.
\end_layout
2012-03-06 08:43:21 +02:00
\begin_layout Subsubsection
Callback: on_frame_emulated()
\end_layout
\begin_layout Standard
Called when emulating frame has completed and on_paint()/on_video() calls
are about to be issued.
\end_layout
2011-11-10 21:20:34 +02:00
\begin_layout Subsubsection
Callback: on_frame()
\end_layout
\begin_layout Standard
Called on each starting whole frame.
\end_layout
\begin_layout Subsubsection
Callback: on_startup()
\end_layout
\begin_layout Standard
2011-09-23 22:46:43 +03:00
Called when the emulator is starting (lsnes.rc and --run files has been run).
\end_layout
\begin_layout Subsubsection
2012-03-06 08:43:21 +02:00
Callback: on_rewind()
\end_layout
\begin_layout Standard
Called when rewind movie to beginning has completed.
\end_layout
\begin_layout Subsubsection
Callback: on_pre_load(string name)
\end_layout
\begin_layout Standard
Called just before savestate/movie load occurs (note: loads are always delayed,
so this occurs even when load was initiated by lua).
\end_layout
\begin_layout Subsubsection
Callback: on_err_load(string name)
\end_layout
\begin_layout Standard
Called if loadstate goes wrong.
\end_layout
\begin_layout Subsubsection
Callback: on_post_load(string name, boolean was_savestate)
\end_layout
\begin_layout Standard
Called on successful loadstate.
was_savestate gives if this was a savestate or a movie.
\end_layout
\begin_layout Subsubsection
Callback: on_pre_save(string name, boolean is_savestate)
\end_layout
\begin_layout Standard
Called just before savestate save occurs (note: movie saves are synchronous
and won't trigger these callbacks if called from Lua).
\end_layout
\begin_layout Subsubsection
Callback: on_err_save(string name)
\end_layout
\begin_layout Standard
Called if savestate goes wrong.
\end_layout
\begin_layout Subsubsection
Callback: on_post_save(string name, boolean is_savestate)
\end_layout
\begin_layout Standard
Called on successful savaestate.
is_savestate gives if this was a savestate or a movie.
\end_layout
\begin_layout Subsubsection
Callback: on_quit()
\end_layout
\begin_layout Standard
Called when emulator is shutting down.
\end_layout
\begin_layout Subsubsection
Callback: on_input(boolean subframe)
\end_layout
\begin_layout Standard
Called when emulator is just sending input to bsnes core.
Warning: This is called even in readonly mode, but the results are ignored.
\end_layout
\begin_layout Subsubsection
Callback: on_reset()
\end_layout
\begin_layout Standard
Called when SNES is reset.
\end_layout
\begin_layout Subsubsection
Callback: on_readwrite()
\end_layout
\begin_layout Standard
Called when moving into readwrite mode as result of
\begin_inset Quotes eld
\end_inset
set-rwmode
\begin_inset Quotes erd
\end_inset
command (note: moving to rwmode by Lua won't trigger this, as per recursive
entry protection).
\end_layout
\begin_layout Subsubsection
2011-09-14 23:28:18 +03:00
Callback: on_snoop(number port, number controller, number index, number
value)
\end_layout
\begin_layout Standard
Called each time bsnes asks for input.
2011-09-23 22:46:43 +03:00
The value is the final value to be sent to bsnes core (readonly mode, autohold
and autofire have been taken into account).
2011-09-14 23:28:18 +03:00
Might be useful when translating movies to format suitable for console
verification.
2011-09-23 22:46:43 +03:00
Note: There is no way to modify the value to be sent.
2011-09-14 23:28:18 +03:00
\end_layout
2013-03-03 08:41:54 +02:00
\begin_layout Itemize
Not called if callback on_snoop2 is defined.
\end_layout
\begin_layout Subsubsection
Callback: on_snoop2(number port, number controller, number index, number
value)
\end_layout
\begin_layout Standard
Like on_snoop, but reserves port 0 for system, having first user port be
port 1.
\end_layout
2012-01-17 21:35:49 +02:00
\begin_layout Subsubsection
Callback: on_keyhook(string keyname, table state)
\end_layout
\begin_layout Standard
Sent when key that has keyhook events requested changes state.
Keyname is name of the key (group) and state is the state (same kind as
table values in input.raw).
\end_layout
2012-03-06 18:21:17 +02:00
\begin_layout Subsubsection
Callback: on_idle()
\end_layout
\begin_layout Standard
Called when requested by set_idle_timeout(), the timeout has expired and
emulator is waiting.
\end_layout
\begin_layout Subsubsection
Callback: on_timer()
\end_layout
\begin_layout Standard
Called when requested by set_idle_timeout() and the timeout has expired
(regardless if emulator is waiting).
\end_layout
\begin_layout Subsubsection
Callback: on_set_rewind(UNSAFEREWIND r)
\end_layout
\begin_layout Standard
Called when unsafe rewind object has been constructed.
\end_layout
\begin_layout Subsubsection
Callback: on_pre_rewind()
\end_layout
\begin_layout Standard
Called just before unsafe rewind is about to occur.
\end_layout
\begin_layout Subsubsection
Callback: on_post_rewind()
\end_layout
\begin_layout Standard
Called just after unsafe rewind has occured.
\end_layout
2013-03-03 09:09:41 +02:00
\begin_layout Subsubsection
Callback: on_button(number port, number controller, number index, string
type)
\end_layout
\begin_layout Standard
Called on controller button press, with following parameters:
\end_layout
\begin_layout Itemize
port: Port number (0 is system)
\end_layout
\begin_layout Itemize
controller: Controller within port
\end_layout
\begin_layout Itemize
index: Index of button.
\end_layout
\begin_layout Itemize
type: Type of event, one of:
\end_layout
\begin_deeper
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
pressed
\begin_inset Quotes erd
\end_inset
: Button was pressed.
\end_layout
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
released
\begin_inset Quotes erd
\end_inset
: Button was released.
\end_layout
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
hold
\begin_inset Quotes erd
\end_inset
: Held.
\end_layout
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
unhold
\begin_inset Quotes erd
\end_inset
: Released from hold.
\end_layout
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
type
\begin_inset Quotes erd
\end_inset
: Typing input on button.
\end_layout
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
untype
\begin_inset Quotes erd
\end_inset
: Typing input undone.
\end_layout
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
2013-03-14 00:15:43 +02:00
autofire <duty> <cycle>
\begin_inset Quotes erd
\end_inset
: Autofire with specifie duty and cycle.
\end_layout
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
autofire
\begin_inset Quotes erd
\end_inset
: Stop autofire.
\end_layout
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset
2013-03-03 09:09:41 +02:00
analog
\begin_inset Quotes erd
\end_inset
: Analog action on axis.
\end_layout
\end_deeper
2013-02-09 12:39:25 +02:00
\begin_layout Section
Movie editor
\end_layout
\begin_layout Itemize
The editor edits in-memory movie.
\end_layout
\begin_layout Itemize
Because past can't be edited and readwrite mode doesn't allow future, editing
only works in
\emph on
read only
\emph default
mode.
\end_layout
\begin_layout Itemize
Keyboard triggers the normal hotkeys and bindings.
\end_layout
\begin_layout Subsection
Left button actions
\end_layout
\begin_layout Itemize
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)
\end_layout
\begin_layout Itemize
Dragging vertically toggles sequence of buttons or changes a sequence of
axis values.
2013-02-09 12:39:25 +02:00
\end_layout
\begin_layout Subsection
Right button actions
\end_layout
\begin_layout Standard
The right mouse button pops up a context-sensitive menu:
\end_layout
\begin_layout Itemize
Toggle <something>: Toggle this button
\end_layout
\begin_layout Itemize
Change <something>: Change this axis value
\end_layout
\begin_layout Itemize
Insert frame after: Insert a frame after this frame
\end_layout
\begin_layout Itemize
Append frame: Append a frame to movie
\end_layout
\begin_layout Itemize
Append frames: Append specified number of frames to movie
\end_layout
\begin_layout Itemize
Delete frame: Delete this frame
\end_layout
\begin_layout Itemize
Delete subframe: Delete this subframe
\end_layout
\begin_layout Itemize
Truncate movie: Delete this subframe and everything after it.
\end_layout
\begin_layout Itemize
Scroll to frame: Prompt for a frame and scroll the display to that frame.
\end_layout
\begin_layout Itemize
Scroll to current frame: Scroll the display to current position
\end_layout
\begin_layout Itemize
Run to frame: Prompts for frame and runs the emulation to that frame.
\end_layout
\begin_layout Itemize
Change number of lines visible: Change the height of the movie display (1
to 255).
\end_layout
\begin_layout Itemize
Lock scroll to playback: While playing back or rewinding movies, the display
will follow if enabled.
\end_layout
\begin_layout Section
Memory watch expression syntax
\end_layout
\begin_layout Standard
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.
\end_layout
\begin_layout Standard
Notations:
\end_layout
\begin_layout Itemize
Evaluation order is strictly left to right.
\end_layout
\begin_layout Itemize
a is the entry on top of stack
\end_layout
\begin_layout Itemize
b is the entry immediately below top of stack
\end_layout
\begin_layout Itemize
; separates values to be pushed (no intermediate pop).
\end_layout
\begin_layout Itemize
After end of element, all used stack slots are popped and all results are
pushed.
\end_layout
\begin_layout Itemize
When pushing multiple values, the pushes occur in order shown.
\end_layout
\begin_layout Standard
The following operators are available:
\end_layout
\begin_layout Itemize
+ : a + b
\end_layout
\begin_layout Itemize
- : a - b
\end_layout
\begin_layout Itemize
* : a * b
\end_layout
\begin_layout Itemize
/ : a / b
\end_layout
\begin_layout Itemize
% : a % b
\end_layout
\begin_layout Itemize
a : atan(a)
\end_layout
\begin_layout Itemize
b : read_signed_byte(a)
\end_layout
\begin_layout Itemize
c : cos(a)
\end_layout
\begin_layout Itemize
d : read_signed_dword(a)
\end_layout
\begin_layout Itemize
i : quotent(a / b)
\end_layout
\begin_layout Itemize
p :
\begin_inset Formula $\pi$
\end_inset
\end_layout
\begin_layout Itemize
q : read_signed_qword(a)
\end_layout
\begin_layout Itemize
r : sqrt(a)
\end_layout
\begin_layout Itemize
s : sin(a)
\end_layout
\begin_layout Itemize
t : tan(a)
\end_layout
\begin_layout Itemize
u : a; a
\end_layout
\begin_layout Itemize
w : read_signed_word(a)
\end_layout
\begin_layout Itemize
A : atan2(a, b)
\end_layout
\begin_layout Itemize
B : read_unsigned_byte(a)
\end_layout
\begin_layout Itemize
C<number>z : Push number <number> to stack.
\end_layout
\begin_layout Itemize
D : read_unsigned_dword(a)
\end_layout
\begin_layout Itemize
C0x<number>z : Push number <number> (hexadecimal) to stack.
\end_layout
2013-02-09 12:39:25 +02:00
\begin_layout Itemize
H<digit> : Set hexadecimal mode with specified number of digits (use A-G
for 10-16 digits).
\end_layout
\begin_layout Itemize
Q : read_unsigned_qword(a)
\end_layout
\begin_layout Itemize
R<digit> : round a to <digit> digits.
\end_layout
\begin_layout Itemize
W : read_unsigned_word(a)
\end_layout
\begin_layout Subsection
Example:
\end_layout
\begin_layout Standard
C0x007e0878zWC0x007e002czW-
\end_layout
\begin_layout Enumerate
Push value 0x7e0878 on top of stack (C0x007e0878z).
\end_layout
\begin_layout Enumerate
Pop the value on top of stack (0x7e0878), read word value at that address
and push the result,call it x1 (W).
\end_layout
\begin_layout Enumerate
Push value 0x7e002c on top of stack (C0x007e002cz).
\end_layout
\begin_layout Enumerate
Pop the value on top of stack (0x7e002c), read word value at that address
and push the result,call it x2 (W).
\end_layout
\begin_layout Enumerate
Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
x2 - x1 (-).
\end_layout
\begin_layout Enumerate
Since the expression ends, the final memory watch result is the top one
on stack, which is x2 - x1.
\end_layout
\begin_layout Section
2011-09-23 22:46:43 +03:00
Modifier and key names:
\end_layout
2012-01-11 15:24:36 +02:00
\begin_layout Subsection
wxWidgets platform
\end_layout
\begin_layout Subsubsection
Modifier names:
\end_layout
\begin_layout Standard
Following modifier names are known:
\end_layout
\begin_layout Itemize
alt
\end_layout
\begin_layout Itemize
ctrl
\end_layout
\begin_layout Itemize
shift
\end_layout
\begin_layout Itemize
meta
\end_layout
\begin_layout Itemize
cmd (Mac OS X only)
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Subsubsection
2012-01-11 15:24:36 +02:00
Key names:
\end_layout
\begin_layout Standard
2012-01-11 15:24:36 +02:00
Following key names are known:
\end_layout
\begin_layout Itemize
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
\end_layout
\begin_layout Section
Movie file format
\end_layout
\begin_layout Standard
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).
\end_layout
\begin_layout Subsection
Detecting clean start/SRAM/Savestate
\end_layout
\begin_layout Itemize
If file has member
\begin_inset Quotes eld
\end_inset
savestate
\begin_inset Quotes erd
\end_inset
it is savestate, otherwise:
\end_layout
\begin_layout Itemize
If file has members with names starting
\begin_inset Quotes eld
\end_inset
moviesram.
\begin_inset Quotes erd
\end_inset
it is movie starting from SRAM, otherwise:
\end_layout
\begin_layout Itemize
It is movie starting from clear state.
\end_layout
\begin_layout Subsection
Member: gametype
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
Type of game ROM and region (as one line).
Valid values are:
\end_layout
\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="3">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0">
<column alignment="center" valignment="top" width="0">
<column alignment="center" valignment="top" width="0">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Value
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
System
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Region
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
snes_pal
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Super NES
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
PAL
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
sgb_pal
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Super Game Boy
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
PAL
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
snes_ntsc
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Super NES
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
NTSC
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
sgb_ntsc
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Super Game Boy
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
NTSC
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
bsx
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
BS-X (non-slotted)
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
NTSC
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
bsxslotted
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
BS-X (slotted)
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
NTSC
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
sufamiturbo
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Sufami Turbo
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
NTSC
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Standard
Frame rates are:
\end_layout
\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0">
<column alignment="center" valignment="top" width="0">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Region
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
2011-09-21 19:32:36 +03:00
Framerate (fps)
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
PAL
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
322445/6448
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
NTSC
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
10738636/178683
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Subsection
Member: port1
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
Contains type of port #1 (as one line).
Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
If not present, defaults to 'gamepad'.
\end_layout
\begin_layout Subsection
Member: port2
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
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'.
\end_layout
\begin_layout Subsection
Member: gamename
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
Contains name of the game (as one line).
\end_layout
\begin_layout Subsection
Member: authors
\end_layout
\begin_layout Standard
Contains authors, one per line.
Part before '|' is the full name, part after is the nickname.
\end_layout
\begin_layout Subsection
Member: systemid
\end_layout
\begin_layout Standard
Always
\begin_inset Quotes eld
\end_inset
lsnes-rr1
\begin_inset Quotes erd
\end_inset
2011-09-21 19:32:36 +03:00
(one line).
Used to reject other saves.
\end_layout
\begin_layout Subsection
Member: controlsversion
\end_layout
\begin_layout Standard
Always
\begin_inset Quotes eld
\end_inset
0
\begin_inset Quotes erd
\end_inset
2011-09-21 19:32:36 +03:00
(one line).
Used to identify what controls are there.
\end_layout
\begin_layout Subsection
Member:
\begin_inset Quotes eld
\end_inset
coreversion
\begin_inset Quotes erd
\end_inset
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
Contains bsnes core version number (as one line).
\end_layout
\begin_layout Subsection
Member: projectid
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
Contains project ID (as one line).
Used to identify if two movies are part of the same project.
\end_layout
\begin_layout Subsection
Member: {rom,slota,slotb}{,xml}.sha256
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
Contains SHA-256 of said ROM or ROM mapping file (as one line).
Absent if corresponding file is absent.
\end_layout
\begin_layout Subsection
Member: moviesram.<name>
\end_layout
\begin_layout Standard
Raw binary startup SRAM of kind <name>.
Only present in savestates and movies starting from SRAM.
\end_layout
\begin_layout Subsection
Member: saveframe
\end_layout
\begin_layout Standard
Contains frame number (as one line) of frame movie was saved on.
Only present in savestates.
\end_layout
\begin_layout Subsection
Member: lagcounter
\end_layout
\begin_layout Standard
Current value of lag counter (as one line).
Only present in savestates.
\end_layout
\begin_layout Subsection
Member: pollcounters
\end_layout
\begin_layout Standard
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.
2011-09-21 19:32:36 +03:00
\end_layout
\begin_layout Subsection
Member: hostmemory
\end_layout
\begin_layout Standard
Raw binary dump of host memory.
Only present in savestates.
\end_layout
\begin_layout Subsection
Member: savestate
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
The raw binary savestate itself.
Savestate detection uses this file, only present in savestates.
\end_layout
\begin_layout Subsection
Member: screenshot
\end_layout
\begin_layout Standard
Screenshot of current frame.
Only present in savestates.
2011-10-22 18:35:13 +03:00
First 2 bytes are big-endian width of image, rest are 24-bit RGB image
data.
2011-09-21 19:32:36 +03:00
Height of image is inferred from the width and size of data.
\end_layout
\begin_layout Subsection
Member: sram.<name>
\end_layout
\begin_layout Standard
Raw binary SRAM of kind <name> at time of savestate.
Only present in savestates.
\end_layout
\begin_layout Subsection
Member: input
\end_layout
\begin_layout Standard
The actual input track, one line per subframe (blank lines are skipped).
\end_layout
\begin_layout Itemize
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.
\end_layout
\begin_layout Itemize
First subframe must start a new frame.
\end_layout
\begin_layout Standard
Length of movie in frames is number of lines in input file that start a
new frame.
\end_layout
2012-09-08 20:51:38 +03:00
\begin_layout Subsection
Member: subtitles
\end_layout
\begin_layout Standard
Subtitle track.
Optional.
\end_layout
\begin_layout Itemize
Each line is in form <firstframe> <numframes> <text>.
\end_layout
\begin_layout Itemize
Linefeed is encoded as
\backslash
n, backslash is encoded as
\backslash
\backslash
.
\end_layout
\begin_layout Subsection
Member: rerecords
\end_layout
\begin_layout Standard
2011-09-21 19:32:36 +03:00
Contains textual base-10 rerecord count (as one line; emulator just writes
this, it doesn't read it) + 1.
\end_layout
\begin_layout Subsection
Member: rrdata
\end_layout
\begin_layout Standard
This member stores set of load IDs.
There is one load ID per rerecord (plus one corresponding to start of project).
\end_layout
\begin_layout Itemize
This member constists of concatenation of records
\end_layout
\begin_layout Itemize
Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
IDs.
\end_layout
\begin_layout Itemize
IDs are interpretted as 256-bit big-endian integers with warparound.
\end_layout
\begin_layout Itemize
Initial predicted ID is all zeroes.
\end_layout
\begin_layout Standard
Format of each record is:
\end_layout
\begin_layout Itemize
1 byte: Opcode byte.
Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
Bit 7 is unused.
\end_layout
\begin_layout Itemize
32-prefixlen bytes of ID.
\end_layout
\begin_layout Itemize
countlen bytes of big-endian count (count).
\end_layout
\begin_layout Standard
Records are processed as follows:
\end_layout
\begin_layout Itemize
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.
\end_layout
\begin_layout Itemize
If countlen is 0, record encodes 1 ID.
\end_layout
\begin_layout Itemize
If countlen is 1, record encodes 2+count IDs.
\end_layout
\begin_layout Itemize
If countlen is 2, record encodes 258+count IDs.
\end_layout
\begin_layout Itemize
If countlen is 3, record encodes 65794+count IDs.
\end_layout
\begin_layout Itemize
The new predicted ID is the next ID after last one encoded by the record.
\end_layout
\begin_layout Standard
The number of rerecords + 1 is equal to the sum of number of IDs encoded
by all records.
\end_layout
2011-09-24 23:12:49 +03:00
\begin_layout Subsection
Member: starttime.second
\end_layout
\begin_layout Standard
Movie starting time, second part.
Epoch is Unix epoch.
Default is 1,000,000,000.
\end_layout
\begin_layout Subsection
Member: starttime.subsecond
\end_layout
\begin_layout Standard
Movie starting time, subsecond part.
Unit is CPU clocks.
2011-09-24 23:12:49 +03:00
Default is 0.
\end_layout
\begin_layout Subsection
Member: savetime.second
\end_layout
\begin_layout Standard
Movie saving time, second part.
Default is starttime.second.
Only present in savestates.
2011-09-24 23:12:49 +03:00
\end_layout
\begin_layout Subsection
Member: savetime.subsecond
\end_layout
\begin_layout Standard
Movie saving time, subsecond part.
Default is starttime.subsecond.
Only present in savestates.
2011-09-24 23:12:49 +03:00
\end_layout
2012-09-23 19:16:30 +03:00
\begin_layout Section
lsvs file format (commentary tracks)
\end_layout
\begin_layout Subsection
Clusters
\end_layout
\begin_layout Itemize
Each cluster is 8kB (8192 bytes) in size.
\end_layout
\begin_layout Itemize
Cluster n starts at offset 8192*n in file.
\end_layout
\begin_layout Itemize
The following clusters are system special:
\end_layout
\begin_deeper
\begin_layout Itemize
Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
\end_layout
\begin_layout Itemize
Cluster 1 (superblock)
\end_layout
\end_deeper
\begin_layout Subsection
Cluster tables
\end_layout
\begin_layout Itemize
The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
last 11 bits of n).
\end_layout
\begin_layout Itemize
This cluster table consists of 2048 4-byte big-endian integers.
\end_layout
\begin_layout Itemize
Each entry describes a cluster in 16MB supercluster, in order.
\end_layout
\begin_layout Itemize
The valid values for entries are:
\end_layout
\begin_deeper
\begin_layout Itemize
0x00000000: Free cluster
\end_layout
\begin_layout Itemize
0x00000001: Last cluster in chain.
\end_layout
\begin_layout Itemize
0xFFFFFFFF: System cluster (cluster tables and superblock)
\end_layout
\begin_layout Itemize
(anything else): Number of next cluster in chain.
Must not be multiple of 2048.
\end_layout
\end_deeper
\begin_layout Itemize
Due to limitations of the format, there can be at most 2097052 superclusters,
giving maximum file size of 16TB.
\end_layout
\begin_layout Subsection
Stream table
\end_layout
\begin_layout Itemize
The stream table chain always starts in cluster 2.
\end_layout
\begin_layout Itemize
Otherwise, it follows normal chaining.
\end_layout
\begin_layout Itemize
The stream table consists of 16-byte entries:
\end_layout
\begin_deeper
\begin_layout Itemize
The first 8 bytes of entry give big-endian beginning position of stream
in units of 1/48000 s.
\end_layout
\begin_layout Itemize
The next 4 bytes of entry give big-endian beginning cluster for control
data.
0 here marks the entry as not present.
\end_layout
\begin_layout Itemize
The last 4 bytes of entry give big-endian beginning cluster for codec data.
\end_layout
\end_deeper
\begin_layout Itemize
Stream table clusters are normal clusters, following normal chaining.
\end_layout
\begin_layout Itemize
The stream begnning position is not guarenteed unique.
There can be multiple streams with the same starting position in the file.
\end_layout
\begin_layout Subsection
Stream control data
\end_layout
\begin_layout Itemize
The stream control data consists of entries 4 bytes each:
\end_layout
\begin_deeper
\begin_layout Itemize
The first 2 bytes of entry gives big-endian length of packet
\end_layout
\begin_layout Itemize
The next byte of entry gives audio length of packet in units of 1/400 s.
\end_layout
\begin_layout Itemize
The last byte is control byte.
\end_layout
\begin_deeper
\begin_layout Itemize
0 means this entry is not present and the control data ends.
\end_layout
\begin_layout Itemize
1 is valid control entry.
\end_layout
\end_deeper
\end_deeper
\begin_layout Itemize
The stream control data can also end by running into end of the readable
chain.
\end_layout
\begin_deeper
\begin_layout Itemize
This happens if there happens to be exact multiple of 2048 packets in stream
and number of packets is nonzero.
\end_layout
\end_deeper
\begin_layout Itemize
These clusters follow normal chaining.
\end_layout
\begin_layout Subsection
Stream codec data
\end_layout
\begin_layout Itemize
Stream codec data consists of raw Opus data packets packed back to back
with nothing in between.
\end_layout
\begin_layout Itemize
Warning: Due to internal limitations, this data must reside in the first
65536 superclusters (that is, the first 1TB of the file).
\end_layout
\begin_layout Subsection
Superblock
\end_layout
\begin_layout Itemize
The superblock is stored in cluster 1.
\end_layout
\begin_layout Itemize
The first 11 bytes are
\begin_inset Quotes eld
\end_inset
sefs-magic
\begin_inset Quotes erd
\end_inset
<NUL>.
\end_layout
\begin_layout Itemize
The rest are unused.
\end_layout
\begin_layout Itemize
This cluster 1 is marked as system special.
\end_layout
\begin_layout Section
Known ROM extensions
\end_layout
\begin_layout Itemize
SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
\end_layout
\begin_layout Itemize
DMG cartridge ROMs: dmg, gb.
\end_layout
\begin_layout Itemize
GBC cartridge ROMs: cgb, gbc.
\end_layout
2012-08-24 21:39:58 +03:00
\begin_layout Section
Gamepack files
\end_layout
\begin_layout Itemize
The first line must be:
\begin_inset Quotes eld
\end_inset
[GAMEPACK FILE]
\begin_inset Quotes erd
\end_inset
.
\end_layout
\begin_layout Itemize
There is one needed line:
\begin_inset Quotes eld
\end_inset
type <systype>
\begin_inset Quotes erd
\end_inset
.
This sets system type to <systype>.
The following system types are valid:
2012-08-24 21:39:58 +03:00
\end_layout
\begin_deeper
\begin_layout Itemize
snes (SNES)
\end_layout
\begin_layout Itemize
bsx (BS-X non-slotted)
\end_layout
\begin_layout Itemize
bsxslotted (BS-X slotted)
\end_layout
\begin_layout Itemize
sufamiturbo (Sufami Turbo)
\end_layout
\begin_layout Itemize
sgb (Super Game Boy)
\end_layout
\begin_layout Itemize
dmg (Game Boy)
\end_layout
\begin_layout Itemize
gbc (Game Boy Color)
\end_layout
\begin_layout Itemize
gbc_gba (Game Boy Color with GBA initial register values)
2012-08-24 21:39:58 +03:00
\end_layout
\end_deeper
\begin_layout Itemize
Optionally a region can be specified:
2012-08-24 21:39:58 +03:00
\begin_inset Quotes eld
\end_inset
region <region>
\begin_inset Quotes erd
\end_inset
.
The following values are valid:
2012-08-24 21:39:58 +03:00
\end_layout
\begin_deeper
\begin_layout Itemize
autodetect (Autodetect region: snes and sgb only)
\end_layout
\begin_layout Itemize
ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
\end_layout
\begin_layout Itemize
pal (PAL: snes, sgb)
\end_layout
\begin_layout Itemize
world (World: dmg, gbc, gbc_gba)
2012-08-24 21:39:58 +03:00
\end_layout
\end_deeper
\begin_layout Itemize
ROM images are loaded as:
2012-08-24 21:39:58 +03:00
\begin_inset Quotes eld
\end_inset
rom <type> <file>
\begin_inset Quotes erd
\end_inset
.
The following types are valid:
2012-08-24 21:39:58 +03:00
\end_layout
\begin_deeper
\begin_layout Itemize
rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
BIOS in bsx, bsxslotted, sufamiturbo)
\end_layout
\begin_layout Itemize
bsx (Cartridge ROM in bsx, bsxslotted)
\end_layout
\begin_layout Itemize
slot-a (Cartridge ROM in sufamiturbo)
\end_layout
\begin_layout Itemize
slot-b (Cartridge ROM in sufamiturbo)
2012-08-24 21:39:58 +03:00
\end_layout
\end_deeper
\begin_layout Itemize
ROM markup can be loaded as:
2012-08-24 21:39:58 +03:00
\begin_inset Quotes eld
\end_inset
xml <type> <file>
\begin_inset Quotes erd
\end_inset
.
The types valid are the same as for ROMs.
2012-08-24 21:39:58 +03:00
\end_layout
\begin_layout Itemize
Patches can be loaded as
\begin_inset Quotes eld
\end_inset
patch[<offset>] <type> <file>
2012-08-24 21:39:58 +03:00
\begin_inset Quotes erd
\end_inset
.
The types are the same as for ROMs.
\end_layout
\begin_deeper
\begin_layout Itemize
Offset is given in form [+-]<number>.
Usually offset is either +0 or -512.
2012-08-24 21:39:58 +03:00
\end_layout
\begin_layout Itemize
Default offset is +0.
\end_layout
\end_deeper
2012-08-24 21:39:58 +03:00
\begin_layout Subsection
Example:
\end_layout
\begin_layout LyX-Code
[GAMEPACK FILE]
\end_layout
\begin_layout LyX-Code
type snes
\end_layout
\begin_layout LyX-Code
rom rom speedygonzales.sfc
\end_layout
\begin_layout LyX-Code
patch-512 rom sonicthehedgehog.ips
2012-08-24 21:39:58 +03:00
\end_layout
\begin_layout Subsection
Example 2:
\end_layout
\begin_layout LyX-Code
[GAMEPACK FILE]
\end_layout
\begin_layout LyX-Code
type sgb
\end_layout
\begin_layout LyX-Code
rom rom supergameboy.sfc
\end_layout
\begin_layout LyX-Code
rom dmg megamanV.dmg
2012-08-24 21:39:58 +03:00
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Section
Quick'n'dirty encode guide
\end_layout
\begin_layout Enumerate
2012-08-24 21:39:58 +03:00
Start the emulator and load the ROM and movie file.
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Enumerate
Set large AVI option 'set-setting avi-large on'
\end_layout
\begin_layout Enumerate
2012-01-06 18:31:18 +02:00
Enable dumping 'dump-avi tmpdump'
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Enumerate
Unpause and let it run until you want to end dumping.
\end_layout
\begin_layout Enumerate
Close the emulator (closing the window is the easiest way).
Or use 'end-avi'.
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Enumerate
For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
-o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
\end_layout
\begin_layout Enumerate
Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
\end_layout
\begin_layout Enumerate
Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
+ tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
\end_layout
\begin_layout Enumerate
Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
Now final.mkv contains quick'n'dirty encode.
\end_layout
\begin_layout Section
Axis configurations for some gamepad types:
\end_layout
\begin_layout Subsection
XBox360 controller:
\end_layout
\begin_layout Standard
Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis2 pressure-+
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis5 pressure-+
\end_layout
2012-01-11 15:24:36 +02:00
\begin_layout Itemize
This is needed for SDL only.
EVDEV sets those types correctly.
\end_layout
\begin_layout Subsection
PS3
\begin_inset Quotes eld
\end_inset
sixaxis
\begin_inset Quotes erd
\end_inset
controller:
\end_layout
\begin_layout Standard
Axes 8-19 should be disabled.
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis8 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis9 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis10 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis11 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis12 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis13 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis14 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis15 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis16 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis17 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis18 disabled
\end_layout
\begin_layout LyX-Code
set-axis joystick0axis19 disabled
\end_layout
\begin_layout Section
Errata:
\end_layout
\begin_layout Subsection
Problems from BSNES core:
\end_layout
\begin_layout Itemize
The whole pending save stuff.
\end_layout
\begin_layout Itemize
Lack of layer hiding.
\end_layout
\begin_layout Itemize
2012-01-11 15:24:36 +02:00
It is slow (especially accuracy).
\end_layout
\begin_layout Itemize
Firmwares can't be loaded from ZIP archives.
\end_layout
\begin_layout Subsection
Other problems:
\end_layout
2011-09-23 22:46:43 +03:00
\begin_layout Itemize
2011-12-18 18:18:08 +02:00
Modifiers don't work with pseudo-keys (SDL, EVDEV).
2011-09-23 22:46:43 +03:00
\end_layout
\begin_layout Itemize
Audio for last dumped frame is not itself dumped.
\end_layout
\begin_layout Itemize
2012-01-11 15:24:36 +02:00
Audio in UI is pretty bad in quality if game doesn't run at full speed.
\end_layout
\begin_layout Itemize
No menus, command based interface (SDL).
\end_layout
\begin_layout Itemize
Long commands don't scroll.
\end_layout
2011-09-13 22:17:55 +03:00
\begin_layout Section
Changelog:
\end_layout
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta1
2011-09-13 22:17:55 +03:00
\end_layout
\begin_layout Itemize
Fix -Wall warnings
\end_layout
\begin_layout Itemize
Fix dumper video corruption with levels 10-18.
\end_layout
2011-09-18 02:20:30 +03:00
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta2
2011-09-18 02:20:30 +03:00
\end_layout
\begin_layout Itemize
Autofire
\end_layout
\begin_layout Itemize
Lots of code cleanups
\end_layout
\begin_layout Itemize
Lua interface to settings
\end_layout
\begin_layout Itemize
Allow specifying AVI borders without Lua
\end_layout
\begin_layout Itemize
Fix scaling if vscale > 1 and originx > 0 (left border exists)
\end_layout
\begin_layout Itemize
on_snoop lua callback
\end_layout
\begin_layout Itemize
Faster movie loading and saving.
\end_layout
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta3
2011-09-18 02:20:30 +03:00
\end_layout
\begin_layout Itemize
Joystick support
\end_layout
2011-09-18 02:49:14 +03:00
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta4
2011-09-18 02:49:14 +03:00
\end_layout
\begin_layout Itemize
Fix multi-buttons
\end_layout
\begin_layout Itemize
Save jukebox functionality.
\end_layout
2011-09-18 10:22:28 +03:00
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta5
2011-09-18 10:22:28 +03:00
\end_layout
\begin_layout Itemize
Try to fix some nasty failing movie load edge cases
\end_layout
\begin_layout Itemize
Allow specifying scripts to run on command line.
\end_layout
2011-09-18 19:41:35 +03:00
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta6
2011-09-18 19:41:35 +03:00
\end_layout
\begin_layout Itemize
Major source code reorganization.
\end_layout
\begin_layout Itemize
Backup savestates before overwriting.
\end_layout
\begin_layout Itemize
Don't crash if loading initial state fails.
\end_layout
2011-09-20 00:25:04 +03:00
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta7
2011-09-20 00:25:04 +03:00
\end_layout
\begin_layout Itemize
Fix firmware lookup
\end_layout
\begin_layout Itemize
Fix author name parsing
\end_layout
\begin_layout Itemize
Fix rerecord counting
\end_layout
\begin_layout Itemize
(SDL) Print messages to console if SDL is uninitialized
\end_layout
\begin_layout Itemize
2011-09-20 22:05:49 +03:00
Add movieinfo program
\end_layout
2011-09-20 00:25:04 +03:00
2011-09-20 22:05:49 +03:00
\begin_layout Itemize
Fix loading movies starting from SRAM.
2011-09-20 00:25:04 +03:00
\end_layout
2011-09-21 16:01:19 +03:00
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta8
2011-09-21 16:01:19 +03:00
\end_layout
\begin_layout Itemize
Add support for unattended dumping
\end_layout
\begin_layout Itemize
Fix compiling for Win32
\end_layout
\begin_layout Itemize
Don't lock up if sound can't be initialized
\end_layout
\begin_layout Itemize
Strip trailing CR from commands
\end_layout
\begin_layout Itemize
Don't try to do dubious things in global ctors (fix crash on startup)
\end_layout
2011-09-22 08:05:15 +03:00
\begin_layout Subsection
2011-09-23 22:46:43 +03:00
rr0-beta9
2011-09-22 08:05:15 +03:00
\end_layout
\begin_layout Itemize
Small documentation tweaking
\end_layout
\begin_layout Itemize
Fix make clean
\end_layout
\begin_layout Itemize
Fix major bug in modifier matching
\end_layout
2011-09-23 23:35:52 +03:00
\begin_layout Subsection
rr0-beta10
\end_layout
\begin_layout Itemize
Lots of documentation fixes
\end_layout
\begin_layout Itemize
Use dedicated callbacks for event backcomm., not commands.
\end_layout
\begin_layout Itemize
Ensure that the watchdog is not hit when executing delayed reset.
\end_layout
\begin_layout Itemize
Remove errant tab from joystick message.
\end_layout
2011-09-24 19:38:27 +03:00
\begin_layout Subsection
rr0-beta11
\end_layout
\begin_layout Itemize
Make autofire operate in absolute time, not linear time
\end_layout
\begin_layout Itemize
Reinitialize controls when resuming from loadstate
\end_layout
\begin_layout Itemize
Some more code cleanups
\end_layout
\begin_layout Itemize
If Lua allocator fails, call OOM_panic()
\end_layout
\begin_layout Itemize
Byte/word/dword/qword sized host memory write/read functions.
\end_layout
\begin_layout Itemize
Dump at correct framerate if dumping interlaced NTSC (height=448).
\end_layout
2011-09-24 21:07:25 +03:00
\begin_layout Subsection
rr0-beta12
\end_layout
\begin_layout Itemize
Actually include the complete source code
\end_layout
\begin_layout Itemize
Keep track of RTC
\end_layout
2011-09-25 02:22:18 +03:00
\begin_layout Subsection
rr0-beta13
\end_layout
\begin_layout Itemize
Document {save,start}time.{,sub}second.
\end_layout
\begin_layout Itemize
Intercept time() from bsnes core.
\end_layout
2011-10-01 13:05:03 +03:00
\begin_layout Subsection
rr0-beta14
\end_layout
\begin_layout Itemize
Allow disabling time() interception (allow build on Mac OS X)
\end_layout
\begin_layout Itemize
Use SDLMain on Mac OS X (make SDL not crash)
\end_layout
\begin_layout Itemize
Disable delayed resets (just plain too buggy for now).
\end_layout
\begin_layout Itemize
Code cleanups
\end_layout
\begin_layout Itemize
Use 16-bit for graphics/video instead of 32-bit.
\end_layout
\begin_layout Itemize
gui.rectangle/gui.pixel
\end_layout
\begin_layout Itemize
gui.crosshair
\end_layout
\begin_layout Itemize
New CSCD writer implementation.
\end_layout
2011-10-05 19:26:53 +03:00
\begin_layout Subsection
rr0-beta15
\end_layout
\begin_layout Itemize
Fix interaction of * and +.
\end_layout
\begin_layout Itemize
Manual improvements
\end_layout
\begin_layout Itemize
Use gettimeofday()/usleep(), these seem portable enough.
\end_layout
\begin_layout Itemize
Move joystick axis manipulation to keymapper code.
\end_layout
\begin_layout Itemize
Changes to how read-only works.
\end_layout
\begin_layout Itemize
Refactor controller input code.
\end_layout
2011-10-10 08:28:30 +03:00
\begin_layout Subsection
rr0-beta16
\end_layout
\begin_layout Itemize
Fix mouseclick scale compensation.
\end_layout
\begin_layout Itemize
Draw area boundaries correctly in SDL code.
\end_layout
\begin_layout Itemize
gui.screenshot.
\end_layout
\begin_layout Itemize
Fix CSCD output (buffer overrun and race condition).
\end_layout
2011-10-21 15:19:24 +03:00
\begin_layout Subsection
rr0-beta17
\end_layout
\begin_layout Itemize
JMD dumping support.
\end_layout
\begin_layout Itemize
Allow unattended dumping to JMD.
\end_layout
\begin_layout Itemize
Move to BSNES v083.
\end_layout
\begin_layout Itemize
Switch back to 32-bit colors.
\end_layout
\begin_layout Itemize
Add Lua function gui.color.
\end_layout
\begin_layout Itemize
Use some new C++11 features in GCC 4.6.
\end_layout
\begin_layout Itemize
Be prepared for core frequency changes.
\end_layout
\begin_layout Itemize
Pass colors in one chunk from Lua.
\end_layout
2011-11-01 00:25:48 +02:00
\begin_layout Subsection
rr0-beta18
\end_layout
\begin_layout Itemize
New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
memory.read_vma() and memory.find_vma().
\end_layout
\begin_layout Itemize
Numerious documentation fixups
\end_layout
\begin_layout Itemize
RTC time format changed
\end_layout
\begin_layout Itemize
Reformat flags display
\end_layout
\begin_layout Itemize
Allow lua package name to be overridden
\end_layout
\begin_layout Itemize
SDUMP (high-quality dumping).
\end_layout
\begin_layout Itemize
Split platform support to plugins.
\end_layout
\begin_layout Itemize
Make all sound plugins support basic sound commands
\end_layout
\begin_layout Itemize
Support portaudio for sound.
\end_layout
\begin_layout Itemize
Allow disable Lua/SDL searching.
\end_layout
\begin_layout Itemize
Upconvert colors when copying lcscreen to screen.
\end_layout
\begin_layout Itemize
Reorganize source tree.
\end_layout
\begin_layout Itemize
Evdev joystick support.
\end_layout
\begin_layout Itemize
Refactor more code into generic window code.
\end_layout
2011-11-05 20:57:47 +02:00
\begin_layout Subsection
rr0-beta19
\end_layout
\begin_layout Itemize
Refactor message handling.
\end_layout
\begin_layout Itemize
Rework makefile
\end_layout
\begin_layout Itemize
Documentation fixes
\end_layout
\begin_layout Itemize
Finish pending saves before load/quit.
\end_layout
\begin_layout Itemize
Wxwidgets graphics plugin.
\end_layout
2011-11-09 00:05:57 +02:00
\begin_layout Subsection
rr0-beta20
\end_layout
\begin_layout Itemize
Get rid of win32-crap.[ch]pp.
\end_layout
\begin_layout Itemize
Move files around a lot.
\end_layout
\begin_layout Itemize
Get rid of need for host C++ compiler.
\end_layout
\begin_layout Itemize
Bsnes v084 core.
\end_layout
\begin_layout Itemize
Refactor inter-component communication.
\end_layout
\begin_layout Itemize
Fix zero luma.
\end_layout
\begin_layout Itemize
Fix crash on multiline aliases.
\end_layout
\begin_layout Itemize
Load/Save settings in wxwidgets gui.
\end_layout
2011-11-09 20:04:07 +02:00
\begin_layout Subsection
rr0-beta21
\end_layout
\begin_layout Itemize
Patch problems in bsnes core
\end_layout
\begin_layout Itemize
SNES is little-endian, not big-endian!
\end_layout
\begin_layout Itemize
Fix memory corruption in lcscreen::load()
\end_layout
2011-11-12 00:46:27 +02:00
\begin_layout Subsection
rr0-beta22
\end_layout
\begin_layout Itemize
Fix interpretting repeat counts in rrdata loading.
\end_layout
\begin_layout Itemize
New lua callback: on_frame()
\end_layout
\begin_layout Itemize
Remove calls to runtosave() that aren't supposed to be there
\end_layout
\begin_layout Itemize
Lua function: movie.read_rtc()
\end_layout
\begin_layout Itemize
Ignore src/fonts/font.cpp
\end_layout
\begin_layout Itemize
Fix more bsnes core problems
\end_layout
\begin_layout Itemize
Control bsnes random seeding
\end_layout
\begin_layout Itemize
Pause-on-end
\end_layout
\begin_layout Itemize
Some bsnes core debugging features (state dump and state hash)
\end_layout
\begin_layout Itemize
Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
it was 'lsnes rr0-beta21').
\end_layout
2011-11-20 10:10:11 +02:00
\begin_layout Subsection
rr0-beta23
\end_layout
\begin_layout Itemize
Fix memory corruption due to macro/field mixup
\end_layout
\begin_layout Itemize
search-memory update
\end_layout
\begin_layout Itemize
Allow direct-mapped framebuffer
\end_layout
\begin_layout Itemize
SDL: Use SDL_ANYFORMAT if possible
\end_layout
\begin_layout Itemize
SDMP2SOX: 2s delay modes.
\end_layout
\begin_layout Itemize
Wxwidgets: Cleanups
\end_layout
\begin_layout Itemize
Use sed -E, not sed -r.
Fixes building on Mac OS X.
\end_layout
\begin_layout Itemize
Wxwidgets: Save jukebox on exit
\end_layout
\begin_layout Itemize
Fix RTC if using load-movie on savestate.
\end_layout
\begin_layout Itemize
Fix crash related to full console mode.
\end_layout
2011-11-26 16:29:52 +02:00
\begin_layout Subsection
rr0-beta24
\end_layout
\begin_layout Itemize
Wxwidgets: Allow bringing application to foreground on Mac OS X.
\end_layout
\begin_layout Itemize
Wxwidgets: Allow compiling on Mac OS X.
\end_layout
\begin_layout Itemize
Use movie compare instead of movie hashing (faster save/load).
\end_layout
\begin_layout Itemize
Lua: _SYSTEM table.
\end_layout
2011-12-03 10:42:33 +02:00
\begin_layout Subsection
rr0-beta25
\end_layout
\begin_layout Itemize
sdmp2sox: Pad soundtrack if using -l or -L.
\end_layout
\begin_layout Itemize
sdmp2sox: Fix NTSC overscan.
\end_layout
\begin_layout Itemize
sdmp2sox: Add AR correction mode.
\end_layout
\begin_layout Itemize
call lua_close() when exiting.
\end_layout
\begin_layout Itemize
Fix zip_writer bug causing warnings from info-zip and error from advzip.
\end_layout
2011-12-12 19:17:40 +02:00
\begin_layout Subsection
rr0-beta26
\end_layout
\begin_layout Itemize
Fix IPS patching code (use bsnes core IPS patcher).
\end_layout
\begin_layout Itemize
Implement BPS patching (using bsnes core IPS patcher).
\end_layout
\begin_layout Itemize
Add feature to load headered ROMs.
\end_layout
\begin_layout Subsection
rr0-beta27
\end_layout
\begin_layout Itemize
Show command names when showing keybindings
\end_layout
2011-12-18 18:18:08 +02:00
\begin_layout Subsection
rr0
\end_layout
\begin_layout Itemize
Fix pause-on-end to be actually controllable
\end_layout
\begin_layout Itemize
SDL: Poll all events in queue, not just first one (fixes slowness in command
typing)
\end_layout
\begin_layout Itemize
Wxwidgets: Fix ROM loading.
\end_layout
2012-01-06 18:31:18 +02:00
\begin_layout Subsection
rr1-beta0
\end_layout
\begin_layout Itemize
Lua: Add gui.textH, gui.textV, gui.textHV
\end_layout
\begin_layout Itemize
Fix text colors on SDL on Mac OS X
\end_layout
\begin_layout Itemize
Mode 'F' for finished in readonly mode.
\end_layout
\begin_layout Itemize
Fix some WS errors.
\end_layout
\begin_layout Itemize
Reliably pause after skip poll
\end_layout
\begin_layout Itemize
Split UI and core into their own threads
\end_layout
\begin_layout Subsection
rr1-beta1
\end_layout
\begin_layout Itemize
Remove leftover dummy SRAM slot
\end_layout
\begin_layout Itemize
Fix controller numbers.
\end_layout
\begin_layout Subsection
rr1-beta2
\end_layout
\begin_layout Itemize
Fix lsnes-dumpavi after interface change.
\end_layout
\begin_layout Itemize
Also give BSNES patches for v085.
\end_layout
\begin_layout Itemize
Pack movie data in memory.
\end_layout
2012-01-11 15:05:01 +02:00
\begin_layout Subsection
2012-01-10 01:15:50 +02:00
rr1-beta3
\end_layout
\begin_layout Itemize
Fix framecount/length given when loading movies.
\end_layout
\begin_layout Itemize
Controller command memory leak fixes.
\end_layout
\begin_layout Itemize
Don't leak palette if freeing screen object.
\end_layout
2012-01-11 15:05:01 +02:00
\begin_layout Subsection
rr1-beta4
\end_layout
\begin_layout Itemize
Detect revisions.
\end_layout
\begin_layout Itemize
Wxwidgets: Allow controlling dumper from the menu.
\end_layout
2012-01-11 16:41:23 +02:00
\begin_layout Subsection
rr1-beta5
\end_layout
\begin_layout Itemize
Rewrite parts of manual
\end_layout
\begin_layout Itemize
Lua: Make it work with Lua 5.2.
\end_layout
2012-01-11 17:31:25 +02:00
\begin_layout Subsection
rr1-beta6
\end_layout
\begin_layout Itemize
Win32: Fix compile errors.
\end_layout
2012-01-12 19:24:27 +02:00
\begin_layout Subsection
rr1-beta7
\end_layout
\begin_layout Itemize
Refactor controller input code.
\end_layout
\begin_layout Itemize
Fix crash when using command line on SDL / Mac OS X.
\end_layout
2012-01-14 01:06:14 +02:00
\begin_layout Subsection
rr1-beta8
\end_layout
\begin_layout Itemize
Delete core/coroutine (obsolete)
\end_layout
\begin_layout Itemize
Lag input display by one frame.
\end_layout
\begin_layout Itemize
Rewind movie to beginning function.
\end_layout
\begin_layout Itemize
Fix wrong frame number reported to Lua when repainting after loadstate
\end_layout
\begin_layout Itemize
Support UI editing of jukebox
\end_layout
\begin_layout Itemize
Wxwidgets: Save settings on exit.
\end_layout
\begin_layout Itemize
Support ${project} for filenames
\end_layout
\begin_layout Itemize
SDL: Fix command history
\end_layout
\begin_layout Subsection
rr1-beta9
\end_layout
\begin_layout Itemize
Fix some order-of-global-ctor bugs.
\end_layout
2012-01-14 11:44:27 +02:00
\begin_layout Subsection
rr1-beta10
\end_layout
\begin_layout Itemize
Fix crashes when quitting on Win32.
\end_layout
2012-01-15 01:56:37 +02:00
\begin_layout Subsection
rr1-beta11
\end_layout
\begin_layout Itemize
EVDEV: Queue keypresses from joystick, don't send directly
\end_layout
\begin_layout Itemize
Wxwidgets: Load-Preserve that actually works.
\end_layout
2012-01-15 20:50:42 +02:00
\begin_layout Subsection
rr1-beta12
\end_layout
\begin_layout Itemize
Wxwidgets: GUI for memory search.
\end_layout
\begin_layout Itemize
Warn about using synchronous queue in UI callback.
\end_layout
2012-01-18 00:59:20 +02:00
\begin_layout Subsection
rr1-beta13
\end_layout
\begin_layout Itemize
Remember last saved file for each ROM
\end_layout
\begin_layout Itemize
Support MT dumping via boost.
\end_layout
\begin_layout Itemize
Lua: input.raw
\end_layout
\begin_layout Itemize
Lua: input.keyhook
\end_layout
\begin_layout Itemize
Make mouse be ordinary input instead of special-casing
\end_layout
\begin_layout Itemize
SDL: Don't screw up commands with NUL codepoints.
\end_layout
2012-01-19 19:04:15 +02:00
\begin_layout Subsection
rr1-beta14
\end_layout
\begin_layout Itemize
Merge status panel and main window
\end_layout
\begin_layout Itemize
True movie slot support (the rest of it)
\end_layout
\begin_layout Itemize
SDL: Fix compilation error
\end_layout
\begin_layout Itemize
Elminate cross calls in dump menu code.
\end_layout
2012-01-20 19:39:16 +02:00
\begin_layout Subsection
rr1-beta15
\end_layout
\begin_layout Itemize
Cancel pending saves command
\end_layout
\begin_layout Itemize
Wxwidgets: Code refactoring
\end_layout
\begin_layout Itemize
Wxwidgets: Fix system -> reset
\end_layout
\begin_layout Itemize
Wxwidgets: Read watch expressions in the right thread
\end_layout
2012-01-21 15:30:33 +02:00
\begin_layout Subsection
rr1-beta16
\end_layout
\begin_layout Itemize
Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
support that).
\end_layout
\begin_layout Itemize
Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
\end_layout
\begin_layout Itemize
Don't append trailing '-' to prefix when saving movie.
\end_layout
\begin_layout Itemize
Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
\end_layout
2012-01-21 21:05:37 +02:00
\begin_layout Subsection
rr1
\end_layout
\begin_layout Itemize
Document memory watch syntax.
\end_layout
2012-02-06 22:02:06 +02:00
\begin_layout Subsection
2012-01-23 13:39:26 +02:00
rr1-delta1
\end_layout
\begin_layout Itemize
Fix unattended dumping (lsnes-dumpavi)
\end_layout
\begin_layout Itemize
Support RAW dumping
\end_layout
\begin_layout Itemize
Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
\end_layout
\begin_layout Itemize
Add option to control sample rate preturbation in AVI dumper
\end_layout
2012-02-06 22:02:06 +02:00
\begin_layout Subsection
rr1-delta2
\end_layout
\begin_layout Itemize
Wxwidgets: Fix dumper submodes
\end_layout
\begin_layout Itemize
Set core controller types before loadstate
\end_layout
\begin_layout Subsection
rr1-delta2epsilon1
\end_layout
\begin_layout Itemize
Fix compiling with bsnes v086.
\end_layout
2012-02-21 15:39:52 +02:00
\begin_layout Subsection
rr1-delta3
\end_layout
\begin_layout Itemize
Don't prompt before quitting
\end_layout
\begin_layout Itemize
Start unpaused, preserve pause/unpause over load.
\end_layout
\begin_layout Itemize
Try to autodetect if ROM is headered.
\end_layout
\begin_layout Itemize
Wxwidgets: Only bring up ROM patching screen if specifically requested.
\end_layout
\begin_layout Itemize
Allow configuring some hotkeys.
\end_layout
2012-03-04 15:46:02 +02:00
\begin_layout Subsection
rr1-delta4
\end_layout
\begin_layout Itemize
Lots of code cleanups
\end_layout
\begin_layout Itemize
Fix JMD compression (JMD dumping was broken)
\end_layout
\begin_layout Itemize
Don't crash if Lua C function throws an exception.
\end_layout
\begin_layout Itemize
Support bitmap drawing in Lua.
\end_layout
\begin_layout Itemize
Fix bsnes v085/v086 patches.
\end_layout
\begin_layout Itemize
Improve stability on win32.
\end_layout
\begin_layout Subsection
rr1-delta4epsilon1
\end_layout
\begin_layout Itemize
Don't corrupt movie if movie length is integer multiple of frames per page.
\end_layout
2012-03-08 15:28:42 +02:00
\begin_layout Subsection
rr1-delta5
\end_layout
\begin_layout Itemize
New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
\end_layout
\begin_layout Itemize
New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
e()
\end_layout
\begin_layout Itemize
Wxwidgets: Fix internal focus lost (hotkeys stop working)
\end_layout
\begin_layout Itemize
Wxwidgets: Fix broken modifiers
\end_layout
\begin_layout Itemize
on_paint has parameter now.
\end_layout
\begin_layout Itemize
Optional initital fill for bitmaps
\end_layout
\begin_layout Itemize
Fix palette changing.
\end_layout
\begin_layout Itemize
Optimize rendering a bit.
\end_layout
\begin_layout Itemize
Bsnes v087 support.
\end_layout
2012-03-10 18:20:03 +02:00
\begin_layout Subsection
rr1-delta5epsilon1
\end_layout
\begin_layout Itemize
Movieinfo: Fix display of port #2 type.
\end_layout
\begin_layout Itemize
Call on_input() after loadstate.
\end_layout
\begin_layout Subsection
rr1-delta5epsilon2
\end_layout
\begin_layout Itemize
Fix writing port2 data to movie.
\end_layout
\begin_layout Itemize
Fix SRAM handling with Bsnes v087.
\end_layout
2012-04-11 22:45:06 +03:00
\begin_layout Subsection
rr1-delta6
\end_layout
\begin_layout Itemize
Library loading support
\end_layout
\begin_layout Itemize
Built-in TSCC encoder
\end_layout
\begin_layout Itemize
Hi-color (256T colors) dumping.
\end_layout
\begin_layout Itemize
Dump over TCP/IP(v6)
\end_layout
\begin_layout Itemize
Hidable status panel
\end_layout
\begin_layout Itemize
Turbo toggle/hold
\end_layout
\begin_layout Itemize
Adjustable sound volume
\end_layout
\begin_layout Itemize
Screen scaling
\end_layout
\begin_layout Itemize
Allow DnD into filename boxes
\end_layout
\begin_layout Itemize
Configurable paths
\end_layout
\begin_layout Itemize
Portaudio: Fix speaker popping at start
\end_layout
\begin_layout Itemize
Lots of UI changes
\end_layout
\begin_layout Itemize
Speed adjustment menu
\end_layout
\begin_layout Itemize
Win32 joystick support
\end_layout
\begin_layout Itemize
Lua: gui.rainbow and gui.box
\end_layout
\begin_layout Itemize
Split key lists into classes (the key list was large!)
\end_layout
\begin_layout Itemize
More save slots support
\end_layout
\begin_layout Itemize
Wxwidgets (wxJoystick) joystick support
\end_layout
2012-04-21 20:29:42 +03:00
\begin_layout Subsection
rr1-delta7
\end_layout
\begin_layout Itemize
Lots of internal joystick refactoring
\end_layout
\begin_layout Itemize
Evdev: Add mapping for BTN_TOOL_QUINTTAP
\end_layout
\begin_layout Itemize
Wxwidgets: Settings mode (open settings without ROM)
\end_layout
\begin_layout Itemize
Wxwidgets: Prompt key to use option
\end_layout
\begin_layout Itemize
Wxwidgets: Fix crash if key goes away underneath
\end_layout
\begin_layout Itemize
Wxwidgets: Fix mouse position in presence of scaling
\end_layout
\begin_layout Itemize
AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
\end_layout
\begin_layout Itemize
Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
seem to work well on WinXP)
\end_layout
\begin_layout Itemize
Start paused option.
\end_layout
2012-04-25 17:15:07 +03:00
\begin_layout Subsection
rr1-delta7epsilon1
\end_layout
\begin_layout Itemize
AVI: ZMBV support
\end_layout
\begin_layout Itemize
lsnes-dumpavi: Start Lua before starting dumper
\end_layout
\begin_layout Itemize
AVI: Fix secondary audio in mode 4.
\end_layout
2012-05-07 20:52:23 +03:00
\begin_layout Subsection
rr1-delta7epsilon2
\end_layout
\begin_layout Itemize
AVI: Refactor ZMBV a bit.
\end_layout
\begin_layout Itemize
Fix error reading analog values from movie file
\end_layout
2012-05-10 15:46:43 +03:00
\begin_layout Subsection
rr1-delta8
\end_layout
\begin_layout Itemize
Delayed reset support
\end_layout
\begin_layout Itemize
Lua: memory.hash_region
\end_layout
2012-05-16 23:33:54 +03:00
\begin_layout Subsection
rr1-delta8epsilon1
\end_layout
\begin_layout Itemize
Rework the build system
\end_layout
\begin_layout Itemize
Typing input support
\end_layout
\begin_layout Itemize
Fix building with bsnes v086 and v087.
\end_layout
\begin_layout Itemize
SDL: Save settings on exit
\end_layout
\begin_layout Itemize
SDL: Command to enter command line mode with given command.
\end_layout
\begin_layout Itemize
SDL: More advanced command editing.
\end_layout
2012-05-22 10:37:12 +03:00
\begin_layout Subsection
rr1-delta9
\end_layout
\begin_layout Itemize
wxMSW: Fix the
\begin_inset Quotes eld
\end_inset
arrow keys and enter don't work
\begin_inset Quotes erd
\end_inset
problem
\end_layout
\begin_layout Itemize
MSU-1 support
\end_layout
\begin_layout Itemize
Show mode changes due to rewinding.
\end_layout
\begin_layout Itemize
Unsafe rewind support
\end_layout
\begin_layout Itemize
Fix directory transversal.
\end_layout
2012-06-07 00:47:52 +03:00
\begin_layout Subsection
rr1-delta10
\end_layout
\begin_layout Itemize
AVI: Sound mode 5 (48kHz high-quality)
\end_layout
\begin_layout Itemize
Lua: Reset Lua VM
\end_layout
\begin_layout Itemize
Map the SNES bus into address space
\end_layout
\begin_layout Itemize
Fix loading memory watch files with CRLF line endings
\end_layout
2012-07-06 18:52:48 +03:00
\begin_layout Subsection
rr1-delta10epsilon1
\end_layout
\begin_layout Itemize
Map bsnes internal state into memory space
\end_layout
\begin_layout Itemize
Fix the
\begin_inset Quotes eld
\end_inset
click on panel wedges the emulator
\begin_inset Quotes erd
\end_inset
for real.
\end_layout
\begin_layout Itemize
DnD movies/saves on the main window.
\end_layout
2012-07-15 22:33:00 +03:00
\begin_layout Subsection
rr1-delta11
\end_layout
\begin_layout Itemize
Split core bindings into own module.
\end_layout
\begin_layout Itemize
Remember invalid settings
\end_layout
\begin_layout Itemize
Support for modified Gambatte core for GB/GBC emulation.
\end_layout
\begin_layout Itemize
Reload/swap ROM function
\end_layout
2012-07-18 17:30:42 +03:00
\begin_layout Subsection
rr1-delta11epsilon1
\end_layout
\begin_layout Itemize
Fix step poll function
\end_layout
2012-07-20 00:23:40 +03:00
\begin_layout Subsection
rr1-delta12
\end_layout
\begin_layout Itemize
Non-insane savestate anchoring
\end_layout
2012-08-30 01:01:27 +03:00
\begin_layout Subsection
rr1-delta13
\end_layout
\begin_layout Itemize
More Memory search methods
\end_layout
\begin_layout Itemize
Preserve movie if loading in RO mode.
\end_layout
\begin_layout Itemize
Fix a obscure case in timeline check
\end_layout
\begin_layout Itemize
Revamp the entiere ROM loading code
\end_layout
\begin_layout Itemize
Support DnD on ROMs
\end_layout
\begin_layout Itemize
Revamp menu layout
\end_layout
\begin_layout Itemize
Standalone hotkey config dialog
\end_layout
\begin_layout Itemize
Show bindings in more user-friendly format
\end_layout
2012-09-01 11:44:09 +03:00
\begin_layout Subsection
rr1-delta13epsilon1
\end_layout
\begin_layout Itemize
Pipedec support
\end_layout
\begin_layout Itemize
Fix uninitialized variables in bsnes v085
\end_layout
2012-09-09 19:18:11 +03:00
\begin_layout Subsection
rr1-delta14
\end_layout
\begin_layout Itemize
Merge gambatte core into mainline (from its own branch)
\end_layout
\begin_layout Itemize
Wxwidgets: Show expected dump file formats
\end_layout
\begin_layout Itemize
Memory watch: Data typing
\end_layout
\begin_layout Itemize
lsnes internal MMIO area.
\end_layout
\begin_layout Itemize
Wxwidgets: New memory watch editor
\end_layout
\begin_layout Itemize
Hexadecimal memory watches
\end_layout
\begin_layout Itemize
Wxwidgets: Monospaced panel
\end_layout
\begin_layout Itemize
Wxwidgets: Split memory watches in panel
\end_layout
\begin_layout Itemize
Wxwidgets: Disable VMAs in memory search
\end_layout
\begin_layout Itemize
lsnes-dumpavi: Fix speed bug
\end_layout
\begin_layout Itemize
Movie subtitle support
\end_layout
\begin_layout Itemize
Fix rerecord count reporting
\end_layout
\begin_layout Itemize
Don't trash movie when loading in readonly mode.
\end_layout
2012-09-21 08:20:26 +03:00
\begin_layout Subsection
rr1-delta14epsilon1
\end_layout
\begin_layout Itemize
Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
\end_layout
\begin_layout Itemize
Fix build on Mac OS X.
\end_layout
\begin_layout Itemize
Lua: loopwrapper
\end_layout
\begin_layout Itemize
Wxwidgets: Hidable messages window
\end_layout
\begin_layout Itemize
Lua: input.joyset
\end_layout
\begin_layout Itemize
Bsnes: Support inconsistent saves
\end_layout
\begin_layout Itemize
Bsnes: Allow simulating saving every frame
\end_layout
\begin_layout Itemize
Fix desync if savestate is loaded in readonly mode in certain conditions.
\end_layout
\begin_layout Itemize
Wxwidgets: Fix save dialogs on Mac OS X.
\end_layout
\begin_layout Itemize
Wxwidgets: Fix insane status width on Win32.
\end_layout
\begin_layout Itemize
Wxwidgets: Fix autohold processing to be faster.
\end_layout
\begin_layout Itemize
Wxwidgets: Allow loading ROMs and movies from commandline.
\end_layout
2012-09-26 08:59:58 +03:00
\begin_layout Subsection
rr1-delta15
\end_layout
\begin_layout Itemize
Be a bit smarter with --load
\end_layout
\begin_layout Itemize
Rewrote higher-level parts of audio system
\end_layout
\begin_layout Itemize
Tool to build commentary tracks
\end_layout
\begin_layout Itemize
Lua: input.joyget
\end_layout
\begin_layout Itemize
Gambatte: Add support for SVN358
\end_layout
\begin_layout Itemize
Use builtin font when rendering status panel.
\end_layout
\begin_layout Itemize
Option to detach memory watch to its own window.
\end_layout
\begin_layout Itemize
Recent ROMs/Movies menu
\end_layout
\begin_layout Itemize
Libao support
\end_layout
\begin_layout Itemize
Useful lag counter for SNES games that autopoll
\end_layout
\begin_layout Itemize
Fix buffer overflow in gambatte sound output
\end_layout
2012-09-27 23:07:06 +03:00
\begin_layout Subsection
rr1-delta15epsilon1
\end_layout
\begin_layout Itemize
Don't blow up on wxGTK if the window is hidden somehow
\end_layout
\begin_layout Itemize
Support simultaneous drop of ROM and movie.
\end_layout
\begin_layout Itemize
Gambatte: Don't save spurious SRAMs.
\end_layout
\begin_layout Itemize
Make SGB ROMs actually usable.
\end_layout
\begin_layout Itemize
Fix so that saved movies appear in recent movies.
\end_layout
\begin_layout Itemize
Don't open multiple commentary editors at once.
\end_layout
2012-09-29 23:00:23 +03:00
\begin_layout Subsection
rr1-delta15epsilon2
\end_layout
\begin_layout Itemize
Lua: memory.readregion/memory.writeregion
\end_layout
\begin_layout Itemize
Lua: memory.map{,s}{byte,word,dword,qword}
\end_layout
\begin_layout Itemize
Lua: memory.map_structure
\end_layout
\begin_layout Itemize
Lua: Fix bus_address for gambatte
\end_layout
\begin_layout Itemize
Fix features dependent of bsnes debugger
\end_layout
\begin_layout Itemize
Cleanup bsnes debugger logic
\end_layout
\begin_layout Itemize
Fix resets in presence of save every frame
\end_layout
2012-10-27 11:17:53 +03:00
\begin_layout Subsection
rr1-delta15epsilon3
\end_layout
\begin_layout Itemize
Lua: input.lcid_to_pcid
\end_layout
\begin_layout Itemize
Fix off-by-one bug with slot hashes
\end_layout
\begin_layout Itemize
Fix crashes on certain memory watch expressions
\end_layout
\begin_layout Itemize
Lua: memory.read_expr
\end_layout
\begin_layout Itemize
Lua: Fix memory.read_expr on nil argument
\end_layout
\begin_layout Itemize
Fix the code to compile on G++ 4.7
\end_layout
\begin_layout Itemize
Change button_id to be a function pointer field, not a virtual method
\end_layout
\begin_layout Itemize
Add bsnes patches to fix libsnes to compile on GCC 4.7
\end_layout
\begin_layout Itemize
Gambatte: Always use legacy lag counting
\end_layout
\begin_layout Itemize
Memory commands: Memory addresses are up to 16 hex digits, not up to 8
\end_layout
\begin_layout Itemize
Fix analog controllers
\end_layout
\begin_layout Itemize
Fix autohold menus
\end_layout
\begin_layout Itemize
Fix button symbols in input display
\end_layout
\begin_layout Itemize
Compensate for nuts bsnes superscope/justifier handling
\end_layout
\begin_layout Itemize
Lua: Fix bit.extract boolean handling
\end_layout
2013-01-16 17:30:04 +02:00
\begin_layout Subsection
rr2-beta0
\end_layout
\begin_layout Itemize
Split emulation cores more from the rest
\end_layout
\begin_layout Itemize
Support having multiple emulation cores compiled at once
\end_layout
\begin_layout Itemize
Support arbitrary number of ports (well, up to 31 anyway).
\end_layout
\begin_layout Itemize
SNES debugger support
\end_layout
\begin_layout Itemize
Support 16-button controllers
\end_layout
\begin_layout Itemize
Remove old SDL front end
\end_layout
\begin_layout Itemize
Data-driven controller buttons
\end_layout
\begin_layout Itemize
Generate the port code from defines
\end_layout
2013-01-19 21:31:32 +02:00
\begin_layout Subsection
rr2-beta1
\end_layout
\begin_layout Itemize
Update libgambatte to SVN364
\end_layout
\begin_layout Itemize
Get rid of partial linking (building with MXE works)
\end_layout
\begin_layout Itemize
Load XML even without gamepack files
\end_layout
\begin_layout Itemize
Support screen rotate & flip
\end_layout
\begin_layout Itemize
Fix bug when changing controller key to another subkey of the same key
\end_layout
2013-01-24 18:35:13 +02:00
\begin_layout Subsection
rr1-delta16
\end_layout
\begin_layout Itemize
Stop at movie end: Don't off-by-one
\end_layout
\begin_layout Itemize
Fix crash closing lsnes with voice playback active.
\end_layout
\begin_layout Itemize
Import/Export OggOpus for commentary tracks
\end_layout
\begin_layout Itemize
16-button controllers.
\end_layout
\begin_layout Itemize
Don't show nonexistent controllers in input display
\end_layout
\begin_layout Itemize
Set voice record/playback volume from UI
\end_layout
\begin_layout Itemize
Patches for gambatte SVN364.
\end_layout
\begin_layout Itemize
Load markup (if exists) even without gamepack file.
\end_layout
\begin_layout Itemize
Screen rotation & flipping
\end_layout
\begin_layout Itemize
Lua: Some new bit functions
\end_layout
\begin_layout Itemize
Auto-refresh voice streams on change.
\end_layout
\begin_layout Itemize
Auto-refresh subtitles on change & new subtitle editor.
\end_layout
\begin_layout Itemize
Fix music volume adjustment.
\end_layout
2013-01-24 18:44:55 +02:00
\begin_layout Subsection
rr2-beta2
\end_layout
\begin_layout Itemize
Use system threads instead of platform threads
\end_layout
\begin_layout Itemize
Cleanup build by allowing dummy and real drivers to link together.
\end_layout
\begin_layout Itemize
Split duplex support
\end_layout
2013-02-03 11:53:50 +02:00
\begin_layout Subsection
rr1-delta16epsilon1
\end_layout
\begin_layout Itemize
Wxwidgets: Fix memory watch rendering.
\end_layout
\begin_layout Itemize
Wxwidgets: Allow setting voice stream gain.
\end_layout
\begin_layout Itemize
Wxwidgets: VU meters and volume adjustment.
\end_layout
\begin_layout Itemize
Lua: Custom fonts support.
\end_layout
\begin_layout Itemize
Lua: Fix methods stopping working when resetting Lua.
\end_layout
\begin_layout Itemize
Fix loading standard-format movies in preserve (readonly) mode.
\end_layout
2013-02-11 00:11:52 +02:00
\begin_layout Subsection
rr1-delta17
\end_layout
\begin_layout Itemize
Primitive movie editor
\end_layout
\begin_layout Itemize
Fix VU meter with no sound device.
\end_layout
\begin_layout Itemize
Fix various undefined return values.
\end_layout
\begin_layout Itemize
Show rates in VU meter window.
\end_layout
2013-02-11 00:32:56 +02:00
\begin_layout Subsection
rr2-beta3
\end_layout
\begin_layout Itemize
Lua: Render queues as objects
\end_layout
\begin_layout Itemize
Bsnes: support hard resets
\end_layout
\begin_layout Itemize
Dedicated sound devices dialog
\end_layout
\begin_layout Itemize
Change the default AVI sound mode to 2 or 5.
\end_layout
\begin_layout Itemize
Fix totally borked movie saving.
\end_layout
\begin_layout Itemize
Portaudio: Use split duplex with different devices.
\end_layout
\begin_layout Itemize
Fix controls with gambatte core.
\end_layout
\begin_layout Itemize
Modify save slot set handling.
\end_layout
\begin_layout Itemize
lsnes-dumpavi: --firmware-path.
\end_layout
\begin_layout Itemize
Fix lots of compiler warnings.
\end_layout
2013-03-04 22:40:02 +02:00
\begin_layout Subsection
rr1-delta17epsilon1
\end_layout
\begin_layout Itemize
Commentary tool: Set nominal bit rate and limit max bit rate.
\end_layout
\begin_layout Itemize
Lua: Unconditionally reload host memory on loadstate
\end_layout
\begin_layout Itemize
Lua: Query bindings, manipulate aliases, create inverse bindings
\end_layout
\begin_layout Itemize
Lua: Fix crashes with resetting VM while some types of paint requests are
in flight.
\end_layout
\begin_layout Itemize
Lua: gui.text: Clip the text properly instead of corrupting memory in some
cases.
\end_layout
\begin_layout Itemize
Save screenshot header reliably
\end_layout
\begin_layout Itemize
Lua: Backport input.get2 and input.set2
\end_layout
\begin_layout Itemize
Lua: New controller info functions.
\end_layout
\begin_layout Itemize
Movie editor: Fix reset delay counters to be the right way around.
\end_layout
\begin_layout Itemize
Lua: on_snoop2
\end_layout
\begin_layout Itemize
Lua: on_button and input.veto_button.
\end_layout
2013-03-04 22:58:52 +02:00
\begin_layout Subsection
rr2-beta4
\end_layout
\begin_layout Itemize
Revert memory leak fix breaking input
\end_layout
\begin_layout Itemize
Refactor Opus handling
\end_layout
\begin_layout Itemize
Restrict member picking only to .zip files
\end_layout
\begin_layout Itemize
Fix reading of host-endian VMAs.
\end_layout
\begin_layout Itemize
Fix rlow and rhigh to be the right way around.
\end_layout
\begin_layout Itemize
Lua: Don't wedge VM if callback fails with an exception
\end_layout
\begin_layout Itemize
Refactor Ogg handling.
\end_layout
2013-04-01 15:05:41 +03:00
\begin_layout Subsection
rr1-delta17epsilon2
\end_layout
\begin_layout Itemize
Fix saving PNG screenshots on Win32.
\end_layout
\begin_layout Itemize
Movie editor: Sweep axis.
\end_layout
\begin_layout Itemize
Load selected slot in ro/rw/preserve/movie mode.
\end_layout
\begin_layout Itemize
input.joyset: Preserve and invert user input.
\end_layout
\begin_layout Itemize
Allow immediate saving at point of save (transfer saves).
\end_layout
\begin_layout Itemize
Wxwidgets: Filter filenames in dialogs, autoappend extensions.
\end_layout
\begin_layout Itemize
data/verysmall.font: Add missing glyph 70 (
\begin_inset Quotes eld
\end_inset
F
\begin_inset Quotes erd
\end_inset
).
\end_layout
\begin_layout Itemize
Lua: Allow painting custom fonts with halo.
\end_layout
\begin_layout Itemize
Fix memory value search to work on byte types.
\end_layout
2013-04-01 15:14:16 +03:00
\begin_layout Subsection
rr2-beta5
\end_layout
\begin_layout Itemize
Reject oggopus files with incomplete pregap
\end_layout
\begin_layout Itemize
Fix multistream and ogg demuxing
\end_layout
\begin_layout Itemize
Workaround bug with screen >1024 pixels wide.
\end_layout
\begin_layout Itemize
Allow on_input to force/veto system controls.
\end_layout
\begin_layout Itemize
Dedicated autohold/autofire window.
\end_layout
\begin_layout Itemize
Support per-button autofire.
\end_layout
\begin_layout Itemize
Fix crash on trying to frameadvance/exit with no ROM loaded.
\end_layout
\begin_layout Itemize
Fix nonexistent controller key warnings.
\end_layout
\begin_layout Itemize
Movie editor: Fix mouse editing (TYPE_RAXIS)
\end_layout
\begin_layout Itemize
TAS input plugin
\end_layout
\begin_layout Itemize
Analog passthrough.
\end_layout
\begin_layout Itemize
Add throttle axes (TYPE_TAXIS).
\end_layout
\begin_layout Itemize
Fix movie reading with first port having multiple controllers.
\end_layout
\begin_layout Itemize
Move some info from status panel to statusbar.
\end_layout
2013-04-17 15:55:24 +03:00
\begin_layout Subsection
rr1-delta17epsilon3
\end_layout
\begin_layout Itemize
Fix status panel (and movie editor) flicker
\end_layout
\begin_layout Itemize
Show effects of Lua in input display
\end_layout
\begin_layout Itemize
Offer lsmv.backup as file filter too for load lsmv
\end_layout
\begin_layout Itemize
Allow slowing down subframe advance
\end_layout
\begin_layout Itemize
Display current save slot information
\end_layout
\begin_layout Itemize
Add snes9x fonts
\end_layout
\begin_layout Itemize
Fix hotkeys stopping working after X-ing settings dialog
\end_layout
\begin_layout Itemize
Movie editor: Fix bug if extending finished movie
\end_layout
\begin_layout Itemize
Cap current_frame_first_subframe to movie size when recounting movie
\end_layout
\begin_layout Itemize
Movie editor: Interpret ctrl+click as right click
\end_layout
2013-04-17 18:28:47 +03:00
\begin_layout Subsection
rr2-beta6
\end_layout
\begin_layout Itemize
Autofire: Fix false status indications
\end_layout
\begin_layout Itemize
Fix subframe counter
\end_layout
\begin_layout Itemize
Fix print() after Lua reset
\end_layout
\begin_layout Itemize
New settings framework
\end_layout
\begin_layout Itemize
Remove some unused leftover stuff
\end_layout
\begin_layout Itemize
Fix race condition causing possible crash on startup
\end_layout
\begin_layout Itemize
Fix compiling if uint64_t and size_t are not compatible
\end_layout
\begin_layout Itemize
Lua: Don't crash if input.[gs]et{,a} is called outside on_input
\end_layout
\begin_layout Subsection
rr2-beta7
\end_layout
\begin_layout Itemize
Fix bug causing crash if triple has invalid button
\end_layout
\end_body
\end_document