Re: [stella] 6 digit score display and other ramblings

Subject: Re: [stella] 6 digit score display and other ramblings
From: Erik Mooney <emooney@xxxxxxxxxxxxxxxx>
Date: Wed, 18 Mar 1998 12:39:27 -0500 (EST)
> I was using the BNE to save cycles over the JMP and a byte of space.
> But you're absolutely right...I never even thought about absolute indirect
> addressing.  Guess I misunderstood your intent. :)

You had my intent right, but I remembered about absolute indirect after I
saw your code, so my intent changed :)

> Heh...trying to save cycles in a time wasting routine!!!! :)

Think of it as "ensuring chronological accuracy" rather than
"time-wasting" :)

> 	LDA	COUNT	; WAIT CYCLES = 16 - COUNT
> 	LSR	A	; SETUP CARRY BIT
> 	STA	$80	; STORE OFFSET VALUE
> DELAY	STA	WSYNC
> 	JMP	($80)	; WASTE 5 CYCLES
> TABLE	NOP		; WASTE 2 CYCLES
> 	NOP		; WASTE 2 CYCLES
> 	NOP		; WASTE 2 CYCLES
> 	NOP		; WASTE 2 CYCLES
> 	NOP		; WASTE 2 CYCLES
> 	BCC	JUMP	; WASTE 2 OR 3 CYCLES
> END	...
> 
> During initialization, the address of TABLE should be stored in $80.  As is,
> this one should give you a delay of 5 or between 7 and 18 cycles (can't get 6). 
> I think.  I'm relatively new to cycle counting.

This'd work if TABLE is the first byte of a page, and if $81 is set to the
number of that page (JMP ($xx) uses a 16-bit pointer.)  If you can't set
up TABLE that way, you'd need to do an add before storing the offset
(which, of course, screws up the carry you already set...)



--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/stella.html
Don't post pirate BINs to Stellalist.  Be a programmer, not a pirate.
Write the best game, win framed autographs of famous Atari alumni!!

Current Thread