From cb6815a1d92bc4089ec1b8aac322cd6cb188fa69 Mon Sep 17 00:00:00 2001 From: bigbass1997 Date: Fri, 27 Aug 2021 15:43:54 -0500 Subject: Added EmulatorCore packet and adjusted keys. Improved documentation formatting. --- inputmaps.txt | 11 ++++++++--- spec.md | 22 +++++++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/inputmaps.txt b/inputmaps.txt index 5b22e7e..9a11c68 100644 --- a/inputmaps.txt +++ b/inputmaps.txt @@ -1,8 +1,13 @@ -When inputs are stored in a TASD file, their values are formatted in a specific order. Data is stored as close to the console-native format as possible. +When inputs are stored in a TASD file, their values are formatted in a specific order. +Data is stored as close tothe console-native format as possible. -Most consoles use "active-low" signals for button presses. That means that if a button is pressed, it sends a logical LOW signal, represented as binary '0'. For example, a NES controller pressing 'A' and 'Left' can be represented as binary '01111101' or hex 0x7D. However, some consoles may include "active-high" signals, or have a more complex protocol. +Most consoles use "active-low" signals for button presses. That means that if a button is pressed, it sends a logical LOW signal, +represented as binary '0'. For example, a NES controller pressing 'A' and 'Left' can be represented as binary '01111101' or hex 0x7D. +However, some consoles may include "active-high" signals, or have a more complex protocol. -Each controller map will include their spec-defined controller type that's used in PortController packets. All inputs that are active-low, will have a forward slash '/' infront of them. For example, all of the buttons on the NES standard controller are active-low, as seen below. Unless otherwise specified, button inputs without a '/' will be active-high, or have a custom protocol. +Each controller map will include their spec-defined controller type that's used in PortController packets. All inputs that are active-low, +will have a forward slash '/' infront of them. For example, all of the buttons on the NES standard controller are active-low, as seen +below. Unless otherwise specified, button inputs without a '/' will be active-high, or have a custom protocol. === NES Standard === diff --git a/spec.md b/spec.md index fa6a719..103da5d 100644 --- a/spec.md +++ b/spec.md @@ -53,17 +53,21 @@ Key | Payload Size | Name | Description 0005 | variable | Category | (string) Category of the TAS. (e.g. "any%") 0006 | variable | EmulatorName | (string) Name of the emulator used to dump this file. 0007 | variable | EmulatorVersion | (string) Version of the emulator. +0008 | variable | EmulatorCore | (string) Name of emulation core being used. (may not be applicable to all emulators) -0008 | 8 bytes | TASLastModified | (Unix epoch in seconds) Last time the TAS movie was edited. Usually TASVideos.org publication date. -0009 | 8 bytes | DumpLastModified | (Unix epoch in seconds) Last time this file was edited. -000A | 4 bytes | TotalFrames | Total number of frames from original movie, including lag frames. (useful for calculating movie length) -000B | 4 bytes | Rerecords | TAS rerecord count. -000C | variable | SourceLink | (string) URL link to publication, video upload of this TAS, or any other relevant websites. +0009 | 8 bytes | TASLastModified | (Unix epoch in seconds) Last time the TAS movie was edited. Usually TASVideos.org publication date. +000A | 8 bytes | DumpLastModified | (Unix epoch in seconds) Last time this file was edited. +000B | 4 bytes | TotalFrames | Total number of frames from original movie, including lag frames. (useful for calculating movie length) +000C | 4 bytes | Rerecords | TAS rerecord count. +000D | variable | SourceLink | (string) URL link to publication, video upload of this TAS, or any other relevant websites. -000D | 2 bytes | BlankFrames | Signed 16-bit number of blank frames to prepend to the TAS inputs (positive number), or frames to ignore from the start of the TAS (negative number). -000E | 1 byte | Verified | Whether or not this TAS has been verified by someone. (boolean, value of either 00 or 01) +000E | 2 bytes | BlankFrames | Signed 16-bit number of blank frames to prepend to the TAS inputs (positive number), or frames to ignore from the start of the TAS (negative number). +000F | 1 byte | Verified | Whether or not this TAS has been verified by someone. (boolean, value of either 00 or 01) -000F | 1 + 1 + v + k + n + p bytes | MemoryInit | Initialization of named memory space. First byte is the kind of initialization. Second byte is whether or not this is required for verifications (0 = optional, 1 = required). Then the name of the space. And an optional custom payload. (1 byte type, 1 byte verification requirement, v = 1 byte exponent for k, k = length of n, n = name string, p = memory payload) +0010 | 1 + 1 + v + k + n + p bytes | MemoryInit | Initialization of named memory space. First byte is the kind of initialization. + Second byte is whether or not this is required for verifications (0 = optional, 1 = required). Then the name of the space. + And an optional custom payload. (1 byte type, 1 byte verification requirement, v = 1 byte exponent for k, k = length of n, n = name string, p = memory payload) + -> 01 = No intialization required (p = 0) -> 02 = All 0x00 (p = 0) -> 03 = All 0xFF (p = 0) @@ -71,7 +75,7 @@ Key | Payload Size | Name | Description -> 05 = Random (implementation-dependent) (p = 0) -> FF = Custom: The 'p' section of payload is used to initialize the 'n' named memory space (e.g. "EEPROM", "WRAM", "Save", etc.) -00F0 | 1 + 1 + 1 bytes | PortController | Specify which controller is plugged into a specific port number (1-indexed). (1 byte Port Number, 2 byte Controller Type) +00F0 | 1 + 2 bytes | PortController | Specify which controller is plugged into a specific port number (1-indexed). (1 byte Port Number, 2 byte Controller Type) -> xx 01 01 = NES Standard -> xx 01 02 = NES Multitap (Four Score) -> xx 01 03 = NES Zapper -- cgit v1.2.3