-
Notifications
You must be signed in to change notification settings - Fork 0
LTF Spec
NtinosTheGamer2324 edited this page Jun 9, 2026
·
1 revision
I pulled these specs from an old project and repurposed them for this context. Most of these are just concepts for now, but they will likely be introduced in later versions of ModuOS.
- All "Magic Numbers" are 4-byte ASCII tags stored in Little-Endian.
- All structures must be packed (no compiler-inserted padding).
- Strings are UTF-8, Null-terminated ('\0').
- Reserved fields MUST be initialized to 0x00.
- Magic: 0x214B5054 ('TPK!')
- Total Files: uint32_t
-
Entries Table (264 bytes per entry):
- Filename: char[256] (Null-terminated).
- Offset: uint32_t (Start of TPK to data).
- Size: uint32_t (Data bytes).
- Magic: 0x21464D54 ('TMF!')
- Dimensions: uint16_t Width, uint16_t Height
- Audio: uint8_t FPS, uint8_t Channels (1=Mono, 2=Stereo), uint32_t Sample Rate
-
Data Block: Interleaved Chunks: [4-byte ID][4-byte Size][Payload]
- IDs: 'VID ' (TVD frame), 'AUD ' (TAS buffer), 'TAM ' (Pulse packet).
- Magic: 0x594E4954 ('TINY')
- Dimensions: uint32_t Width, uint32_t Height
- Compression: uint8_t (0=Raw BGRA8888, 1=RLE-8)
- Magic: 0x21445654 ('TVD!')
- Frames: uint16_t Total, uint16_t Keyframe interval
- Logic: Keyframe (Full raw pixels) vs. Delta (XOR-map of pixel changes).
- Magic: 0x21474D54 ('TMG!')
- Counts: uint32_t Vertex Count, uint32_t Index Count
- Data: Vertex list (Float X,Y,Z, U,V) followed by uint16_t Index list.
- Magic: 0x64756154 ('Taud')
- Format: uint32_t Sample Rate (Hz), uint8_t Channels, uint8_t Bit Depth (8, 16, or 24)
- Data: Raw PCM signed integers.
-
Sequence (6-byte chunks):
- Waveform: 0=Sine, 1=Square, 2=Saw, 3=Noise.
- Freq/Duration: uint16_t Hz, uint16_t ms.
- Envelope: uint8_t ADSR/Volume.
- Header (6 bytes): Type (Obj, Arr, Str, Int, Float), Key Length, Value Data Length.
- Key: N-bytes of ASCII text.
- Value: M-bytes of binary data.
- Magic: 0x21464354 ('TCF!')
- Metadata: uint32_t Total entries, uint32_t Language ID.
- Index Table (8 bytes per entry): uint32_t Timestamp (ms), uint32_t Offset to string.
-
Packet (6 bytes):
- Color: uint8_t R, G, B
- Energy: uint8_t (0-255 Amplitude/Motion)
- Flags: uint16_t (0x01: Flash, 0x02: Shake, 0x04: Rumble)
- Ports: uint16_t Source, uint16_t Destination
- Sequence: uint16_t (Monotonic)
- Flags: uint8_t (0x01:ACK, 0x02:SYN, 0x04:FIN)
- Checksum: uint8_t (XOR of all bytes)
End of Specification