Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sunybcs!uhura.cc.rochester.edu!mek4_ltd From: mek4_ltd@uhura.cc.rochester.edu (Mark Kern) Newsgroups: comp.sys.apple Subject: Re: Really small question (a really long explanation) Message-ID: <4636@ur-cc.UUCP> Date: 22 Dec 89 16:49:56 GMT References: <9542@microsoft.UUCP> <1989Dec15.200302.8233@ncsuvx.ncsu.edu> <10041@microsoft.UUCP> Reply-To: mek4_ltd@uhura.cc.rochester.edu (Mark Kern) Organization: University of Rochester Lines: 35 In article <10041@microsoft.UUCP> brianw@microsoft.UUCP (Brian Willoughby) writes: >If you still prefer shadowing, then you could save time by causing the MVN >instruction to move back to the same location (source == destination). A >hand-coded loop will always be slower than MVN, except for cases where a >different kind of move is needed, such as an I/O move where you keep >read/writing the same address from/to a memory buffer. (i.e. reading from a >single SCSI port address into a memory buffer.) Thus, the only limitation of >MVN (or MVP) is that BOTH the source and destination addresses must be >changing. If MVN were the fastest way for moving data, GS games would be not be moving at half the speed they are now. MVN takes 7 cycles per byte, not word. An unfolded lda, sta loop is slightly faster, taking roughly 12 cyles per word, depending on the addressing mode used. MVN might be faster when the slowdown in writing occurs, but this is something I'm unsure of. The way many GS games shuttles memory from bank $01 to $E1 in a hurry is by mapping the stack onto the SHR screen, setting DP at the SHR, then PEI'ing the screen to itself, which then gets shadowed over to $E1. So far, this one of the fastest ways to do it. It is much faster than the MVN method. For info on the slow/fast cycle times for instructions when writing to Mega II controlled RAM can be found in Apple Tech Notes #70 (fast graphics hints) and Apple Note #68 (tips for I/O expansion slot card design). Mark E. Kern -- ========================================================================= Mark Edward Kern, mek4_ltd@uhura.cc.rochester.edu A.Online: Markus Quagmire Studios U.S.A. "We not only hear you, we feel you !" =========================================================================