[stella] Coding fun With David Crane Part II

Subject: [stella] Coding fun With David Crane Part II
From: Manuel Polik <cybergoth@xxxxxxxx>
Date: Wed, 10 Oct 2001 22:26:20 +0100
Hi there!

Last time in this series *g* I was wondering why David Crane stored the
horizontal coordinates in Outlaw in reversed order, or better why he was
counting left to right from 160 to zero. I think I know the answer now:

He has to both _move_ a bullet (missile) and trace it's position.

Assuming he wants this bullet to move 4 pixel to the right.

He continues like this:

LDA #$FC    ; A-> -4!
ADC verpos  ; verpos = verpos-4

It moves right, so he subtracts 4 pixel following his reversed logic
here.

ATTENTION: Now, to actually move the bullet, he does just:

ASL
ASL
ASL
ASL         ; A-> C0
STA HMM0,X  ; Move bullet 4 pixel to the right.

Cool, or? I think that's how horizontal movement was _supposed_ to work
:-)

Did per chance anyone else notice other examples of reverse horizontal
position tracing in original '78 or older games?

Greetings,
	Manuel

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

Current Thread