unexpanded vic .cfg file for cc65

You need an actual VIC.

Moderator: Moderators

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

unexpanded vic .cfg file for cc65

Postby vicassembly » Thu Jun 08, 2017 10:23 am

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?

polluks
Vic 20 Newbie
Posts: 9
Joined: Sat Apr 29, 2017 4:53 pm
Website: http://www.bilskaja.de
Location: Germany
Occupation: FI

Re: unexpanded vic .cfg file for cc65

Postby polluks » Fri Jun 09, 2017 3:57 pm

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 Nerd
Posts: 596
Joined: Wed Aug 25, 2010 5:30 pm

Re: unexpanded vic .cfg file for cc65

Postby groepaz » Fri Jun 09, 2017 5:41 pm

doesnt cc65 already come with a cfg for barebones vic20? *shrug*

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

Re: unexpanded vic .cfg file for cc65

Postby vicassembly » Mon Jun 12, 2017 6:58 am

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

Postby Misfit » Mon Jun 12, 2017 8:20 am


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

Re: unexpanded vic .cfg file for cc65

Postby vicassembly » Mon Jun 12, 2017 1:43 pm

Thanks, Misfit! That worked perfectly. Thanks.


Return to “Emulation and Cross Development”

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests