Re: [cc65] Creating Sprites with VIC

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-10-15 07:14:04


On Mon, Oct 14, 2002 at 08:09:50PM -0500, Brian Bagnall wrote:
> This just pokes them in, but does VIC provide a cleaner way to do this
> without all the poking?

As Blackjack told you, you can replace at least the loop by using memcpy:

        memcpy ((void*) 832, N, sizeof (N));

The mousedemo program from the samples does also use a sprite on the C64. Just
have a look at it.

> I think it's a bit dangerous poking data in manually
> because you never know if the compiler has allocated that memory space to
> something else already.

You may want to have a look at the linker config file that determines the
memory setup. If you aren't using a config file, the standard one comes into
effect, which means that your program starts at $801 and ends at $D000 on the
C64. The compiler/linker will not access memory outside this range. If you
want to change this (for example because you need a hires screen somewhere),
you will have to use a custom linker configuration.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-10-15 07:14:28 CEST