replayr -- Read Emulator Input Recordings
Copyright (C) 2025-2026 Thorben Pelzer

replayr is free software, distributed under the GNU General Public License
version 2 or, at your option, any later version. It is provided without warranty.

The input fixtures distributed with replayr are original artificial recordings.
Their generators are included under tools/ or in the test suite. They contain
no published TAS recordings, game ROMs, audiovisual material, or emulator
binaries. They are distributed under replayr's package license.

FORMAT REFERENCES AND SOURCE PROVENANCE

The readers implement file layouts described in public specifications and
upstream serialization code. The references below identify those materials.
The readers are original R implementations; upstream source trees and
published recordings are not distributed with this package.
The upstream license notices listed here describe the consulted material,
whose terms vary by project and component.

TASVideos format documentation
  https://tasvideos.org/EmulatorResources
  FMV: https://tasvideos.org/EmulatorResources/Famtasia/FMV
  FCM: https://tasvideos.org/EmulatorResources/FCEU/FCM
  M64: https://tasvideos.org/EmulatorResources/Mupen/M64
  SMV: https://tasvideos.org/EmulatorResources/Snes9x/SMV
  GMV: https://tasvideos.org/EmulatorResources/Gens/GMV
  MAR: https://tasvideos.org/EmulatorResources/Mamerr/Mar
  Additional format-specific references appear in the reader source headers.

FCEUX (FM2 and FM3)
  https://fceux.com/web/FM2.html
  https://github.com/TASEmulators/fceux
  src/movie.cpp, src/movie.h, and src/input/zapper.cpp describe text/binary
  records, TAS Editor boundaries, and Zapper fields. GPL-2.0-or-later.

BizHawk (BK2, BKM, TAS, TASPROJ, and GBMV container structure)
  https://github.com/TASEmulators/BizHawk/tree/ab81ea25762af8ece499ba278e3f5cc3848ec742
  The original BizHawk C# code is MIT-licensed. Controller definitions,
  Bk2Controller, Bk2LogEntryGenerator, and legacy InputAdapters establish
  field identities, serialization order, and axis ranges. Emulation cores
  bundled with BizHawk have their own licenses. The nominal console frame
  rates of recording_info() are those of PlatformFrameRates in
  BizHawk.Client.Common, which gives the clock derivation of each.

Dolphin (GameCube and Wii DTM)
  https://github.com/dolphin-emu/dolphin
  Source/Core/Core/Movie.cpp and Movie.h; WiimoteCommon/DataReport;
  WiimoteEmu/DesiredWiimoteState, Camera, and Extension/{Nunchuk,Classic}.
  GPL-2.0-or-later. The mixed HID layout follows Dolphin 5.0.
  The extended Zelda Edition layout follows Movie.h in:
  https://github.com/dragonbane0/dolphin/tree/a6e66c227c592d09ff09ef9b238d15ff52dd9632
  GPL-2.0-or-later.

PCSX-rerecording (PXM) and PSXjin (PJM)
  https://github.com/TASEmulators/pcsxrr
  https://code.google.com/archive/p/psxjin/
  Controller packet layouts; GPL-2.0-or-later.

lsnes (LSMV)
  https://repo.or.cz/lsnes.git
  https://tasvideos.org/EmulatorResources/Lsnes/LSMV
  Movie and controller serialization; GPL-2.0-or-later.

VBA-rerecording (VBM)
  https://github.com/TASEmulators/vba-rerecording
  movie.h and the movie reader; GPL-2.0-or-later.

Mupen64 (M64)
  https://github.com/mupen64/mupen64-rr-lua/blob/main/src/Core/R4300/VCR.cpp
  Header-declared controller sample count and playback boundaries;
  GPL-2.0-or-later, Mupen64 Organization.

Doom, Heretic and Hexen (LMP)
  https://github.com/id-Software/DOOM/blob/master/linuxdoom-1.10/g_game.c
  id Software's released Doom source carries GPL version 2.
  https://github.com/coelckers/prboom-plus/blob/master/prboom2/src/g_game.c
  Boom versions 200-202, compatibility flags, game options, and tic commands;
  GPL-2.0-or-later. Notices identify id Software, Boom and PrBoom contributors,
  and Andrey Budko.
  https://github.com/dsda-org/dsda-doom (v0.29.4: prboom2/src/g_game.c,
  prboom2/src/dsda/demo.c, excmd.c, options.c)
  Header layouts of every demo version, 16-bit turning, TASDoom command
  order, the outer headers of dsda-doom and PrBoom+um, MBF21 options, and
  extended commands; GPL-2.0-or-later. Notices identify id Software, the
  Boom, MBF and PrBoom contributors, Andrey Budko, and Ryan Krafnick.
  https://github.com/chocolate-doom/chocolate-doom (3.1.0: src/heretic and
  src/hexen, g_game.c, p_user.c, h2def.h)
  Heretic and Hexen commands: look, fly, artifact, jump, player classes;
  GPL-2.0-or-later. Notices identify Raven Software and Simon Howard.

Dega (MMV)
  https://github.com/Plombo/dega/blob/master/mast/video.cpp
  Header, controller packets, and end-of-file behavior. No explicit license
  notice was identified in the consulted file or repository license files.

DeSmuME (DSM)
  https://github.com/TASEmulators/desmume/blob/master/desmume/src/movie.cpp
  Text/binary records, pad order, touchscreen, microphone, and command fields;
  GPL-2.0-or-later, DeSmuME team.

PCEjin and VBjin (MC2)
  https://github.com/TASEmulators/pcejin/blob/master/movie.cpp
  https://github.com/TASEmulators/vbjin/blob/master/movie.cpp
  Port counts and text/binary records. No explicit license notice was found
  in these two movie.cpp files. VBjin's mednafen/src/vb/vb.cpp, consulted for
  the controller descriptor, carries GPL-2.0-or-later.

Yabause-rerecording (YMV)
  https://github.com/adelikat/yabause-rr/blob/master/src/windows/movie.cpp
  Enhanced version-1 records and Saturn pad fields; GPL-2.0-or-later.

Mednafen-rerecording (MCM)
  https://github.com/TASEmulators/mednafen-rr
  src/movie.cpp and system input descriptors. Root COPYING contains GPLv2;
  consulted Mednafen descriptor notices generally permit GPLv2 or later.
  The Lynx descriptor carries K. Wilkins's permissive zlib-style notice.
  Component-specific notices take precedence over repository-wide summaries.

Citra/Azahar (CTM)
  https://github.com/azahar-emu/azahar/blob/master/src/core/movie.cpp
  Tagged device polls and HID/IR service field definitions;
  GPL-2.0-or-later, Citra Emulator Project / Azahar Emulator Project.

GZ (GZM)
  https://github.com/MrPancakeTurtle/gz
  src/gz/gz_macro.c, gz_movie.c, gz.h, and z64.h describe macro updates,
  button edges, reset bits, synchronization, and seed records. No explicit
  license notice was identified in the consulted files or repository notices.

ZSNES (ZMV)
  https://github.com/emillon/zsnes/blob/master/src/zmovie.c
  Enhanced movie headers, compressed state blocks, controller packing,
  repeat records, and chapter tables. GPL-2.0-only, ZSNES Team.

MAME-rerecording (MAR)
  The reader uses the published MAR structure and factual game port mappings.
  Historical MAME-rr serialization was inspected to verify record boundaries;
  its noncommercial source is not reproduced or translated into the R reader.
  The bundled mar-layouts.json cites each port-order reference and corresponding
  current MAME driver. The inspected current drivers use BSD-3-Clause notices:
  https://github.com/mamedev/mame/tree/master/src/mame

FinalBurn Alpha (FBM)
  The FGK adaptive Huffman decoder is independently implemented from the
  mathematical algorithm described by Jeffrey Scott Vitter (1987), section 2:
  https://doi.org/10.1145/31846.42227
  FBM word order and chunk structure were checked against published recordings.
  https://github.com/TASEmulators/fbarr/blob/b679678de6b9f6548c46862d4c74ba4fb7cc1fdf/fbarr/src/burner/win32/replay.cpp
  src/burner/win32/replay.cpp gives the layout of the text that follows the
  input (chunk FRM1). FB Alpha licence (free to use and modify, not for profit), FB Alpha team and
  the fbarr contributors. No code is taken from it.
  Bundled fbm-layouts.json contains factual input-field order, names, and types
  with source references. No emulator decompressor implementation is included.

Dustmod (DFT)
  https://tasvideos.org/EmulatorResources/Dustmod
  https://dustkidblog.wordpress.com/2016/08/07/nexus-tasing-with-dustmod/
  Script syntax, archive structure, and input commands. Directional double-tap
  encoding is documented by Dusted's exporter and tests:
  https://github.com/AlexMorson/dusted/blob/af0a8f57a12f5b6986c9791c64bef7578e192acb/src/dusted/nexus_script.py
  Dusted uses the MIT license, Alex Morson. The R reader independently parses
  the script syntax and retains commands as data.


Atari Grand Challenge data set and Atari-HEAD (TXT tables of actions)
  https://arxiv.org/abs/1705.10998
  https://github.com/yobibyte/atarigrandchallenge/blob/master/agc/dataset.py
  agc/dataset.py reads the trajectory files and agc/util.py lists the
  action names. No licence stated; Vitaly Kurin and co-authors. No code is
  taken from it.
  https://doi.org/10.5281/zenodo.3451402
  The description of the data set and its action_enums.txt give the columns
  of a trial and the action numbers of the Arcade Learning Environment.
  Creative Commons Attribution 4.0; Ruohan Zhang and co-authors.
  Neither data set is distributed with this package; the two tables under
  inst/extdata/tables were written for replayr.

GoldSrc (DEM)
  https://github.com/YaLTeR/hldemo-rs/blob/cbc1efa212a4fc49c776304058efd07e0369caa7/src/types.rs
  src/types.rs and src/parse/frame describe the header, the directory of
  sections and the frames of demo protocol 5. Apache-2.0 or MIT, Ivan
  Molodetskikh.
  https://github.com/ValveSoftware/halflife/blob/de70fada5061965884492178a7d6166646424a4e/common/usercmd.h
  common/usercmd.h and common/in_buttons.h give the fields of the command
  and the action bits. Half-Life 1 SDK License, Valve Corporation.
  https://github.com/jpcy/coldemoplayer/blob/9c97ab128ac889739c1643baf0d5fdf884d8a65f/compLexity%20Demo%20Player/demo%20parser/HalfLifeDemoParser.cs
  The demo parser of the compLexity Demo Player gives the length of a
  network-message frame in demos up to network protocol 43. GPL-3.0, Jonathan
  Young. No code is taken from it; the place of the command in those frames
  was found in demos of 2001.

libTAS (LTM)
  https://github.com/clementgallet/libTAS/blob/master/src/program/movie/InputSerialization.cpp
  src/shared/inputs/{AllInputs,SingleInput,ControllerInputs,InputEvent} describe
  field names and controller ranges. GPL-3.0-or-later, Clement Gallet.

Hourglass (WTF and HGM)
  https://tasvideos.org/EmulatorResources/Hourglass/WTF
  Public format specification; TASVideos documentation uses CC-BY 2.0:
  https://tasvideos.org/SiteLicense
  The reader follows the documented header and frame packet layout.

JPC-RR (JRSR)
  https://tasvideos.org/EmulatorResources/JPC/JRSRFormat
  https://github.com/antogerva/jpcrr/blob/master/src/main/java/org/jpc/emulator/EventRecorder.java
  EventRecorder, peripheral/Keyboard, archive streams, and modules/Joystick;
  GPL-2.0-only, Isis Innovation Limited and H. Ilari Liusvaara.

openMSX (OMR)
  https://github.com/openMSX/openMSX/blob/master/src/input/StateChange.hh
  StateChange, device implementations, and EmuDuration describe event fields
  and source-clock units. GPL version 2 per README and doc/GPL.txt.

CoffeeTools (CTAS)
  https://github.com/Blaizer/CoffeeTools/blob/main/patches/CoffeeTools/code/gml_GlobalScript_CoffeeTools.gml
  Versions 3 and 4 of the input and randomization-seed tables;
  MIT, copyright 2026 Blaise Roth.
