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

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-11-23 05:52:26
Good morning!

On Mon, Nov 21, 2005 at 01:10:02PM -0600, PH wrote:
> I removed the optimize switch, and that helped it compile.
> Unfortunately, it didn't help the original bug.

The NES startup file contains a small sloppiness that made it break when more
segments were added to the library and the linker config. There may be more
problems, but let's try this fix first:

---------------------------------------------------------------------------
Index: libsrc/nes/crt0.s
===================================================================
RCS file: /usr/local/cvsroot/uz/c64/cc65/libsrc/nes/crt0.s,v
retrieving revision 1.4
diff -u -r1.4 crt0.s
--- libsrc/nes/crt0.s	22 May 2003 22:32:04 -0000	1.4
+++ libsrc/nes/crt0.s	23 Nov 2005 04:40:52 -0000
@@ -98,9 +98,9 @@

 ; Copy the .data segment to RAM

-        lda     #<(__ROM0_START__ + __STARTUP_SIZE__+ __CODE_SIZE__+ __RODATA_SIZE__)
+        lda     #<(__DATA_LOAD__)
         sta     ptr1
-        lda     #>(__ROM0_START__ + __STARTUP_SIZE__+ __CODE_SIZE__+ __RODATA_SIZE__)
+        lda     #>(__DATA_LOAD__)
         sta     ptr1+1
         lda     #<(__DATA_RUN__)
         sta     ptr2
---------------------------------------------------------------------------

Either apply the patch and recompile the startup code, or grab a replacement
nes.o file from

        ftp://ftp.musoftware.de/pub/uz/cc65/nes.o

Then, replace the nes.o file that comes with 2.11.0 and recompile your
program. Once I have positive feedback, I will make the change official.

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 23 05:52:49 2005

This archive was generated by hypermail 2.1.8 : 2005-11-23 05:52:51 CET