From 37df6ce680f11f55ecc52a26718f2aa4e3cc85ed Mon Sep 17 00:00:00 2001 From: bigbass1997 Date: Sat, 1 Feb 2025 22:39:52 -0600 Subject: Added a "Hold" option to INPUT_MOMENT. Clarified intended formatting and usage of INPUT_CHUNK and INPUT_MOMENT packets, and of INPUT_CHUNK byte indexes in TRANSITION packets. --- src/docs/draft-tasd-spec-0001.xml | 57 +++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/docs/draft-tasd-spec-0001.xml b/src/docs/draft-tasd-spec-0001.xml index f2a6bcd..16fa4a7 100644 --- a/src/docs/draft-tasd-spec-0001.xml +++ b/src/docs/draft-tasd-spec-0001.xml @@ -32,7 +32,7 @@ https://github.com/rasteri - + General Independent TAS Console Replay Research Group @@ -189,7 +189,7 @@
Magic Number
4 octet value that MUST be [54 41 53 44](ASCII value TASD).
Version
-
Version of the TASD file format. Version currently MUST be a value of 1.
+
Version of the TASD file format. Version currently MUST be a value of 1, but SHOULD be incremented in future versions.
G_KEYLEN
Global length of Key values of packets. G_KEYLEN currently MUST be a value of 2.
@@ -381,9 +381,9 @@ Input Frame/Timing Key Descriptions
[FE 01] - INPUT_CHUNK
-
Specifies a chunk of input data for the TAS when played on hardware. All data from INPUT_CHUNK packets are concatenated together in order of appearance in the TASD file. If the INPUT_CHUNK packet type is used, the PORT_CONTROLLER packet type MUST be used. If the INPUT_CHUNK packet type is used, the INPUT_MOMENT packet type SHOULD NOT be used. This packet type is OPTIONAL and a TASD file MAY contain more than 1 of this packet type. Discussed in ().
+
Specifies a chunk of input data for the TAS when played on hardware. All data from INPUT_CHUNK packets are concatenated together in order of appearance in the TASD file. If the INPUT_CHUNK packet type is used in a TASD file, the PORT_CONTROLLER packet type MUST also be used at least once. If the INPUT_CHUNK packet type is used, the INPUT_MOMENT packet type SHOULD NOT be used. This packet type is OPTIONAL and a TASD file MAY contain more than 1 of this packet type. Discussed in ().
[FE 02] - INPUT_MOMENT
-
Specifies input data that is sent from the replay device to the console with specific timing. If the INPUT_MOMENT packet type is used, the PORT_CONTROLLER packet type MUST be used. If the INPUT_MOMENT packet type is used, the INPUT_CHUNK packet type SHOULD NOT be used. This packet type is OPTIONAL and a TASD file MAY contain more than 1 of this packet type. Discussed in ().
+
Specifies a single instance of input data that is sent from the replay device to the console with specific timing. If the INPUT_MOMENT packet type is used in a TASD file, the PORT_CONTROLLER packet type MUST also be used at least once. If the INPUT_MOMENT packet type is used, the INPUT_CHUNK packet type SHOULD NOT be used. This packet type is OPTIONAL and a TASD file MAY contain more than 1 of this packet type. Discussed in ().
[FE 03] - TRANSITION
Specifies when a transition or change occurs during a TAS replay (example: console reset or changing of controller types). This packet type is OPTIONAL and a TASD file MAY contain more than 1 of this packet type. Discussed in ().
[FE 04] - LAG_FRAME_CHUNK
@@ -1104,49 +1104,54 @@
Port
Controller port number (Port number MUST be 1-indexed).
Inputs
-
Controller input data for controller on Port. Input values are usually in native format (usually active-low). Input formats for specific controller types are described in .
+
Controller input data for controller on Port. Input formats for each controller type is described in .
PLEN
Length of the packet payload.
- A single INPUT_CHUNK packet MAY contain up to every input of a TAS movie console replay and MAY contain fewer than every input of a TAS movie console replay. If there are more than 1 INPUT_CHUNK packets, the INPUT_CHUNK packets MUST be in order of the TAS movie console replay inputs, where earlier inputs in the TAS movie console replay are earlier in the TASD file and later inputs in the TAS movie console replay are later in the TASD file. - The input data contained in Inputs is divided up based on the PORT_CONTROLLER type corresponding to the Port number. Refer to for each available type and the number of bytes used for each instance of controller input. Keep in mind that the PORT_CONTROLLER type can be changed using TRANSITION packets. + All INPUT_CHUNK packets with corresponding Port values in the TASD file MUST be in chronological order, where earlier inputs in the TAS movie console replay are earlier in the TASD file and later inputs in the TAS movie console replay are later in the TASD file. If there are more than one INPUT_CHUNK packets for a specific Port, the input data MUST be interpreted as if all their contents were concatenated into a single INPUT_CHUNK packet. As such, a single INPUT_CHUNK packet MAY contain up to every input of a TAS movie console replay and MAY contain fewer than every input of a TAS movie console replay. + The input data contained in Inputs is divided up based on the PORT_CONTROLLER type corresponding to the Port number. Refer to for each available type and the number of bytes used for each instance of controller input. The PORT_CONTROLLER type MAY be changed using TRANSITION packets, which MAY change the interpretation of the input data until either the end of the replay or until the next PORT_CONTROLLER transition. +
INPUT_MOMENT Packet INPUT_MOMENT packets MUST be in the following format:
Port
Controller port number (Port number MUST be 1-indexed).
-
Type
-
Determines specific timing type for start of Inputs.
+
Hold
+
Determines whether the Input data MUST continue to be held after the controller state has been read.
+
Index Type
+
Specifies timing methodology of a specific moment when Input data MUST be applied.
Index
-
Time value to start sending Inputs data.
-
Inputs
-
Controller input data for controller on Port. Input values are usually in native format (usually active-low). Input formats for specific controller types are described in .
+
Time value in units based on Index Type.
+
Input
+
A single instance of controller input data for the controller on the specified Port. Input formats for each controller type is described in .
PLEN
Length of the packet payload.
- The input data contained in Inputs is divided up based on the PORT_CONTROLLER type corresponding to the Port number. Refer to for each available type and the number of bytes used for each instance of controller input. Keep in mind that the PORT_CONTROLLER type can be changed using TRANSITION packets. + Each INPUT_MOMENT packet contains a single instance of controller input data for a specific moment during a TAS replay. The input data's format depends on the PORT_CONTROLLER type corresponding to the Port number. Refer to for each available type. The PORT_CONTROLLER type MAY be changed using TRANSITION packets, which MAY change the interpretation of the input data. + If Hold is TRUE, the controller MUST continually hold the input state until the next INPUT_MOMENT for the same Port number. If Hold is FALSE, the controller MUST hold only until the console reads the input state, or until the next INPUT_MOMENT for the same Port number.
TRANSITION Packet @@ -1166,7 +1171,7 @@ [02] - Cycle Count [03] - Milliseconds [04] - Microseconds * 10 - [05] - INPUT_CHUNK Index + [05] - INPUT_CHUNK Byte Index Port (Unsigned Integer) [1 octet] Index (Unsigned Integer) [8 octets] Type (Binary Data): [1 octet] @@ -1180,9 +1185,9 @@
Input Type
Determines specific timing type for start of transition.
Port
-
Controller port number of input index. If Index Type is [05], Port MUST be 1-indexed Port number, otherwise Port MAY be any value.
+
Controller port number (Port number MUST be 1-indexed).
Index
-
Time or offset value to start transition. If Index Type is [05], Index MUST be the byte offset of INPUT_CHUNK data from INPUT_CHUNK packets for the controller port specified by Port.
+
Time or offset value to start transition. If Index Type is [05], Index MUST be interpreted as the byte offset (0-indexed) into the concatenated input data from all INPUT_CHUNK packets for the controller port specified by Port. If Index Type is [05], the byte offset MUST also point to the first byte of an instance of controller input data (according to the PORT_CONTROLLER format at that moment in the TAS replay.)
Type
Type of transition. If Type is [FF], the transition action will be interpreting a TASD packet.
Inner Packet
@@ -1923,7 +1928,7 @@ THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR(S) "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.