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

Subject: Re: [stella] 6 digit score display and other ramblings
From: Chris Wilkson <cwilkson@xxxxxxxxxxxxx>
Date: Tue, 17 Mar 1998 18:51:16 -0800 (PST)
> Actually, looking at my 6502 docs again, doesn't JMP support absolute
> indirect addressing?  ie, if I store #$10 in memory location $80, and #$F6
> in location $81, the instruction JMP ($80) will jump to $F610.  Trying it
> in the PC Atari debugger, the addressing mode does exist... so it should be
> possible to get single-cycle-precision delay in ROM, without
> self-modifiying code.

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. :)

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

So how about...


	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.

-Chris

--
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