1 |
/* |
2 |
* main.h - General definitions |
3 |
* |
4 |
* Basilisk II (C) 1997-1999 Christian Bauer |
5 |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
8 |
* the Free Software Foundation; either version 2 of the License, or |
9 |
* (at your option) any later version. |
10 |
* |
11 |
* This program is distributed in the hope that it will be useful, |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
* GNU General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
*/ |
20 |
|
21 |
#ifndef MAIN_H |
22 |
#define MAIN_H |
23 |
|
24 |
// CPU type (0 = 68000, 1 = 68010, 2 = 68020, 3 = 68030, 4 = 68040/060) |
25 |
extern int CPUType; |
26 |
extern bool CPUIs68060; // Flag to distinguish 68040 and 68060 |
27 |
|
28 |
// FPU type (0 = no FPU, 1 = 68881, 2 = 68882) |
29 |
extern int FPUType; |
30 |
|
31 |
// Flag: 24-bit-addressing? |
32 |
extern bool TwentyFourBitAddressing; |
33 |
|
34 |
// 68k register structure (for Execute68k()) |
35 |
struct M68kRegisters { |
36 |
uint32 d[8]; |
37 |
uint32 a[8]; |
38 |
uint16 sr; |
39 |
}; |
40 |
|
41 |
// Functions |
42 |
extern void FlushCodeCache(void *start, uint32 size); // Code was patched, flush caches if neccessary |
43 |
extern void QuitEmulator(void); // Quit emulator |
44 |
extern void ErrorAlert(const char *text); // Display error alert |
45 |
extern void WarningAlert(const char *text); // Display warning alert |
46 |
extern bool ChoiceAlert(const char *text, const char *pos, const char *neg); // Display choice alert |
47 |
|
48 |
// Interrupt flags |
49 |
enum { |
50 |
INTFLAG_60HZ = 1, // 60Hz VBL |
51 |
INTFLAG_SERIAL = 2, // Serial driver |
52 |
INTFLAG_ETHER = 4, // Ethernet driver |
53 |
INTFLAG_AUDIO = 8, // Audio block read |
54 |
INTFLAG_TIMER = 16 // Time Manager |
55 |
}; |
56 |
|
57 |
extern uint32 InterruptFlags; // Currently pending interrupts |
58 |
extern void SetInterruptFlag(uint32 flag); // Set/clear interrupt flags |
59 |
extern void ClearInterruptFlag(uint32 flag); |
60 |
|
61 |
#endif |