aboutsummaryrefslogtreecommitdiff
path: root/src/atari.cfg
blob: 4e0859d085699e2416bea171ece7fe7d7f914579 (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
50
51
52
# This is a hacked-up modified config, DO NOT USE for the config segment.
# The ONCE segment and the CONDES stuff are removed (don't need).
# The STARTUP segment now loads to page 6.
# CODE loads high ($8000) and everything else loads low ($2000), to leave
# an 8K hole for the banking window at $4000-$7FFF.

FEATURES {
    STARTADDRESS: default = $8000;
}
SYMBOLS {
    __EXEHDR__:          type = import;
    __AUTOSTART__:       type = import;  # force inclusion of autostart "trailer"
    __STACKSIZE__:       type = weak, value = $0100;
    __STARTADDRESS__:    type = export, value = %S;
    __RESERVED_MEMORY__: type = weak, value = $0000;
}
MEMORY {
    ZP:         file = "", define = yes, start = $0082, size = $007E;

# file header, just $FFFF
    HEADER:     file = %O,               start = $0000, size = $0002;

# page 6
    P6HDR:      file = %O,               start = $0000, size = $0004;
    PAGE6:      file = %O, define = yes, start = $0600, size = $00ff;

# $2000 for everything but STARTUP and CODE
    P20HDR:      file = %O,               start = $0000, size = $0004;
    PAGE20:      file = %O, define = yes, start = $2000, size = $1360;

# "main program" load chunk
    MAINHDR:    file = %O,               start = $0000, size = $0004;
    MAIN:       file = %O, define = yes, start = %S,    size = $4000 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
    TRAILER:    file = %O,               start = $0000, size = $0006;
}
SEGMENTS {
    ZEROPAGE:  load = ZP,         type = zp;
    EXTZP:     load = ZP,         type = zp,                optional = yes;
    EXEHDR:    load = HEADER,     type = ro;
    P6HDR:     load = P6HDR,      type = ro;
    STARTUP:   load = PAGE6,      type = ro,  define = yes;
    MAINHDR:   load = MAINHDR,    type = ro;
    P20HDR:    load = P20HDR,     type = ro;
    LOWBSS:    load = PAGE20,     type = rw,                optional = yes;  # not zero initialized
    RODATA:    load = PAGE20,     type = ro;
    DATA:      load = PAGE20,     type = rw;
    LOWCODE:   load = PAGE20,     type = ro,  define = yes, optional = yes;
    BSS:       load = PAGE20,     type = bss, define = yes;
    CODE:      load = MAIN,       type = ro,  define = yes;
    INIT:      load = MAIN,       type = rw,                optional = yes;
    AUTOSTRT:  load = TRAILER,    type = ro;
}