Skip to content

Document V2 header format specification #39

@mbreiser

Description

@mbreiser

Summary

The V2 pattern file header format for G4, G4.1, and G6 is implemented but not documented.

What to document

G4/G4.1 Header V2

  • Bytes 2-3: generation_id (3 bits) + arena_id (8 bits)
  • Backward compatibility with V1 (version detection logic)

G6 Header V2

  • Bytes 5-6: arena_id (6 bits) + observer_id (6 bits)
  • 4-bit version field
  • Extended from 17 to 18 bytes

Arena Registry

  • Per-generation ID namespaces (G4, G4.1, G6)
  • ID ranges: G4.1 (8-bit 0-255), G6 (6-bit 0-63)
  • Registry lookup: arena name ↔ arena_id

Where to document

  • webDisplayTools README (user-facing reference)
  • Inline documentation in pat-parser.js and pat-encoder.js
  • Consider a dedicated docs/pattern-format-v2.md

Implementation Reference

  • maDisplayTools/utils/write_g4_header_v2.m
  • maDisplayTools/utils/read_g4_header.m, read_g6_header.m
  • webDisplayTools/js/pat-parser.js, js/pat-encoder.js
  • webDisplayTools/js/arena-configs.js (registry lookups)

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions