We just moved to a different server. Please be patient until all files and pages are restored and the MediaWiki software has been updated. Thank you


From REWiki
Jump to: navigation, search

Stargunner is a horizontal scrolling shooter computer game developed by Apogee Software. It was released on November 19, 1996, and it has the distinction of being the last title sold under the Apogee brand name.

All the data of this game is stored in STARGUN.DLT. This file begins with 8 bytes header, which is interpreted as follows

 const char header [8];
 // .
 // .
 // .
 // read header from the archive
 // .
 // .
 // .
 uint32_t id      = *(uint32_t*)header;
 uint32_t x       = *(uint32_t*)(header + 2);
 uint16_t flag    = *(uint16_t*)(header+6);
 uint16_t entries = 50;
 if (flag)
     entries = (*(uint32_t*) (header+4)) >> 16;
 // check header validity
 if (id != 0x45564144 ||  (x >> 16) != 256)
        exit (FAILURE);

Just after the header, files data is placed one after another. The number of files inside archive is stored in the entries variable. Every file begins with 40 bytes long file entry header.

struct file_entry {

   char     m_name [32];
   uint32_t m_original_size;
   uint32_t m_compressed_size;


As one may see, all file names are encrypted and the are compressed files in the archive. In order to decrypt file names, apply the following simple algorithm:

for (int i = 1; i < 32; i++) m_name [i] = ((m_name [i-1] + i) ^ m_name[i]);

That all by now. Further investigation on compression needed.

Personal tools