--- BasiliskII/src/include/main.h 1999/10/03 14:16:26 1.1.1.1 +++ BasiliskII/src/include/main.h 2004/01/12 15:29:27 1.12 @@ -1,7 +1,7 @@ /* * main.h - General definitions * - * Basilisk II (C) 1997-1999 Christian Bauer + * Basilisk II (C) 1997-2004 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,20 +38,36 @@ struct M68kRegisters { uint16 sr; }; -// Functions +// General functions +extern bool InitAll(void); +extern void ExitAll(void); + +// Platform-specific functions extern void FlushCodeCache(void *start, uint32 size); // Code was patched, flush caches if neccessary extern void QuitEmulator(void); // Quit emulator extern void ErrorAlert(const char *text); // Display error alert +extern void ErrorAlert(int string_id); extern void WarningAlert(const char *text); // Display warning alert +extern void WarningAlert(int string_id); extern bool ChoiceAlert(const char *text, const char *pos, const char *neg); // Display choice alert +// Mutexes (non-recursive) +struct B2_mutex; +extern B2_mutex *B2_create_mutex(void); +extern void B2_lock_mutex(B2_mutex *mutex); +extern void B2_unlock_mutex(B2_mutex *mutex); +extern void B2_delete_mutex(B2_mutex *mutex); + // Interrupt flags enum { - INTFLAG_60HZ = 1, // 60Hz VBL - INTFLAG_SERIAL = 2, // Serial driver - INTFLAG_ETHER = 4, // Ethernet driver - INTFLAG_AUDIO = 8, // Audio block read - INTFLAG_TIMER = 16 // Time Manager + INTFLAG_60HZ = 1, // 60.15Hz VBL + INTFLAG_1HZ = 2, // ~1Hz interrupt + INTFLAG_SERIAL = 4, // Serial driver + INTFLAG_ETHER = 8, // Ethernet driver + INTFLAG_AUDIO = 16, // Audio block read + INTFLAG_TIMER = 32, // Time Manager + INTFLAG_ADB = 64, // ADB + INTFLAG_NMI = 128 // NMI }; extern uint32 InterruptFlags; // Currently pending interrupts