i tried to do fast pixel output on the cp330 screen. so i stepped over the posts and finally i found the post about maze3d: http://www.cpsdk.com...wtopic.php?t=67
i took a look at the code, and checked how he gained access to the classpad-screenbuffer.
it is done via invoking a so called hidden-function to get to the screen-buffer.
so with this knowledge i wrote yesterday the base-structure of a calculator-engine system, just short "ce". it uses namespaces to seperate several areas of handling, like graphic or keyboard, network, etc.
the desing is fully abstract and so it is possible to support the hardware of different types of calculators or if you want computers.
code of course has to be written to fill the namespaces.
at the moment i have concentrated on graphics an i got a simple system, where the virtual graphic-device of the classpad initializes the system specific components for graphic. the access to screen is abstracted via rendertargets. so default is, that the current rendertarget is the actual screenbuffer. but if you are smart

at the moment it is only possible to draw 8 pixel at once(1 bit per pixel), because i have not finalized the generic access to rendertargets to support different rendertargets with different formats.
if the buffer-access handling works, i will take a look to handle depth-buffering and how it incorporates with colorbuffer. if you only want to write color to colorbuffer if the pixel is in front of others these information have to be exchanged.
the whole other hardware capabilities can be implemented in other devices, for example keyboard device or so.
the tree is: device_interface::device_area_interface::device_system
interface:=generic
area := graphic|keyboard|sound|...
system:=cp330|...
so for now it is a project compiled with the cpsdk. for renderig a window has to be created and then invalidate, begindraw, enddraw from peg has to be called. between begindraw-enddraw you can flush the colorbuffer to screenbuffer.
at the moment im interested in performance so i want to determine the pixel-fill rate of the device and my implementation.
but to do this i need access to a timer and the possibility to write elapsed time to a classpad variable.
does anyone know how to this?
because hidden-function access only works if the programm is compiled purely for the classpad it is possible to emulate the drawing capabilites with a virtual device based on gdi or what ever. a code-path selection has then to be set, of course.
if i can manage the data handling of the render target, i will post the small-framework so that everyone can use it an make it better, or perhaps something already exists. then let me know

there exists a function in the bios.lib: _CP_Btime_GetTime_RtcMandS
seems to access the the realtime-clock, but i don't know the parameters; anyone?
irenek