It looks like I have figured it out

Code:
Function  OpenFile(pszFile: PChar; nMode: ctypes.cint32): ctypes.cint32;                    Cdecl; External;
Procedure CloseFile(nFile: ctypes.cint32);                                                  Cdecl; External;
Function  MMap(pAddr: Pointer; nLen,nProtection,nFlags,nFD,nOff: ctypes.cint32): Pointer;   Cdecl; External;
Procedure MUnmap(p: Pointer; nSize: ctypes.cint32);                                         Cdecl; External;
Procedure ChangeDir(pszDir: PChar);                                                         Cdecl; External;
Procedure ExecuteFile(pszFile: PChar; nZero1,nZero2: ctypes.cint32);                        Cdecl; External;
I was missing the Cdecl declaration for the external routines!

I will now be playing around with accessing the hardware of the gp2x directly using the above routines to see if I can get some graphics working faster on the gp2x

cheers,
Paul.