SmallsomeFormats · Language · ArchitectureJörg Burbach

FormA Format definition

Generation 26 contract

FormA generation 26 uses the FMA1 signature and a 24-byte geometry-core header. Coordinate and triangle-index streams use method-tagged delta-varint or byteplane encodings. A scene block adds non-geometric attributes while referring to the core geometry. DecodeXYZI32Memory and DecodeSceneMemory define the supported memory outputs. The reference validates triangle indices, reserved fields and scene substreams.

This is a concise format overview. The bundled reference module is the authoritative field-by-field and bitstream definition; it includes the required structures, constants, encoder and decoder. Input and output are memory buffers. File access and playback or rendering belong to the host application.

Public operations

  Declare.i DetectMemory(*Memory, MemorySize.i)
  Declare.i InspectMemory(*Memory, MemorySize.i, *Info.FMA1Info)
  Declare.i EncodeXYZI32Memory(*XYZ, VertexCount.i, *Indices = 0, FaceCount.i = 0, *OutSize.Integer = #Null)
  Declare.i DecodeXYZI32Memory(*Memory, MemorySize.i, *OutVertexCount.Integer = #Null, *OutFaceCount.Integer = #Null, *OutIndexMemory.Integer = #Null, *OutIndexBytes.Integer = #Null)
  Declare.s GetSpatial_FormAInfo()
  Declare.i EncodeSceneMemory(*Scene.Retro3D::Scene, *OutSize.Integer = #Null)
  Declare.i DecodeSceneMemory(*Memory, MemorySize.i, *Scene.Retro3D::Scene)

The source bundle preserves the include paths and contains all literal include dependencies and the MIT license. The individual module is not advertised as a dependency-free distribution.

C and JavaScript

The memory ports encode and decode generation-26 streams. The port contracts specify dependencies, buffer ownership, data structures, encoder differences and exchange-format boundaries. The complete C/JavaScript source bundle preserves shared dependency paths. Browser file conversion is separate from the codec core.

JavaScript exposes geometry and scene attributes. C validates and preserves the uncompressed scene attribute stream alongside Int32 geometry. The C caller supplies or consumes that documented stream; there is no separate typed C scene-object API.