ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/include/main.h
Revision: 1.11
Committed: 2002-01-15T14:58:41Z (22 years, 10 months ago) by cebix
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-12, nigel-build-13, snapshot-15012002
Changes since 1.10: +1 -1 lines
Log Message:
- documentation updates
- 2001 -> 2002
- version 0.9 -> 1.0

File Contents

# User Rev Content
1 cebix 1.1 /*
2     * main.h - General definitions
3     *
4 cebix 1.11 * Basilisk II (C) 1997-2002 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 cebix 1.9 // Mutexes (non-recursive)
55     struct B2_mutex;
56     extern B2_mutex *B2_create_mutex(void);
57     extern void B2_lock_mutex(B2_mutex *mutex);
58     extern void B2_unlock_mutex(B2_mutex *mutex);
59     extern void B2_delete_mutex(B2_mutex *mutex);
60    
61 cebix 1.1 // Interrupt flags
62     enum {
63 cebix 1.4 INTFLAG_60HZ = 1, // 60.15Hz VBL
64     INTFLAG_1HZ = 2, // ~1Hz interrupt
65     INTFLAG_SERIAL = 4, // Serial driver
66     INTFLAG_ETHER = 8, // Ethernet driver
67     INTFLAG_AUDIO = 16, // Audio block read
68 jlachmann 1.5 INTFLAG_TIMER = 32, // Time Manager
69 cebix 1.10 INTFLAG_ADB = 64, // ADB
70     INTFLAG_NMI = 128 // NMI
71 cebix 1.1 };
72    
73     extern uint32 InterruptFlags; // Currently pending interrupts
74     extern void SetInterruptFlag(uint32 flag); // Set/clear interrupt flags
75     extern void ClearInterruptFlag(uint32 flag);
76    
77     #endif