ZSurface

The ZSurface class is a memory area to which you can draw images and primitives.
It provides set of optimized methods for various types of memory transfers ( blitting) between 
memory buffers (ZSurfaces) and/or framebuffer (video) memory on ARM powered, qte based devices ( currently it only supports the Zaurus.)


The code for memory transfers (blits) is written in optimized ARM asm and therefore is quite fast.
Each function has an equivalent written in pure C ( not optimized ) which allows entire class to be used
on X86 machines using qvfb ( should be only used for development etc ...)


The package contains ZSurface source code (zsurface/) as well as a demo application (demo/)

To compile the demo application to run on x86/qvfb:

cd zsurface
tmake zsurface.x86 > Makefile
make
cd ..
cd demo
tmake demo.pro > Makefile 
make

Start qvfb. Make sure to configure it to 16 bit ( this is very important , we are hitting framebuffer memory directly and therefore
qvfb needs to emulate 16 bit ,240x320 PDA framebuffer.) 
Once you have that set, start qpe and then start demo app (./zsurfacedemo)


To compile the demo application to run on the Zaurus :
Make sure your environment is set to support ARM cross compiler ( refer to  http://docs.zaurus.com/ for more info about how to set this up)


cd zsurface
tmake zsurface.pro > Makefile
make
cd ..
cd demo
tmake demo.pro > Makefile 
make

That's it.

zsurface directory contains ZSurface class which , by default, is compiled into a static library.
There are two tmake scripts - one for x86 ( zsurfacex86.pro) and another is for arm arch ( zsurface.pro).
The only difference is that x86 one defines USE_C_ONLY variable and does not attempt to compile ASM files (*.S) which, obviously,
would not work on X86 machine.


LIMITATIONS:
- full screen only 
- at this point only Zaurus hardware is supported.
- on A 300 only default screen mode is supported ( ZROTATION 0 )

TO DO:

- support of qte on ipaq devices
- support for landscape modes on A 300
- support for windowed mode 
- support for RLE encoded sprites

This code is released under BSD license.

Any comments, suggestions should be directed to wrawdanik@warmi.net


Thanks

Walter Rawdanik
