[cc65] Hello, and a memory corruption (?) issue when optimizing

From: Maik Merten <maikmerten1googlemail.com>
Date: 2013-06-09 16:09:56
Dear all,

last year I got interested to tinker a bit with programming for the C64, 
to widen my perspective onto programming a bit (something different from 
Java for a change). Also I like old computers ;-)

cc65 gave me the opportunity to create usable results somewhat quickly, 
so thanks a lot to everyone involved! I'm sorry to read cc65 is 
currently unmaintained, but thankfully this list still seems to exist.

I'm trying to put some finishing touches onto "Nuclear Reaction 2100", a 
turn-based strategy puzzle game for the C64, which can be played against 
an AI player or a human opponent. It's a "port" of a game originally 
written by Robert Akerberg for the Amiga. The GPLv3 source code can be 
obtained from


The code for sure is a bit clunky here and there, I only have shallow 
experience of developing in C. Nonetheless, things appear to work pretty 

Either way, I notice that the title screen, which displays a multicolor 
bitmap, is corrupted when specifying any of cl65's -O options in the 
Makefile. This makes me guess that the binary include, defined in text.s as

.export _titlecard
_titlecard: .incbin "resources/title.koa",2,10001

is getting corrupted due to a different memory footprint of the compiled 
code. This is a pity, given that the optimized compile is indeed much 
faster (very noticable when the AI player determines its next move). I 
assume that I have to somehow shove the includes into a more "safe" 
position in memory, but this is only a guess.

Can anybody offer advise?

Thank you very much,

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 Jun 9 16:10:10 2013

This archive was generated by hypermail 2.1.8 : 2013-06-15 17:37:38 CEST