Re: [stella] need 16-bit math for JoustPong?

Subject: Re: [stella] need 16-bit math for JoustPong?
From: KirkIsrael@xxxxxxxxxxxxx
Date: 3 Feb 2004 02:51:00 -0000
Thanks for all this advice.  I didn't realize it was so easy
in some ways; that as long as you only clear the appropriate 
flag before hand, the built in flag handling (carry and what not)
takes care of the rest as long as you add the low bytes first,
then the high bytes.
(I had a good understanding of what a fractional byte meant, just 
not what it would take to carry it over.)

It's coming along pretty well, hopefully by tonight I'll be posting 
a preliminary version w/ the "floaty" Joust feel.

One question; in Andrew Davie's example, he used 
varname as the "fractional byte" and varname+1 as the "integer byte".

I prefer it the other way for 2 reasons:

1) is a mental concern, putting the integer byte to the "left" of the 
"fractional byte" jives well with my "mental map" of how it works,
i.e. the "signifigance" of a bits decreases as you go through the 
16 bits of the two bytes.  (I know this is a bit prosaic, but 
its how my humble little brain has to think)

2) is a more practical issue, the rest of the program usually 
deals with the integer byte more than the fractional byte 
(for instance, when figuring out if this is the scanline to
draw the player) so it's a little neater to write
   LDA PlayerPos
rather than
   LDA PlayerPos+1

So, is my coding style going to be totally illegible, always putting 
the high byte first?  I assume it doesn't make a computational difference...

 The purpose of conversation isn't to demonstrate one's glib intelligence; 
 it's how we stumble and grope our way through the mists and arrive at 
 something like intelligence. --Mr. Blue

Archives (includes files) at
Unsub & more at

Current Thread