Re: [stella] 1 cycle!

Subject: Re: [stella] 1 cycle!
From: Manuel Polik <cybergoth@xxxxxxxx>
Date: Tue, 18 Mar 2003 00:30:47 +0100
Hi Fabrizio!

>Thank you everyone for the amazingly prompt reply!
>All great stuff which I'm going to make use of :)

>I still have a question: you're 100% correct, branching 
to the slower piece
>of code is not exactly the most effective solution! 
But.. if I swap the 2
>pieces of code, I'll be forced to add a JMP at the end 
of the slower piece:

>[snip]
> BCC SkipDrawBall2 ; 2/3
>DrawBall2    ; Slower piece of code starts here
> LDY BallTabPtr ; 3
> LDA BallSizeTab,Y ; 4
> STA CTRLPF ; 3
> LDA BallEnableShiftTab,Y ; 4    Merged tables
> STA ENABL ; 3
> STA HMBL ; 3
> DEC BallTabPtr ; 5
> JMP Continue ; 3 <-------- Jump the following code
>SkipDrawBall2    ; Faster piece of code starts here
> LDA #0  ; 2
> STA ENABL ; 3
> SLEEP 18
>Continue
>[snip]
>
>...or maybe I'm missing something? (probably!)

You would move somewhere else and execute the return 
jump also in the quicker branch:

SkipDrawBall2    ; Faster piece of code starts here
	LDA #0  ; 2
	STA ENABL ; 3
	SLEEP 15
	JMP Continue

You could move it right before the entry of NextRow for 
example.

Greetings,
	Manuel

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


Current Thread