Skip to content

Instantly share code, notes, and snippets.

@koitsu
Last active May 20, 2019 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koitsu/119b97532a50a1bb6e227d614bb991a7 to your computer and use it in GitHub Desktop.
Save koitsu/119b97532a50a1bb6e227d614bb991a7 to your computer and use it in GitHub Desktop.
Loremaster data details

Introduction

https://videogamegeek.com/videogame/246794/loremaster

There are 3 main data files used by the game:

  • EXE\LM1_DB.001
  • DAT\LM1_DB.002
  • DAT\LM1_DB.003

LM1_DB.001

This file is in GXL format, which is a PCX file archive format invented by Genus Microprogramming in the late 80s.

You can extract these archives using one of the two tools listed here. I chose to use the Windows command-line program unpcxgx.exe from the Russian group called CTPAX-X.

The archive contains 1062 files, including:

  • BIT5X7.GFT -- 5x7 pixel font used for things like health status
  • ENG40.GFT -- 37-pixel-high "gothic-like" blackletter-type font
  • TITLE.PCX -- main Loremaster image (640x480 256-colour PCX format, with native RLE compression)

Fonts (GFT files)

The GFT files mentioned above are GEM bitmap fonts primarily used by Atari home computers. The file format is well-documented and understood.

The MS-DOS version of the graphics editor NeoPaint can use GFT files as text fonts within the editor itself. Simply copy the GFT files into the main NEOPAINT directory and re-run NeoPaint.

A shareware version of NeoPaint v3.2a for MS-DOS is available at one of the links below, and works quite well under DOSBox.

The Windows version of NeoPaint cannot use/read GFT files, only fonts that Windows natively offers (e.g. TrueType, OpenType, etc.).

NeoSoft has since sold all rights to their software to SinLios Soluciones Digitales S.L. of Spain, and the software is now known as PixelNEO.

The two aforementioned fonts, BIT5X7.GFT and ENG40.GFT, are provided here for ease of use:

LM1_DB.002

Appears to be another type of archive file format, but not GXL; likely custom/in-house. I suspect the data is image-related (think: sprites), but not sure. Some of the reverse-engineered details are below. LE stands for little endian.

General format

File offset   Length   Description
-----------   ------   -----------
0x0000-0003        4   0xFF
0x0004-000B        8   0x00
0x000C-000F        4   Archive entry length (unsigned 32-bit LE) (e.g. `0xFA020000` = 762 (0x2FA) bytes)
0x0010-02F9            0x00
0x02FA-05F3      762   Archive entry 1
0x05F4-08ED      762   Archive entry 2
0x08EE-0BE7      762   Archive entry 3
0x08EE-0EE1      762   Archive entry 4
  .......
EOF

Archive entry format

Length   Description
------   -----------
     4   0x00
     4   Archive entry number (unsigned 32-bit LE)
     4   Unsure
    20   Archive name; ASCII string, space-padded to length
   ...   Rest needs to be analysed

Example: archive entry 1

File offset   Length   Description
-----------   ------   -----------
0x02FA-02FD        4   0x00
0x02FE-0301        4   0x01 00 00 00 -- Archive entry number 1
0x0302-0305        4   0x05 16 20 35
0x0306-0319       20   0x4C 49 47 .. -- "LIGHT               "
0x031A-031D        4   0x33 25 39 35
0x031E-0321        4   0x27 37 39 BE
0x0322-0325        4   0x29 31 39 32
0x0326-0329        4   0x47 42 34 44
0x032A-032B        2   0x6C AB
  .......
0x05F0-05F3        4   0x58 7C DE 00

LM1_DB.003

Similar overall format to LM1_DB.002, but with shorter/smaller archive entries, and very different overall entries.

However, an important detail: archive entry names (from LM_DB.002) are referenced here. I'm suspecting some kind of lookup table, maybe for animations, but there are other entries in this file that refer to actual input commands that can be used (ex. ARMOR, ASK, DISPELL, BUTTERMAN, LIGHT, etc.).

Still yet to be figured out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment