Re: [cc65] Linker is not following configuration file

From: Oliver Schmidt <ol.sc1web.de>
Date: 2012-01-25 11:05:34
Hi Payton,

> OK, here's the scenario.  I want to leave a hole from $1000 to $3000 for
> loading in music files.

> [...]

> I'm obviously not doing something right here, but I cannot figure it out.
>  Please help.

I'd say the problem itself doesn't have much to do with ld65: Rather
the hole is the problem. The CBM program loader loads data into a
continuous mamaory area - there's no option for holes. So how is ld65
supposed to create a file compatible with the CBM loader with a hole?
Maybe you consider this question silly but it really isn't ! So ther
very best aproach is obviously - again without any reference to ld65 -
to avoid holes. Rather all the stuff that needs to be loaded initially
should be placed together. I surely don't know enough about both sound
in the C64 and your project to judge but I could imagine that you
could organize things in a different way avoid the hole.

Anyway how to handle such a hole?

a) Have only on part loaded by the CBM program loader and load the
stuff "behind the hole" explicitly. Doing so with ld65 is of course
possible - and you do it already with your overlays.

b) Have the stuff "behind the hole" first loaded ignoring the hole and
relocated after loading but before using. Doing so with ld65 is of
course possible but you need to prvode your own relocation facility.

c) Have the hole filled with dummy data to be loaded by the CBM
loader. Doing so with ld65 is of course possible but given the size of
the hole as I understand it and given the C64 disk speed that no sexy
option - isn't it? However it may become better if the stuff loaded
into the hole isn't just dummy data but useful data. You said
something about sound. So you could include some sound that is played
on program startup. In that case checkout ".incbin" in the ca65 docs.
And apart from that you or course need to do what Marc alread wrote.

So as mentioned I'd rethink the hole thingy in general. All this "that
stuff is at $x000 and this stuff is at $y000" usually isn't necessary
with ld65 where you rather let the linker decide the optimal addresses
without waste and have all references adjusted automagically.The size
of overlays is the one example as ld65 isn't able to adjust that.

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jan 25 11:05:42 2012

This archive was generated by hypermail 2.1.8 : 2012-01-25 11:05:45 CET