On Tue, Jun 29, 2004 at 12:40:50PM +0200, Edwin Blink wrote: > > Is this just as fast as the SAM's internal memory? (I don't know whether > > or not the 1 meg card is slower.) Also, how expensive is paging?
> The CF will not work just like RAM instead it works just like a 8-bit > harddisk by using memory mapped I/O. Every 512 byte sector must be > selected first. I did wonder. Paging one 512 byte sector at a time is fine, as speed is the main issue. > 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. So you must read byte 0, followed by byte 1, and so on? Does each read fetch the next byte regardless of the offset into the I/O region? I.e. can you keep reading from the same address to fetch the next byte? 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. 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 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. 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 ). 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 will need to do paging every few instructions, since I'm mainly > > interested in using CF as extra memory, rather than as disk space.) > I hope your not to disapointed now. 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. Cheers, -- Stuart Brady

