[cc65] Re: Porting to CC65

From: doynax <doynax1gmail.com>
Date: 2010-10-09 22:51:22
Hello,

I'm looking into transferring a C64 game project from ACME to CA65
with a view to prototyping tedious game logic in C and to make dealing
with overlay code easier. Anyway, after spending an afternoon reading
through the manuals and doing a little testing I've now got a couple
of questions:

1. Am I likely to get into trouble compiling the odd C function into
an existing project? Is there a big fixed space overhead, or are the
standard library and runtime functions compiled-in as needed? Also,
what is the convention for preserving the compiler's zeropage
variables?

2. My old code makes frequent use of a certain "single_page N" macro
which insures that the following N-byte array stays within a single
page. Is there any way I can handle this efficiently in CA65? As far
as I can see just aligning would waste up to 4*(N-1) bytes.

3. Should I be using the preprocessor to implement non-trivial loops?
I can't see how to redefine labels imperatively so I tried using macro
recursion but ran into if-nesting limits.

4. Am I abusing named scopes by trying to use them like C++
namespaces? I seem to end up wanting to open scopes twice, both in the
code itself and in the .inc "header."

I apologize ahead of time if any of this has already been covered by
the manual or previous discussions in the mailing list.

/doynax
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Oct 9 22:51:30 2010

This archive was generated by hypermail 2.1.8 : 2010-10-09 22:51:34 CEST