Re: [stella] Player data loading...semi newbie

Subject: Re: [stella] Player data loading...semi newbie
From: Erik Mooney <erik@xxxxxxxxxx>
Date: Wed, 17 Oct 2001 14:22:55 -0400
10/17/2001 1:12:15 PM, Ben Larson <wazzapfool@xxxxxxxxx> wrote:

>For the thing I'm working on, the kernel time is
>pretty tight already because I'm drawing a dynamic,
>asymmetrical playfield (a la Maze Craze).  Because of
>the lack of time, I was thinking of just using a load
>with an 'Indirect Y' addressing mode to fetch, first,
>the ROM index address from RAM, and then, using the Y
>(scan line) offset, fetch the actual data.  If I do
>this for 192 lines, though, I think that's going to
>mean that I have to have quite a bit of wasted (blank)
>ROM space both before and after the actual player
>graphic.  Also the blank space + graphic would stretch
>over multiple pages.  But, by just changing the lookup
>value in RAM, I guess I could change where the player
>would appear vertically on the screen, right?  Kind of
>like positioning a foosball soccer man with the metal
>stick. :)
>
>Anyway, like I said, I don't really know what the
>standard player graphic-loading methods are.  Right
>now I'm just wondering if this is a viable (albeit
>wasteful) method.  I think it is, but I need some
>insight... 

It's viable, sure.  Note that you'll need 192-spriteHeight zero bytes
both before and after the player graphic, and you'll need those blank
spaces for every frame of animation for the player (although you could
overlap the blanks somewhat.)  And of course you need to allow for
the extra cycle for indexing across page boundary.

If you have only one frame of animation, like the Missile Command
cursor or most Defender objects, it doesn't even need to be Indirect Y -
you can use direct Indexed Y.

This is a GREAT technique for Supercharger-based games, since you
can rewrite the player graphic data to RAM within the same area of memory.
(Can this be done with Superchip or Megacart RAM? I think so...)


Also look at my post from a couple weeks ago here for a general-purpose
fast sprite routine, which may suit your program better:

http://www.biglist.com/lists/stella/archives/200109/msg00353.html


-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread