So the SAMs z80 really  is actually slowed down quite considerably, I hadn`t 
realised how much :(

Thanks for the details :)

Andrew Collier <[EMAIL PROTECTED]> wrote: On 17 May 2007, at 23:24, Calvin 
Allett wrote:
>> Andrew Collier  wrote:

>> Because of the Sam's memory timings, using JR is usually as fast (or
>> slightly faster than) using JP. That may change with Mayhem  
>> accelerator!

> Thanks :) I`ve been reading the 1995 posts to the mailing list these
> past few days, and it`s amazing how much I`m picking up from
> those old old posts, so I`ve seen it mentioned that they run at around
> the same speed on SAM, am I remembering right that it depends
> where in screen the raster is when the code is run?

Yes. The Sam's ASIC deals with memory in blocks of 4 cycles at a  
time, and also "steals" four cycles out of every eight while drawing  
the screen (and also in some parts of the border, in MODE 1). In  
general, this means that Sam cycle timings are usually the Z80's own  
timings rounded up to a multiple of four, and then doubled if the  
screen is on.

But a few instructions don't obey this rule, because they don't need  
to read memory at the time ASIC reads it. So when the screen is on,  
they "escape" part of the time doubling. JR is one of these  
instructions, but JP is not.

On a raw Z80, on in a Sam running from external memory, and probably  
in the Mayhem accelerator; JP takes 10 cycles, and JR takes 12 (or 7  
for a conditional jump not taken).

In a Sam during the border, or if the screen is off, JP takes 12  
cycles and also JR takes 12 cycles (a conditional jump which is not  
taken, only takes 8 cycles).

When the screen is on, JP takes 24 cycles, but JR only takes 16 (a  
conditional JR is 16 cycles whether taken or not).

HTH,
Andrew

-- 
  ---       Andrew Collier         ----
   ---- http://www.intensity.org.uk/ ---
                                       --




       
---------------------------------
 Yahoo! Answers - Got a question? Someone out there knows the answer. Tryit now.

Reply via email to