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