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