Re: [stella] single digit scoring...

Subject: Re: [stella] single digit scoring...
From: KirkIsrael@xxxxxxxxxxxxx
Date: 26 Aug 2003 12:21:41 -0000
> > I find that Erik's line
> >     LDA (pointerP0ScoreOffset), Y
> > won't assemble... "Illegal Addressing mode" for that line, alas
> 
> REMOVE THE SPACE!  before the Y
> Then it will assemble.

ACK! Thanks.

Can you tell I'm really use to programming in languages where 
whitespace isn't so important?

Just for grins, I went back to my saved copy using Erik's method.
(I've recently started putting a primitive versioning perl script
into my build routine...if the current source code is different 
than the last one I built with, it saves a timestamped copy in
a directory...came in useful here, all I had to do was search that
directory to retrieve my earlier work)

It works fine! I had to tweak the kernal slightly because I didn't 
have enough time in the HBLANK to do all that offset stuff, otherwise 
the left player's score was dropped and chopped.  The OTHER weird thing
is that it's off by 3 digits!  My new 'calculate P0's scoring digit'
is

	LDA p0score ;accumulator = score
	ASL ;accumulator = score * 2
	ASL ;accumulator = score * 4
	ADC p0score  ;accumulator = (score * 4) + score = score * 5
	ADC #15 ;why do I need this??
	STA pointerP0Score
	LDA #>Score0Graphic
	STA pointerP0Score+1

That "ADC #15" is a hack that puts the pointer on the correct digit.
I have no idea why I need that, but it seems to work for all my 
numbers. Any idea? Full source at http://alienbill.com/joustpong/ ,
I slipped it in as yesterday's entry at the bottom.

Anyway, this seems more efficient and flexible than my unrolled loop
kernal, (and its hackness less egregious) so I'm sticking with it. 
Thanks Erik!

-- 
KirkIsrael@xxxxxxxxxxxxx    http://kisrael.com
"All life is 6-to-5 against, just enough to keep you interested" --Runyon


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


Current Thread