> I'm in (say) 2-bit color mode. If I draw a bitmap that is 8x1 at (0,0) onto
> my screen buffer, all I have to do is copy 2 bytes from the bitmap to the
> first 2 bytes of the screen buffer (I'm using MemMove right now, but I'll
> bet there is a faster way, do you know how good the memcpy in MSL is?).

memcpy in MSL just is a inline wrapper around MemMove, so you wouldn't 
see a performance change.  We thought about providing a optimized 
version of this routine, but it got deferred since it probably would be 
better to call the OS when we have native ARM routines in OS 5 than it 
would be to loop in emulated 68K code.

If you want some code you can crib, look at the file mem.c in the "(MSL 
for Palm OS)\MSL_C\MSL_Common\Src" folder.  Among all the various 
defines, you'll find a fairly good memcpy, with support for aligned and 
unaligned writes.  The MemMove in Palm OS 4.0 suffers from not doing 32-
bit reads/writes.  True, the DragonBall only has a 16-bit memory bus, 
but not taking full advantage of the register size means more 
instructions are executed per copy.  I think one of the optimizations 
that QuickBits does on a device is to replace MemMove by a better 
version.

-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Get help at http://palmoswerks.com/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to