2 #include <hw/cpu/cpu.h>
5 #if !defined(TARGET_WINDOWS) && !defined(TARGET_OS2)
6 /* NTVDM.EXE DOSNTAST.VDD call support */
7 #include <windows/ntvdm/ntvdmlib.h>
21 WINDOWS_OS2, /* Not Windows, OS/2 */
22 /* Exact meaning: If we're a DOS/Windows program, then we know we're running under OS/2
23 and OS/2 is emulating DOS/Windows. If we're an OS/2 program, then we're in our native
28 extern const char *windows_mode_strs[WINDOWS_MAX];
29 #define windows_mode_str(x) windows_mode_strs[x]
31 extern uint8_t windows_mode;
32 extern uint16_t windows_version;
33 extern uint8_t windows_emulation;
34 extern const char *windows_version_method;
35 extern const char *windows_emulation_comment_str;
37 /* TODO: Someday, these will become variables */
39 /* whether the Windows emulation allows Win16 to call DPMI */
40 #define windows_emulation_includes_dpmi 0
43 const char *windows_emulation_str(uint8_t e);
45 #if defined(TARGET_WINDOWS) && TARGET_MSDOS == 32 && !defined(WIN386)
49 extern unsigned char win9x_qt_thunk_probed;
50 extern unsigned char win9x_qt_thunk_available;
52 typedef WORD HGLOBAL16; /* <- NTS: Taken from WINE header definitions */
54 extern void (__stdcall *QT_Thunk)();
55 extern DWORD (__stdcall *LoadLibrary16)(LPSTR lpszLibFileName);
56 extern VOID (__stdcall *FreeLibrary16)(DWORD dwInstance);
57 extern HGLOBAL16 (__stdcall *GlobalAlloc16)(UINT flags,DWORD size);
58 extern HGLOBAL16 (__stdcall *GlobalFree16)(HGLOBAL16 handle);
59 extern DWORD (__stdcall *GlobalLock16)(HGLOBAL16 handle);
60 extern BOOL (__stdcall *GlobalUnlock16)(HGLOBAL16 handle);
61 extern VOID (__stdcall *GlobalUnfix16)(HGLOBAL16 handle);
62 extern DWORD (__stdcall *GetProcAddress16)(DWORD dwInstance, LPSTR lpszProcName);
63 extern VOID (__stdcall *GlobalFix16)(HGLOBAL16 handle);
65 extern DWORD win9x_kernel_win16;
66 extern DWORD win9x_user_win16;
68 int Win9xQT_ThunkInit();
69 void Win9xQT_ThunkFree();
72 #if defined(TARGET_WINDOWS) && TARGET_MSDOS == 16
73 # include <toolhelp.h>
74 extern HMODULE ToolHelpDLL;
75 extern unsigned char ToolHelpProbed;
76 extern BOOL (PASCAL FAR *__TimerCount)(TIMERINFO FAR *t);
77 extern BOOL (PASCAL FAR *__InterruptUnRegister)(HTASK htask);
78 extern BOOL (PASCAL FAR *__InterruptRegister)(HTASK htask,FARPROC callback);