1 /****************************************************************************
2  globals.h
3  ****************************************************************************/
4 
5 #ifndef GLOBALS_H_
6 #define GLOBALS_H_
7 
8 #include "hard_pce.h"
9 #include "defs.h"
10 
11 //
12 // Bitmask values for PCE status flags:
13 //
14 #define FL_N 0x80
15 #define FL_V 0x40
16 #define FL_T 0x20
17 #define FL_B 0x10
18 #define FL_D 0x08
19 #define FL_I 0x04
20 #define FL_Z 0x02
21 #define FL_C 0x01
22 
23 //
24 // Globals for PCE memory-addressing:
25 //
26 extern UChar * base[256];
27 extern UChar * zp_base;
28 extern UChar * sp_base;
29 extern UChar * mmr_base[8];
30 
31 //
32 // Globals for PCE CPU registers:
33 //
34 extern UInt16  reg_pc;
35 extern UChar   reg_a;
36 extern UChar   reg_x;
37 extern UChar   reg_y;
38 extern UChar   reg_p;
39 extern UChar   reg_s;
40 extern UChar * mmr;
41 
42 //
43 // Globals which hold emulation-realted info:
44 //
45 extern UInt32    cycles;
46 extern UChar   halt_flag;
47 
48 //
49 // Tables for disassembly/execution of PCE opcodes:
50 //
51 extern mode_struct addr_info[];
52 extern operation optable[];
53 
54 #endif
55