unexpanded vic .cfg file for cc65

You need an actual VIC.

Moderator: Moderators

Post Reply
vicassembly
Vic 20 Devotee
Posts: 253
Joined: Fri Mar 19, 2010 1:40 pm

unexpanded vic .cfg file for cc65

Post 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?
User avatar
polluks
Vic 20 Amateur
Posts: 43
Joined: Sat Apr 29, 2017 4:53 pm
Website: http://www.bilskaja.de
Location: Germany
Occupation: FI

Re: unexpanded vic .cfg file for cc65

Post 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;
}
VC20 [WGA103574] + UltiMem
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: unexpanded vic .cfg file for cc65

Post by groepaz »

doesnt cc65 already come with a cfg for barebones vic20? *shrug*
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
vicassembly
Vic 20 Devotee
Posts: 253
Joined: Fri Mar 19, 2010 1:40 pm

Re: unexpanded vic .cfg file for cc65

Post by vicassembly »

That cfg didn't work for me either.
User avatar
Misfit
Vic 20 Devotee
Posts: 207
Joined: Thu Nov 28, 2013 9:09 am

Re: unexpanded vic .cfg file for cc65

Post by Misfit »

vicassembly
Vic 20 Devotee
Posts: 253
Joined: Fri Mar 19, 2010 1:40 pm

Re: unexpanded vic .cfg file for cc65

Post by vicassembly »

Thanks, Misfit! That worked perfectly. Thanks.
Post Reply