2004-09-17 09:11:15 +02:00
|
|
|
/* -*-mode: C; fill-column: 77; c-basic-offset: 4; -*- */
|
|
|
|
|
|
|
|
#ifndef _PNOSTATE_H_
|
|
|
|
#define _PNOSTATE_H_
|
|
|
|
|
|
|
|
#include <PceNativeCall.h>
|
2004-09-19 05:28:45 +02:00
|
|
|
#include <MemoryMgr.h>
|
2004-09-17 09:11:15 +02:00
|
|
|
|
2006-11-29 05:11:24 +01:00
|
|
|
/* from http://news.palmos.com/read/messages?id=159373 */
|
|
|
|
typedef struct EmulStateType {
|
|
|
|
UInt32 instr;
|
|
|
|
UInt32 regD[8];
|
|
|
|
UInt32 regA[8];
|
|
|
|
UInt32 regPC;
|
|
|
|
} EmulStateType;
|
|
|
|
|
2004-09-17 09:11:15 +02:00
|
|
|
/* This gets written into the code by the callback below. */
|
|
|
|
typedef struct PNOState {
|
2006-11-29 05:11:24 +01:00
|
|
|
const EmulStateType* emulStateP;
|
2004-09-17 09:11:15 +02:00
|
|
|
Call68KFuncType* call68KFuncP;
|
|
|
|
void* gotTable;
|
|
|
|
} PNOState;
|
|
|
|
|
2004-09-19 05:28:45 +02:00
|
|
|
/* I can't get the circular decls to work now */
|
|
|
|
typedef void StorageCallback(/*PnoletUserData*/void* dataP);
|
2004-09-17 09:11:15 +02:00
|
|
|
|
|
|
|
/* This is how armlet and 68K stub communicate on startup */
|
2004-09-19 05:28:45 +02:00
|
|
|
typedef struct PnoletUserData {
|
2004-09-17 09:11:15 +02:00
|
|
|
unsigned long* pnoletEntry;
|
|
|
|
unsigned long* gotTable;
|
|
|
|
StorageCallback* storageCallback; /* armlet calls this */
|
|
|
|
PNOState* stateSrc; /* armlet fills in */
|
|
|
|
PNOState* stateDest; /* armlet fills in */
|
2004-09-19 05:28:45 +02:00
|
|
|
|
|
|
|
/* PilotMain params */
|
|
|
|
MemPtr cmdPBP;
|
|
|
|
UInt16 cmd;
|
|
|
|
UInt16 launchFlags;
|
2004-10-02 05:54:30 +02:00
|
|
|
|
|
|
|
/* Other.... */
|
|
|
|
Boolean recursive; /* PilotMain called from inside PilotMain */
|
2004-09-19 05:28:45 +02:00
|
|
|
} PnoletUserData;
|
2004-09-17 09:11:15 +02:00
|
|
|
|
|
|
|
#endif
|