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