Le dimanche, 29 sep 2002, � 16:31 Europe/Paris, Tilo Christ a �crit : > Is there some way to detect the presence of such an accelerator?
What you can do is contact MediaQ ( http://www.mediaq.com ) and try their API. Just in case you don't know, all Cli� devices are using a MediaQ chip. > How does its speed compare to handcrafted assembly routines? Only you knows which are the conditions you are using ( resolution, depth, location in RAM or VRAM of the data etc ), which functions you use and how well your "handcrafted assembly routines" are optimised > In my game framework I have some very fast assembly routines, but can > alternatively use a "pure" version that only uses officially > sanctioned PalmOS calls. So my question is: Does it make sense to > recognize the presence of an accelerator and then switch to using Palm > OS, because it will be faster than the handcrafted assembly routines? The best way to be fixed is to try by yourself : just run a benchmark comparing your fonctions and the ones of the API. In fact, you don't need to check for the presence of an accelerator ( unless you want to use some specific function that may be usefull ), the Palm OS API should take care of that for you. What I would suggest is to have for each fonction you wrote in assembly, an API equivalent, like for exemple : CopyScreen_ASM and CopyScreen_API, and use in your code CopyScreen which is in fact the content of a pointer on one of those function. Then at run time, when your application is started, benchmark all of those functions ( offscreen, so the user don't see anything ), and make the pointer use the one which is faster ! This way, you don't need to change anything in your source code, and your app is ready and optimized for every hardware accelerators, even those that are not yet released ! ;-) -- Daniel Morais http://www.kickoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
