> using c, some preprocessor #ifdefs and abstracted functions i 
> managed to port my first big project to ppc... hehe. writing in 
> c and not in c++ for ppc seems not to be very common. i did it 
> using the ms embedded tools/ms vc because i didn't find any 
> working port of gcc for ppc. actually my application also works
> in windows (in a little window of course).

take it one step further - that is, dont use #ifdef's :)

and, have your 'main code' program towards a new set of API's
(ie: we created a DAL.h - device abstraction layer) and the
code ends up looking very clean/simple :) 

the difficult task is writing the implementation of the DAL
for every device that exists. this is what takes time :) we 
have spend a good 6 months on this project, it takes a while
to really see results.

you also need to have a 'new event system' = which is NOT 
platform dependent. we abstracted that as well - the code 
you write knows nothing about a specific PDA.

to give you an idea:

---
boolean
ApplicationInitialize()
{
  rectangle rect;
  int       i, j;

  // allocate and initialize globals
  GlobalsType *gbls = _MemPtrNew(sizeof(GlobalsType), false);
  _MemSet(gbls, sizeof(GlobalsType), 0);
  _SysSetGlobals(gbls);

  // get information about the display
  _GfxDisplayInfo(&globals->scr_width, &globals->scr_height);
  _GfxClearWindow();

  rect.x      = 0;
  rect.y      = 0;
  rect.width  = globals->scr_width / 16;
  rect.height = globals->scr_height / 16;

  for (j=0; j<16; j++)
  {
    for (i=0; i<16; i++)
    {
      rect.x = i * rect.width;
      rect.y = j * rect.height;

      _GfxFillRegion(&rect, (color)((j * 16) + i));
    }
  }

  // update the screen
  _GfxRepaint();

  return true;
}
---

thats taken from one of the little demo's i wrote up to show
the 256 color palette on the display. i currently have 9 demo's
showing different capabilities:

- audio         - tests the freq/duration playback 
                  (will be adding support for midi playback soon)
- cube3d        - the classic :)
- font_test     - TTF based font renderering engine
- palette       - shows the 256 color palette
- sketch        - key/pen sketch program
- parachute     - graphics example showing use of different
                  resolutions on each device (handles all)
                  http://www.ardiri.com/multi-platform/

- drc_demo
- netter_demo   - some anatomy pictures i did for a commercial
                  demo (i work with medical stuff) www.drcompanion.com

and... finally :)

- bejeweled     - a cross platform implementation of bejeweled :)
                  http://www.ardiri.com/mw-bejeweled.gif

now, i am sure i'll raise some eyebrows from Howard et al *g* but,
most likely the bejeweled demo shows a 'real' application concept
in action - and, the source will most likely be included as a 
reference when we license out our multi-platform engine.

did i forget to mention that it runs on (currently):

- palm 68k
- palm armlet (99% arm) = VERY fast *g*
- pocket pc
- smartphone
- symbian series 60 
- win32

we are adding support for:

- ebookman
- vtech helio
- {any new platform}

but, they are very low priority :) the great thing is that we can
add a new platform, and you wont have to modify your application.
it will support the new platform as well!

the great thing is that you do all your application development 
using visual studio under windows. that is, you get access to a 
good debugging environment and you dont need to know squat about 
pda development :) 

when it runs, its just a matter of recompiling for all the devices
and, if you did everything right - you'll have 5 binaries :) we 
may even provide the service of generating the platform binaries.
that way, you wont even need to have *any* PDA tools installed :)

we are packaging this concept for licensing for developers to use.
if you are interested and want to know more, contact me direct for
more information - i can send you a few of the above demos :)

---
Aaron Ardiri                        [EMAIL PROTECTED]
CEO - CTO                                           +46 70 656 1143
Mobile Wizardry                      http://www.mobilewizardry.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