Re: [stella] 1 cycle!

Subject: Re: [stella] 1 cycle!
From: Manuel Polik <cybergoth@xxxxxxxx>
Date: Mon, 17 Mar 2003 22:34:19 +0100
Hi Fabrizio!


> So, any idea on saving up cycles in that function is 
> welcome.. I'm willing to use Illegal/Undocumented 
> opcodes too, if required!

Don't Panic!

Let me see...

> DEC ScanCount ; 5
> LDA ScanCount ; 3
> SEC  ; 2
> SBC BallY ; 3
> ADC #BALL_HEIGHT; 2
> BCS DrawBall2 ; 2/3
> LDA #0  ; 2
> STA ENABL ; 3
> SLEEP 22
> JMP SkipDrawBall2 ; 3 47
> DrawBall2

So, here you are *jumping* to the branch that is already 
the slower one!

Tada: If you'd swap both routines and jump to the quick 
branch here, it should save you exactly one cycle! ;-)

Greetings,
	Manuel

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


Current Thread