99fb1fc3a6360cc7f426e395e273b259a1a9fb36
[cyclone68000.git] / Cyclone / Cyclone.h
1 \r
2 // Cyclone 68000 Emulator - Header File\r
3 \r
4 // This code is licensed under the GNU General Public License version 2.0 and the MAME License.\r
5 // You can choose the license that has the most advantages for you.\r
6 \r
7 // SVN repository can be found at http://code.google.com/p/cyclone68000/\r
8 \r
9 #ifdef __cplusplus\r
10 extern "C" {\r
11 #endif\r
12 \r
13 extern int CycloneVer; // Version number of library\r
14 \r
15 struct Cyclone\r
16 {\r
17   unsigned int d[8];   // [r7,#0x00]\r
18   unsigned int a[8];   // [r7,#0x20]\r
19   unsigned int pc;     // [r7,#0x40] Memory Base+PC\r
20   unsigned char srh;   // [r7,#0x44] Status Register high (T_S__III)\r
21   unsigned char xc;    // [r7,#0x45] Extend flag (____??X?)\r
22   unsigned char flags; // [r7,#0x46] Flags (ARM order: ____NZCV)\r
23   unsigned char irq;   // [r7,#0x47] IRQ level\r
24   unsigned int osp;    // [r7,#0x48] Other Stack Pointer (USP/SSP)\r
25   unsigned int vector; // [r7,#0x50] IRQ vector (temporary)\r
26   int pad1[3];\r
27   int cycles;          // [r7,#0x5c]\r
28   int membase;         // [r7,#0x60] Memory Base (ARM address minus 68000 address)\r
29   unsigned int   (*checkpc)(unsigned int pc); // [r7,#0x64] - Called to recalc Memory Base+pc\r
30   unsigned char  (*read8  )(unsigned int a);  // [r7,#0x68]\r
31   unsigned short (*read16 )(unsigned int a);  // [r7,#0x6c]\r
32   unsigned int   (*read32 )(unsigned int a);  // [r7,#0x70]\r
33   void (*write8 )(unsigned int a,unsigned char  d); // [r7,#0x74]\r
34   void (*write16)(unsigned int a,unsigned short d); // [r7,#0x78]\r
35   void (*write32)(unsigned int a,unsigned int   d); // [r7,#0x7c]\r
36   unsigned char  (*fetch8 )(unsigned int a);  // [r7,#0x80]\r
37   unsigned short (*fetch16)(unsigned int a);  // [r7,#0x84]\r
38   unsigned int   (*fetch32)(unsigned int a);  // [r7,#0x88]\r
39 };\r
40 \r
41 void CycloneRun(struct Cyclone *pcy);\r
42 \r
43 #ifdef __cplusplus\r
44 } // End of extern "C"\r
45 #endif\r