Re: [cc65] Need help with .cfg file on C64

From: Marc 'BlackJack' Rintsch <marc1rintsch.de>
Date: 2010-12-12 04:28:55
Hi Stefan,

> The first thing I tried was simply to move RAM way up, to make room
> for characters and sprites in the default vic bank.  This didn't
> work.  I tried like this: MEMORY {
>     ZP:       file = "", define = yes, start = $0002, size = $001A;
>     LOADADDR: file = %O,               start = $07FF, size = $0002;
>     HEADER:   file = %O,               start = $0801, size = $000C;
>     RAM:      file = %O, define = yes, start = $2710, size = $a8f0 -
> __STACKSIZE__; }
> The HEADER is generated assuming the code will follow (sys 2061
> instead of sys10000).  It didn't look at where CODE ended up or at
> the start of RAM.  Interestingly, doing an sys10000 also didn't
> work.

The content of the three memory regions are written to the output file 
(%O) as is, without padding or "filling gaps".  So what is saved is the 
two byte LOADADDR, usually the bytes $01 $08, directly followed by the 
12 bytes HEADER which is a BASIC stub and then comes RAM which contains 
stuff that should end up at $2710 in memory but I doubt it will do in 
this example.

If you move the code around I guess you will have to write your own 
start up code (crts0.s) which doesn't produce a BASIC stub but emits the 
right address in the LOADADDR memory region.  The memory map may look 
like this then:

     ZP:       file = "", define = yes, start = $0002, size = $001A;
     LOADADDR: file = %O,               start = $26FE, size = $0002;
     RAM:      file = %O, define = yes, start = $2710, size = $a8f0 -
 __STACKSIZE__; }

> Since I don't know what __RAM_START__ and __RAM_SIZE__ in crt0.s
> refers to (RAM or RAM2 or the set of all RAM areas?), [...]

If you have the option ``define = yes`` on a memory region then the 
constants __NAME_START__ and __NAME_SIZE__ are defined where NAME is the 
name of the memory region.  So the names refer to RAM.

Ciao,
	Marc 'BlackJack' Rintsch
-- 
I'm not a complete idiot - several parts are missing.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Dec 12 04:29:18 2010

This archive was generated by hypermail 2.1.8 : 2010-12-12 04:29:22 CET