ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/include/main.h
Revision: 1.6
Committed: 2000-08-22T12:44:29Z (24 years, 3 months ago) by cebix
Content type: text/plain
Branch: MAIN
Changes since 1.5: +0 -1 lines
Log Message:
- fixed compilation problem under Linux
- TriggerNMI() declaration moved to cpu_emulation.h

File Contents

# User Rev Content
1 cebix 1.1 /*
2     * main.h - General definitions
3     *
4 cebix 1.3 * Basilisk II (C) 1997-2000 Christian Bauer
5 cebix 1.1 *
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 cebix 1.2 // General functions
42     extern bool InitAll(void);
43     extern void ExitAll(void);
44    
45     // Platform-specific functions
46 cebix 1.1 extern void FlushCodeCache(void *start, uint32 size); // Code was patched, flush caches if neccessary
47     extern void QuitEmulator(void); // Quit emulator
48     extern void ErrorAlert(const char *text); // Display error alert
49     extern void WarningAlert(const char *text); // Display warning alert
50     extern bool ChoiceAlert(const char *text, const char *pos, const char *neg); // Display choice alert
51    
52     // Interrupt flags
53     enum {
54 cebix 1.4 INTFLAG_60HZ = 1, // 60.15Hz VBL
55     INTFLAG_1HZ = 2, // ~1Hz interrupt
56     INTFLAG_SERIAL = 4, // Serial driver
57     INTFLAG_ETHER = 8, // Ethernet driver
58     INTFLAG_AUDIO = 16, // Audio block read
59 jlachmann 1.5 INTFLAG_TIMER = 32, // Time Manager
60     INTFLAG_NMI = 64 // NMI
61 cebix 1.1 };
62    
63     extern uint32 InterruptFlags; // Currently pending interrupts
64     extern void SetInterruptFlag(uint32 flag); // Set/clear interrupt flags
65     extern void ClearInterruptFlag(uint32 flag);
66    
67     #endif