ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/include/main.h
Revision: 1.15
Committed: 2009-07-23T19:19:13Z (14 years, 9 months ago) by asvitkine
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +1 -1 lines
Log Message:
BasiliskII side of changes to support .sheepvm bundles for SheepShaver

File Contents

# Content
1 /*
2 * main.h - General definitions
3 *
4 * Basilisk II (C) 1997-2008 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 // General functions
42 extern bool InitAll(const char *vmdir);
43 extern void ExitAll(void);
44
45 // Platform-specific functions
46 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 ErrorAlert(int string_id);
50 extern void WarningAlert(const char *text); // Display warning alert
51 extern void WarningAlert(int string_id);
52 extern bool ChoiceAlert(const char *text, const char *pos, const char *neg); // Display choice alert
53
54 // 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 // Interrupt flags
62 enum {
63 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 INTFLAG_TIMER = 32, // Time Manager
69 INTFLAG_ADB = 64, // ADB
70 INTFLAG_NMI = 128 // NMI
71 };
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