Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Academy » 'magic' entry for stars! files (aka 'starsfile' for unix :-))
'magic' entry for stars! files (aka 'starsfile' for unix :-)) Sat, 08 April 2006 14:17 Go to previous message
wumpus

 
Master Chief Petty Officer
Stars! V.I.P
Created tools and utilities to help the Stars! community
Past Weekly Puzzle Master

Messages: 114
Registered: September 2004
I just re-discovered that some time in the dark and dingy past, I'd spent an afternoon learning how to configure the "magic" file for the 'file' command in unix to recognise stars! files and print some of the basic game information.

Probably pretty useless, but hey, maybe someone wants it, so here goes:

0       leshort 0x2010         
>2      string  J3J3    Stars! 
                               
# Version number, an leshort at offset 10
>>10    leshort 0x1281  1.10a, 
>>10    leshort 0x2A2B  2.6/7i?,
>>10    leshort 0x2A60  2.6/7jrc3,
                               
# Unknown version              
>>10    leshort <0x1281 Unknown version %04X,
>>10    leshort >0x1281        
>>>10   leshort <0x2A2B Unknown version %04X,
>>10    leshort >0x2A2B
>>>10   leshort <0x2A60 Unknown version %04X,
>>10    leshort >0x2A60 Unknown version %04X,

>>6     lelong  x       Game id 0x%X,
>>12    leshort x       Turn %d,

# Flags, an leshort at offset 16
>>16    leshort&0x0007  0x0000  xy file,
>>16    leshort&0x0007  0x0001  x file,
>>>16   leshort&0x0100  0x0100  (save&submit),
>>>16   leshort&0x0100  0x0000  (save only),
>>16    leshort&0x0007  0x0002  hst file,
>>16    leshort&0x0007  0x0003  m file,
>>16    leshort&0x0007  0x0004  h file,
>>16    leshort&0x0007  0x0005  r file,
>>16    leshort&0x0007  0x0006  Unknown type %x,
>>16    leshort&0x0007  0x0007  Unknown type %x,

>>16    leshort&0x0400  0x0400  Mutliple turns,
>>16    uleshort&0xFBF8 >0      (Unknown flags 0x%04X)

# Player number and salt, leshort at offset 14
>>14    leshort&0x000F  x       Player %d,


I'll probably put this on Sourceforge or something - improvements definitely welcome Razz I suspect the "magic" formatting is pretty godawful for a start... it was my first and thus far only attempt at writing a "magic" recipe Razz


Yay for random obscure stuff found on the hard drive (actually I knew I had done this once upon a time, but had believed it to be lost in one of my semi-regular hard-drive nukings Very Happy).



Michael "Wumpus" Zinn
» Apply magic glue here «

Report message to a moderator

 
Read Message
Read Message
Previous Topic: M-File splitter, thanks to m.a@stars harassment :-)
Next Topic: A new bug? Ramscoop refusing to coast at free warp.
Goto Forum:
  


Current Time: Thu May 23 06:44:39 EDT 2024