On 6/21/06, Donald C. Kirker <[EMAIL PROTECTED]> wrote:
I have read and people have said that you need to have an m68k loader,
and the reast could be ARM code, but Aaron Ardiri says otherwise
(from http://www.palminfocenter.com/view_story.asp?ID=6487):
"> Nope, the current version of OS 5 can't do native ARM code, only
a68k with ARMlets to speed up applications.
How would I go about doing this? I have been looking around, and I
have found nothing so far.
you are referring to a webpage thats very old :) - and, back when
ARM code was being written for palm os devices; all we could do was
use PceNativeCall as per the API specification that palmsource provided.
a lot of advancements have been made since then.
Aaron stated in some posts on this newsgroup that all that is neede
is a very small (1-2k) m68k loader). He also stated that it would be
possible that no loader would be needed (he refers to the HotSync
app and the Tapwave ROM loader).
a palmsource employee mentioned that hotsync was a native app, and
when the tapwave rom loader was released; it was also noticed as a
native app. there seemed to be a way to do 100% ARM code - but, it
was not documented anywhere.
the same can be said about patching OS 5, now - we know a lot more
about how the internal OS 5 routines work; specifically around the use
of the r9 ARM register. it is now possible to patch OS 5.
If I couldn't easily do a pure ARM app without a loader then what code
would I need to include in the loader (PilotMain obviously) and how would
I call the ARM code (I have seen an program using PEAL, but I think
PEAL might be a hassel to use).
Igor Nesterov and others have done a lot of work in documenting some of
this - you can find some information at the following sites:
http://yahm.palmoid.com/yahmv.htm
http://www.mobile-stream.com/devzone.html
mobile-stream have actually done a lot of reverse engineering of the palmos
and made a little sdk thats quite simple to use. they even have an example
of how to write a 100% native ARM program.
but, in answer to your question; my applications have a little 68k loader that
do this in the PilotMain() function:
result = errNone;
if (PACE_LoadArmResource())
result = PceNativeCall((void *)armlet, (void *)GOT);
PACE_UnloadArmResource();
the two PACE_ routines obviously load the resource, setup the armlet and
GOT tables (if you read my old posts; you'll understand this). it could be
done a lot easier with an alternative sdk - however, i've been using this for
just over four years now - and, i have never had any problems.
yes, the event loop runs within the ARM code - it never returns to 68k until
the application is completed from my applications point of view.
--
// Aaron Ardiri
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/