lsnes/manual.txt

2382 lines
54 KiB
Text
Raw Normal View History

2011-12-12 16:08:22 +02:00
1 Introduction
lsnes is SNES rerecording emulator based on bsnes core.
2012-01-11 15:05:01 +02:00
2 Dependencies
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
1. bsnes libsnes
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
(a) v084 or 085
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
(b) accuracy or compatiblity core.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
(c) Patched version (using included 6 patches)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
2. Zlib
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
3. boost_iostreams
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
4. boost_filesystem
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
5. libsdl (SDL only)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
6. sdlmain (SDL only, part of SDL)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
7. boost_conversion (this is header-only library)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
8. libswscale (wxwidgets graphics only)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
9. Portaudio (portaudio sound only)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
10. std::thread and co (for threaded dumper only)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
3 Building
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Building is via makefile, the following options are available:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• CROSS_PREFIX=<prefix>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Prefix to apply to commands when building executables /
object files for the target architecture.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is blank.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• CC=<name>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Name of C++ compiler.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
CROSS_PREFIX is prepended if compiling for target
architecture.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
This needs to be at least GCC 4.6.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Set to 'g++-mp-4.6' if compiling on Mac OS X using GCC 4.6
from Macports.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is 'g++'.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• HOSTCC=<name>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Name of host C++ compiler.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is value of 'CC' option.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• USER_HOSTCCFLAGS=<flags>:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Compiler flags to pass when compiling/linking for host
architecture.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is blank.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• USER_CFLAGS=<flags>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Extra flags to pass when compiling for target architecture
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is blank.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• USER_LDFLAGS=<flags>:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Extra flags to pass when linking for target architecture.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is blank.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• USER_PLATFORM_CFLAGS=<flags>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Extra flags to pass when compiling files using
platform-dependent code for target architecture.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is blank.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• USER_PLATFORM_LDFLAGS=<flags>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Extra flags to pass when linking files using
platform-dependent code for target architecture.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is blank.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• FONT_SRC=<file>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Set the font file to use.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Currently the valid values are:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
cp437.hex: Standard VGA font (256 characters).
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
unifontfull-5.1.20080820.hex: GNU unifont (covers most of
Unicode BMP)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is 'unifontfull-5.1.20080820.hex'
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• LUA=<package>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Package to use for Lua support.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Needs to be Lua 5.1.x. If Lua 5.2.x works is unknown.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Usually valid value is 'lua' or 'lua5.1'.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is not to build Lua support.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• THREADS=<bool>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Override platform default for dumper threading support.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Threading is default on Linux.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
'YES' tries to use threading.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
'NO' disables threading.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Note: This has absolutely nothing to do with platform
threading.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• BSNES_IS_COMPAT=<anything>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Signals that BSNES core used is compatiblity core, not
accuracy core.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is to assume accuracy core.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• JOYSTICK=<implementation>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Set joystick implementation. Valid values are:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
SDL: Use SDL for joystick (requires SDL graphics)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
EVDEV: Use EVDEV for joystick (Linux only).
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
DUMMY: Disable joystick support.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is SDL.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• SOUND=<implementation>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Set sound implementation. Valid values are:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
SDL: Use SDL for sound (requires SDL graphics)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
PORTAUDIO: Use Portaudio for sound.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
DUMMY: Disable sound support
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Default is SDL.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
• GRAPHICS=<implementation>
Set windowing library to use. Valid values are:
SDL: Use SDL for graphics
WXWIDGETS: Use wxWidgets for graphics.
Default is SDL.
4 Command line options
4.1 ROM options
<kind> in the following can be one of:
• rom: Cartridge ROM (BIOS for special carts). This is required.
• bsx: BS-X (non-slotted) Game flash ROM.
• bsxslotted: BS-X (slotted) Game flash ROM.
• dmg: DMG game ROM
• slot-a: Sufami Turbo Slot A ROM
• slot-b: Sufami Turbo Slot B ROM
4.1.1 --<kind>=<file> (lsnes/SDL, lsnes-avidump)
Load <file> as specified ROM (SFC/BS/DMG/ST file format).
4.1.2 --headered-<kind>=<file> (lsnes/SDL, lsnes-avidump)
Load <file> as specified ROM, stripping first 512 bytes. Handy
for loading SMC / FIG and such files.
4.1.3 --<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
Override hardware detection for ROM, reading the values from
<file> (BSNES XML format).
4.1.4 --ips-<kind>=<file> (lsnes/SDL, lsnes-avidump)
Apply BPS/IPS patch <file> to ROM <kind>. If specified multiple
times, the patches are applied in order.
4.1.5 --ips-<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
Apply BPS/IPS patch <file> to XML of ROM <kind>. If specified
multiple times, the patches are applied in order.
4.1.6 --ips-offset=<offset> (lsnes/SDL, lsnes-avidump)
Set offset to apply to IPS patches. May be negative. Handy for
applying headered IPS patches (use offset of -512 for this). The
offset must be 0 for BPS patches.
4.1.7 --pal
Force ROM to be considered PAL-only.
• Only works on SNES and SGB ROMs (not BS-X or Sufami Turbo).
• Attempting to load NTSC movie file will error out.
4.1.8 --ntsc
Force ROM to be considered NTSC-only.
• Attempting to load PAL movie file will error out.
4.2 Session options
4.2.1 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
Load <filename> as movie or savestate file. All other session
options are ignored.
4.2.2 --port1=<device> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
Set type of port1. Valid values are:
• none: No device connected
• gamepad: One gamepad (the default)
• multitap: Four gamepads (warning: makes most games refuse to
start)
• mouse: Mouse.
2012-01-11 15:05:01 +02:00
4.2.3 --port2=<type> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
Set type of port2. Valid values are:
• none: No device connected (the default)
• gamepad: One gamepad
• multitap: Four gamepads.
• mouse: Mouse
• superscope: Super Scope
• justifier: One justifier
• justifiers: Two justifiers
2012-01-11 15:05:01 +02:00
4.2.4 --gamename=<name> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Set the name of game to <name>. Default is blank.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
4.2.5 --author=<name> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
Add author with full name of <name> (no nickname).
2012-01-11 15:05:01 +02:00
4.2.6 --author=|<name> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
Add author with nickname of <name> (no full name).
2012-01-11 15:05:01 +02:00
4.2.7 --author=<fullname>|<nickname> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
Add author with full name of <fullname> and nickname of
<nickname>.
2012-01-11 15:05:01 +02:00
4.2.8 --rtc-second=<value> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Set RTC second (0 is 1st January 1970 00:00:00Z). Default is
1,000,000,000.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
4.2.9 --rtc-subsecond=<value> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Set RTC subsecond. Range is 0-. Unit is CPU cycle. Default is 0.
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
4.3 Misc. options:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
4.3.1 --run=<file> (lsnes/SDL)
2011-12-12 16:08:22 +02:00
After running main RC file, run this file. If multiple are
specified, these execute in order specified.
2012-01-11 15:05:01 +02:00
4.4 dump options (lsnes-dumpavi only)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
4.4.1 --prefix=<prefix>
2011-12-12 16:08:22 +02:00
Set dump prefix. Default is “avidump”.
2012-01-11 15:05:01 +02:00
4.4.2 --level=<level>
2011-12-12 16:08:22 +02:00
Set compression level (0-18). Default is 7.
2012-01-11 15:05:01 +02:00
4.4.3 --length=<length>
2011-12-12 16:08:22 +02:00
Set number of frames to dump. Mandatory.
2012-01-11 15:05:01 +02:00
4.4.4 --lua=<script>
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
Run specified lua script (lsnes-dumpavi does not have
2011-12-12 16:08:22 +02:00
initialization files).
2012-01-11 15:05:01 +02:00
4.4.5 --jmd
2011-12-12 16:08:22 +02:00
Use JMD dumping instead of AVI dumping.
2012-01-11 15:05:01 +02:00
4.4.6 --sdmp
Use SDMP dumping instead of AVI dumping.
4.4.7 --ss
Dump in single segment (SDMP only).
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
5 Startup file lsnes.rc
Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as
2011-12-12 16:08:22 +02:00
commands. This file is located in:
• Windows: %APPDATA%\lsnes\lsnes.rc (if %APPDATA% exists)
• Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME
exists)
• Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
• All: ./lsnes.rc (fallback default).
If leading directories do not exist, attempt to create them is
made.
2012-01-11 15:05:01 +02:00
6 Internal commands
2011-12-12 16:08:22 +02:00
• Commands beginning with '*' invoke the corresponding command
without alias expansion.
• If command starts with '+' (after possible '*'), the command is
executed as-is when button is pressed, and when button is
released, it is executed with '+' replaced by '-'.
2012-01-11 15:05:01 +02:00
• Commands without '+' execute only on negative edge (release).
6.1 Settings:
2011-12-12 16:08:22 +02:00
Settings control various aspects of emulator behaviour.
2012-01-11 15:05:01 +02:00
6.1.1 set-setting <setting> <value>
2011-12-12 16:08:22 +02:00
Sets setting <setting> to value <value> (may be empty).
2012-01-11 15:05:01 +02:00
6.1.2 unset-setting <setting>
2011-12-12 16:08:22 +02:00
Try to unset setting <setting> (not all settings can be unset).
2012-01-11 15:05:01 +02:00
6.1.3 get-setting <setting>
2011-12-12 16:08:22 +02:00
Read value of setting <setting>
2012-01-11 15:05:01 +02:00
6.1.4 show-settings
2011-12-12 16:08:22 +02:00
Print names and values of all settings.
2012-01-11 15:05:01 +02:00
6.2 Keybindings
2011-12-12 16:08:22 +02:00
Keybindings bind commands or aliases to keys (or pseudo-keys).
Notes:
• Do not bind edge active (+/-) commands to keys with modifiers,
that won't work right!
• Names of keys and modifiers are platform-dependent.
• Be careful before binding pseudo-keys (such as joystick axes,
buttons or hats) with modifiers. That may or may not work
right.
2012-01-11 15:05:01 +02:00
6.2.1 bind-key [<mod>/<modmask>] <key> <command>
2011-12-12 16:08:22 +02:00
Bind <command> to key <key> (activating if modifiers in <modmask>
(comma-seperated list) are set as <mod> (comma-seperated list).
The names of keys and modifiers are platform-dependent.
2012-01-11 15:05:01 +02:00
6.2.2 unbind-key [<mod>/<modmask>] <key>
2011-12-12 16:08:22 +02:00
Unbind command from <key> (with specified <mod> and <modmask>).
2012-01-11 15:05:01 +02:00
6.2.3 set-axis <axis> [disabled | axis | axis-inverse |
2011-12-12 16:08:22 +02:00
pressure0- | pressure0+ | pressure-0 | pressure-+ | pressure+0
| pressure+-] [minus=<val>] [zero=<val>] [plus=<val>]
[tolerance=<val>]
Set axis parameters for axis <axis>.
• disabled: Disable axis
• axis: Normal axis
• axis-inverse: Inverse axis
• pressure0-: Pressure sensitive. Released at 0, pressed at -.
• pressure0+: Pressure sensitive. Released at 0, pressed at +.
• pressure-0: Pressure sensitive. Released at -, pressed at 0.
• pressure-+: Pressure sensitive. Released at -, pressed at +.
• pressure+0: Pressure sensitive. Released at +, pressed at 0.
• pressure+-: Pressure sensitive. Released at +, pressed at -.
• minus=<val>: Calibration at extreme minus position
(-32768-32767)
• zero=<val>: Calibration at neutral position (-32768-32767)
• plus=<val>: Calibration at extreme plus position (-32768-32767)
• tolerance=<value>: Center band tolerance (0<x<1). The smaller
the value, the more sensitive the control is.
2012-01-11 15:05:01 +02:00
6.2.4 show-bindings
2011-12-12 16:08:22 +02:00
Print all key bindings in effect.
2012-01-11 15:05:01 +02:00
6.3 Aliases
2011-12-12 16:08:22 +02:00
Aliases bind command to sequence of commands. After alias has
been defined, it replaces the command it shadows.
Notes:
• You can't alias command to itself.
• Aliases starting with +/- are edge active just like ordinary
commands starting with +/-.
• One command can be aliased to multiple commands.
2012-01-11 15:05:01 +02:00
6.3.1 alias-command <command> <expansion>
2011-12-12 16:08:22 +02:00
Append <expansion> to alias <command>. If alias does not already
exist, it is created.
2012-01-11 15:05:01 +02:00
6.3.2 unalias-command <command>
2011-12-12 16:08:22 +02:00
Clear alias expansion for <command>.
2012-01-11 15:05:01 +02:00
6.3.3 show-aliases
2011-12-12 16:08:22 +02:00
Print all aliases and their expansions in effect.
2012-01-11 15:05:01 +02:00
6.4 run-script <script>
2011-12-12 16:08:22 +02:00
Run <script> as if commands were entered on the command line.
2012-01-11 15:24:36 +02:00
6.5 Video dumping
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
Following commands control video dumping:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
6.5.1 dump-avi <prefix>
2011-12-12 16:08:22 +02:00
2012-01-06 18:31:18 +02:00
Dump AVI video to prefix <prefix> Notes:
2011-12-12 16:08:22 +02:00
• The codec is Camstudio Codec in gzip mode.
• Encoder and muxer are internal, available on all platforms.
• Audio enable/disable and framerate has no effect.
• The audio dumped to .avi is low-quality version. The
high-quality version is dumped to .sox file.
2012-01-11 15:05:01 +02:00
6.5.2 end-avi
2011-12-12 16:08:22 +02:00
End current AVI video dump (closing the emulator also closes the
dump).
2012-01-11 15:24:36 +02:00
6.5.3 dump-jmd <file>
2011-12-12 16:08:22 +02:00
2012-01-06 18:31:18 +02:00
Dump JMD video to file <file>.
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
6.5.4 end-jmd
2011-12-12 16:08:22 +02:00
End the current JMD dump in progress.
2012-01-11 15:24:36 +02:00
6.5.5 dump-sdmp <prefix>
Dump SDMP to <prefix>, splitting at 2GB.
6.5.6 dump-sdmp-ss <file>
Dump SDMP to <file>, no splitting
6.5.7 end-sdmp
End the current SDMP dump in progress.
6.6 Memory manipulation
2011-12-12 16:08:22 +02:00
<address> may be decimal or hexadecimal (prefixed with '0x').
<value> can be hexadecimal (prefixed with '0x'), unsigned or
signed (prefixed with '-') decimal.
The available element <sizes> are:
• byte: 1 byte
• word: 2 bytes
• dword: 4 bytes
• qword: 8 bytes
When reading RAM and ROM, multi-byte reads/writes are big-endian.
When dealing with DSP memory, multi-byte reads/writes are
native-endian (do not use operand sizes exceeding DSP bitness,
except dword is OK for 24-bit memory).
2012-01-11 15:24:36 +02:00
6.6.1 read-<size> <address>
2011-12-12 16:08:22 +02:00
Read the value of byte in <address>.
2012-01-11 15:24:36 +02:00
6.6.2 read-s<size> <address>
2011-12-12 16:08:22 +02:00
Read the value of signed byte in <address>.
2012-01-11 15:24:36 +02:00
6.6.3 write-<size> <address> <value>
2011-12-12 16:08:22 +02:00
Write <value> to byte in address <address>.
2012-01-11 15:24:36 +02:00
6.6.4 search-memory reset
2011-12-12 16:08:22 +02:00
Reset the memory search
2012-01-11 15:24:36 +02:00
6.6.5 search-memory count
2011-12-12 16:08:22 +02:00
Print number of candidates remaining
2012-01-11 15:24:36 +02:00
6.6.6 search-memory print
2011-12-12 16:08:22 +02:00
Print all candidates remaining
2012-01-11 15:24:36 +02:00
6.6.7 search-memory <usflag><sizeflag><op>
2011-12-12 16:08:22 +02:00
Searches memory for addresses satisfying criteria.
<usflag> can be:
• u: unsigned
• s: signed
<sizeflag> can be:
• b: byte
• w: word
• d: dword
• q: qword
<op> can be:
• lt: < previous value.
• le: <= previous value.
• eq: = previous value.
• ne: != previous value.
• ge: >= previous value.
• gt: > previous value.
2012-01-11 15:24:36 +02:00
6.6.8 search-memory <sizeflag> <value>
2011-12-12 16:08:22 +02:00
Searches for addresses that currently have value <value>.
<sizeflag> is as in previous command.
2012-01-11 15:24:36 +02:00
6.7 Main commands
2011-12-12 16:08:22 +02:00
These commands are not available in lsnesrc, but are available
after ROM has been loaded.
2012-01-11 15:24:36 +02:00
6.7.1 quit-emulator [/y]
2011-12-12 16:08:22 +02:00
Quits the emulator (asking for confirmation). If /y is given, no
confirmation is asked.
2012-01-11 15:24:36 +02:00
6.7.2 pause-emulator
2011-12-12 16:08:22 +02:00
Toggle paused/unpaused
2012-01-11 15:24:36 +02:00
6.7.3 +advance-frame
2011-12-12 16:08:22 +02:00
Advance frame. If the button is still held after configurable
timeout expires, game unpauses for the duration frame advance is
held.
2012-01-11 15:24:36 +02:00
6.7.4 +advance-poll
2011-12-12 16:08:22 +02:00
Advance subframe. If the button is still held after configurable
timeout expires, game unpauses for the duration frame advance is
held.
2012-01-11 15:24:36 +02:00
6.7.5 advance-skiplag
2011-12-12 16:08:22 +02:00
Skip to first poll in frame after current.
2012-01-11 15:24:36 +02:00
6.7.6 reset
2011-12-12 16:08:22 +02:00
Reset the SNES after this frame.
2012-01-11 15:24:36 +02:00
6.7.7 load <filename>
2011-12-12 16:08:22 +02:00
Load savestate <filename> in current mode.
2012-01-11 15:24:36 +02:00
6.7.8 load-state <filename>
2011-12-12 16:08:22 +02:00
Load savestate <filename> in readwrite mode.
2012-01-11 15:24:36 +02:00
6.7.9 load-readonly <filename>
2011-12-12 16:08:22 +02:00
Load savestate <filename> in readonly mode.
2012-01-11 15:24:36 +02:00
6.7.10 load-preserve <filename>
2011-12-12 16:08:22 +02:00
Load savestate <filename> in readonly mode, preserving current
events.
2012-01-11 15:24:36 +02:00
6.7.11 load-movie <filename>
2011-12-12 16:08:22 +02:00
Load savestate <filename>, ignoring save part in readonly mode.
2012-01-11 15:24:36 +02:00
6.7.12 save-state <filename>
2011-12-12 16:08:22 +02:00
Save system state to <filename> as soon as possible.
2012-01-11 15:24:36 +02:00
6.7.13 save-movie <filename>
2011-12-12 16:08:22 +02:00
Save movie to <filename>.
2012-01-11 15:24:36 +02:00
6.7.14 set-rwmode
2011-12-12 16:08:22 +02:00
Set read-write mode.
2012-01-11 15:24:36 +02:00
6.7.15 set-romode
2011-12-12 16:08:22 +02:00
Set read-only mode
2012-01-11 15:24:36 +02:00
6.7.16 toggle-rwmode
2011-12-12 16:08:22 +02:00
Toggle between read-only and read-write modes.
2012-01-11 15:24:36 +02:00
6.7.17 set-gamename <name>
2011-12-12 16:08:22 +02:00
Set name of the game to <name>
2012-01-11 15:24:36 +02:00
6.7.18 get-gamename
2011-12-12 16:08:22 +02:00
Print the name of the game.
2012-01-11 15:24:36 +02:00
6.7.19 add-author <author>
2011-12-12 16:08:22 +02:00
Adds new author <author>. If <author> does not contain '|' it is
full name. If it contains '|', '|' splits the full name and
nickname.
2012-01-11 15:24:36 +02:00
6.7.20 edit-author <num> <author>
2011-12-12 16:08:22 +02:00
Edit the author in slot <num> (0-based) to be <author> (see
add-author for format)
2012-01-11 15:24:36 +02:00
6.7.21 remove-author <num>
2011-12-12 16:08:22 +02:00
Remove author in slot <num>
2012-01-11 15:24:36 +02:00
6.7.22 print-authors
2011-12-12 16:08:22 +02:00
Print authors.
2012-01-11 15:24:36 +02:00
6.7.23 test-1, test-2, test-3
2011-12-12 16:08:22 +02:00
Internal test commands. Don't use.
2012-01-11 15:24:36 +02:00
6.7.24 take-screenshot <filename>
2011-12-12 16:08:22 +02:00
Save screenshot to <filename>.
2012-01-11 15:24:36 +02:00
6.7.25 +controller<num><button>
2011-12-12 16:08:22 +02:00
Press button <button> on controller <num> (1-8). The following
button names are known:
• left
• right
• up
• down
• A
• B
• X
• Y
• L
• R
• select
• start
• trigger
• cursor
• pause
• turbo
2012-01-11 15:24:36 +02:00
6.7.26 controllerh<num><button>
2011-12-12 16:08:22 +02:00
Hold/unhold button <button> on controller <num> (1-8). See
+controller for button names.
2012-01-11 15:24:36 +02:00
6.7.27 autofire (<pattern>|-)...
2011-12-12 16:08:22 +02:00
Set autofire pattern. Each parameter is comma-separated list of
button names (in form of 1start, 1A, 2B, etc..) to hold on that
frame. After reaching the end of pattern, the pattern restarts
from the beginning.
2012-01-11 15:24:36 +02:00
6.7.28 repaint
2011-12-12 16:08:22 +02:00
Force a repaint.
2012-01-11 15:24:36 +02:00
6.8 Save jukebox
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
6.8.1 cycle-jukebox-backward
2011-12-12 16:08:22 +02:00
Cycle save jukebox backwards.
2012-01-11 15:24:36 +02:00
6.8.2 cycle-jukebox-forward
2011-12-12 16:08:22 +02:00
Cycle save jukebox forwards
2012-01-11 15:24:36 +02:00
6.8.3 add-jukebox-save <filename>
2011-12-12 16:08:22 +02:00
Add <filename> to jukebox saves.
2012-01-11 15:24:36 +02:00
6.8.4 load-jukebox
2011-12-12 16:08:22 +02:00
Do load from jukebox (current mode).
2012-01-11 15:24:36 +02:00
6.8.5 save-jukebox
2011-12-12 16:08:22 +02:00
Do state save to jukebox.
2012-01-11 15:24:36 +02:00
6.9 Lua
2011-12-12 16:08:22 +02:00
Only available if lua support is compiled in.
2012-01-11 15:24:36 +02:00
6.9.1 evaluate-lua <luacode>
2011-12-12 16:08:22 +02:00
Run Lua code <luacode> using built-in Lua interpretter.
2012-01-11 15:24:36 +02:00
6.9.2 run-lua <script>
2011-12-12 16:08:22 +02:00
Run specified lua file using built-in Lua interpretter.
2012-01-11 15:24:36 +02:00
6.10 Memory watch
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
6.10.1 add-watch <name> <expression>
2011-12-12 16:08:22 +02:00
Adds new watch (or modifies old one).
2012-01-11 15:24:36 +02:00
6.10.2 remove-watch <name>
2011-12-12 16:08:22 +02:00
Remove a watch.
2012-01-11 15:24:36 +02:00
6.11 Sound
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
6.11.1 enable-sound <on/off>
2011-12-12 16:08:22 +02:00
Enable/Disable sound.
2012-01-11 15:24:36 +02:00
6.11.2 set-sound-device <device>
2011-12-12 16:08:22 +02:00
Set sound device to <device>
2012-01-11 15:24:36 +02:00
6.11.3 show-sound-status
2011-12-12 16:08:22 +02:00
Show status of sound system.
2012-01-11 15:24:36 +02:00
6.11.4 show-sound-devices
2011-12-12 16:08:22 +02:00
Show all available devices.
2012-01-11 15:24:36 +02:00
6.12 SDL Platform commands
2011-12-12 16:08:22 +02:00
The following are valid on SDL platform.
2012-01-11 15:24:36 +02:00
6.12.1 identify-key
2011-12-12 16:08:22 +02:00
Asks to press a key and then identifies that (pseudo-)key.
2012-01-11 15:24:36 +02:00
6.12.2 toggle-console
2011-12-12 16:08:22 +02:00
Toggle between windowed/fullscreen console.
2012-01-11 15:24:36 +02:00
6.12.3 scroll-fullup
2011-12-12 16:08:22 +02:00
Scroll messages window as far back as it goes.
2012-01-11 15:24:36 +02:00
6.12.4 scroll-fulldown
2011-12-12 16:08:22 +02:00
Scroll messages window as far forward as it goes.
2012-01-11 15:24:36 +02:00
6.12.5 scroll-up
2011-12-12 16:08:22 +02:00
Scroll messages window back one screenful.
2012-01-11 15:24:36 +02:00
6.12.6 scroll-down
2011-12-12 16:08:22 +02:00
Scroll messages window forward one screenful.
2012-01-11 15:05:01 +02:00
7 Settings
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
7.1 Core settings
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
7.1.1 firmwarepath
2011-12-12 16:08:22 +02:00
Set where bsnes looks for firmware files. Default is “.”.
2012-01-11 15:05:01 +02:00
7.1.2 targetfps
2011-12-12 16:08:22 +02:00
Set the target fps. Numeric, range is 0.001 to “infinite”.
Default is native framerate.
2012-01-11 15:05:01 +02:00
7.1.3 savecompression
2011-12-12 16:08:22 +02:00
Set save compression level (integer 0-9). Default is 7 (0 is no
compression).
2012-01-11 15:05:01 +02:00
7.1.4 advance-timeout
2011-12-12 16:08:22 +02:00
Set the frame advance timeout in milliseconds. Numeric integer,
range is 0-999999999. Default is 500.
2012-01-11 15:05:01 +02:00
7.2 AVI dumper settings
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
7.2.1 avi-large
2011-12-12 16:08:22 +02:00
AVI dumper: Always dump at 512x448 or 512x478 regardless of what
the console outputs.
2012-01-11 15:05:01 +02:00
7.2.2 avi-left-border
2011-12-12 16:08:22 +02:00
AVI dumper: Set the default left border thickness (unless lua
overrides) for dumps. Range 0-8191. Default is 0.
2012-01-11 15:05:01 +02:00
7.2.3 avi-right-border
2011-12-12 16:08:22 +02:00
AVI dumper: Set the default right border thickness (unless lua
overrides) for dumps. Range 0-8191. Default is 0.
2012-01-11 15:05:01 +02:00
7.2.4 avi-top-border
2011-12-12 16:08:22 +02:00
AVI dumper: Set the default top border thickness (unless lua
overrides) for dumps. Range 0-8191. Default is 0.
2012-01-11 15:05:01 +02:00
7.2.5 avi-bottom-border
2011-12-12 16:08:22 +02:00
AVI dumper: Set the default bottom border thickness (unless lua
overrides) for dumps. Range 0-8191. Default is 0.
2012-01-11 15:05:01 +02:00
7.2.6 avi-maxframes
2011-12-12 16:08:22 +02:00
AVI dumper: Maximum number of frames per dump segment (0 =>
unlimited). Range 0-999999999. Default is 0.
2012-01-11 15:24:36 +02:00
7.2.7 avi-compresison
AVI dumper: Compression level (0-18).
• Compression levels 10 and above are not compatible with stock
CSCD codec.
• Recomended level is 7.
7.3 JMD options
7.3.1 jmd-copression
JMD dumper: Compression level (0-9).
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
7.4 SDL platform settings
7.4.1 autorepeat-first-delay
2011-12-12 16:08:22 +02:00
Sets the delay for first character in typematic autorepeat.
2012-01-11 15:24:36 +02:00
7.4.2 autorepeat-subsequent-delay
2011-12-12 16:08:22 +02:00
Sets the delay for subsequent characters in typematic autorepeat.
2012-01-11 15:05:01 +02:00
8 Lua functions
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
8.1 Core (in main table)
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
8.1.1 print
2011-12-12 16:08:22 +02:00
Print line to message console.
2012-01-11 15:05:01 +02:00
8.1.2 exec(string command)
2011-12-12 16:08:22 +02:00
Run command as it was entered on the command line
2012-01-11 15:05:01 +02:00
8.2 Table bit:
2011-12-12 16:08:22 +02:00
Bitwise logical functions and related.
2012-01-11 15:05:01 +02:00
8.2.1 bit.none(number...) / bit.bnot(number...)
2011-12-12 16:08:22 +02:00
48-bit bitwise NOT / NONE function (set bits that are set in none
of the arguments).
2012-01-11 15:05:01 +02:00
8.2.2 bit.any(number...) / bit.bor(number...)
2011-12-12 16:08:22 +02:00
48-bit bitwise OR / ANY function (set bits that are set in any of
the arguments).
2012-01-11 15:05:01 +02:00
8.2.3 bit.all(number...) / bit.band(number...)
2011-12-12 16:08:22 +02:00
48-bit bitwise AND / ALL function (set bits that are set in all
of the arguments).
2012-01-11 15:05:01 +02:00
8.2.4 bit.parity(number...) / bit.bxor(number...)
2011-12-12 16:08:22 +02:00
48-bit bitwise XOR / PARITY function (set bits that are set in
odd number of the arguments).
2012-01-11 15:05:01 +02:00
8.2.5 bit.lrotate(number base[, number amount[, number bits]])
2011-12-12 16:08:22 +02:00
Rotate bits-bit (max 48, default 48) number left by amount
(default 1) places.
2012-01-11 15:05:01 +02:00
8.2.6 bit.rrotate(number base[, number amount[, number bits]])
2011-12-12 16:08:22 +02:00
Rotate bits-bit (max 48, default 48) number right by amount
(default 1) places.
2012-01-11 15:05:01 +02:00
8.2.7 bit.lshift(number base[, number amount[, number bits]])
2011-12-12 16:08:22 +02:00
Shift bits-bit (max 48, default 48) number left by amount
(default 1) places. The new bits are filled with zeroes.
2012-01-11 15:05:01 +02:00
8.2.8 bit.lrshift(number base[, number amount[, number bits]])
2011-12-12 16:08:22 +02:00
Shift bits-bit (max 48, default 48) number logically right by
amount (default 1) places. The new bits are filled with zeroes.
2012-01-11 15:05:01 +02:00
8.2.9 bit.arshift(number base[, number amount[, number bits]])
2011-12-12 16:08:22 +02:00
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.
2012-01-11 15:05:01 +02:00
8.3 Table gui:
2011-12-12 16:08:22 +02:00
Most of these functions can only be called in on_paint and
on_video callbacks. Exceptions are noted.
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.
Origin of coordinates is at top left corner of game display area.
Left and top gaps correspond to negative coordinates.
2012-01-11 15:05:01 +02:00
8.3.1 gui.resolution()
2011-12-12 16:08:22 +02:00
Returns 2-tuple (hresolution, vresolution).
2012-01-11 15:05:01 +02:00
8.3.2 gui.<class>_gap(number gap)
2011-12-12 16:08:22 +02:00
Set the <class> (left, right, top, bottom) gap to specified value
(max gap is 8191).
2012-01-11 15:05:01 +02:00
8.3.3 gui.text(number x, number y, string text[, number fgc[,
2011-12-12 16:08:22 +02:00
number bgc]])
Draw specified text on the GUI (each character cell is 8 or 16
wide and 16 high). Parameters:
• x: X-coordinate to start the drawing from (and x-coordinate at
begining of the lines).
• y: Y-coordinate to start the drawing from.
• text: The text to draw.
• fgc: Text color (default is 0xFFFFFF (white))
• bgc: Background color (default is -1 (transparent))
2012-01-11 15:05:01 +02:00
8.3.4 gui.textH(number x, number y, string text[, number fgc[,
number bgc]])
Like gui.text, but draw using double-width.
2012-01-11 15:05:01 +02:00
8.3.5 gui.textV(number x, number y, string text[, number fgc[,
number bgc]])
Like gui.text, but draw using double-height.
2012-01-11 15:05:01 +02:00
8.3.6 gui.textHV(number x, number y, string text[, number fgc[,
number bgc]])
Like gui.text, but draw using double-width/double-height.
2012-01-11 15:05:01 +02:00
8.3.7 gui.rectangle(number x, number y, number width, number
2011-12-12 16:08:22 +02:00
height[, number thickness[, number outline[, number fill]]])
Draw rectangle on the GUI. Parameters:
• x: X-coordinate of left edge.
• y: Y-coordinate of upper edge.
• width: Width of rectangle.
• height: Height of rectangle.
• thickness: Thickness of outline (default is 1).
• outline: Color of outline (default is 0xFFFFFF (white))
• fill: Color of fil (default is -1 (transparent))
2012-01-11 15:05:01 +02:00
8.3.8 gui.pixel(number x, number y[, number color])
2011-12-12 16:08:22 +02:00
Draw one pixel on the GUI. Parameters:
• x: X-coordinate of the pixel
• y: Y-coordinate of the pixel
• color: Color of the pixel (default is 0xFFFFFF (white))
2012-01-11 15:05:01 +02:00
8.3.9 gui.crosshair(number x, number y[, number length[, number
2011-12-12 16:08:22 +02:00
color]])
Draw a crosshair. Parameters:
• x: X-coordinate of the crosshair
• y: Y-coordinate of the crosshair
• length: Length of the crosshair lines (default 10).
• color: Color of the crosshair (default is 0xFFFFFF (white))
2012-01-11 15:05:01 +02:00
8.3.10 gui.line(number x1, number y1, number x2, number y2[,
2011-12-12 16:08:22 +02:00
number color])
Draw a thin line. Parameters:
• x1: X-coordinate of one end.
• y1: Y-coordinate of one end.
• x2: X-coordinate of the other end.
• y2: Y-coordinate of the other end.
• color: Color of the line (default is 0xFFFFFF (white)).
2012-01-11 15:05:01 +02:00
8.3.11 gui.circle(number x, number y, number r[, number thick[,
2011-12-12 16:08:22 +02:00
number border[, number fil]]])
Draw a circle. Parameters.
• x: X-coordinate of the center
• y: Y-coordinate of the center
• r: The radius of the circle
• thick: Border thickness
• border: Border color (default is 0xFFFFFF (white))
• fill: Fill color (default is -1 (transparent)).
2012-01-11 15:05:01 +02:00
8.3.12 gui.repaint()
2011-12-12 16:08:22 +02:00
Request on_repaint() to happen as soon as possible. Can be used
anywhere.
2012-01-11 15:05:01 +02:00
8.3.13 gui.subframe_update(boolean on)
2011-12-12 16:08:22 +02:00
Request subframe updates (calling on_paint() on subframes) to
happen (on=true) or not happen (on=false). Can be used anywhere.
2012-01-11 15:05:01 +02:00
8.3.14 gui.screenshot(string filename)
2011-12-12 16:08:22 +02:00
Write PNG screenshot of the current frame (no drawings) to
specified file. Can be used anywhere.
2012-01-11 15:05:01 +02:00
8.3.15 gui.color(number r, number g, number b[, number a])
2011-12-12 16:08:22 +02:00
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.
2012-01-11 15:05:01 +02:00
8.3.16 gui.status(string name, string value)
2011-12-12 16:08:22 +02:00
Set status field “L[<name>]” to <value> in status area. Can be
used anywhere.
2012-01-11 15:05:01 +02:00
8.4 table input
2011-12-12 16:08:22 +02:00
Input handling. Only available in on_input callback.
2012-01-11 15:05:01 +02:00
8.4.1 input.get(number controller, number index)
2011-12-12 16:08:22 +02:00
Read the specified index (0-11) from specified controller (0-7).
Notes:
• Uses physical controller numbering. Gamepad in port 2 is
controller 4, not 1!
2012-01-11 15:05:01 +02:00
8.4.2 input.set(number controller, number index, number value)
2011-12-12 16:08:22 +02:00
Write the specified index (0-11) from specified controller (0-7),
storing value. Notes:
• Uses physical controller numbering. Gamepad in port 2 is
controller 4, not 1!
2012-01-11 15:05:01 +02:00
8.4.3 input.reset([number cycles])
2011-12-12 16:08:22 +02:00
Execute reset. If cycles is greater than zero, do delayed reset.
0 (or no value) causes immediate reset.
• Only available with subframe flag false.
2012-01-11 15:05:01 +02:00
8.5 Table hostmemory
2011-12-12 16:08:22 +02:00
Host memory handling (extra memory saved to savestates). Host
memory starts empty.
2012-01-11 15:05:01 +02:00
8.5.1 hostmemory.read(number address)
2011-12-12 16:08:22 +02:00
Reads hostmemory slot address. Slot numbers out of range return
false instead of numeric.
2012-01-11 15:05:01 +02:00
8.5.2 hostmemory.write(number address, number value)
2011-12-12 16:08:22 +02:00
Writes hostmemory slot with 0-255. Slot numbers out of range
cause extension of host memory slot space.
2012-01-11 15:05:01 +02:00
8.5.3 hostmemory.readbyte(number address)
2011-12-12 16:08:22 +02:00
Read unsigned byte (1 element) from given address. Slots out of
range return false.
2012-01-11 15:05:01 +02:00
8.5.4 hostmemory.writebyte(number address, number value)
2011-12-12 16:08:22 +02:00
Write unsigned byte (1 element) to given slot. Slot numbers out
of range cause extension.
2012-01-11 15:05:01 +02:00
8.5.5 hostmemory.readsbyte(number address)
2011-12-12 16:08:22 +02:00
Read signed byte (1 element) from given address. Slots out of
range return false.
2012-01-11 15:05:01 +02:00
8.5.6 hostmemory.writesbyte(number address, number value)
2011-12-12 16:08:22 +02:00
Write signed byte (1 element) to given slot. Slot numbers out of
range cause extension.
2012-01-11 15:05:01 +02:00
8.5.7 hostmemory.readword(number address)
2011-12-12 16:08:22 +02:00
Read unsigned word (2 elements) from given address. Slots out of
range return false.
2012-01-11 15:05:01 +02:00
8.5.8 hostmemory.writeword(number address, number value)
2011-12-12 16:08:22 +02:00
Write unsigned word (2 elements) to given slot. Slot numbers out
of range cause extension.
2012-01-11 15:05:01 +02:00
8.5.9 hostmemory.readsword(number address)
2011-12-12 16:08:22 +02:00
Read signed word (2 elements) from given address. Slots out of
range return false.
2012-01-11 15:05:01 +02:00
8.5.10 hostmemory.writesword(number address, number value)
2011-12-12 16:08:22 +02:00
Write signed word (2 elements) to given slot. Slot numbers out of
range cause extension.
2012-01-11 15:05:01 +02:00
8.5.11 hostmemory.readdword(number address)
2011-12-12 16:08:22 +02:00
Read unsigned doubleword (4 elements) from given address. Slots
out of range return false.
2012-01-11 15:05:01 +02:00
8.5.12 hostmemory.writedword(number address, number value)
2011-12-12 16:08:22 +02:00
Write unsigned doubleword (4 elements) to given slot. Slot
numbers out of range cause extension.
2012-01-11 15:05:01 +02:00
8.5.13 hostmemory.readsdword(number address)
2011-12-12 16:08:22 +02:00
Read signed doubleword (4 elements) from given address. Slots out
of range return false.
2012-01-11 15:05:01 +02:00
8.5.14 hostmemory.writesdword(number address, number value)
2011-12-12 16:08:22 +02:00
Write signed doubleword (4 elements) to given slot. Slot numbers
out of range cause extension.
2012-01-11 15:05:01 +02:00
8.5.15 hostmemory.readqword(number address)
2011-12-12 16:08:22 +02:00
Read unsigned quadword (8 elements) from given address. Slots out
of range return false.
2012-01-11 15:05:01 +02:00
8.5.16 hostmemory.writeqword(number address, number value)
2011-12-12 16:08:22 +02:00
Write unsigned quadword (4 elements) to given slot. Slot numbers
out of range cause extension.
2012-01-11 15:05:01 +02:00
8.5.17 hostmemory.readsqword(number address)
2011-12-12 16:08:22 +02:00
Read signed quadword (8 elements) from given address. Slots out
of range return false.
2012-01-11 15:05:01 +02:00
8.5.18 hostmemory.writesqword(number address, number value)
2011-12-12 16:08:22 +02:00
Write signed quadword (8 elements) to given slot. Slot numbers
out of range cause extension.
2012-01-11 15:05:01 +02:00
8.6 Table movie
2011-12-12 16:08:22 +02:00
Movie handling
2012-01-11 15:05:01 +02:00
8.6.1 movie.currentframe()
2011-12-12 16:08:22 +02:00
Return number of current frame.
2012-01-11 15:05:01 +02:00
8.6.2 movie.framecount()
2011-12-12 16:08:22 +02:00
Return number of frames in movie.
2012-01-11 15:05:01 +02:00
8.6.3 movie.readonly()
2011-12-12 16:08:22 +02:00
Return true if in readonly mode, false if in readwrite.
2012-01-11 15:05:01 +02:00
8.6.4 movie.set_readwrite()
2011-12-12 16:08:22 +02:00
Set readwrite mode (does not cause on_readwrite callback).
2012-01-11 15:05:01 +02:00
8.6.5 movie.frame_subframes(number frame)
2011-12-12 16:08:22 +02:00
Count number of subframes in specified frame (frame numbers are
1-based) and return that.
2012-01-11 15:05:01 +02:00
8.6.6 movie.read_subframe(number frame, number subframe)
2011-12-12 16:08:22 +02:00
Read specifed subframe in specified frame and return data as
array (100 elements, numbered 0-99 currently).
2012-01-11 15:05:01 +02:00
8.7 Table settings
2011-12-12 16:08:22 +02:00
Routines for settings manipulation
2012-01-11 15:05:01 +02:00
8.7.1 settings.get(string name)
2011-12-12 16:08:22 +02:00
Get value of setting. If setting is blank, returns false. If
setting value can't be obtained, returns (nil, error message).
2012-01-11 15:05:01 +02:00
8.7.2 settings.set(string name, string value)
2011-12-12 16:08:22 +02:00
Set value of setting. If setting can't be set, returns (nil,
error message).
2012-01-11 15:05:01 +02:00
8.7.3 settings.is_set(string name)
2011-12-12 16:08:22 +02:00
Returns if setting is set. If setting does not exist, returns
(nil, error message).
2012-01-11 15:05:01 +02:00
8.7.4 settings.blank(string name)
2011-12-12 16:08:22 +02:00
Blanks a setting and returns true. If setting can't be blanked,
returns (nil, error message).
2012-01-11 15:05:01 +02:00
8.8 Table memory
2011-12-12 16:08:22 +02:00
Contains various functions for managing memory
2012-01-11 15:05:01 +02:00
8.8.1 memory.vma_count()
2011-12-12 16:08:22 +02:00
Returns the number of VMAs
2012-01-11 15:05:01 +02:00
8.8.2 memory.read_vma(number index)
2011-12-12 16:08:22 +02:00
Reads the specified VMA (indices start from zero). Trying to read
invalid VMA gives nil. The read VMA is table with the following
fields:
• region_name (string): The readable name of the VMA
• baseaddr (number): Base address of the VMA
• lastaddr (number): Last address in the VMA.
• size (number): The size of VMA in bytes.
• readonly (boolean): True of the VMA corresponds to ROM.
• native_endian (boolean): True if the VMA has native endian as
opposed to little endian.
2012-01-11 15:05:01 +02:00
8.8.3 memory.find_vma(number address)
2011-12-12 16:08:22 +02:00
Finds the VMA containing specified address. Returns table in the
same format as read_vma or nil if not found.
2012-01-11 15:05:01 +02:00
8.8.4 memory.readbyte(number address)
2011-12-12 16:08:22 +02:00
Reads the specified address as unsigned byte and returns the
result.
2012-01-11 15:05:01 +02:00
8.8.5 memory.readsbyte(number address)
2011-12-12 16:08:22 +02:00
Reads the specified address as signed byte and returns the
result.
2012-01-11 15:05:01 +02:00
8.8.6 memory.writebyte(number address, number value)
2011-12-12 16:08:22 +02:00
Writes the specified value (negative values undergo 2's
complement) to specified address (as a byte).
2012-01-11 15:05:01 +02:00
8.8.7 memory.readword(number address)
2011-12-12 16:08:22 +02:00
Reads the specified address as unsigned word and returns the
result.
2012-01-11 15:05:01 +02:00
8.8.8 memory.readsword(number address)
2011-12-12 16:08:22 +02:00
Reads the specified address as signed word and returns the
result.
2012-01-11 15:05:01 +02:00
8.8.9 memory.writeword(number address, number value)
2011-12-12 16:08:22 +02:00
Writes the specified value (negative values undergo 2's
complement) to specified address (as a word).
2012-01-11 15:05:01 +02:00
8.8.10 memory.readdword(number address)
2011-12-12 16:08:22 +02:00
Reads the specified address as unsigned doubleword and returns
the result.
2012-01-11 15:05:01 +02:00
8.8.11 memory.readsdword(number address)
2011-12-12 16:08:22 +02:00
Reads the specified address as signed doubleword and returns the
result.
2012-01-11 15:05:01 +02:00
8.8.12 memory.writedword(number address, number value)
2011-12-12 16:08:22 +02:00
Writes the specified value (negative values undergo 2's
complement) to specified address (as a doubleword).
2012-01-11 15:05:01 +02:00
8.8.13 memory.readqword(number address)
2011-12-12 16:08:22 +02:00
Reads the specified address as unsigned quadword and returns the
result.
2012-01-11 15:05:01 +02:00
8.8.14 memory.readsqword(number address)
2011-12-12 16:08:22 +02:00
Reads the specified address as signed quadword and returns the
result.
2012-01-11 15:05:01 +02:00
8.8.15 memory.writeqword(number address, number value)
2011-12-12 16:08:22 +02:00
Writes the specified value (negative values undergo 2's
complement) to specified address (as a quadword).
2012-01-11 15:05:01 +02:00
8.9 Table _SYSTEM
2011-12-12 16:08:22 +02:00
Contains copy of global variables from time of Lua
initialization. Non-writeable.
2012-01-11 15:05:01 +02:00
8.10 Callbacks
2011-12-12 16:08:22 +02:00
Various callbacks to Lua that can occur.
2012-01-11 15:05:01 +02:00
8.10.1 Callback: on_paint()
2011-12-12 16:08:22 +02:00
Called when screen is being painted. Any gui.* calls requiring
graphic context draw on the screen.
2012-01-11 15:05:01 +02:00
8.10.2 Callback: on_video()
2011-12-12 16:08:22 +02:00
Called when video dump frame is being painted. Any gui.* calls
requiring graphic context draw on the video.
2012-01-11 15:05:01 +02:00
8.10.3 Callback: on_frame()
2011-12-12 16:08:22 +02:00
Called on each starting whole frame.
2012-01-11 15:05:01 +02:00
8.10.4 Callback: on_startup()
2011-12-12 16:08:22 +02:00
Called when the emulator is starting (lsnes.rc and --run files
has been run).
2012-01-11 15:05:01 +02:00
8.10.5 Callback: on_pre_load(string name)
2011-12-12 16:08:22 +02:00
Called just before savestate/movie load occurs (note: loads are
always delayed, so this occurs even when load was initiated by
lua).
2012-01-11 15:05:01 +02:00
8.10.6 Callback: on_err_load(string name)
2011-12-12 16:08:22 +02:00
Called if loadstate goes wrong.
2012-01-11 15:05:01 +02:00
8.10.7 Callback: on_post_load(string name, boolean was_savestate)
2011-12-12 16:08:22 +02:00
Called on successful loadstate. was_savestate gives if this was a
savestate or a movie.
2012-01-11 15:05:01 +02:00
8.10.8 Callback: on_pre_save(string name, boolean is_savestate)
2011-12-12 16:08:22 +02:00
Called just before savestate save occurs (note: movie saves are
synchronous and won't trigger these callbacks if called from
Lua).
2012-01-11 15:05:01 +02:00
8.10.9 Callback: on_err_save(string name)
2011-12-12 16:08:22 +02:00
Called if savestate goes wrong.
2012-01-11 15:05:01 +02:00
8.10.10 Callback: on_post_save(string name, boolean is_savestate)
2011-12-12 16:08:22 +02:00
Called on successful savaestate. is_savestate gives if this was a
savestate or a movie.
2012-01-11 15:05:01 +02:00
8.10.11 Callback: on_quit()
2011-12-12 16:08:22 +02:00
Called when emulator is shutting down.
2012-01-11 15:05:01 +02:00
8.10.12 Callback: on_input(boolean subframe)
2011-12-12 16:08:22 +02:00
Called when emulator is just sending input to bsnes core.
Warning: This is called even in readonly mode, but the results
are ignored.
2012-01-11 15:05:01 +02:00
8.10.13 Callback: on_reset()
2011-12-12 16:08:22 +02:00
Called when SNES is reset.
2012-01-11 15:05:01 +02:00
8.10.14 Callback: on_readwrite()
2011-12-12 16:08:22 +02:00
Called when moving into readwrite mode as result of “set-rwmode”
command (note: moving to rwmode by Lua won't trigger this, as per
recursive entry protection).
2012-01-11 15:05:01 +02:00
8.10.15 Callback: on_snoop(number port, number controller, number
2011-12-12 16:08:22 +02:00
index, number value)
Called each time bsnes asks for input. The value is the final
value to be sent to bsnes core (readonly mode, autohold and
autofire have been taken into account). Might be useful when
translating movies to format suitable for console verification.
Note: There is no way to modify the value to be sent.
2012-01-11 15:05:01 +02:00
9 Modifier and key names:
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
9.1 SDL Platform
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
9.1.1 Modifier names
2011-12-12 16:08:22 +02:00
Following modifier names are known:
• ctrl, lctrl, rctrl: Control keys
• alt, lalt, ralt: ALT keys.
• shift, lshift, rshift: Shift keys.
• meta, lmeta, rmeta: Meta keys.
• num, caps: Numlock/Capslock (these are sticky!)
• mode: Mode select.
2012-01-11 15:05:01 +02:00
9.1.2 Key names
2011-12-12 16:08:22 +02:00
Following key names are known:
• backspace, tab, clear, return, pause, escape, space, exclaim,
quotedbl, hash, dollar, 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, 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, delete, world_0,
world_1, world_2, world_3, world_4, world_5, world_6, world_7,
world_8, world_9, world_10, world_11, world_12, world_13,
world_14, world_15, world_16, world_17, world_18, world_19,
world_20, world_21, world_22, world_23, world_24, world_25,
world_26, world_27, world_28, world_29, world_30, world_31,
world_32, world_33, world_34, world_35, world_36, world_37,
world_38, world_39, world_40, world_41, world_42, world_43,
world_44, world_45, world_46, world_47, world_48, world_49,
world_50, world_51, world_52, world_53, world_54, world_55,
world_56, world_57, world_58, world_59, world_60, world_61,
world_62, world_63, world_64, world_65, world_66, world_67,
world_68, world_69, world_70, world_71, world_72, world_73,
world_74, world_75, world_76, world_77, world_78, world_79,
world_80, world_81, world_82, world_83, world_84, world_85,
world_86, world_87, world_88, world_89, world_90, world_91,
world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3,
kp4, kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide,
kp_multiply, kp_minus, kp_plus, kp_enter, kp_equals, up, down,
right, left, insert, home, end, pageup, pagedown, f1, f2, f3,
f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, numlock,
capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt, lalt,
rmeta, lmeta, lsuper, rsuper, mode, compose, help, print,
sysreq, break, menu, power, euro, undo
• Names of form 'key<n>' where <n> is 0-255 are interpretted as
key having hardware-dependent scan code of <n> (useful to bind
those keys that don't have symbolic names).
2012-01-11 15:24:36 +02:00
9.1.3 Joystick pseudo-keys:
2011-12-12 16:08:22 +02:00
• joystick<num>button<button>: Joystick <num> (0-based) button
<button> (0-based).
• joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat>
(0-based) up.
• joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat>
(0-based) left.
• joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat>
(0-based) down.
• joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat>
(0-based) right.
• joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis>
negative position (axis modes axis and axis_inverse).
• joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis>
positive position (axis modes axis and axis_inverse).
• joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis>
pressure (axis modes pressure_*).
2012-01-11 15:24:36 +02:00
9.1.4 Special buttons:
2011-12-12 16:08:22 +02:00
• Escape: Enter/Exit Command mode, cancel modal dialogs.
• Return (also KPEnter): Execute command, ok modal dialog.
• Pgup/Up (also KP8/9 if no num lock; command mode): Previous
command in command history
• Pgdn/Down(also KP2/3 if no num lock; command mode): Next
command in command history
• Home (also KP7 if no num lock; command mode): Beginning of
command.
• End (also KP1 if no num lock; command mode): End of command.
• Left (also KP4 if no num lock; command mode): Move cursor left.
• Right (also KP6 if no num lock; command mode): Move cursor
right.
• Delete (also KP. if no num lock; command mode): Delete
character to right of cursor.
• Insert (also KP0 if no num lock; command mode): Toggle between
insert / overwrite modes.
• Backspace (command mode): Delete character to left of cursor.
• LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump
corrupted!).
2012-01-11 15:24:36 +02:00
9.2 wxWidgets platform
9.2.1 Modifier names:
Following modifier names are known:
• alt
• ctrl
• shift
• meta
• cmd (Mac OS X only)
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
9.2.2 Key names:
Following key names are known:
• back, tab, return, escape, space, exclaim, quotedbl, hash,
dollar, percent, ampersand, quote, leftparen, rightparen,
asterisk, plus, comma, minus, period, slash, 0, 1, 2, 3, 4, 5,
6, 7, 8, 9, colon, semicolon, less, equals, greater, question,
at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t,
u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m,
n, o, p, q, r, s, t, u, v, w, x, y, z, leftcurly, pipe,
rightcurly, tilde, delete, start, lbutton, rbutton, cancel,
mbutton, clear, shift, alt, control, menu, pause, capital, end,
home, lefT, up, right, down, select, print, execute, snapshot,
insert, help, numpad0, numpad1, numpad2, numpad3, numpad4,
numpad5, numpad6, numpad7, numpad8, numpad9, multiply, add,
separator, subtract, decimal, divide, f1, f2, f3, f4, f5, f6,
f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19,
f20, f21, f22, f23, f24, numlock, scroll, pageup, pagedown,
numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up,
numpad_right, numpad_down, numpad_pageup, numpad_pagedown,
numpad_end, numpad_begin, numpad_insert, numpad_delete,
numpad_equal, numpad_multiply, numpad_add, numpad_separator,
numpad_subtract, numpad_decimal, numpad_divide, windows_left,
windows_right, windows_menu, command, special1, special2,
special3, special4, special5, special6, special7, special8,
special9, special10, special11, special12, special13,
special14, special15, special16, special17, special18,
special19, special20
2011-12-12 16:08:22 +02:00
2012-01-11 15:05:01 +02:00
10 Movie file format
2011-12-12 16:08:22 +02:00
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).
2012-01-11 15:05:01 +02:00
10.1 Detecting clean start/SRAM/Savestate
2011-12-12 16:08:22 +02:00
• If file has member “savestate” it is savestate, otherwise:
• If file has members with names starting “moviesram.” it is
movie starting from SRAM, otherwise:
• It is movie starting from clear state.
2012-01-11 15:05:01 +02:00
10.2 Member: gametype
2011-12-12 16:08:22 +02:00
Type of game ROM and region (as one line). Valid values are:
+--------------+---------------------+--------+
| Value | System | Region |
+--------------+---------------------+--------+
+--------------+---------------------+--------+
| snes_pal | Super NES | PAL |
+--------------+---------------------+--------+
| sgb_pal | Super Game Boy | PAL |
+--------------+---------------------+--------+
| snes_ntsc | Super NES | NTSC |
+--------------+---------------------+--------+
| sgb_ntsc | Super Game Boy | NTSC |
+--------------+---------------------+--------+
| bsx | BS-X (non-slotted) | NTSC |
+--------------+---------------------+--------+
| bsxslotted | BS-X (slotted) | NTSC |
+--------------+---------------------+--------+
| sufamiturbo | Sufami Turbo | NTSC |
+--------------+---------------------+--------+
Frame rates are:
+---------+-----------------+
| Region | Framerate (fps) |
+---------+-----------------+
+---------+-----------------+
| PAL | 322445/6448 |
+---------+-----------------+
| NTSC | 10738636/178683 |
+---------+-----------------+
2012-01-11 15:05:01 +02:00
10.3 Member: port1
2011-12-12 16:08:22 +02:00
Contains type of port #1 (as one line). Valid values are 'none',
'gamepad', 'multitap' and 'mouse'. If not present, defaults to
'gamepad'.
2012-01-11 15:05:01 +02:00
10.4 Member: port2
2011-12-12 16:08:22 +02: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'.
2012-01-11 15:05:01 +02:00
10.5 Member: gamename
2011-12-12 16:08:22 +02:00
Contains name of the game (as one line).
2012-01-11 15:05:01 +02:00
10.6 Member: authors
2011-12-12 16:08:22 +02:00
Contains authors, one per line. Part before '|' is the full name,
part after is the nickname.
2012-01-11 15:05:01 +02:00
10.7 Member: systemid
2011-12-12 16:08:22 +02:00
Always “lsnes-rr1” (one line). Used to reject other saves.
2012-01-11 15:05:01 +02:00
10.8 Member: controlsversion
2011-12-12 16:08:22 +02:00
Always “0” (one line). Used to identify what controls are there.
2012-01-11 15:05:01 +02:00
10.9 Member: “coreversion”
2011-12-12 16:08:22 +02:00
Contains bsnes core version number (as one line).
2012-01-11 15:05:01 +02:00
10.10 Member: projectid
2011-12-12 16:08:22 +02:00
Contains project ID (as one line). Used to identify if two movies
are part of the same project.
2012-01-11 15:05:01 +02:00
10.11 Member: {rom,slota,slotb}{,xml}.sha256
2011-12-12 16:08:22 +02:00
Contains SHA-256 of said ROM or ROM mapping file (as one line).
Absent if corresponding file is absent.
2012-01-11 15:05:01 +02:00
10.12 Member: moviesram.<name>
2011-12-12 16:08:22 +02:00
Raw binary startup SRAM of kind <name>. Only present in
savestates and movies starting from SRAM.
2012-01-11 15:05:01 +02:00
10.13 Member: saveframe
2011-12-12 16:08:22 +02:00
Contains frame number (as one line) of frame movie was saved on.
Only present in savestates.
2012-01-11 15:05:01 +02:00
10.14 Member: lagcounter
2011-12-12 16:08:22 +02:00
Current value of lag counter (as one line). Only present in
savestates.
2012-01-11 15:05:01 +02:00
10.15 Member: pollcounters
2011-12-12 16:08:22 +02:00
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.
2012-01-11 15:05:01 +02:00
10.16 Member: hostmemory
2011-12-12 16:08:22 +02:00
Raw binary dump of host memory. Only present in savestates.
2012-01-11 15:05:01 +02:00
10.17 Member: savestate
2011-12-12 16:08:22 +02:00
The raw binary savestate itself. Savestate detection uses this
file, only present in savestates.
2012-01-11 15:05:01 +02:00
10.18 Member: screenshot
2011-12-12 16:08:22 +02:00
Screenshot of current frame. Only present in savestates. First 2
bytes are big-endian width of image, rest are 24-bit RGB image
data. Height of image is inferred from the width and size of
data.
2012-01-11 15:05:01 +02:00
10.19 Member: sram.<name>
2011-12-12 16:08:22 +02:00
Raw binary SRAM of kind <name> at time of savestate. Only present
in savestates.
2012-01-11 15:05:01 +02:00
10.20 Member: input
2011-12-12 16:08:22 +02:00
The actual input track, one line per subframe (blank lines are
skipped).
• If the first byte of each line is '.', ' ', <tab> or '|', then
the line is part of same frame as previous, otherwise it starts
a new frame.
• First subframe must start a new frame.
Length of movie in frames is number of lines in input file that
start a new frame.
2012-01-11 15:05:01 +02:00
10.21 Member: rerecords
2011-12-12 16:08:22 +02:00
Contains textual base-10 rerecord count (as one line; emulator
just writes this, it doesn't read it) + 1.
2012-01-11 15:05:01 +02:00
10.22 Member: rrdata
2011-12-12 16:08:22 +02:00
This member stores set of load IDs. There is one load ID per
rerecord (plus one corresponding to start of project).
• This member constists of concatenation of records
• Each record is 2-36 bytes long and can represent 1-16,843,009
consequtive IDs.
• IDs are interpretted as 256-bit big-endian integers with
warparound.
• Initial predicted ID is all zeroes.
Format of each record is:
• 1 byte: Opcode byte. Bits 0-4 are prefix length (prefixlen),
bits 5-6 are count length (countlen). Bit 7 is unused.
• 32-prefixlen bytes of ID.
• countlen bytes of big-endian count (count).
Records are processed as follows:
• To form the first ID encoded by record, take the first
prefixlen bytes predicted ID and append the read ID value to
it. The result is the first ID encoded.
• If countlen is 0, record encodes 1 ID.
• If countlen is 1, record encodes 2+count IDs.
• If countlen is 2, record encodes 258+count IDs.
• If countlen is 3, record encodes 65794+count IDs.
• The new predicted ID is the next ID after last one encoded by
the record.
The number of rerecords + 1 is equal to the sum of number of IDs
encoded by all records.
2012-01-11 15:05:01 +02:00
10.23 Member: starttime.second
2011-12-12 16:08:22 +02:00
Movie starting time, second part. Epoch is Unix epoch. Default is
1,000,000,000.
2012-01-11 15:05:01 +02:00
10.24 Member: starttime.subsecond
2011-12-12 16:08:22 +02:00
Movie starting time, subsecond part. Unit is CPU clocks. Default
is 0.
2012-01-11 15:05:01 +02:00
10.25 Member: savetime.second
2011-12-12 16:08:22 +02:00
Movie saving time, second part. Default is starttime.second. Only
present in savestates.
2012-01-11 15:05:01 +02:00
10.26 Member: savetime.subsecond
2011-12-12 16:08:22 +02:00
Movie saving time, subsecond part. Default is
starttime.subsecond. Only present in savestates.
2012-01-11 15:24:36 +02:00
11 Quick'n'dirty encode guide
2011-12-12 16:08:22 +02:00
1. Start the emulator and load the movie file.
2. Set large AVI option 'set-setting avi-large on'
2012-01-06 18:31:18 +02:00
3. Enable dumping 'dump-avi tmpdump'
2011-12-12 16:08:22 +02:00
4. Unpause and let it run until you want to end dumping.
5. Close the emulator (closing the window is the easiest way). Or
use 'end-avi'.
6. For each tmpdump*.avi file created, on command prompt, do
'x264 --crf 10 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
7. Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
8. Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv +
tmpdump_0000001.mkv + tmpdump_0000002.mkv' (list every
tmpdump_<numbers>.mkv, with + in between).
9. Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'. Now
final.mkv contains quick'n'dirty encode.
2012-01-11 15:24:36 +02:00
12 Axis configurations for some gamepad types:
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
12.1 XBox360 controller:
2011-12-12 16:08:22 +02:00
Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be
set to pressure-+.
set-axis joystick0axis2 pressure-+
set-axis joystick0axis5 pressure-+
2012-01-11 15:24:36 +02:00
• This is needed for SDL only. EVDEV sets those types correctly.
12.2 PS3 “sixaxis” controller:
2011-12-12 16:08:22 +02:00
Axes 8-19 should be disabled.
set-axis joystick0axis8 disabled
set-axis joystick0axis9 disabled
set-axis joystick0axis10 disabled
set-axis joystick0axis11 disabled
set-axis joystick0axis12 disabled
set-axis joystick0axis13 disabled
set-axis joystick0axis14 disabled
set-axis joystick0axis15 disabled
set-axis joystick0axis16 disabled
set-axis joystick0axis17 disabled
set-axis joystick0axis18 disabled
set-axis joystick0axis19 disabled
2012-01-11 15:24:36 +02:00
13 Errata:
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
13.1 Problems from BSNES core:
2011-12-12 16:08:22 +02:00
• The whole pending save stuff.
• Lack of layer hiding.
2012-01-11 15:24:36 +02:00
• It is slow (especially accuracy).
2011-12-12 16:08:22 +02:00
• Firmwares can't be loaded from ZIP archives.
2012-01-11 15:24:36 +02:00
13.2 Other problems:
2011-12-12 16:08:22 +02:00
2011-12-18 18:18:08 +02:00
• Modifiers don't work with pseudo-keys (SDL, EVDEV).
2011-12-12 16:08:22 +02:00
• Audio for last dumped frame is not itself dumped.
2012-01-11 15:24:36 +02:00
• Audio in UI is pretty bad in quality if game doesn't run at
full speed.
2011-12-12 16:08:22 +02:00
• AVI compression levels 10-18 are not compatible with AVISynth
AVISource.
• No menus, command based interface (SDL).
• Long commands don't scroll.
• The SDL screen drawing is slow.
2012-01-11 15:24:36 +02:00
• Wxwidgets UI is still pretty buggy.
2011-12-18 18:18:08 +02:00
2012-01-11 15:24:36 +02:00
14 Changelog:
2011-12-12 16:08:22 +02:00
2012-01-11 15:24:36 +02:00
14.1 rr0-beta1
2011-12-12 16:08:22 +02:00
• Fix -Wall warnings
• Fix dumper video corruption with levels 10-18.
2012-01-11 15:24:36 +02:00
14.2 rr0-beta2
2011-12-12 16:08:22 +02:00
• Autofire
• Lots of code cleanups
• Lua interface to settings
• Allow specifying AVI borders without Lua
• Fix scaling if vscale > 1 and originx > 0 (left border exists)
• on_snoop lua callback
• Faster movie loading and saving.
2012-01-11 15:24:36 +02:00
14.3 rr0-beta3
2011-12-12 16:08:22 +02:00
• Joystick support
2012-01-11 15:24:36 +02:00
14.4 rr0-beta4
2011-12-12 16:08:22 +02:00
• Fix multi-buttons
• Save jukebox functionality.
2012-01-11 15:24:36 +02:00
14.5 rr0-beta5
2011-12-12 16:08:22 +02:00
• Try to fix some nasty failing movie load edge cases
• Allow specifying scripts to run on command line.
2012-01-11 15:24:36 +02:00
14.6 rr0-beta6
2011-12-12 16:08:22 +02:00
• Major source code reorganization.
• Backup savestates before overwriting.
• Don't crash if loading initial state fails.
2012-01-11 15:24:36 +02:00
14.7 rr0-beta7
2011-12-12 16:08:22 +02:00
• Fix firmware lookup
• Fix author name parsing
• Fix rerecord counting
• (SDL) Print messages to console if SDL is uninitialized
• Add movieinfo program
• Fix loading movies starting from SRAM.
2012-01-11 15:24:36 +02:00
14.8 rr0-beta8
2011-12-12 16:08:22 +02:00
• Add support for unattended dumping
• Fix compiling for Win32
• Don't lock up if sound can't be initialized
• Strip trailing CR from commands
• Don't try to do dubious things in global ctors (fix crash on
startup)
2012-01-11 15:24:36 +02:00
14.9 rr0-beta9
2011-12-12 16:08:22 +02:00
• Small documentation tweaking
• Fix make clean
• Fix major bug in modifier matching
2012-01-11 15:24:36 +02:00
14.10 rr0-beta10
2011-12-12 16:08:22 +02:00
• Lots of documentation fixes
• Use dedicated callbacks for event backcomm., not commands.
• Ensure that the watchdog is not hit when executing delayed
reset.
• Remove errant tab from joystick message.
2012-01-11 15:24:36 +02:00
14.11 rr0-beta11
2011-12-12 16:08:22 +02:00
• Make autofire operate in absolute time, not linear time
• Reinitialize controls when resuming from loadstate
• Some more code cleanups
• If Lua allocator fails, call OOM_panic()
• Byte/word/dword/qword sized host memory write/read functions.
• Dump at correct framerate if dumping interlaced NTSC
(height=448).
2012-01-11 15:24:36 +02:00
14.12 rr0-beta12
2011-12-12 16:08:22 +02:00
• Actually include the complete source code
• Keep track of RTC
2012-01-11 15:24:36 +02:00
14.13 rr0-beta13
2011-12-12 16:08:22 +02:00
• Document {save,start}time.{,sub}second.
• Intercept time() from bsnes core.
2012-01-11 15:24:36 +02:00
14.14 rr0-beta14
2011-12-12 16:08:22 +02:00
• Allow disabling time() interception (allow build on Mac OS X)
• Use SDLMain on Mac OS X (make SDL not crash)
• Disable delayed resets (just plain too buggy for now).
• Code cleanups
• Use 16-bit for graphics/video instead of 32-bit.
• gui.rectangle/gui.pixel
• gui.crosshair
• New CSCD writer implementation.
2012-01-11 15:24:36 +02:00
14.15 rr0-beta15
2011-12-12 16:08:22 +02:00
• Fix interaction of * and +.
• Manual improvements
• Use gettimeofday()/usleep(), these seem portable enough.
• Move joystick axis manipulation to keymapper code.
• Changes to how read-only works.
• Refactor controller input code.
2012-01-11 15:24:36 +02:00
14.16 rr0-beta16
2011-12-12 16:08:22 +02:00
• Fix mouseclick scale compensation.
• Draw area boundaries correctly in SDL code.
• gui.screenshot.
• Fix CSCD output (buffer overrun and race condition).
2012-01-11 15:24:36 +02:00
14.17 rr0-beta17
2011-12-12 16:08:22 +02:00
• JMD dumping support.
• Allow unattended dumping to JMD.
• Move to BSNES v083.
• Switch back to 32-bit colors.
• Add Lua function gui.color.
• Use some new C++11 features in GCC 4.6.
• Be prepared for core frequency changes.
• Pass colors in one chunk from Lua.
2012-01-11 15:24:36 +02:00
14.18 rr0-beta18
2011-12-12 16:08:22 +02:00
• New lua functions gui.line(), gui.status() and gui.circle(),
memory.vma_count(), memory.read_vma() and memory.find_vma().
• Numerious documentation fixups
• RTC time format changed
• Reformat flags display
• Allow lua package name to be overridden
• SDUMP (high-quality dumping).
• Split platform support to plugins.
• Make all sound plugins support basic sound commands
• Support portaudio for sound.
• Allow disable Lua/SDL searching.
• Upconvert colors when copying lcscreen to screen.
• Reorganize source tree.
• Evdev joystick support.
• Refactor more code into generic window code.
2012-01-11 15:24:36 +02:00
14.19 rr0-beta19
2011-12-12 16:08:22 +02:00
• Refactor message handling.
• Rework makefile
• Documentation fixes
• Finish pending saves before load/quit.
• Wxwidgets graphics plugin.
2012-01-11 15:24:36 +02:00
14.20 rr0-beta20
2011-12-12 16:08:22 +02:00
• Get rid of win32-crap.[ch]pp.
• Move files around a lot.
• Get rid of need for host C++ compiler.
• Bsnes v084 core.
• Refactor inter-component communication.
• Fix zero luma.
• Fix crash on multiline aliases.
• Load/Save settings in wxwidgets gui.
2012-01-11 15:24:36 +02:00
14.21 rr0-beta21
2011-12-12 16:08:22 +02:00
• Patch problems in bsnes core
• SNES is little-endian, not big-endian!
• Fix memory corruption in lcscreen::load()
2012-01-11 15:24:36 +02:00
14.22 rr0-beta22
2011-12-12 16:08:22 +02:00
• Fix interpretting repeat counts in rrdata loading.
• New lua callback: on_frame()
• Remove calls to runtosave() that aren't supposed to be there
• Lua function: movie.read_rtc()
• Ignore src/fonts/font.cpp
• Fix more bsnes core problems
• Control bsnes random seeding
• Pause-on-end
• Some bsnes core debugging features (state dump and state hash)
• Fix titlebar version number (no, the last version wasn't
'lsnes-0-beta21', it was 'lsnes rr0-beta21').
2012-01-11 15:24:36 +02:00
14.23 rr0-beta23
2011-12-12 16:08:22 +02:00
• Fix memory corruption due to macro/field mixup
• search-memory update
• Allow direct-mapped framebuffer
• SDL: Use SDL_ANYFORMAT if possible
• SDMP2SOX: 2s delay modes.
• Wxwidgets: Cleanups
• Use sed -E, not sed -r. Fixes building on Mac OS X.
• Wxwidgets: Save jukebox on exit
• Fix RTC if using load-movie on savestate.
• Fix crash related to full console mode.
2012-01-11 15:24:36 +02:00
14.24 rr0-beta24
2011-12-12 16:08:22 +02:00
• Wxwidgets: Allow bringing application to foreground on Mac OS
X.
• Wxwidgets: Allow compiling on Mac OS X.
• Use movie compare instead of movie hashing (faster save/load).
• Lua: _SYSTEM table.
2012-01-11 15:24:36 +02:00
14.25 rr0-beta25
2011-12-12 16:08:22 +02:00
• sdmp2sox: Pad soundtrack if using -l or -L.
• sdmp2sox: Fix NTSC overscan.
• sdmp2sox: Add AR correction mode.
• call lua_close() when exiting.
• Fix zip_writer bug causing warnings from info-zip and error
from advzip.
2012-01-11 15:24:36 +02:00
14.26 rr0-beta26
2011-12-12 19:17:40 +02:00
• Fix IPS patching code (use bsnes core IPS patcher).
• Implement BPS patching (using bsnes core IPS patcher).
• Add feature to load headered ROMs.
2012-01-11 15:24:36 +02:00
14.27 rr0-beta27
• Show command names when showing keybindings
2012-01-11 15:24:36 +02:00
14.28 rr0
2011-12-18 18:18:08 +02:00
• Fix pause-on-end to be actually controllable
• SDL: Poll all events in queue, not just first one (fixes
slowness in command typing)
• Wxwidgets: Fix ROM loading.
2012-01-11 15:24:36 +02:00
14.29 rr1-beta0
2012-01-06 18:31:18 +02:00
• Lua: Add gui.textH, gui.textV, gui.textHV
• Fix text colors on SDL on Mac OS X
• Mode 'F' for finished in readonly mode.
• Fix some WS errors.
• Reliably pause after skip poll
• Split UI and core into their own threads
2012-01-11 15:24:36 +02:00
14.30 rr1-beta1
2012-01-06 18:31:18 +02:00
• Remove leftover dummy SRAM slot
• Fix controller numbers.
2012-01-11 15:24:36 +02:00
14.31 rr1-beta2
• Fix lsnes-dumpavi after interface change.
• Also give BSNES patches for v085.
• Pack movie data in memory.
2012-01-11 15:24:36 +02:00
14.32 rr1-beta3
2012-01-10 01:15:50 +02:00
• Fix framecount/length given when loading movies.
• Controller command memory leak fixes.
• Don't leak palette if freeing screen object.
2012-01-11 15:24:36 +02:00
14.33 rr1-beta4
2012-01-11 15:05:01 +02:00
• Detect revisions.
• Wxwidgets: Allow controlling dumper from the menu.