Quantcast User:Zarevak/GLM - TaRapedia, the Tabula Rasa Wiki - Collaborative guide on Logos, Missions, NPCs and more!
Recent changes Random page
GAMING
Gaming
 
WoWWiki
Halopedia
FFXIclopedia
Age of Conan
Warhammer Online
Grand Theft Wiki
See more...

User:Zarevak/GLM

From TaRapedia

Jump to: navigation, search

Contents

[edit] Overview

GLM files are base data source files for Tabula Rasa. All textures (and icons), sounds, music, models, ... are stored in these files.

[edit] File Format

[edit] Basic structure

The GLM files consists of 4 parts

  1. data
  2. filenames table
  3. file allocation table (FAT)
  4. DWORD (4byte) pointer to FAT

[edit] FAT structure

  • 8-bytes long "CHNKBLXX" string - ID of the FAT?
  • DWORD pointer to filenames table
  • DWORD size (in bytes) of the filenames table
  • DWORD count of the items in the filenames table
  • records for each file in the GLM file:
    • DWORD pointer to beginning of the file
    • DWORD size of the file in GLM file
    • DWORD uncompressed? size of the file
    • DWORD offset to the filenames table, where the filename string for this file begins (ends with NULL character)
    • SHORT (2bytes) flags?:
      • 0 - uncompressed data
      • 1 - compressed data? - only found in effects.glm file
    • DWORD unix timestamp - count of seconds from 00:00:00 UTC on January 1, 1970

[edit] Decoding

  1. Start by reading the last 4 bytes of the GLM file and move to the location it represents (offset from beginning of the file) = beginning FAT table
  2. read FAT header (ID, pointer to Filenames table, size of filenames table, filecount)
  3. read the whole filenames table into memory
  4. for each file (count from the FAT header):
    1. read the next file information from FAT
    2. extract the filename from filename table - beginning is known from FAT, ends with NULL character
    3. extract the file data