Mercurial > vba-clojure
view src/gba/GBAGlobals.h @ 379:f86bd04bd9fc
simplifying frame-metronome
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 11 Apr 2012 12:35:31 -0500 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 #ifndef VBA_GBA_GLOBALS_H2 #define VBA_GBA_GLOBALS_H4 #if _MSC_VER > 10005 #pragma once6 #endif // _MSC_VER > 10008 #include "../Port.h"10 #define VERBOSE_SWI 111 #define VERBOSE_UNALIGNED_MEMORY 212 #define VERBOSE_ILLEGAL_WRITE 413 #define VERBOSE_ILLEGAL_READ 814 #define VERBOSE_DMA0 1615 #define VERBOSE_DMA1 3216 #define VERBOSE_DMA2 6417 #define VERBOSE_DMA3 12818 #define VERBOSE_UNDEFINED 25619 #define VERBOSE_AGBPRINT 51221 // moved from armdis.cpp22 #define debuggerReadMemory(addr) \23 READ32LE(&map[(addr) >> 24].address[(addr) & map[(addr) >> 24].mask])25 #define debuggerReadHalfWord(addr) \26 READ16LE(&map[(addr) >> 24].address[(addr) & map[(addr) >> 24].mask])28 #define debuggerReadByte(addr) \29 READ8LE(&map[(addr) >> 24].address[(addr) & map[(addr) >> 24].mask])31 #define debuggerWriteMemory(addr, value) \32 WRITE32LE((&map[(addr)>>24].address[(addr) & map[(addr)>>24].mask]), (value))34 #define debuggerWriteHalfWord(addr, value) \35 WRITE16LE((&map[(addr)>>24].address[(addr) & map[(addr)>>24].mask]), (value))37 #define debuggerWriteByte(addr, value) \38 WRITE8LE((&map[(addr)>>24].address[(addr) & map[(addr)>>24].mask]), (value))40 // moved from GBA.h41 typedef struct42 {43 u8 *address;44 u32 mask;45 } memoryMap;47 #ifndef NO_GBA_MAP48 extern memoryMap map[256];49 #endif51 // moved from GBA.h52 typedef union53 {54 struct55 {56 #ifdef WORDS_BIGENDIAN57 u8 B3;58 u8 B2;59 u8 B1;60 u8 B0;61 #else62 u8 B0;63 u8 B1;64 u8 B2;65 u8 B3;66 #endif67 } B;68 struct69 {70 #ifdef WORDS_BIGENDIAN71 u16 W1;72 u16 W0;73 #else74 u16 W0;75 u16 W1;76 #endif77 } W;78 #ifdef WORDS_BIGENDIAN79 volatile u32 I;80 #else81 u32 I;82 #endif83 } reg_pair;85 extern reg_pair reg[45];86 extern u8 biosProtected[4];87 extern bool8 ioReadable[0x400];88 extern bool8 N_FLAG;89 extern bool8 C_FLAG;90 extern bool8 Z_FLAG;91 extern bool8 V_FLAG;92 extern bool8 armState;93 extern bool8 armIrqEnable;94 extern u32 armNextPC;95 extern int32 armMode;96 extern u32 stop;97 extern int32 saveType;98 extern bool8 useBios;99 extern bool8 skipBios;100 extern int32 frameSkip;101 extern u32 extButtons;102 extern bool8 capturePrevious;103 extern int32 captureNumber;104 extern bool8 speedup;105 extern bool8 synchronize;106 extern bool8 cpuDisableSfx;107 extern bool8 cpuIsMultiBoot;108 extern bool8 parseDebug;109 extern int32 layerSettings;110 extern int32 layerEnable;111 extern bool8 speedHack;112 extern bool8 memLagEnabled, memLagTempEnabled;113 extern bool8 useOldFrameTiming;114 extern int32 cpuSaveType;115 extern bool8 cpuEnhancedDetection;116 extern bool8 cheatsEnabled;118 extern int emulating;120 extern u8 *bios;121 extern u8 *rom;122 extern u8 *internalRAM;123 extern u8 *workRAM;124 extern u8 *paletteRAM;125 extern u8 *vram;126 extern u8 *pix;127 extern u8 *oam;128 extern u8 *ioMem;130 extern u16 DISPCNT;131 extern u16 DISPSTAT;132 extern u16 VCOUNT;133 extern u16 BG0CNT;134 extern u16 BG1CNT;135 extern u16 BG2CNT;136 extern u16 BG3CNT;137 extern u16 BG0HOFS;138 extern u16 BG0VOFS;139 extern u16 BG1HOFS;140 extern u16 BG1VOFS;141 extern u16 BG2HOFS;142 extern u16 BG2VOFS;143 extern u16 BG3HOFS;144 extern u16 BG3VOFS;145 extern u16 BG2PA;146 extern u16 BG2PB;147 extern u16 BG2PC;148 extern u16 BG2PD;149 extern u16 BG2X_L;150 extern u16 BG2X_H;151 extern u16 BG2Y_L;152 extern u16 BG2Y_H;153 extern u16 BG3PA;154 extern u16 BG3PB;155 extern u16 BG3PC;156 extern u16 BG3PD;157 extern u16 BG3X_L;158 extern u16 BG3X_H;159 extern u16 BG3Y_L;160 extern u16 BG3Y_H;161 extern u16 WIN0H;162 extern u16 WIN1H;163 extern u16 WIN0V;164 extern u16 WIN1V;165 extern u16 WININ;166 extern u16 WINOUT;167 extern u16 MOSAIC;168 extern u16 BLDMOD;169 extern u16 COLEV;170 extern u16 COLY;171 extern u16 DM0SAD_L;172 extern u16 DM0SAD_H;173 extern u16 DM0DAD_L;174 extern u16 DM0DAD_H;175 extern u16 DM0CNT_L;176 extern u16 DM0CNT_H;177 extern u16 DM1SAD_L;178 extern u16 DM1SAD_H;179 extern u16 DM1DAD_L;180 extern u16 DM1DAD_H;181 extern u16 DM1CNT_L;182 extern u16 DM1CNT_H;183 extern u16 DM2SAD_L;184 extern u16 DM2SAD_H;185 extern u16 DM2DAD_L;186 extern u16 DM2DAD_H;187 extern u16 DM2CNT_L;188 extern u16 DM2CNT_H;189 extern u16 DM3SAD_L;190 extern u16 DM3SAD_H;191 extern u16 DM3DAD_L;192 extern u16 DM3DAD_H;193 extern u16 DM3CNT_L;194 extern u16 DM3CNT_H;195 extern u16 TM0D;196 extern u16 TM0CNT;197 extern u16 TM1D;198 extern u16 TM1CNT;199 extern u16 TM2D;200 extern u16 TM2CNT;201 extern u16 TM3D;202 extern u16 TM3CNT;203 extern u16 P1;204 extern u16 IE;205 extern u16 IF;206 extern u16 IME;208 #endif // VBA_GBA_GLOBALS_H