-----------------------------------------------------------------------------
File name:	TSTROM_X.TXT			Revision date:	2000.09.01
Created by:	Ronald Andersson		Creation date:	2000.09.01
-----------------------------------------------------------------------------
This file describes the following test programs for the cartridge ROM port:

TSTROM_1.APP	used to test the access cycle time    [nanoseconds]
TSTROM_2.APP	used to test the maximum access rate  [accesses/second]

Note that both tests run with active interrupts, and so the access times will
be somewhat higher than the real access times, and the rates will be somewhat
lower than the theoretical maximum. However, since the real applications have
to run with active interrupts, this makes the rate results fully realistic.

Each test will take several seconds, but even in the slowest environments
they should never take more than 30 seconds. (Unless something bombs... ;-)
The test timing resolution is 5 ms, as it uses the 200 Hz system clock,
and if run on clones or machines with this clock modified then the times
will be miscalculated.  (That does not apply to any of my tests below.)
-----------------------------------------------------------------------------
Here are some access cycle times I get for various systems, after rounding
and compensating for interrupt time losses.

 8 MHz ST         = 500 ns  shown as appx 620 ns with STinG active
36 MHz ST         = 500 ns  shown as appx 510 ns with STinG active
32 MHz TT         = 500 ns  shown as appx 575 ns with STinG active
50 MHz CT2-Falcon = 400-800 ns  varying with operating modes

NB: If you wonder why TT has so high losses, it is probably because the
    higher screen rez (compared to ST) and VGA refresh rate demand more
    video RAM accesses per second.  During these the CPU does no access.
-----------------------------------------------------------------------------
Here are some maximum transfer rates, just rounded from those by TSTROM_2,
since its test method does perform a realistic transfer with STinG active.

 8 MHz ST         = 530000 accesses per second
36 MHz ST         = 640000 accesses per second
32 MHz TT         = 980000 accesses per second
50 MHz CT2-Falcon = 960000 accesses per second

NB: Even a standard ST was capable of 534000 accesses per second, and since
    all the accesses were transfers of 16bit words, it means that a standard
    ST can transfer over one megabyte per second over the cartridge port...!
    But that only applies to read operations, as write operations demand
    more complex methods, due to the missing R/W signal on the port. This
    means that half a megabyte per second is the maximum for ST writing to
    the cartridge port, and less efficient implementations will have to
    settle for appx half of those values.
-----------------------------------------------------------------------------
It is interesting to note that the differences do not follow CPU speed in
a linear fashion, meaning that other factors (timed waitstates) dominate
the access cycles.  It is likely that this will be true also with other
accelerators, although timing details probably differ.  Note also that
those relying on a PMMU tree (eg: CT2) always have greater losses when
accessing uncachable hardware, like cartridge, as each access has to
perform ATC lookup to determine the physical address.

It is also interesting to note, from the program displays not shown here,
that the supposed difference in cache behaviour for the two access areas
$00FAxxxx and $FFFAxxxx of TT and Falcon do not exist.  Their behaviour
seems fully identical, contrary to various docs (eg: Some for CT2.)
-----------------------------------------------------------------------------
Partial sources for the main parts of the programs are available, but it
was not practical (due to size) to include the full code and macro libs
that are needed for reassembly.
-----------------------------------------------------------------------------
End of file:	TSTROM_X.TXT
-----------------------------------------------------------------------------
