On Mon, 13 Sep 1999, Si Owen wrote:

> (*) No contention when display is disabled (modes 3 and 4 only), or when

Do you also ensure that the screen is black when the display is disabled?
Some of my code relies on this for cosmetic effect - ie, cleaning up
pixels which couldn't be modified in time. I think ESI's The Lyra 3 does
this too.

> outside the main 192 lines of the screen in modes 2, 3 and 4.  It doesn't
> take into account the speed-up in the border areas of the main screen, but
> that doesn't affect most things and can be added in the future.  Uncontended
> timings use the documented instruction timing, and contended timings use a
> rough formula of "((tstates + 7) & -7) - 1" (!) to give 8 t-state rounding.
> It's a start anyway...

I suspect it may well be easier and probably more accurate to hard-wire
all the instruction times up to the nearest 4 (more accurate than the
standard timings because instruction reads always occur at 4 t-state
boundaries, even when the processor is running in uncontended RAM.[1])

Then you can just double that timing for contended memory, which will be
accurate except for a few special cases such as INC rr (You'd probably
want to implement uncontended running in the border before worrying about
those, either). This is assuming you're referring to t-states as real
clock cycle t-states, rather than the slightly more abstract "useful
t-state" which can vary between one and two clock cycles, but is often
used because instructions will then appear to be the usual length...

It would be interesting to see how your modified timing code copes with my
second E-Tunes player (Fred 63 onwards, or from
http://mnemotech.ucam.org/mnemotech.html)

The problem there is that a lot of line interrupt routines are involved in
displaying the scrolling message - in current versions of SimCoupe the
processing for one line takes too long, and the code misses the following
line's interrupt, so has to wait for that during the next frame. The
message is sixteen pixels high, so this actually causes the program to run
at one sixteenth of the proper speed.

Andrew

[1] Running from ROM or external RAM will be different, of course, but
that is probably of secondary importance?

-- 
 --  Andrew Collier  ([EMAIL PROTECTED])  --        My other
  --      http://mnemotech.ucam.org      --       .sig is a
   -- Part 3 Materials Science, Cambridge --      PDF file
                                           --

Reply via email to