Re: [cc65] Need help getting started with cc65 NES

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-11-16 22:53:51
On Wed, Nov 16, 2005 at 03:44:21PM -0600, PH wrote:
> I am looking at the crt0.s file like you said.  That is the code that is
> being run first, like you say.  The problem seems to be when it gets to
> the initlib code in the condes.s file.  It runs to the "jmp condes"
> line, and then jumps to location $6003, and from there I am not sure
> what it is doing, but it eventually gets stuck at $600c.  Then, it just
> sits there.  Does that tell you anything?

As you can see from the linker config, it expects $6000-$7FFF to contain RAM.
The condes routine is self modifying code for performance reasons, so it must
be located in the data segment, which is in RAM. The condes routine calls
several subroutines that are placed in a table by the linker. What should
happen is that the subroutine call at the jmpvec: label is executed several
times, and after that the routine returns.

My suggestion is to first check if condes routine is actually in place. This
could fail if either the copy routine has a problem, or if there is no RAM at
the given location. If the condes routine is in place, check if the subroutine
calls are ok. You can locate the target addresses in the map file to find out
the corresponding names.

As an alternative approach, if you choose a simpler program, there may not be
called any constructors at all, so initlib will do nothing.

Maybe groepaz has an idea what else to try, because the NES port is his
child:-)

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
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 Nov 16 22:54:04 2005

This archive was generated by hypermail 2.1.8 : 2005-11-16 22:54:07 CET