[stella] Supercharger RPG bare beginnings - request for help

Thomas Jentzsch tjentzsch at web.de
Fri Sep 15 05:19:41 CDT 2006


Bob wrote:

> I should have been a bit more specific: my scrolling map is based on
> Andrew's concept*, not his actual code.  I've never seen his code,
> though I did look for it here and at AA.

Makes sense. I would have been surprised if Andrew would have taken the risk to share his code. And I couldn't identify anything familiar in your code.

Actually Andrew's code is doing something very clever and maybe this would work for your code too: 
When scrolling, he compares the new tile with the old one and then skips updating the buffer if the tiles are identical.

One question: How (or where) you do merge the data of the two tiles which belong to the same PF register?

I saw this code:
	lda (PtrTemp),Y	;<--have both tiles
	sta Temp+1
	and #$F0		;left tile * 16...
	sta Temp
	lda Temp+1		;...plus right tile
	and #$0F
...

which can be optimized into:
	lda (PtrTemp),Y	;<--have both tiles
	and #$F0		;left tile * 16...

> The display RAM is a series of addresses in the kernel code; I write the
> new addresses to a chunk of RAM (the buffer) and, after they are all
> updated, I copy them all at once to the kernel.

I suppose you are only switching pointers inside the kernel, right?


> I don't think the method of scrolling is similar - though I'm not sure.

I'll have a closer look at the code. Before starting to optimize the code, IMO its better to optimize the algorithms first.

BTW: RMW = Read, Modify, Write

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



_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066





More information about the Stella mailing list