]> git.sur5r.net Git - cc65/blob - cfg/atarixl-overlay.cfg
Put EXE header and main chunk load header into a single file --
[cc65] / cfg / atarixl-overlay.cfg
1 FEATURES {
2     STARTADDRESS: default = $2400;
3 }
4
5 SYMBOLS {
6     __EXEHDR__:          type = import;
7     __SYSTEM_CHECK__:    type = import;  # force inclusion of "system check" load chunk
8     __AUTOSTART__:       type = import;  # force inclusion of autostart "trailer"
9     __STACKSIZE__:       type = weak, value = $0800; # 2k stack
10     __OVERLAYSIZE__:     type = weak, value = $1000; # 4k overlay
11     __STARTADDRESS__:    type = export, value = %S;
12     sramprep:            type = import;  # force inclusion of SRPREP
13 }
14
15 MEMORY {
16     ZP:            file = "", define = yes, start = $0082,                  size = $007E;
17
18 # just $FFFF
19     HEADER:        file = %O,               start = $0000,                  size = $0002;
20
21 # "system check" load chunk
22     SYSCHKHDR:     file = %O,               start = $0000,                  size = $0004;
23     SYSCHKCHNK:    file = %O,               start = $2E00,                  size = $0300;
24     SYSCHKTRL:     file = %O,               start = $0000,                  size = $0006;
25
26 # "shadow RAM preparation" load chunk
27     SRPREPHDR:     file = %O,               start = $0000,                  size = $0004;
28     SRPREPCHNK:    file = %O, define = yes, start = %S + __OVERLAYSIZE__,   size = $7C20 - %S - __OVERLAYSIZE__ - $07FF;  # $07FF: space for temp. chargen buffer, 1K aligned
29     SRPREPTRL:     file = %O,               start = $0000,                  size = $0006;
30
31 # "main program" load chunk
32     MAINHDR:       file = %O,               start = $0000,                  size = $0004;
33     RAM:           file = %O, define = yes, start = %S +
34                                                     __OVERLAYSIZE__ +
35                                                     __LOWBSS_SIZE__,        size = $D000 -
36                                                                                    __STACKSIZE__ -
37                                                                                    %S -
38                                                                                    __OVERLAYSIZE__ -
39                                                                                    __LOWBSS_SIZE__;
40
41 # defines entry point into program
42     TRAILER:       file = %O,               start = $0000, size = $0006;
43
44 # memory beneath the ROM preceeding the character generator
45     HIDDEN_RAM2:   file = "", define = yes, start = $D800, size = $0800;
46
47 # address of relocated character generator (same addess as ROM version)
48     CHARGEN:       file = "", define = yes, start = $E000, size = $0400;
49
50 # memory beneath the ROM
51     HIDDEN_RAM:    file = "", define = yes, start = $E400, size = $FFFA - $E400;
52
53 # overlays
54     OVL1:          file = "%O.1",           start = %S,                     size = __OVERLAYSIZE__;
55     OVL2:          file = "%O.2",           start = %S,                     size = __OVERLAYSIZE__;
56     OVL3:          file = "%O.3",           start = %S,                     size = __OVERLAYSIZE__;
57     OVL4:          file = "%O.4",           start = %S,                     size = __OVERLAYSIZE__;
58     OVL5:          file = "%O.5",           start = %S,                     size = __OVERLAYSIZE__;
59     OVL6:          file = "%O.6",           start = %S,                     size = __OVERLAYSIZE__;
60     OVL7:          file = "%O.7",           start = %S,                     size = __OVERLAYSIZE__;
61     OVL8:          file = "%O.8",           start = %S,                     size = __OVERLAYSIZE__;
62     OVL9:          file = "%O.9",           start = %S,                     size = __OVERLAYSIZE__;
63 }
64
65 SEGMENTS {
66     EXEHDR:      load = HEADER,                        type = ro;
67
68     SYSCHKHDR:   load = SYSCHKHDR,                     type = ro,                optional = yes;
69     SYSCHK:      load = SYSCHKCHNK,                    type = rw,  define = yes, optional = yes;
70     SYSCHKTRL:   load = SYSCHKTRL,                     type = ro,                optional = yes;
71
72     SRPREPHDR:   load = SRPREPHDR,                     type = ro;
73     LOWBSS:      load = SRPREPCHNK,                    type = bss, define = yes;  # shared btw. SRPREPCHNK and RAM, not zero initialized
74     SRPREP:      load = SRPREPCHNK,                    type = rw,  define = yes;
75     SHADOW_RAM:  load = SRPREPCHNK, run = HIDDEN_RAM,  type = rw,  define = yes, optional = yes;
76     SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw,  define = yes, optional = yes;
77     SRPREPTRL:   load = SRPREPTRL,                     type = ro;
78
79     MAINHDR:     load = MAINHDR,                       type = ro;
80     STARTUP:     load = RAM,                           type = ro,  define = yes;
81     LOWCODE:     load = RAM,                           type = ro,  define = yes, optional = yes;
82     INIT:        load = RAM,                           type = ro,                optional = yes;
83     CODE:        load = RAM,                           type = ro,  define = yes;
84     RODATA:      load = RAM,                           type = ro;
85     DATA:        load = RAM,                           type = rw;
86     BSS:         load = RAM,                           type = bss, define = yes;
87     ZEROPAGE:    load = ZP,                            type = zp;
88     EXTZP:       load = ZP,                            type = zp,                optional = yes;
89     AUTOSTRT:    load = TRAILER,                       type = ro;
90
91     OVERLAY1:    load = OVL1,                          type = ro,  define = yes, optional = yes;
92     OVERLAY2:    load = OVL2,                          type = ro,  define = yes, optional = yes;
93     OVERLAY3:    load = OVL3,                          type = ro,  define = yes, optional = yes;
94     OVERLAY4:    load = OVL4,                          type = ro,  define = yes, optional = yes;
95     OVERLAY5:    load = OVL5,                          type = ro,  define = yes, optional = yes;
96     OVERLAY6:    load = OVL6,                          type = ro,  define = yes, optional = yes;
97     OVERLAY7:    load = OVL7,                          type = ro,  define = yes, optional = yes;
98     OVERLAY8:    load = OVL8,                          type = ro,  define = yes, optional = yes;
99     OVERLAY9:    load = OVL9,                          type = ro,  define = yes, optional = yes;
100 }
101 FEATURES {
102     CONDES: type    = constructor,
103             label   = __CONSTRUCTOR_TABLE__,
104             count   = __CONSTRUCTOR_COUNT__,
105             segment = INIT;
106     CONDES: type    = destructor,
107             label   = __DESTRUCTOR_TABLE__,
108             count   = __DESTRUCTOR_COUNT__,
109             segment = RODATA;
110     CONDES: type    = interruptor,
111             label   = __INTERRUPTOR_TABLE__,
112             count   = __INTERRUPTOR_COUNT__,
113             segment = RODATA,
114             import  = __CALLIRQ__;
115 }