2 * Misc. emulation definitions
4 * Copyright 1995 Alexandre Julliard
7 #ifndef __WINE_MISCEMU_H
8 #define __WINE_MISCEMU_H
14 extern HANDLE16 DOSMEM_BiosSeg
;
15 extern DWORD DOSMEM_CollateTable
;
17 extern DWORD DOSMEM_ErrorCall
;
18 extern DWORD DOSMEM_ErrorBuffer
;
20 extern BOOL32
DOSMEM_Init(HMODULE16 hModule
);
21 extern void DOSMEM_Tick(void);
22 extern WORD
DOSMEM_AllocSelector(WORD
);
23 extern char * DOSMEM_MemoryBase(HMODULE16 hModule
);
24 extern LPVOID
DOSMEM_GetBlock(HMODULE16 hModule
, UINT32 size
, UINT16
* p
);
25 extern BOOL32
DOSMEM_FreeBlock(HMODULE16 hModule
, void* ptr
);
26 extern LPVOID
DOSMEM_ResizeBlock(HMODULE16 hModule
, void* ptr
, UINT32 size
, UINT16
* p
);
27 extern UINT32
DOSMEM_Available(HMODULE16 hModule
);
28 extern LPVOID
DOSMEM_MapRealToLinear(DWORD
); /* real-mode to linear */
29 extern LPVOID
DOSMEM_MapDosToLinear(UINT32
); /* linear DOS to Wine */
30 extern UINT32
DOSMEM_MapLinearToDos(LPVOID
); /* linear Wine to DOS */
32 /* msdos/interrupts.c */
33 extern FARPROC16
INT_GetPMHandler( BYTE intnum
);
34 extern void INT_SetPMHandler( BYTE intnum
, FARPROC16 handler
);
35 extern FARPROC16
INT_GetRMHandler( BYTE intnum
);
36 extern void INT_SetRMHandler( BYTE intnum
, FARPROC16 handler
);
37 extern FARPROC16
INT_CtxGetHandler( CONTEXT
*context
, BYTE intnum
);
38 extern void INT_CtxSetHandler( CONTEXT
*context
, BYTE intnum
, FARPROC16 handler
);
39 extern int INT_RealModeInterrupt( BYTE intnum
, PCONTEXT context
);
42 extern void IO_port_init (void);
43 extern DWORD
IO_inport( int port
, int count
);
44 extern void IO_outport( int port
, int count
, DWORD value
);
47 extern void WINAPI
INT_Int10Handler(CONTEXT
*);
50 extern void WINAPI
INT_Int11Handler(CONTEXT
*);
53 extern void WINAPI
INT_Int13Handler(CONTEXT
*);
56 extern void WINAPI
INT_Int16Handler(CONTEXT
*);
59 extern void WINAPI
INT_Int17Handler(CONTEXT
*);
62 extern void WINAPI
INT_Int19Handler(CONTEXT
*);
65 extern DWORD
INT1A_GetTicksSinceMidnight(void);
66 extern void WINAPI
INT_Int1aHandler(CONTEXT
*);
69 extern void WINAPI
INT_Int20Handler(CONTEXT
*);
72 extern void WINAPI
INT_Int25Handler(CONTEXT
*);
75 extern void WINAPI
INT_Int29Handler(CONTEXT
*);
78 extern void WINAPI
INT_Int25Handler(CONTEXT
*);
81 extern void WINAPI
INT_Int2fHandler(CONTEXT
*);
84 extern void WINAPI
INT_Int31Handler(CONTEXT
*);
87 extern void WINAPI
XMS_Handler(CONTEXT
*);
90 extern BOOL32
SIGNAL_Init(void);
91 extern void SIGNAL_SetHandler( int sig
, void (*func
)(), int flags
);
92 extern void SIGNAL_MaskAsyncEvents( BOOL32 flag
);
95 extern BOOL32
SIGNAL_InitEmulator(void);
98 extern void ASPI_DOS_HandleInt(CONTEXT
*context
);
100 #define CTX_SEG_OFF_TO_LIN(context,seg,off) \
101 (ISV86(context) ? (void*)(V86BASE(context)+((seg)<<4)+off) \
102 : PTR_SEG_OFF_TO_LIN(seg,off))
104 #define INT_BARF(context,num) \
105 fprintf( stderr, "int%x: unknown/not implemented parameters:\n" \
106 "int%x: AX %04x, BX %04x, CX %04x, DX %04x, " \
107 "SI %04x, DI %04x, DS %04x, ES %04x\n", \
108 (num), (num), AX_reg(context), BX_reg(context), CX_reg(context), \
109 DX_reg(context), SI_reg(context), DI_reg(context), \
110 (WORD)DS_reg(context), (WORD)ES_reg(context) )
112 #endif /* __WINE_MISCEMU_H */