Page 1 of 1

unexpanded vic .cfg file for cc65

Posted: Thu Jun 08, 2017 10:23 am
by vicassembly
I have a vic+8k.cfg file that works well. I was trying to mock up an unexpanded vic cfg file last night and it was very bare bones. (something like this)
MEMORY {
RAM: start = $1000, size = $0201, type = rw, fill = yes;
}

SEGMENTS {
BASIC: load = RAM, type = ro, define = yes, optional = no;
STARTUP: load = RAM, type = ro, define = yes, optional = no;
}

The problem is when I compile and link the resulting program size is 3k. Perfect.
When I load it into vice it gives a syntax error at load time and the linenumber is weird.
It should read 2017 sys4100 (or something like this) and it tries to be: 54617 sys4100.

Any ideas as to what might be wrong? Am I missing something in the .cfg file above?

Re: unexpanded vic .cfg file for cc65

Posted: Fri Jun 09, 2017 3:57 pm
by polluks
In version 2.16 cfg/vic20.cfg looks like

Code: Select all

MEMORY {
    ZP:       file = "", define = yes, start = $0002, size = $001A;
    LOADADDR: file = %O,               start = $11FF, size = $0002;
    HEADER:   file = %O,               start = $1201, size = $000C;
    MAIN:     file = %O, define = yes, start = $120D, size = $6DF3 - __STACKSIZE__;
}
SEGMENTS {
    ZEROPAGE: load = ZP,       type = zp;
    LOADADDR: load = LOADADDR, type = ro;
    EXEHDR:   load = HEADER,   type = ro;
    STARTUP:  load = MAIN,     type = ro;
    LOWCODE:  load = MAIN,     type = ro,  optional = yes;
    ONCE:     load = MAIN,     type = ro,  optional = yes;
    CODE:     load = MAIN,     type = ro;
    RODATA:   load = MAIN,     type = ro;
    DATA:     load = MAIN,     type = rw;
    INIT:     load = MAIN,     type = bss;
    BSS:      load = MAIN,     type = bss, define   = yes;
}

Re: unexpanded vic .cfg file for cc65

Posted: Fri Jun 09, 2017 5:41 pm
by groepaz
doesnt cc65 already come with a cfg for barebones vic20? *shrug*

Re: unexpanded vic .cfg file for cc65

Posted: Mon Jun 12, 2017 6:58 am
by vicassembly
That cfg didn't work for me either.

Re: unexpanded vic .cfg file for cc65

Posted: Mon Jun 12, 2017 8:20 am
by Misfit

Re: unexpanded vic .cfg file for cc65

Posted: Mon Jun 12, 2017 1:43 pm
by vicassembly
Thanks, Misfit! That worked perfectly. Thanks.