----- Original Message ----- 
From: "Stuart Brady" <[EMAIL PROTECTED]>

> > But when selected and available it will be as fast as RAM an can be
> > loaded with a single LDIR instruction or in any other way you like.
> > It's also possible to execute code from it directly. But only in a
> > linair way.

Data can be read/written to a single register address or to a block of
addresses
Any read/write in this block has the same effect as writting to the single
register.
The advantage is dat you can use block moves to speed thing up.

> So you must read byte 0, followed by byte 1, and so on?

Yes

> Does each read  fetch the next byte regardless of the offset into the I/O
region?

Yes (when accessing the block range)

> can you keep reading from the same address to fetch the next byte?

Yes (register)

> I've had a thought about alternative ways of copying data.  Stack
> copying would be "fun" if you took an NMI, as the return address would
> be written to (SP-2).  When reading using POP, the overwritten data will
> be in registers, or in the target buffer.  When writing using PUSH, the
> overwritten data would be overwritten anyway.  In both cases, the first
> two bytes before the start of the buffer could also be overwritten. I
> think this would need an awful lot of care.

With the wacky NMI button on some SAMs it would be a lot more then just
(SP-2)
But it is fun indeed. I remember putting the SP in screen area and hitting
NMI like a
maniak. That realy was fun :)

Using pushes is a fast way to fill a sector with 0 for 'formating'.
fastest reading I could think of is by executing code directly from the
sector
in small 'bursts'containing LD (HL),n ;inc L which load load a byte in 11
Ts. however only
170 bytes could be loaded in this way because the sector would then be used
up
For loading data it is not usefull.

> Since you can't use PUSH to write to the disk, I've thought about using
> POP to read from memory and LD to write to disk, but I can't see a way
> of doing this that isn't slower than LDIs.

I can't too.

>  I think the ROM's LDIR routine may be the best bet, though.  If anyone
> knows any clever tricks for copying memory, I'd be delighted to learn
about them.

Only thing that beats LDIR is LDI and a block of 64/128 of them whould speed
up.
I wrote a routine which I also used in Comet that worked as a LDIR but was
made out
of LDIs when in ROM it would be even faster.

> I don't know a whole lot about timings on the Z80 or the SAM.  I'm
> particularly confused by contended memory - I remember reading that the
> ASIC does burst reads, but if so, these must be fairly short bursts
> (4 bytes for modes ).

It is confusing. Even with having good knowledge of them. Still need to make
a
reference sheet for it. But simply said round up instructions timings up to
multiples
of 4.

> Also, I don't get why accessing RAM is slower  than accessing ROM,
> even when video has been turned off.  Could someone explain this, please?

I'ts because of  RAM refreshing and the way the asic is designed.
The refreshing is done by the asic at fixed intervals  (4Ts?) and simply
halts the Z80 whenever it wants to access RAM.

> Well, it looks like I'll still be needing the 1 meg card.  But an
> interface that's faster than the ATOM is surely a good thing.

We'll see

Edwin

Reply via email to