summaryrefslogtreecommitdiff
path: root/image_format.txt
blob: c96b5a77c13e1ed9b1d01b67bca72e3c146c8a30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
This file best viewed in Emacs' -*- outline-mode -*-.

Each image is split into many files.  One for each 16k page, with
header information.  Also one descriptor file, containing pointers to
the page files.  This way multiple images can share the same data.

* Fields in the page image header:

** Magic number
   0x0680
** Size (page only)
   0x4000
** Page number
   word
** Calculator model
   word, enum 'models' in image.h

* Fields in the descriptor file:

** Header
*** Magic Number
    0x1680
*** Size
*** Name
    string-32, 0-terminated

** Data
   Tagged list of these records:
*** Page number - 'PG'
    word
*** Checksum - 'CK'
    word
    CRC-16 of page, as in page image file
*** Version - 'VE'
    string, 0-terminated
*** Calculator model - 'MD'
    Byte, same undefined enum
** Registers - 'RG'
   Tagged list of registers
*** A - 'A'
*** F - 'F'
*** BC - 'BC'
*** DE - 'DE'
*** HL - 'HL'
*** SP - 'SP'
*** PC - 'PC'
*** I - 'I'
** Other state
*** Pages presently paged in - 'IN'