Re: Re: [stella] Kernel help #2

Subject: Re: Re: [stella] Kernel help #2
From: Dennis Debro <ddebro@xxxxxxxxxxxxx>
Date: Tue, 27 Aug 2002 16:28:25 -0400
Thanks Thomas,

> You could move some of your code into the previous scanline 
> (e.g. inc scanLine, sta HMOVE),

I thought I was doing things on the previous scanline before the real scanline is called. The subroutines are called on the scanline before it's needed so the accumulator holds GRP0 graphics. I am also doing HMOVE on each scanline so I remove the comb effect.

> but IMO your main problem is, 
> that you are 'wasting' to much time with using subroutines. 
> Each call needs addtional 12 cycles, which is ~1/6 of your 76 
> cycles. So try to avoid JSR inside the kernel.

I agree each jsr call takes 12 cycles (6 for jsr and 6 for rts). Should I do a sort of unroll so I have this routine on each scanline? I was trying to do some reuse here but I know timing is tight :)

The scanline where the player is being positioned is taking a max of 62 cycles right? That leaves me ~10 cycles to get ready for the next scanline. Hmmm...I guess if I have time on the previous scanline to do the routine "twice" then the player graphic could be held in some sort of temp variable. So when the scanline is called after the player move routine, I still have the player graphic already held off.

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


Current Thread