configure.in: default profiling to off, as its broken
[rofl0r-VisualBoyAdvance.git] / src / Globals.cpp
bloba256ce378322e4549afd7efc9ee84aeedc5ab00b
1 // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
2 // Copyright (C) 1999-2003 Forgotten
3 // Copyright (C) 2005 Forgotten and the VBA development team
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2, or(at your option)
8 // any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #include "GBA.h"
21 #ifdef BKPT_SUPPORT
22 int oldreg[17];
23 char oldbuffer[10];
24 #endif
26 reg_pair reg[45];
27 memoryMap map[256];
28 bool ioReadable[0x400];
29 bool N_FLAG = 0;
30 bool C_FLAG = 0;
31 bool Z_FLAG = 0;
32 bool V_FLAG = 0;
33 bool armState = true;
34 bool armIrqEnable = true;
35 u32 armNextPC = 0x00000000;
36 int armMode = 0x1f;
37 u32 stop = 0x08000568;
38 int saveType = 0;
39 bool useBios = false;
40 bool skipBios = false;
41 int frameSkip = 1;
42 bool speedup = false;
43 bool synchronize = true;
44 bool cpuDisableSfx = false;
45 bool cpuIsMultiBoot = false;
46 bool parseDebug = true;
47 int layerSettings = 0xff00;
48 int layerEnable = 0xff00;
49 bool speedHack = false;
50 int cpuSaveType = 0;
51 bool cheatsEnabled = true;
52 bool mirroringEnable = false;
54 u8 *bios = NULL;
55 u8 *rom = NULL;
56 u8 *internalRAM = NULL;
57 u8 *workRAM = NULL;
58 u8 *paletteRAM = NULL;
59 u8 *vram = NULL;
60 u8 *pix = NULL;
61 u8 *oam = NULL;
62 u8 *ioMem = NULL;
64 u16 DISPCNT = 0x0080;
65 u16 DISPSTAT = 0x0000;
66 u16 VCOUNT = 0x0000;
67 u16 BG0CNT = 0x0000;
68 u16 BG1CNT = 0x0000;
69 u16 BG2CNT = 0x0000;
70 u16 BG3CNT = 0x0000;
71 u16 BG0HOFS = 0x0000;
72 u16 BG0VOFS = 0x0000;
73 u16 BG1HOFS = 0x0000;
74 u16 BG1VOFS = 0x0000;
75 u16 BG2HOFS = 0x0000;
76 u16 BG2VOFS = 0x0000;
77 u16 BG3HOFS = 0x0000;
78 u16 BG3VOFS = 0x0000;
79 u16 BG2PA = 0x0100;
80 u16 BG2PB = 0x0000;
81 u16 BG2PC = 0x0000;
82 u16 BG2PD = 0x0100;
83 u16 BG2X_L = 0x0000;
84 u16 BG2X_H = 0x0000;
85 u16 BG2Y_L = 0x0000;
86 u16 BG2Y_H = 0x0000;
87 u16 BG3PA = 0x0100;
88 u16 BG3PB = 0x0000;
89 u16 BG3PC = 0x0000;
90 u16 BG3PD = 0x0100;
91 u16 BG3X_L = 0x0000;
92 u16 BG3X_H = 0x0000;
93 u16 BG3Y_L = 0x0000;
94 u16 BG3Y_H = 0x0000;
95 u16 WIN0H = 0x0000;
96 u16 WIN1H = 0x0000;
97 u16 WIN0V = 0x0000;
98 u16 WIN1V = 0x0000;
99 u16 WININ = 0x0000;
100 u16 WINOUT = 0x0000;
101 u16 MOSAIC = 0x0000;
102 u16 BLDMOD = 0x0000;
103 u16 COLEV = 0x0000;
104 u16 COLY = 0x0000;
105 u16 DM0SAD_L = 0x0000;
106 u16 DM0SAD_H = 0x0000;
107 u16 DM0DAD_L = 0x0000;
108 u16 DM0DAD_H = 0x0000;
109 u16 DM0CNT_L = 0x0000;
110 u16 DM0CNT_H = 0x0000;
111 u16 DM1SAD_L = 0x0000;
112 u16 DM1SAD_H = 0x0000;
113 u16 DM1DAD_L = 0x0000;
114 u16 DM1DAD_H = 0x0000;
115 u16 DM1CNT_L = 0x0000;
116 u16 DM1CNT_H = 0x0000;
117 u16 DM2SAD_L = 0x0000;
118 u16 DM2SAD_H = 0x0000;
119 u16 DM2DAD_L = 0x0000;
120 u16 DM2DAD_H = 0x0000;
121 u16 DM2CNT_L = 0x0000;
122 u16 DM2CNT_H = 0x0000;
123 u16 DM3SAD_L = 0x0000;
124 u16 DM3SAD_H = 0x0000;
125 u16 DM3DAD_L = 0x0000;
126 u16 DM3DAD_H = 0x0000;
127 u16 DM3CNT_L = 0x0000;
128 u16 DM3CNT_H = 0x0000;
129 u16 TM0D = 0x0000;
130 u16 TM0CNT = 0x0000;
131 u16 TM1D = 0x0000;
132 u16 TM1CNT = 0x0000;
133 u16 TM2D = 0x0000;
134 u16 TM2CNT = 0x0000;
135 u16 TM3D = 0x0000;
136 u16 TM3CNT = 0x0000;
137 u16 P1 = 0xFFFF;
138 u16 IE = 0x0000;
139 u16 IF = 0x0000;
140 u16 IME = 0x0000;