-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathemm.h
39 lines (30 loc) · 785 Bytes
/
emm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _EMM_H_
#define _EMM_H_ 1
#include "USBDDOS/platform.h"
#include "USBDDOS/DPMI/dpmi.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef uint32_t (*EMM_IOTRAP_HANDLER)(uint32_t port, uint32_t val, uint32_t out);
//user interface, not actual struct
typedef struct EMM_IODispatchTable
{
uintptr_t port; //don't care about pointer size
EMM_IOTRAP_HANDLER handler;
}EMM_IODT;
typedef struct EMM_IOPorTrap
{
uint32_t memory;
uint32_t handle;
uint16_t func;
}EMM_IOPT;
//get EMM version
uint16_t EMM_GetVersion(void);
//I/O virtualize
BOOL EMM_Install_IOPortTrap(uint16_t start, uint16_t end, EMM_IODT* inputp iodt, uint16_t count, EMM_IOPT* outputp iopt);
BOOL EMM_Uninstall_IOPortTrap(EMM_IOPT* inputp iopt);
#ifdef __cplusplus
}
#endif
#endif