RE: RE: [stella] Generic kernal or just build a game?

Subject: RE: RE: [stella] Generic kernal or just build a game?
From: stella@xxxxxxxxxxxxxxx
Date: Mon, 29 Mar 2004 07:45:00 -0600

> I solved a little simpler problem once, destroying the playfield
> with a single pixel. It seems like the key to effective code here
> was this table
> disintigratetab
>     .byte %01111111
>     .byte %10111111
>     .byte %11011111
>     .byte %11101111
>     .byte %11110111
>     .byte %11111011
>     .byte %11111101
>     .byte %11111110
> I used it to erase single blocks out. This table works as is for
> the left _and_ the right side, if you
> EOR #$07 the index for the right side.

That table will make life easier for certain.  Right now I use loops to ROL
or ROR one bit into position.  I "AND" this with memory, which will reveal
if there was a brick there (non zero).  If so, then I EOR #$FF the original
value, AND it again, and store it.

Will EOR #$07 really get that flipped byte to index correctly?  It's
criminal how simple this will be! :)

	<if byte is a flipped byte>
	LDA bitIndex
	EOR #$07
	TAY bitIndex
	LDA (disintigratetab),y

> I also seem to have code that is testing for a brick at this
> location first and if there isn't any, I check he surrounding
> blocks as well. Not sure if this is really required, maybe my
> brick calculation was just buggy ;-)

I figured out the brick candidate orderering last night and it's a
relatively simple set of branches.  It was just such a nightmare to even
CHECK to see if a brick was present, much less remove it.

Thanks for the great help.

Archives (includes files) at
Unsub & more at

Current Thread