Xref: utzoo comp.sys.amiga.tech:879 comp.sys.amiga:19574 Path: utzoo!attcan!uunet!husc6!mit-eddie!killer!elg From: elg@killer.UUCP (Eric Green) Newsgroups: comp.sys.amiga.tech,comp.sys.amiga Subject: Re: DiskObject Message-ID: <4260@killer.UUCP> Date: 1 Jun 88 06:25:13 GMT References: <2135@ur-tut.UUCP> Distribution: na Organization: The Unix(R) Connection, Dallas, Texas Lines: 34 in article <2135@ur-tut.UUCP>, dpvc@ur-tut (Davide P. Cervone) says: > Xref: killer comp.sys.amiga.tech:935 comp.sys.amiga:20028 > In article <4751@watdcsu.waterloo.edu> debate2@watdcsu.waterloo.edu (Dave Oh) writes: >>Ok... What if I were to call dobj=GetDiskObject(disk); ? >>The GetDiskObject call returns a pointer to FAST ram, for gadget, diskobject >>and image... I've tried to CopyMem(&dobj->do_Gadget.GadgetRender,&nimage, >>sizeof(struct Image)); and I get a lock up! Even in Manx SDB. > > But doesn't CopyMem use the blitter to move the memory? If so, then you > CAN'T use it to move your image from FAST memory to CHIP. You'll need to > have the CPU do the memory move, not the blitter. There probably is a Manx > library routine that does this (like movemem or something). CopyMem does not use the blitter. I've used it to copy data that's nowhere near CHIP memory. One thing to note about CopyMem and the corresponding Manx library routine (movemem): they do not properly handle overlapping data areas. In particular, they do a low-to-high move, ALWAYS... which, when the destination overlaps at a higher address, overwrites the top of the source area before that area of memory has been copied (thus garbaging everything). Ideally, they should do a high-to-low move upon detecting such a condition. Note that this behavior is NOT documented, not even in the Manx 3.60 docs for "movemem". I found out about it the hard way (doing block moves for a simple full-screen editor :-(. ). I have a sample program that demonstrates the problem, but, alas, it's on the Amiga at work, and I'm here on my 128 at home. -- Eric Lee Green {cuae2,ihnp4}!killer!elg Snail Mail P.O. Box 92191 Lafayette, LA 70509 "Is a dream a lie if it don't come true, or is it something worse?"