Re: Aw: Re: [stella] Incoming

Subject: Re: Aw: Re: [stella] Incoming
From: Thomas Jentzsch <tjentzsch@xxxxxx>
Date: Wed, 30 Jan 2002 09:23:45 +0100
Ben wrote:
> If you look at the player drawing routine, you'll
> notice that it's very simple and super-fast...a mere
> 12 cycles max per player:
> 
>    ; Load player 1 data
>    LDA (P1Offset),Y		;[3]+5-6
>    STA GRP0			;[8-9]+3
> 
> The problem, though, is that this approach requires me
> to put 154 blank bytes before and after the player
> graphic.  Because of this, it's inevitable that a page
> is going to be crossed at some point, since the whole
> 'graphic' is going to use up 314 bytes.  

Hmm, if I understand your code correct, the *main* kernel loop (ScanLoop) has only 120 lines. This area would sure fit into a single page and you can avoid page crossing *there*.


> Fortunately,
> I only have one other graphic so far (the shot), and I
> can share one of the blank spaces between the two of
> them.

I noticed the way you are drawing your graphics. It's the fastest way, that's true (in my counting 8 cycles not 11-12), but you are wasting a *lot* of ROM. So you can't add nice animations etc. I don't know, if it is possible at all to use a more RAM saving solution, but it's definitely worth thinking about it.

 
> RAM is pretty tight also, though.
>
>snip
> 
> 4 bytes for the psuedo random number register

Well, I don't think that you need a 4 byte random generator, 2 bytes should be enough here. 


> 12 bytes to store memory index locations for the digit
> graphic lookups in the 6-digit E-P-W readout
> 4 bytes to store memory index locations for the player
> graphic lookups 

And perhaps you can share some bytes for different purposes: 
E.g. the 4 bytes for the player graphic lookups and the 12 bytes for the digit graphic lookups are temporary and never used a the same time. 


> 1 byte for wind
> 1 byte for game status

And (another) perhaps, you don't always need all bits (e.g wind or game status) so you could merge those bytes.

Have fun!
Thomas
_______________________________________________________
Thomas Jentzsch         | *** Every bit is sacred ! ***
tjentzsch at web dot de |



























______________________________________________________________________________
Darf es ein bisschen mehr sein? Mehr Speicher, mehr Mail, mehr Erlebnis, 
mehr Prämie. Der WEB.DE Club - http://club.web.de

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


Current Thread