[DDK:NT_VDD]

Declare some VDM memory services.

[NTVDM]
- Almost all of the XXXInitialize functions just return TRUE always, so VOIDify them instead (since they always succeed).
- Move almost all of the hardware initialization inside EmulatorInitialize.
- Move pure console initialization/mode-saving/cleanup code into ConsoleInit/Cleanup functions in ntvdm.c instead of in bios.c.

svn path=/branches/ntvdm/; revision=61588
This commit is contained in:
Hermès Bélusca-Maïto
2014-01-11 20:59:27 +00:00
parent 25105f6bec
commit 40f773b96b
13 changed files with 239 additions and 172 deletions
+64
View File
@@ -36,6 +36,7 @@ VOID
WINAPI
VDDTerminateVDM(VOID);
/*
* I/O Port services
*/
@@ -86,6 +87,69 @@ VDDDeInstallIOHook
PVDD_IO_PORTRANGE pPortRange
);
/*
* Memory services
*/
typedef enum
{
VDM_V86,
VDM_PM
} VDM_MODE;
#ifndef MSW_PE
#define MSW_PE 0x0001
#endif
#define getMODE() ((getMSW() & MSW_PE) ? VDM_PM : VDM_V86)
PBYTE
WINAPI
Sim32pGetVDMPointer
(
IN ULONG Address,
IN BOOLEAN ProtectedMode
);
PBYTE
WINAPI
MGetVdmPointer
(
IN ULONG Address,
IN ULONG Size,
IN BOOLEAN ProtectedMode
);
PVOID
WINAPI
VdmMapFlat
(
IN USHORT Segment,
IN ULONG Offset,
IN VDM_MODE Mode
);
BOOL
WINAPI
VdmFlushCache
(
IN USHORT Segment,
IN ULONG Offset,
IN ULONG Size,
IN VDM_MODE Mode
);
BOOL
WINAPI
VdmUnmapFlat
(
IN USHORT Segment,
IN ULONG Offset,
IN PVOID Buffer,
IN VDM_MODE Mode
);
#ifdef __cplusplus
}
#endif