On Tue, May 20, 2008 at 07:20:48PM +0100, Thomas Harte wrote:

> Obviously the second is faster — but I'm curious about your cycle  
> counts. All the z80 documentation I have lists "add hl, ss" as 11 t- 
> states. Why have you turned that into 16? 

By mistake :)

I'm working from google, and misread a table. You're right, it should be 12. 
(Whn I get 
home I'll check there aren't any other details I missed).


There's a very comprehensive article in "Based On An Idea" about Sam timings; 
in almost 
all cases you can consider the real timing to be the Z80 timings rounded up to 
multiples 
of 4 (and then doubled if you're in the screen area - because there's little 
way top avoid 
this effect, I find it simpler to think of timings in terms of a t-state whose 
length 
changes).

Then as the second layer of approximation, there are some instructions which 
don't access 
memory so much, and take less than double time in the screen area. In effect 
you recover 4 
of the "variable t-states" if you happen to be in the screen. The article lists 
there with 
a * for each 4 t-states you can save.

INC rr is one (there are more, I can't remember right now) which takes 8* 
t-states.

Andrew

-- 
 ---       Andrew Collier         ----
  ---- http://www.intensity.org.uk/ ---
                                      --
r<2+ T<4* cSEL dMS hEn/CB<BL A4 S+*<++ C$++L/mP W- a-- Vh+seT+ (Cantab) 1.1.4

Reply via email to