Cxbx-Reloaded/Include/Win32/CxbxKrnl/Emu.h

102 lines
3.2 KiB
C
Raw Normal View History

2003-01-26 06:18:56 +00:00
// ******************************************************************
// *
// * .,-::::: .,:: .::::::::. .,:: .:
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
// * $$$ Y$$$P $$""""Y$$ Y$$$P
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
// *
2003-03-27 06:23:58 +00:00
// * Cxbx->Win32->CxbxKrnl->Emu.h
2003-01-26 06:18:56 +00:00
// *
// * This file is part of the Cxbx project.
// *
// * Cxbx and Cxbe are free software; you can redistribute them
// * and/or modify them under the terms of the GNU General Public
// * License as published by the Free Software Foundation; either
// * version 2 of the license, or (at your option) any later version.
// *
// * This program is distributed in the hope that it will be useful,
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// * GNU General Public License for more details.
// *
// * You should have recieved a copy of the GNU General Public License
// * along with this program; see the file COPYING.
// * If not, write to the Free Software Foundation, Inc.,
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
// *
// * (c) 2002-2003 Aaron Robinson <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
2003-03-27 06:23:58 +00:00
#ifndef EMU_H
#define EMU_H
2003-02-08 08:17:24 +00:00
2003-04-02 02:23:30 +00:00
#include "Xbe.h"
2003-03-27 06:59:17 +00:00
2003-04-02 02:36:53 +00:00
#undef FIELD_OFFSET // prevent macro redefinition warnings
2003-04-02 02:23:30 +00:00
#include <windows.h>
2003-01-26 06:18:56 +00:00
2003-10-01 01:10:35 +00:00
// pointless function
2003-04-02 02:23:30 +00:00
extern "C" CXBXKRNL_API void NTAPI EmuNoFunc();
2003-01-26 06:18:56 +00:00
2003-10-01 01:10:35 +00:00
// verify szVersion matches the current build version
2003-09-02 20:09:24 +00:00
extern "C" CXBXKRNL_API bool NTAPI EmuVerifyVersion(const char *szVersion);
2003-10-01 01:10:35 +00:00
// cleanup and terminate the current thread
2003-05-20 21:39:25 +00:00
extern "C" CXBXKRNL_API void NTAPI EmuCleanThread();
2003-10-01 01:10:35 +00:00
// initialize emulation
extern "C" CXBXKRNL_API void NTAPI EmuInit(void *pTLSData, Xbe::TLS *pTLS, Xbe::LibraryVersion *LibraryVersion, DebugMode DbgMode, char *szDebugFilename, Xbe::Header *XbeHeader, uint32 XbeHeaderSize, void (*Entry)());
// print out a warning message to the kernel debug log file
2003-07-23 00:12:42 +00:00
#ifdef _DEBUG_WARNINGS
extern "C" CXBXKRNL_API void NTAPI EmuWarning(const char *szWarningMessage, ...);
#else
inline void NTAPI EmuWarning(const char *szWarningMessage, ...) { }
#endif
2003-10-01 01:10:35 +00:00
// cleanup emulation
2003-06-10 08:18:43 +00:00
extern "C" CXBXKRNL_API void NTAPI EmuCleanup(const char *szErrorMessage, ...);
2003-04-16 19:06:20 +00:00
2003-10-01 01:10:35 +00:00
// kernel function not implemented, panic
2003-04-02 02:23:30 +00:00
extern "C" CXBXKRNL_API void NTAPI EmuPanic();
2003-01-26 06:18:56 +00:00
2003-10-01 01:10:35 +00:00
// exception handler
2003-04-08 03:34:05 +00:00
extern int EmuException(LPEXCEPTION_POINTERS e);
2003-10-01 01:10:35 +00:00
// global kernel thunk table
2003-04-02 02:23:30 +00:00
extern "C" CXBXKRNL_API uint32 KernelThunkTable[367];
2003-01-26 06:18:56 +00:00
2003-10-01 01:10:35 +00:00
// global thread local storage structure
2003-05-03 08:29:37 +00:00
extern Xbe::TLS *g_pTLS;
2003-04-06 00:25:30 +00:00
2003-10-01 01:10:35 +00:00
// global thread local storage data
2003-05-21 03:03:05 +00:00
extern void *g_pTLSData;
2003-10-01 01:10:35 +00:00
// global Xbe header cache
2003-05-21 03:03:05 +00:00
extern Xbe::Header *g_pXbeHeader;
2003-05-04 19:55:25 +00:00
2003-10-01 01:10:35 +00:00
// partition emulation directory handles
2003-05-28 22:54:38 +00:00
extern HANDLE g_hCurDir;
2003-06-25 02:01:51 +00:00
extern HANDLE g_hTDrive;
extern HANDLE g_hUDrive;
2003-07-19 02:13:56 +00:00
extern HANDLE g_hZDrive;
2003-05-28 22:54:38 +00:00
2003-10-01 01:10:35 +00:00
// thread notification routine
2003-09-05 04:48:27 +00:00
extern PVOID g_pfnThreadNotification;
2003-10-03 04:39:33 +00:00
// extra stuff for multimonitors (win95+)
typedef struct _MONITORINFO
{
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
}
MONITORINFO, *LPMONITORINFO;
2003-01-26 06:18:56 +00:00
#endif