home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / src / Globals.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-13  |  3.4 KB  |  136 lines

  1. // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
  2. // Copyright (C) 1999-2003 Forgotten
  3. // Copyright (C) 2004 Forgotten and the VBA development team
  4.  
  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.
  14. //
  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.
  18.  
  19. #include "GBA.h"
  20.  
  21. reg_pair reg[45];
  22. memoryMap map[256];
  23. bool ioReadable[0x400];
  24. bool N_FLAG = 0;
  25. bool C_FLAG = 0;
  26. bool Z_FLAG = 0;
  27. bool V_FLAG = 0;
  28. bool armState = true;
  29. bool armIrqEnable = true;
  30. u32 armNextPC = 0x00000000;
  31. int armMode = 0x1f;
  32. u32 stop = 0x08000568;
  33. int saveType = 0;
  34. bool useBios = false;
  35. bool skipBios = false;
  36. int frameSkip = 1;
  37. bool speedup = false;
  38. bool synchronize = true;
  39. bool cpuDisableSfx = false;
  40. bool cpuIsMultiBoot = false;
  41. bool parseDebug = true;
  42. int layerSettings = 0xff00;
  43. int layerEnable = 0xff00;
  44. bool speedHack = false;
  45. int cpuSaveType = 0;
  46. bool cpuEnhancedDetection = true;
  47. bool cheatsEnabled = true;
  48.  
  49. u8 *bios = NULL;
  50. u8 *rom = NULL;
  51. u8 *internalRAM = NULL;
  52. u8 *workRAM = NULL;
  53. u8 *paletteRAM = NULL;
  54. u8 *vram = NULL;
  55. u8 *pix = NULL;
  56. u8 *oam = NULL;
  57. u8 *ioMem = NULL;
  58.  
  59. u16 DISPCNT  = 0x0080;
  60. u16 DISPSTAT = 0x0000;
  61. u16 VCOUNT   = 0x0000;
  62. u16 BG0CNT   = 0x0000;
  63. u16 BG1CNT   = 0x0000;
  64. u16 BG2CNT   = 0x0000;
  65. u16 BG3CNT   = 0x0000;
  66. u16 BG0HOFS  = 0x0000;
  67. u16 BG0VOFS  = 0x0000;
  68. u16 BG1HOFS  = 0x0000;
  69. u16 BG1VOFS  = 0x0000;
  70. u16 BG2HOFS  = 0x0000;
  71. u16 BG2VOFS  = 0x0000;
  72. u16 BG3HOFS  = 0x0000;
  73. u16 BG3VOFS  = 0x0000;
  74. u16 BG2PA    = 0x0100;
  75. u16 BG2PB    = 0x0000;
  76. u16 BG2PC    = 0x0000;
  77. u16 BG2PD    = 0x0100;
  78. u16 BG2X_L   = 0x0000;
  79. u16 BG2X_H   = 0x0000;
  80. u16 BG2Y_L   = 0x0000;
  81. u16 BG2Y_H   = 0x0000;
  82. u16 BG3PA    = 0x0100;
  83. u16 BG3PB    = 0x0000;
  84. u16 BG3PC    = 0x0000;
  85. u16 BG3PD    = 0x0100;
  86. u16 BG3X_L   = 0x0000;
  87. u16 BG3X_H   = 0x0000;
  88. u16 BG3Y_L   = 0x0000;
  89. u16 BG3Y_H   = 0x0000;
  90. u16 WIN0H    = 0x0000;
  91. u16 WIN1H    = 0x0000;
  92. u16 WIN0V    = 0x0000;
  93. u16 WIN1V    = 0x0000;
  94. u16 WININ    = 0x0000;
  95. u16 WINOUT   = 0x0000;
  96. u16 MOSAIC   = 0x0000;
  97. u16 BLDMOD   = 0x0000;
  98. u16 COLEV    = 0x0000;
  99. u16 COLY     = 0x0000;
  100. u16 DM0SAD_L = 0x0000;
  101. u16 DM0SAD_H = 0x0000;
  102. u16 DM0DAD_L = 0x0000;
  103. u16 DM0DAD_H = 0x0000;
  104. u16 DM0CNT_L = 0x0000;
  105. u16 DM0CNT_H = 0x0000;
  106. u16 DM1SAD_L = 0x0000;
  107. u16 DM1SAD_H = 0x0000;
  108. u16 DM1DAD_L = 0x0000;
  109. u16 DM1DAD_H = 0x0000;
  110. u16 DM1CNT_L = 0x0000;
  111. u16 DM1CNT_H = 0x0000;
  112. u16 DM2SAD_L = 0x0000;
  113. u16 DM2SAD_H = 0x0000;
  114. u16 DM2DAD_L = 0x0000;
  115. u16 DM2DAD_H = 0x0000;
  116. u16 DM2CNT_L = 0x0000;
  117. u16 DM2CNT_H = 0x0000;
  118. u16 DM3SAD_L = 0x0000;
  119. u16 DM3SAD_H = 0x0000;
  120. u16 DM3DAD_L = 0x0000;
  121. u16 DM3DAD_H = 0x0000;
  122. u16 DM3CNT_L = 0x0000;
  123. u16 DM3CNT_H = 0x0000;
  124. u16 TM0D     = 0x0000;
  125. u16 TM0CNT   = 0x0000;
  126. u16 TM1D     = 0x0000;
  127. u16 TM1CNT   = 0x0000;
  128. u16 TM2D     = 0x0000;
  129. u16 TM2CNT   = 0x0000;
  130. u16 TM3D     = 0x0000;
  131. u16 TM3CNT   = 0x0000;
  132. u16 P1       = 0xFFFF;
  133. u16 IE       = 0x0000;
  134. u16 IF       = 0x0000;
  135. u16 IME      = 0x0000;
  136.