Re: [cc65] Autostart ROM VIC-20 or C64 template project?

From: Groepaz <groepaz1gmx.net>
Date: 2013-06-27 21:21:55
On Thursday 27 June 2013, you wrote:
> Would anyone have a template project (or a regular project I could use
> as a template) for an autostart ($a000) ROM application? 

shouldnt that be $8000 ? (CBM80 cartridge) ? or do you really want to make a 
basic rom?

> Alternatively,
> would someone be interested in helping me set one up?  Since I do so
> much C development for other projects, I'd like to carry my development
> in C over to the 64 and VIC

it should actually be fairly easy, i'd do something like this in the linker 
config:

MEMORY {
    ZP:       file = "", define = yes, start = $0002, size = $001A;
    LOADADDR:                          start = $07FF, size = $0002;
    HEADER:   file = %O,               start = $8000, size = $0009;
    ROM:      file = %O, define = yes, start = $8009, size = $1ff7; 
    RAM:                 define = yes, start = $0800, size = $7800 - 
__STACKSIZE__;
}
SEGMENTS {
    LOADADDR: load = LOADADDR, type = ro;
    EXEHDR:   load = HEADER,   type = ro;
    STARTUP:  load = ROM,      type = ro;
    LOWCODE:  load = ROM,      type = ro,                optional = yes;
    INIT:     load = ROM,      type = ro,  define = yes, optional = yes;
    CODE:     load = ROM,      type = ro;
    RODATA:   load = ROM,      type = ro;
    DATA:     load = ROM, run = RAM, type = rw;
    ZPSAVE:   load = RAM,      type = bss;
    BSS:      load = RAM,      type = bss, define = yes;
    ZEROPAGE: load = ZP,       type = zp;
}

... and you'll have to patch crt0 to produce a proper CBM80 header (instead of 
the basic line) and copy the DATA section to ram.

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

A critic is a man who knows the way but can't drive the car. 
<Kenneth Tynan>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Jun 27 21:21:20 2013

This archive was generated by hypermail 2.1.8 : 2013-06-27 21:21:22 CEST