RE: Fastest memory transfer (on Sam)

2005-02-08 Thread Geoff Winkless
Please disregard last message: I'm being stupid. I wrote: See I disagree about this... Won't it be [4] [4] Loop around: {3},{1 WAIT} 4 cycles {5},[3 of 5] 8 cycles [2 of 5],[2 of 4] 4 cycles [2 of 4], {2 WAIT} 4 cycles Ignore me. I've missed a [4] out. Geoff

Re: Fastest memory transfer (on Sam)

2005-02-08 Thread Geoff Winkless
Yes, I'm still harping on. Sorry :-) Edwin wrote: Like the Idea. So I looked a bit better at LDIR in ROM too. LDIR is made up of 5 M-cycles: 4,4,3,5,5 for standard LDIR = 21T 4,4,3+1,5,5+2 LDIR in RAM with RAM contemption = 24T 4+4,4+4,3+5,5,5+6 LDIR in RAM with Display contemption = 40Ts

Re: Fastest memory transfer (on Sam)

2005-02-04 Thread Edwin Blink
Edwin, I have another question: On Spectrum, it was the basic asm knowledge that JR is shorter but slower than JP. But how does it work on Sam? I assume (without any exact computation) that due to the contention, JR is probably faster than JP in general cases. Am I right? (I consider

RE: Fastest memory transfer (on Sam)

2005-02-03 Thread Geoff Winkless
Edwin Blink wrote: From: Geoff Winkless [EMAIL PROTECTED] Without wishing to appear stupid (yeah, I know, too late, haha), I'm still not clear why that's a memory access. It's not. The delay is added there for convenience. But in fact it will delay the next opcode fetch (unless it is in

Re: Fastest memory transfer (on Sam)

2005-02-03 Thread Edwin Blink
From: Geoff Winkless [EMAIL PROTECTED] Please understand that I'm not trying to be awkward; I just don't comprehend the logic. No prob. I hadn't looked this close on ROM Display contention before so it is interesting to look into and discuss it, also a reminder to get on with a Z80 T-States

RE: Fastest memory transfer (on Sam)

2005-02-02 Thread Aley Keprt
@nvg.ntnu.no Subject: Re: Fastest memory transfer (on Sam) I already tried many LDI's and PUSH/POP system on my own, but unfortunately the process of changing SP makes PUSH/POP slower than sequence of LDI's. The fastest scrollleft code I could think of is the folowing code snippet which should

RE: Fastest memory transfer (on Sam)

2005-02-02 Thread Aley Keprt
, February 01, 2005 1:48 PM To: sam-users@nvg.ntnu.no Subject: Re: Fastest memory transfer (on Sam) I already tried many LDI's and PUSH/POP system on my own, but unfortunately the process of changing SP makes PUSH/POP slower than sequence of LDI's. The fastest scrollleft code I could think

Re: Fastest memory transfer (on Sam)

2005-02-02 Thread Edwin Blink
- Original Message - From: Aley Keprt [EMAIL PROTECTED] I originally though it's number of T-states, but POP must take at least 12T, definitely not 4T. Obviously a typing mistake :-) here are some more timings for PUSH/POP: PUSH qq (5,3,3) Standard =11Ts PUSH qq (5+3,3+1,3+1) RAM

Re: Fastest memory transfer (on Sam)

2005-02-02 Thread Edwin Blink
Incidentally, what are the 5 cycles for an LDIR? It uses the same technique as used by relative jumps to add a value of -2 to PC. so is it really the case that the z80 reads the (erroneous) next instruction before doing PC-=2 (as one source on the web suggested)? I think that suggestion

RE: Fastest memory transfer (on Sam)

2005-02-02 Thread Geoff Winkless
Edwin Blink wrote: Incidentally, what are the 5 cycles for an LDIR? It uses the same technique as used by relative jumps to add a value of -2 to PC. Without wishing to appear stupid (yeah, I know, too late, haha), I'm still not clear why that's a memory access. I've found a more helpful

Re: Fastest memory transfer (on Sam)

2005-02-02 Thread Edwin Blink
From: Geoff Winkless [EMAIL PROTECTED] Without wishing to appear stupid (yeah, I know, too late, haha), I'm still not clear why that's a memory access. It's not. The delay is added there for convenience. But in fact it will delay the next opcode fetch (unless it is in rom but read below).

Re: Fastest memory transfer (on Sam)

2005-02-02 Thread david
I can't remember if thats the case with Colins device he showed recently?Edwin Blink [EMAIL PROTECTED] wrote: From: Geoff Winkless <[EMAIL PROTECTED]> Without wishing to appear stupid (yeah, I know, too late, haha), I'm still not clear why that's a memory access.It's not. The delay is added there

Re: Fastest memory transfer (on Sam)

2005-02-02 Thread Andrew Collier
On Wed, 2005-02-02 at 19:11, Edwin Blink wrote: I'd prefer a redesigned ASIC (with a few other fixes). I see little advantage in having a accelerator board Because the extra power is needed in handling video memory. An accelerator board would have to wait just like the Z80 does. A simple

Re: Fastest memory transfer (on Sam)

2005-02-01 Thread Edwin Blink
I already tried many LDI's and PUSH/POP system on my own, but unfortunately the process of changing SP makes PUSH/POP slower than sequence of LDI's. The fastest scrollleft code I could think of is the folowing code snippet which should be repeated 9*height times and It's best to write a routine

Re: Fastest memory transfer (on Sam)

2005-02-01 Thread Geoff Winkless
Edwin Blink wrote: The fastest scrollleft code I could think of is the folowing code snippet which should be repeated 9*height times and It's best to write a routine to generate it runtime and fill in the proper SP values. [snip] It's 20% faster and takes 29% less space then LDI's. BTW

Re: Fastest memory transfer (on Sam)

2005-02-01 Thread Edwin Blink
From: Geoff Winkless [EMAIL PROTECTED] Trying to think this through... Like the Idea. So I looked a bit better at LDIR in ROM too. LDIR is made up of 5 M-cycles: 4,4,3,5,5 for standard LDIR = 21T 4,4,3+1,5,5+2 LDIR in RAM with RAM contemption = 24T 4+4,4+4,3+5,5,5+6 LDIR in RAM with Display

RE: Fastest memory transfer (on Sam)

2005-01-31 Thread Simon Owen
Aley Keprt wrote: I need to move (video) memory on Sam, what's the fastest routine? Despite its unfinished state, the SimCoupe debugger can be used to time blocks of code. Whenever you enter the debugger the T-diff value in the bottom right of the display shows the number of _real_ tstates that

RE: Fastest memory transfer (on Sam)

2005-01-31 Thread Aley Keprt
memory transfer (on Sam) I need to move (video) memory on Sam, what's the fastest routine? I expect it must utilize push pop instructions, since they take just 10T to move a byte, but I am unsure what is exact look of the whole routine. Please can somebody help me? There is not a single fastest

RE: Fastest memory transfer (on Sam)

2005-01-31 Thread Aley Keprt
how it will look on the real machine. (I will test later.) ;-) Aley -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Owen Sent: Monday, January 31, 2005 4:15 AM To: sam-users@nvg.ntnu.no Subject: RE: Fastest memory transfer (on Sam) Aley Keprt wrote

RE: Fastest memory transfer (on Sam)

2005-01-31 Thread Aley Keprt
wonder how it will look on the real machine. (I will testlater.) ;-)Aley-Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Simon OwenSent: Monday, January 31, 2005 4:15 AMTo: sam-users@nvg.ntnu.noSubject: RE: Fastest memory transfer (on Sam)Aley Keprt wrote: I

Fastest memory transfer (on Sam)

2005-01-30 Thread Aley Keprt
I need to move (video) memory on Sam, what's the fastest routine? I expect it must utilize push pop instructions, since they take just 10T to move a byte, but I am unsure what is exact look of the whole routine. Please can somebody help me?

Re: Fastest memory transfer (on Sam)

2005-01-30 Thread Edwin Blink
I need to move (video) memory on Sam, what's the fastest routine? I expect it must utilize push pop instructions, since they take just 10T to move a byte, but I am unsure what is exact look of the whole routine. Please can somebody help me? There is not a single fastest routine for everything.