~ubuntu-branches/ubuntu/wily/gargoyle-free/wily-proposed

« back to all changes in this revision

Viewing changes to terps/magnetic/Generic/tech.txt

  • Committer: Bazaar Package Importer
  • Author(s): Sylvain Beucler
  • Date: 2009-09-11 20:09:43 UTC
  • Revision ID: james.westby@ubuntu.com-20090911200943-idgzoyupq6650zpn
Tags: upstream-2009-08-25
ImportĀ upstreamĀ versionĀ 2009-08-25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
Magnetic Internal Data Formats
 
3
==============================
 
4
 
 
5
Unless otherwise stated all words are big-endian. The datafile format
 
6
is as follows:
 
7
 
 
8
1) Game file (.mag)
 
9
 
 
10
Offset Size Explanation
 
11
-----------------------
 
12
   0    4   Magic word 'MaSc'
 
13
   4    4   Size of datafile
 
14
   8    4   Size of header (42 in this version)
 
15
  12    2   Game version:
 
16
              0. Pawn
 
17
              1. Guild of Thieves
 
18
              2. Jinxter
 
19
              3. Myth, Corruption, Fish!
 
20
              4. Magnetic Windows versions
 
21
  14    4   Size of code [1]
 
22
  18    4   Size of string data ( <=65536 ) [2]
 
23
  22    4   Size of string data part 2 (the rest) [3]
 
24
  26    4   Size of dictionary [4]
 
25
  30    4   String table offset ( <=[2]+[3] )
 
26
  34    4   Offset in the code block up to which undo and restart
 
27
            data is saved. This originally had a very clear meaning
 
28
            as the C64 versions used read-only swapping from disk
 
29
            after that offset. Other versions are somewhat less
 
30
            obvious, but looking at the save-routines should help.
 
31
  38    4   Undo offset, ie. the offset in the code block at which
 
32
            data for the undo operation is saved, usually in the
 
33
            beginning of the main loop. A zero value works just
 
34
            nicely if you don't care about undo (which isn't
 
35
            foolproof anyway).
 
36
  42   [1]  Code data
 
37
  ++   [2]  String data 1
 
38
  ++   [3]  String data 2
 
39
  ++   [4]  Dictionary data
 
40
 
 
41
2) Graphics file (.gfx). This is basically just an encapsulation of
 
42
   the original Amiga graphics files.
 
43
 
 
44
Offset Size Explanation
 
45
-----------------------
 
46
   0    4   Magic word 'MaPi'
 
47
   4    4   Size of datafile
 
48
 8+4*k  4   Offset to the k:th picture data
 
49
 
 
50
The format of the individual pictures is somewhat obscure, but the
 
51
details can be found in the routine ms_extract() in the source file
 
52
emu.c.
 
53