Re: [stella] RPG progress

Subject: Re: [stella] RPG progress
From: Thomas Jentzsch <tjentzsch@xxxxxx>
Date: Sun, 22 Feb 2004 21:49:05 +0100
Paul Slocum wrote:
> Without a HUGE improvement in the speed of the map generation, I
> don't know of a way to fix it.  And rewriting the map generation
> system is not something I'm too excited about.  It is pretty
> complicated, and there's not a lot of memory to spare.

Have you calculated how much time (worst case) you need in total for
scrolling and generating a new line?

The are some chances for optimization, but I don't know how much time
you have to save. E.g.

>From scrollRight:
   lda levelDataA+4,y   ;4
   and #$F0             ;2
   sta temp             ;3
   ldx levelDataA,y     ;4
   lda swap,x           ;4
   and #$0F             ;2
   ora temp             ;3
   sta levelDataA+4,y   ;4 = 26

This can be replaced by:
   lda levelDataA+4,y   ;4
   ldx levelDataA,y     ;4
   eor swap,x           ;4
   and #$F0             ;2
   eor swap,x           ;4
   sta levelDataA+4,y   ;4 = 22

There are many more places in the code, where this EOR trick can be
used. And if you have enough space (256 bytes) you could replace 4xLSR
with a large table and *maybe* save one blank line between the tiles.

How about generating the new line into an invisible buffer first and
then scroll and copy within one frame?

BTW: Why are you using BCD during map generation? Any clever trick I
am missing?

Have fun!
Thomas                            
_______________________________________________________
Thomas Jentzsch         | *** Every bit is sacred ! ***
tjentzsch at web dot de |
----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread