ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/include/main.h
Revision: 1.8
Committed: 2001-06-30T17:21:55Z (23 years, 4 months ago) by cebix
Content type: text/plain
Branch: MAIN
Changes since 1.7: +2 -0 lines
Log Message:
- experimental gamma table support
- restructured video_x.cpp: uses classes for display types

File Contents

# User Rev Content
1 cebix 1.1 /*
2     * main.h - General definitions
3     *
4 cebix 1.7 * Basilisk II (C) 1997-2001 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 cebix 1.8 extern void ErrorAlert(int string_id);
50 cebix 1.1 extern void WarningAlert(const char *text); // Display warning alert
51 cebix 1.8 extern void WarningAlert(int string_id);
52 cebix 1.1 extern bool ChoiceAlert(const char *text, const char *pos, const char *neg); // Display choice alert
53    
54     // Interrupt flags
55     enum {
56 cebix 1.4 INTFLAG_60HZ = 1, // 60.15Hz VBL
57     INTFLAG_1HZ = 2, // ~1Hz interrupt
58     INTFLAG_SERIAL = 4, // Serial driver
59     INTFLAG_ETHER = 8, // Ethernet driver
60     INTFLAG_AUDIO = 16, // Audio block read
61 jlachmann 1.5 INTFLAG_TIMER = 32, // Time Manager
62     INTFLAG_NMI = 64 // NMI
63 cebix 1.1 };
64    
65     extern uint32 InterruptFlags; // Currently pending interrupts
66     extern void SetInterruptFlag(uint32 flag); // Set/clear interrupt flags
67     extern void ClearInterruptFlag(uint32 flag);
68    
69     #endif