Supported Snes9x versions and joypad controllers.
Digital columns are compact; button_layout() gives their stable IDs.
Numeric source channels are always retained in analog_channels().
Arguments
- path
Recording file path.
- analog
Stick representation:
"raw"(default),"cardinal4","cardinal8","angle", or"angle+magnitude". A scalar applies to both sticks;c(left = "cardinal8", right = "angle")selects them independently. Cardinal modes add separate left/right logical direction columns. Continuous modes return numeric fields throughstick_channels(). Original X/Y values remain inanalog_channels()in every mode. Absent sticks add no columns.- deadzone
Radial threshold in centred axis half-range units, from zero to one. One value applies to both sticks; named left/right values are allowed.
NULLuses the default of the controller, whichever emulator recorded it: 0.125 for the sticks of Nintendo's consoles (Nintendo 64, GameCube, Wii extensions, 3DS) and 0.25 for all other sticks. The first is close to the 15 of 128 units that the GameCube's controller library discards on each axis (PAD_Clampin libogc). The second covers the resting position of a released PlayStation stick, up to about 32 of 128 units from the centre (psx-spx), and is close to the 7849 and 8689 of 32767 that Microsoft gives for the thumbsticks of PC gamepads (XInput). A game applies a threshold of its own, which the recording does not store; give that value to study one game. Neutral observations have no direction and anNAangle. Magnitude is kept.- triggers
"raw"(default) or"digital". For DTM, digital additionally projects each analogue trigger at 128/255 into separate L2/R2 columns. Hardware L/R click bits remain distinct from thresholded analogue triggers.- aliases
TRUE(default) places the controls of a recording under the shared IDs thatbutton_layout()describes. WithFALSE, a control that would be placed under another control's ID keeps the key of its source, so every control of the recording has a column of its own and no two are combined.- ...
Reader-specific arguments, such as
controller_orderfor M64 or DTM, ormemberfor a recording inside a ZIP archive (seemovie_members()).
Value
A replayr_movie with compact digital columns and selected stick fields.
Details
Each row is an input sample. A recording holds one sample more than its
frame count. Version 4 and 5 files also declare a count of input samples;
when that count is larger and the samples are stored, all of them are
returned. Bytes after the declared range are left unread and counted in
header$unusedTrailingBytes.
header$romCRC32 and header$romName hold the CRC32 of the ROM and its
internal name, as Snes9x stores them before the savestate; recordings of
early Snes9x versions leave both empty. Japanese names keep their
katakana.
Examples
movie <- read_smv(system.file("extdata", "sample.smv", package = "replayr"))
movie
#> <replayr_movie [smv] observations=3600 players=1 buttons=12 source=sample.smv>
#> Header keys: version, uid, rerecordCount, ctrlMask, opts, isPal, sync, inputSampleCount, ...
#> P1 active observations: dpad_right=900, dpad_left=900, dpad_down=900, dpad_up=900, start=6, select=4, b=900, a=450, x=288
press_counts(movie)
#> dpad_right dpad_left dpad_down dpad_up start select b
#> 900 900 900 900 6 4 900
#> a x y l1 r1
#> 450 288 0 0 0