Mercurial > vba-linux
comparison src/gb/gbGlobals.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:8ced16adf2e1 | 1:f9f4f1b99eed |
---|---|
1 #ifndef VBA_GB_GLOBALS_H | |
2 #define VBA_GB_GLOBALS_H | |
3 | |
4 #if _MSC_VER > 1000 | |
5 #pragma once | |
6 #endif // _MSC_VER > 1000 | |
7 | |
8 #include "../Port.h" | |
9 | |
10 extern int32 gbRomSizeMask; | |
11 extern int32 gbRomSize; | |
12 extern int32 gbRamSize; | |
13 extern int32 gbRamSizeMask; | |
14 | |
15 extern u8 * gbRom; | |
16 extern u8 * gbRam; | |
17 extern u8 * gbVram; | |
18 extern u8 * gbWram; | |
19 extern u8 * gbMemory; | |
20 extern u16 *gbLineBuffer; | |
21 | |
22 extern u8 *gbMemoryMap[16]; | |
23 | |
24 inline u8 gbReadMemoryQuick(u16 address) | |
25 { | |
26 extern int32 gbEchoRAMFixOn; | |
27 if (gbEchoRAMFixOn) | |
28 { | |
29 if (address >= 0xe000 && address < 0xfe00) | |
30 { | |
31 address -= 0x2000; | |
32 } | |
33 } | |
34 return gbMemoryMap[address>>12][address&0xfff]; | |
35 } | |
36 | |
37 inline void gbWriteMemoryQuick(u16 address, u8 value) | |
38 { | |
39 extern int32 gbEchoRAMFixOn; | |
40 if (gbEchoRAMFixOn) | |
41 { | |
42 if (address >= 0xe000 && address < 0xfe00) | |
43 { | |
44 address -= 0x2000; | |
45 } | |
46 } | |
47 gbMemoryMap[address>>12][address&0xfff] = value; | |
48 } | |
49 | |
50 inline u8 gbReadROMQuick(u32 address) | |
51 { | |
52 return gbRom[address]; | |
53 } | |
54 | |
55 extern int32 gbFrameSkip; | |
56 extern u16 gbColorFilter[32768]; | |
57 extern int32 gbColorOption; | |
58 extern int32 gbPaletteOption; | |
59 extern int32 gbEmulatorType; | |
60 extern int32 gbBorderOn; | |
61 extern int32 gbBorderAutomatic; | |
62 extern int32 gbCgbMode; | |
63 extern int32 gbSgbMode; | |
64 extern int32 gbWindowLine; | |
65 extern int32 gbSpeed; | |
66 extern u8 gbBgp[4]; | |
67 extern u8 gbObp0[4]; | |
68 extern u8 gbObp1[4]; | |
69 extern u16 gbPalette[128]; | |
70 | |
71 extern u8 register_LCDC; | |
72 extern u8 register_LY; | |
73 extern u8 register_SCY; | |
74 extern u8 register_SCX; | |
75 extern u8 register_WY; | |
76 extern u8 register_WX; | |
77 extern u8 register_VBK; | |
78 | |
79 extern int emulating; | |
80 | |
81 extern int32 gbBorderLineSkip; | |
82 extern int32 gbBorderRowSkip; | |
83 extern int32 gbBorderColumnSkip; | |
84 extern int32 gbDmaTicks; | |
85 | |
86 extern bool8 useOldFrameTiming; | |
87 extern bool8 gbNullInputHackEnabled; | |
88 extern bool8 gbNullInputHackTempEnabled; | |
89 | |
90 extern void gbRenderLine(); | |
91 extern void gbDrawSprites(); | |
92 | |
93 extern u8 (*gbSerialFunction)(u8); | |
94 | |
95 #endif // VBA_GB_GLOBALS_H |