Scott Erickson wrote:
forgot to say i am using PODS, not codewarrior.
For a straight forward pnolet without globals and an object size below
64k made with prc-tools (should be similar to PODS):
* put your arm code in one c file, first function must be
UInt32 NativeFunction(const void *emulStateP, void *userData68KP,
Call68KFuncType *call68KFuncP)
{
MyUserData *myUserData68KP = (MyUserData *) userData68KP;
// call your stuff here
return 0;
}
call 68k code back like this:
void ARM_SetClip (const void *emulStateP, Call68KFuncType *call68KFuncP,
RectangleType *rP)
{
typedef struct _tagWinSetClip
{
RectangleType *rP;
} structWinSetClip;
structWinSetClip params1;
rP->topLeft.x = ByteSwap16(rP->topLeft.x);
rP->topLeft.y = ByteSwap16(rP->topLeft.y);
rP->extent.x = ByteSwap16(rP->extent.x);
rP->extent.y = ByteSwap16(rP->extent.y);
params1.rP = (RectangleType *) ByteSwap32(rP);
((void)((call68KFuncP)(emulStateP, PceNativeTrapNo(sysTrapWinSetClip),
¶ms1, sizeof(params1))));
}
compile it with
arm-palmos-gcc -Wall -nostartfiles -lc -ffixed-r9 -O3 -o FrameArm.o
FrameArm.c
arm-palmos-objcopy -O binary FrameArm.o FrameArm.arm
Put the result in a custom resource.
In your main you lock the pnolet resource and call it like:
if (sysFtrNumProcessorIsARM(processor))
{
// On ARM-Processor, call the Armlet Function
PceNativeCall(armlet, (void *) &myUserData68K);
}
That's it.
Regards
Henk
--
-------------------------------------------------------------------------
Henk Jonas [EMAIL PROTECTED]
Palm OS ® certified developer
Please contact me, if you need an off-site contract worker.
-------------------------------------------------------------------------
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/