[NTVDM] Improve the PCH situation.

svn path=/trunk/; revision=69435
This commit is contained in:
Amine Khaldi 2015-10-03 21:47:46 +00:00
parent 4aa8ae13c2
commit f24e24d07c
94 changed files with 100 additions and 699 deletions

View file

@ -6,25 +6,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/callback.h"
#include "cpu/bop.h"
#include "bios.h"
#include "bios32/bios32.h"
#include "rom.h"
#include "umamgr.h"
#include "io.h"
#include "hardware/cmos.h"
#include <stdlib.h>
/* DEFINES ********************************************************************/

View file

@ -9,11 +9,6 @@
#ifndef _BIOS_H_
#define _BIOS_H_
/* INCLUDES *******************************************************************/
#include "kbdbios.h"
#include "vidbios.h"
/* DEFINES ********************************************************************/
/* BOP Identifiers */
@ -165,6 +160,4 @@ BiosInitialize(IN LPCSTR BiosFileName,
VOID
BiosCleanup(VOID);
#endif // _BIOS_H_
/* EOF */
#endif /* _BIOS_H_ */

View file

@ -7,39 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
/* BIOS Version number and Copyright */
#include <reactos/buildno.h>
#include <reactos/version.h>
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/cpu.h" // for EMULATOR_FLAG_CF
#include "cpu/bop.h"
#include "int32.h"
#include <isvbop.h>
#include <bios/bios.h>
#include <bios/rom.h>
#include "bios32.h"
#include "bios32p.h"
#include "dskbios32.h"
#include "kbdbios32.h"
#include "vidbios32.h"
#include "moubios32.h"
#include "memory.h"
#include "io.h"
#include "hardware/cmos.h"
#include "hardware/pic.h"
#include "hardware/pit.h"
#include "hardware/ps2.h"
/* PRIVATE VARIABLES **********************************************************/
CALLBACK16 BiosContext;
@ -165,7 +137,7 @@ static const BYTE PostCode[] =
/* PRIVATE FUNCTIONS **********************************************************/
static VOID BiosCharPrint(CHAR Character)
static VOID Bios32CharPrint(CHAR Character)
{
/* Save AX and BX */
USHORT AX = getAX();
@ -534,7 +506,7 @@ static VOID WINAPI BiosMiscService(LPWORD Stack)
static VOID WINAPI BiosRomBasic(LPWORD Stack)
{
PrintMessageAnsi(BiosCharPrint, "FATAL: INT18: BOOT FAILURE.");
PrintMessageAnsi(Bios32CharPrint, "FATAL: INT18: BOOT FAILURE.");
/* ROM Basic is unsupported, display a message to the user */
DisplayMessage(L"NTVDM doesn't support ROM Basic. The VDM is closing.");

View file

@ -9,10 +9,6 @@
#ifndef _BIOS32_H_
#define _BIOS32_H_
/* INCLUDES *******************************************************************/
// #include <bios/bios.h>
/* DEFINES ********************************************************************/
enum
@ -41,6 +37,4 @@ typedef struct
BOOLEAN Bios32Initialize(VOID);
VOID Bios32Cleanup(VOID);
#endif // _BIOS32_H_
/* EOF */
#endif /* _BIOS32_H_ */

View file

@ -9,12 +9,6 @@
#ifndef _BIOS32P_H_
#define _BIOS32P_H_
/* INCLUDES *******************************************************************/
#include <bios/bios.h>
/**/ #include "int32.h" /**/
/* DEFINES ********************************************************************/
#define BIOS_PIC_MASTER_INT 0x08
@ -42,6 +36,4 @@ do { \
VOID EnableHwIRQ(UCHAR hwirq, EMULATOR_INT32_PROC func);
VOID PicIRQComplete(BYTE IntNum);
#endif // _BIOS32P_H_
/* EOF */
#endif /* _BIOS32P_H_ */

View file

@ -6,26 +6,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
// #include "../../memory.h"
// #include "cpu/bop.h"
#include "cpu/cpu.h" // for EMULATOR_FLAG_ZF
#include "int32.h"
#include "dskbios32.h"
// #include <bios/dskbios.h>
#include "bios32p.h"
#include "hardware/disk.h"
/* DEFINES ********************************************************************/
// Disks which are currently supported by the BIOS Disk module.

View file

@ -21,5 +21,3 @@ BOOLEAN DiskBios32Initialize(VOID);
VOID DiskBios32Cleanup(VOID);
#endif /* _DSKBIOS32_H_ */
/* EOF */

View file

@ -6,22 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "kbdbios32.h"
#include <bios/kbdbios.h>
#include "bios32p.h"
#include "int32.h"
#include "cpu/cpu.h" // for EMULATOR_FLAG_ZF
#include "io.h"
#include "hardware/ps2.h"
/* PRIVATE VARIABLES **********************************************************/
static BYTE BiosKeyboardMap[256];

View file

@ -39,5 +39,3 @@
VOID KbdBios32Post(VOID);
#endif /* _KBDBIOS32_H_ */
/* EOF */

View file

@ -9,23 +9,11 @@
* NOTE: Based from VirtualBox OSE ROM BIOS, and SeaBIOS.
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/cpu.h" // for EMULATOR_FLAG_CF
#include "moubios32.h"
#include "bios32p.h"
#include "io.h"
#include "hardware/mouse.h"
#include "hardware/ps2.h"
/* PRIVATE VARIABLES **********************************************************/
#define MOUSE_IRQ_INT 0x74

View file

@ -20,5 +20,3 @@ BOOLEAN MouseBiosInitialize(VOID);
VOID MouseBios32Cleanup(VOID);
#endif /* _MOUBIOS32_H_ */
/* EOF */

View file

@ -6,20 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/cpu.h"
#include "vbe.h"
#include "io.h"
/* PRIVATE VARIABLES **********************************************************/
static const VBE_MODE Modes[VBE_MODE_COUNT] = {

View file

@ -9,8 +9,6 @@
#ifndef _VBE_H_
#define _VBE_H_
#include "hardware/video/svga.h"
/* DEFINITIONS ****************************************************************/
#define OEM_NAME "Cirrus Logic GD-5434 VGA"
@ -105,4 +103,4 @@ typedef struct _VBE_MODE
VOID WINAPI VbeService(LPWORD Stack);
BOOLEAN VbeInitialize(VOID);
#endif // _VBE_H_
#endif /* _VBE_H_ */

View file

@ -8,21 +8,11 @@
* NOTE: All of the real code is in bios/vidbios.c
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/bop.h"
#include "int32.h"
#include "vidbios32.h"
#include <bios/vidbios.h>
#include "bios32p.h"
/* DEFINES ********************************************************************/
/* BOP Identifiers */

View file

@ -21,5 +21,3 @@ BOOLEAN VidBios32Initialize(VOID);
VOID VidBios32Cleanup(VOID);
#endif /* _VIDBIOS32_H_ */
/* EOF */

View file

@ -6,20 +6,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/bop.h"
#include "int32.h"
#include "bios.h"
// #include "kbdbios.h"
/* DEFINES ********************************************************************/
/* BOP Identifiers */

View file

@ -20,6 +20,4 @@
BOOLEAN KbdBiosInitialize(VOID);
VOID KbdBiosCleanup(VOID);
#endif // _KBDBIOS_H_
/* EOF */
#endif /* _KBDBIOS_H_ */

View file

@ -6,20 +6,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "memory.h"
#include "cpu/callback.h"
#include "rom.h"
#include "utils.h"
/* PRIVATE FUNCTIONS **********************************************************/
static BOOLEAN FASTCALL ShadowRomWrite(ULONG Address, PVOID Buffer, ULONG Size)

View file

@ -43,6 +43,4 @@ LoadRom(IN PCSTR RomFileName,
VOID
SearchAndInitRoms(IN PCALLBACK16 Context);
#endif // _ROM_H_
/* EOF */
#endif /* _ROM_H_ */

View file

@ -9,18 +9,11 @@
* indirectly by the DOS EMS Driver, and by VDD memory management functions.
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "memory.h"
#include "umamgr.h"
/* PRIVATE VARIABLES **********************************************************/
typedef struct _UMA_DESCRIPTOR

View file

@ -29,6 +29,4 @@ BOOLEAN UmaDescReallocate(IN USHORT UmbSegment, IN OUT PUSHORT Size);
BOOLEAN UmaMgrInitialize(VOID);
VOID UmaMgrCleanup(VOID);
#endif // _UMAMGR_H_
/* EOF */
#endif /* _UMAMGR_H_ */

View file

@ -7,32 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
/* BIOS Version number and Copyright */
#include <reactos/buildno.h>
#include <reactos/version.h>
#include "emulator.h"
#include "cpu/cpu.h"
#include "cpu/bop.h"
#include "memory.h"
#include "bios.h"
#include "bios32/bios32p.h"
#include "rom.h"
#include "bios32/vbe.h"
// #include "vidbios.h"
#include "bios32/vidbios32.h"
#include "io.h"
#include "hardware/video/svga.h"
/* MACROS *********************************************************************/
//

View file

@ -113,6 +113,4 @@ VOID VidBiosPost(VOID);
BOOLEAN VidBiosInitialize(VOID);
VOID VidBiosCleanup(VOID);
#endif // _VIDBIOS_H_
/* EOF */
#endif /* _VIDBIOS_H_ */

View file

@ -7,23 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "clock.h"
#include "cpu/cpu.h"
#include "hardware/cmos.h"
#include "hardware/ps2.h"
#include "hardware/pit.h"
#include "hardware/video/svga.h"
#include "hardware/mouse.h"
/* DEFINES ********************************************************************/
/*

View file

@ -50,6 +50,4 @@ ULONGLONG GetCycleSpeed(VOID);
VOID ClockUpdate(VOID);
BOOLEAN ClockInitialize(VOID);
#endif // _CLOCK_H_
/* EOF */
#endif /* _CLOCK_H_ */

View file

@ -7,16 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "bop.h"
/* PRIVATE VARIABLES **********************************************************/
/*

View file

@ -23,6 +23,4 @@ typedef VOID (WINAPI *EMULATOR_BOP_PROC)(LPWORD Stack);
VOID RegisterBop(BYTE BopCode, EMULATOR_BOP_PROC BopHandler);
VOID FASTCALL EmulatorBiosOperation(PFAST486_STATE State, UCHAR BopCode);
#endif // _BOP_H_
/* EOF */
#endif /* _BOP_H_ */

View file

@ -15,20 +15,11 @@
| with the CPU registers is 100% prone to bugs!!
\******************************************************************************/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "callback.h"
#include "cpu.h"
#include "bop.h"
#include <isvbop.h>
/* PRIVATE VARIABLES **********************************************************/
static BYTE Yield[] =

View file

@ -58,6 +58,4 @@ RegisterCallback16(IN ULONG FarPtr,
IN SIZE_T CallbackSize,
OUT PSIZE_T CodeSize OPTIONAL);
#endif // _CALLBACK_H_
/* EOF */
#endif /* _CALLBACK_H_ */

View file

@ -6,34 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu.h"
#include "memory.h"
#include "callback.h"
#include "bop.h"
#include <isvbop.h>
#include "clock.h"
#include "bios/rom.h"
#include "hardware/cmos.h"
#include "hardware/keyboard.h"
#include "hardware/mouse.h"
#include "hardware/pic.h"
#include "hardware/ps2.h"
#include "hardware/sound/speaker.h"
#include "hardware/pit.h"
#include "hardware/video/svga.h"
#include "io.h"
/* PRIVATE VARIABLES **********************************************************/
FAST486_STATE EmulatorContext;

View file

@ -9,10 +9,6 @@
#ifndef _CPU_H_
#define _CPU_H_
/* INCLUDES *******************************************************************/
#include <fast486.h>
/* DEFINES ********************************************************************/
/* FLAGS */
@ -74,6 +70,4 @@ VOID EmulatorTerminate(VOID);
BOOLEAN CpuInitialize(VOID);
VOID CpuCleanup(VOID);
#endif // _CPU_H_
/* EOF */
#endif /* _CPU_H_ */

View file

@ -6,15 +6,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu.h"
#include "x86context.h"
/* PRIVATE VARIABLES **********************************************************/

View file

@ -116,6 +116,4 @@ VOID WINAPI setMSW(USHORT);
#endif
#endif // _REGISTERS_H_
/* EOF */
#endif /* _REGISTERS_H_ */

View file

@ -134,6 +134,4 @@ typedef struct _X86CONTEXT
} X86CONTEXT;
#include "poppack.h"
#endif // __X86CONTEXT_H__
/* EOF */
#endif /* __X86CONTEXT_H__ */

View file

@ -10,30 +10,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include <isvbop.h>
#include "utils.h"
#include "dem.h"
#include "dos/dos32krnl/device.h"
#include "dos/dos32krnl/memory.h"
#include "dos/dos32krnl/process.h"
#include "cpu/bop.h"
#include "cpu/cpu.h"
#include "bios/bios.h"
#include "mouse32.h"
#include "vddsup.h"
/*
* EXPERIMENTAL!
* Activate this line if you want to have COMMAND.COM completely external.

View file

@ -13,10 +13,6 @@
#ifndef _DEM_H_
#define _DEM_H_
/* INCLUDES *******************************************************************/
#include "dos32krnl/dos.h"
/* DEFINES ********************************************************************/
/* BOP Identifiers */
@ -101,6 +97,4 @@ demSetCurrentDirectoryGetDrive
OUT PUCHAR DriveNumber
);
#endif // _DEM_H_
/* EOF */
#endif /* _DEM_H_ */

View file

@ -6,23 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "int32.h"
#include "../dem.h"
#include "dos.h"
#include "dosfiles.h"
#include "handle.h"
#include "memory.h"
#include "bios/bios.h"
// This is needed because on UNICODE this symbol is redirected to
// GetEnvironmentStringsW whereas on ANSI it corresponds to the real
// "ANSI" function (and GetEnvironmentStringsA is aliased to it).

View file

@ -7,20 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "dos.h"
#include "dos/dem.h"
#include "bios/bios.h"
/* PRIVATE VARIABLES **********************************************************/
PDOS_DEVICE_NODE Con = NULL;

View file

@ -9,18 +9,11 @@
* For other languages, please use COUNTRY.SYS
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "country.h"
#include "memory.h"
/* PRIVATE VARIABLES **********************************************************/
/* CaseMap routine: should call INT 65h, AL=20h */

View file

@ -96,4 +96,4 @@ VOID DosToUpperStrZ(PSTR DestStr, PSTR SrcStr);
BOOLEAN DosCountryInitialize(VOID);
#endif
#endif /* _COUNTRY_H_ */

View file

@ -6,21 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/bop.h"
#include "device.h"
#include "dos.h"
#include "dos/dem.h"
#include "memory.h"
/* PRIVATE VARIABLES **********************************************************/
static const BYTE StrategyRoutine[] = {

View file

@ -208,6 +208,4 @@ VOID DeviceStrategyBop(VOID);
VOID DeviceInterruptBop(VOID);
DWORD DosLoadDriver(LPCSTR DriverFile);
#endif // _DEVICE_H_
/* EOF */
#endif /* _DEVICE_H_ */

View file

@ -7,34 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/cpu.h"
#include "int32.h"
#include "dos.h"
#include "dos/dem.h"
#include "country.h"
#include "device.h"
#include "handle.h"
#include "dosfiles.h"
#include "memory.h"
#include "process.h"
#include "himem.h"
#include "bios/bios.h"
#include "io.h"
#include "hardware/ps2.h"
#include "emsdrv.h"
/* PRIVATE VARIABLES **********************************************************/
CALLBACK16 DosContext;

View file

@ -9,12 +9,6 @@
#ifndef _DOS_H_
#define _DOS_H_
/* INCLUDES *******************************************************************/
#include "device.h"
/**/ #include "int32.h" /**/
/* DEFINES ********************************************************************/
//
@ -333,6 +327,4 @@ VOID DosEchoCharacter(CHAR Character);
*/
BOOLEAN DosKRNLInitialize(VOID);
#endif // _DOS_H_
/* EOF */
#endif /* _DOS_H_ */

View file

@ -7,24 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "../../memory.h"
#include "dos.h"
#include "dos/dem.h"
#include "dosfiles.h"
#include "handle.h"
#include "process.h"
#include "bios/bios.h"
/* PRIVATE FUNCTIONS **********************************************************/
static VOID StoreNameInSft(LPCSTR FilePath, PDOS_FILE_DESCRIPTOR Descriptor)

View file

@ -6,6 +6,8 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
#pragma once
/* DEFINES ********************************************************************/
#define FILE_INFO_STDIN (1 << 0)

View file

@ -9,23 +9,11 @@
* LIM EMS v4.0: http://www.phatcode.net/res/218/files/limems40.txt
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "../../memory.h"
#include "bios/umamgr.h"
#include "dos.h"
#include "dos/dem.h"
#include "device.h"
#include "emsdrv.h"
#define EMS_DEVICE_NAME "EMMXXXX0"
#define EMS_SEGMENT_SIZE ((EMS_PHYSICAL_PAGES * EMS_PAGE_SIZE) >> 4)

View file

@ -100,6 +100,4 @@ typedef struct _EMS_HARDWARE_INFO
BOOLEAN EmsDrvInitialize(USHORT Segment, ULONG TotalPages);
VOID EmsDrvCleanup(VOID);
#endif // _EMSDRV_H_
/* EOF */
#endif /* _EMSDRV_H_ */

View file

@ -6,22 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "dos.h"
#include "dos/dem.h"
#include "dosfiles.h"
#include "handle.h"
#include "memory.h"
#include "process.h"
/* PRIVATE FUNCTIONS **********************************************************/
/* Taken from base/shell/cmd/console.c */

View file

@ -6,6 +6,8 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
#pragma once
/* DEFINITIONS ****************************************************************/
#define DEFAULT_JFT_SIZE 20

View file

@ -44,21 +44,11 @@
* of the internal Upper Memory Area Manager, in umamgr.c
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/bop.h"
#include "../../memory.h"
#include "bios/umamgr.h"
#include "device.h"
#include "himem.h"
#define XMS_DEVICE_NAME "XMSXXXX0"
/* BOP Identifiers */

View file

@ -65,6 +65,4 @@ BOOLEAN XmsGetDriverEntry(PDWORD Pointer);
VOID XmsInitialize(VOID);
VOID XmsCleanup(VOID);
#endif // _HIMEM_H_
/* EOF */
#endif /* _HIMEM_H_ */

View file

@ -7,23 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "bios/umamgr.h" // HACK until we correctly call XMS services for UMBs.
#include "dos.h"
#include "dos/dem.h"
#include "memory.h"
#include "process.h"
#include "himem.h"
// FIXME: Should be dynamically initialized!
#define FIRST_MCB_SEGMENT (SYSTEM_ENV_BLOCK + 0x200) // old value: 0x1000
#define USER_MEMORY_SIZE (0x9FFE - FIRST_MCB_SEGMENT)

View file

@ -50,6 +50,4 @@ VOID DosChangeMemoryOwner(WORD Segment, WORD NewOwner);
VOID DosInitializeUmb(VOID);
VOID DosInitializeMemory(VOID);
#endif // _DOS_MEMORY_H_
/* EOF */
#endif /* _DOS_MEMORY_H_ */

View file

@ -7,30 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cpu/cpu.h"
#include "dos.h"
#include "dos/dem.h"
#include "dosfiles.h"
#include "handle.h"
#include "process.h"
#include "memory.h"
#include "bios/bios.h"
#include "io.h"
#include "hardware/ps2.h"
#include "vddsup.h"
/* PRIVATE FUNCTIONS **********************************************************/
static VOID DosInitPsp(IN WORD Segment,

View file

@ -6,6 +6,8 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
#pragma once
/* DEFINITIONS ****************************************************************/
#define DOS_CMDLINE_LENGTH 127

View file

@ -6,34 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
/* Driver Version number and Copyright */
#include <reactos/buildno.h>
#include <reactos/version.h>
#include "emulator.h"
#include "cpu/cpu.h"
#include "int32.h"
#include "hardware/mouse.h"
#include "hardware/ps2.h"
#include "hardware/pic.h"
#include "hardware/video/svga.h"
#include "mouse32.h"
#include "bios/bios.h"
#include "bios/bios32/bios32p.h"
#include "memory.h"
#include "io.h"
#include "dos32krnl/memory.h"
/* PRIVATE VARIABLES **********************************************************/
static const CHAR MouseCopyright[] =

View file

@ -78,6 +78,4 @@ typedef struct _MOUSE_DRIVER_STATE
BOOLEAN DosMouseInitialize(VOID);
VOID DosMouseCleanup(VOID);
#endif // _MOUSE32_H_
/* EOF */
#endif /* _MOUSE32_H_ */

View file

@ -6,40 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "memory.h"
#include "cpu/callback.h"
#include "cpu/cpu.h"
#include "cpu/bop.h"
#include <isvbop.h>
#include "int32.h"
#include "clock.h"
#include "bios/rom.h"
#include "hardware/cmos.h"
#include "hardware/disk.h"
#include "hardware/dma.h"
#include "hardware/keyboard.h"
#include "hardware/mouse.h"
#include "hardware/pic.h"
#include "hardware/pit.h"
#include "hardware/ppi.h"
#include "hardware/ps2.h"
#include "hardware/sound/speaker.h"
#include "hardware/video/svga.h"
#include "vddsup.h"
#include "io.h"
/* PRIVATE VARIABLES **********************************************************/
LPVOID BaseAddress = NULL;

View file

@ -9,10 +9,6 @@
#ifndef _EMULATOR_H_
#define _EMULATOR_H_
/* INCLUDES *******************************************************************/
#include <fast486.h>
/* DEFINES ********************************************************************/
/* Basic Memory Management */
@ -121,6 +117,4 @@ VOID EmulatorTerminate(VOID);
BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput);
VOID EmulatorCleanup(VOID);
#endif // _EMULATOR_H_
/* EOF */
#endif /* _EMULATOR_H_ */

View file

@ -6,20 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "cmos.h"
#include "io.h"
#include "pic.h"
#include "clock.h"
/* PRIVATE VARIABLES **********************************************************/
static HANDLE hCmosRam = INVALID_HANDLE_VALUE;

View file

@ -151,6 +151,4 @@ DWORD RtcGetTicksPerSecond(VOID);
VOID CmosInitialize(VOID);
VOID CmosCleanup(VOID);
#endif // _CMOS_H_
/* EOF */
#endif /* _CMOS_H_ */

View file

@ -18,22 +18,11 @@
* in little endian) *MUST* be fixed!
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "disk.h"
// #include "io.h"
#include "memory.h"
#include "utils.h"
/**************** HARD DRIVES -- VHD FIXED DISK FORMAT SUPPORT ****************/
// http://citrixblogger.org/2008/12/01/dynamic-vhd-walkthrough/

View file

@ -88,6 +88,4 @@ UnmountDisk(IN DISK_TYPE DiskType,
BOOLEAN DiskCtrlInitialize(VOID);
VOID DiskCtrlCleanup(VOID);
#endif // _DISK_H_
/* EOF */
#endif /* _DISK_H_ */

View file

@ -7,19 +7,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "dma.h"
#include "io.h"
#include "memory.h"
/* PRIVATE VARIABLES **********************************************************/
/*

View file

@ -59,6 +59,4 @@ DWORD DmaRequest(IN WORD iChannel,
VOID DmaInitialize(VOID);
#endif // _DMA_H_
/* EOF */
#endif /* _DMA_H_ */

View file

@ -6,16 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "keyboard.h"
#include "ps2.h"
/* PRIVATE VARIABLES **********************************************************/
static BOOLEAN Reporting = FALSE;

View file

@ -22,4 +22,4 @@
VOID KeyboardEventHandler(PKEY_EVENT_RECORD KeyEvent);
BOOLEAN KeyboardInit(BYTE PS2Connector);
#endif // _KEYBOARD_H_
#endif /* _KEYBOARD_H_ */

View file

@ -6,19 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "mouse.h"
#include "ps2.h"
#include "clock.h"
#include "video/svga.h"
/* PRIVATE VARIABLES **********************************************************/
static const BYTE ScrollMagic[3] = { 200, 100, 80 };

View file

@ -66,4 +66,4 @@ VOID MouseEventHandler(PMOUSE_EVENT_RECORD MouseEvent);
VOID MouseGetDataFast(PCOORD CurrentPosition, PBYTE CurrentButtonState);
BOOLEAN MouseInit(BYTE PS2Connector);
#endif // _MOUSE_H_
#endif /* _MOUSE_H_ */

View file

@ -7,18 +7,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "pic.h"
#include "io.h"
/* PRIVATE VARIABLES **********************************************************/
typedef struct _PIC

View file

@ -37,6 +37,4 @@ BYTE PicGetInterrupt(VOID);
VOID PicInitialize(VOID);
#endif // _PIC_H_
/* EOF */
#endif /* _PIC_H_ */

View file

@ -8,20 +8,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "pit.h"
#include "io.h"
#include "pic.h"
#include "clock.h"
/* PRIVATE VARIABLES **********************************************************/
static PIT_CHANNEL PitChannels[PIT_CHANNELS];

View file

@ -77,6 +77,4 @@ WORD PitGetReloadValue(BYTE Channel);
VOID PitInitialize(VOID);
#endif // _PIT_H_
/* EOF */
#endif /* _PIT_H_ */

View file

@ -11,21 +11,11 @@
* - This controller is here only for having ports 61h and 62h working.
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "ppi.h"
#include "hardware/pit.h"
#include "hardware/sound/speaker.h"
#include "io.h"
/* PRIVATE VARIABLES **********************************************************/
/*static*/ BYTE Port61hState = 0x00; // Used in emulator.c

View file

@ -21,6 +21,4 @@ extern BYTE Port61hState;
VOID PpiInitialize(VOID);
#endif // _PPI_H_
/* EOF */
#endif /* _PPI_H_ */

View file

@ -11,21 +11,11 @@
* http://www.computer-engineering.org/ps2keyboard/
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "ps2.h"
#include "memory.h"
#include "io.h"
#include "pic.h"
#include "clock.h"
/* PRIVATE VARIABLES **********************************************************/
#define BUFFER_SIZE 32

View file

@ -57,6 +57,4 @@ BOOLEAN PS2PortQueueRead(BYTE PS2Port);
BOOLEAN PS2Initialize(VOID);
VOID PS2Cleanup(VOID);
#endif // _PS2_H_
/* EOF */
#endif /* _PS2_H_ */

View file

@ -6,16 +6,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "speaker.h"
#include "hardware/pit.h"
/* Extra PSDK/NDK Headers */
#include <ndk/iofuncs.h>

View file

@ -16,6 +16,4 @@ VOID SpeakerChange(UCHAR Port61hValue);
VOID SpeakerInitialize(VOID);
VOID SpeakerCleanup(VOID);
#endif // _SPEAKER_H_
/* EOF */
#endif /* _SPEAKER_H_ */

View file

@ -6,21 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "svga.h"
#include <bios/vidbios.h>
#include "memory.h"
#include "io.h"
#include "clock.h"
/* PRIVATE VARIABLES **********************************************************/
static CONST DWORD MemoryBase[] = { 0xA0000, 0xA0000, 0xB0000, 0xB8000 };

View file

@ -385,6 +385,4 @@ BOOLEAN VgaGetDoubleVisionState(PBOOLEAN Horizontal, PBOOLEAN Vertical);
BOOLEAN VgaInitialize(HANDLE TextHandle);
VOID VgaCleanup(VOID);
#endif // _SVGA_H_
/* EOF */
#endif /* _SVGA_H_ */

View file

@ -7,19 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "int32.h"
#include "cpu/bop.h"
#include <isvbop.h>
/* PRIVATE VARIABLES **********************************************************/
/*

View file

@ -10,10 +10,6 @@
#ifndef _INT32_H_
#define _INT32_H_
/* INCLUDES *******************************************************************/
#include "cpu/callback.h"
/* DEFINES ********************************************************************/
/* 32-bit Interrupt Identifiers */
@ -60,6 +56,4 @@ Int32Call(IN PCALLBACK16 Context,
VOID InitializeInt32(VOID);
#endif // _INT32_H_
/* EOF */
#endif /* _INT32_H_ */

View file

@ -7,16 +7,11 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "io.h"
/* PRIVATE VARIABLES **********************************************************/
typedef struct _EMULATOR_IO_HANDLERS

View file

@ -103,6 +103,4 @@ VOID FASTCALL EmulatorWriteIo
UCHAR DataSize
);
#endif // _IO_H_
/* EOF */
#endif /* _IO_H_ */

View file

@ -6,16 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "memory.h"
/* PRIVATE VARIABLES **********************************************************/
typedef struct _MEM_HOOK

View file

@ -92,6 +92,4 @@ MemQueryMemoryZone
PBOOLEAN Hooked
);
#endif // _MEMORY_H_
/* EOF */
#endif /* _MEMORY_H_ */

View file

@ -6,20 +6,11 @@
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "bios/bios.h"
#include "cpu/cpu.h"
#include "dos/dem.h"
#include "resource.h"
/* VARIABLES ******************************************************************/

View file

@ -45,6 +45,58 @@ DWORD WINAPI SetLastConsoleEventActive(VOID);
/* PSEH for SEH Support */
#include <pseh/pseh2.h>
#include <reactos/buildno.h>
#include <reactos/version.h>
#include <fast486.h>
#include <isvbop.h>
#include "bios/bios32/bios32.h"
#include "bios/bios32/dskbios32.h"
#include "bios/bios32/kbdbios32.h"
#include "bios/bios32/moubios32.h"
#include "bios/bios32/vidbios32.h"
#include "bios/vidbios.h"
#include "bios/bios.h"
#include "bios/kbdbios.h"
#include "bios/umamgr.h"
#include "cpu/callback.h"
#include "bios/rom.h"
#include "clock.h"
#include "cpu/bop.h"
#include "cpu/cpu.h"
#include "dos/dem.h"
#include "dos/mouse32.h"
#include "dos/dos32krnl/country.h"
#include "dos/dos32krnl/device.h"
#include "dos/dos32krnl/dos.h"
#include "dos/dos32krnl/dosfiles.h"
#include "dos/dos32krnl/emsdrv.h"
#include "dos/dos32krnl/handle.h"
#include "dos/dos32krnl/himem.h"
#include "dos/dos32krnl/process.h"
#include "emulator.h"
#include "hardware/cmos.h"
#include "hardware/disk.h"
#include "hardware/dma.h"
#include "hardware/keyboard.h"
#include "hardware/mouse.h"
#include "hardware/pic.h"
#include "hardware/pit.h"
#include "hardware/ppi.h"
#include "hardware/ps2.h"
#include "hardware/sound/speaker.h"
#include "hardware/video/svga.h"
#include "bios/bios32/vbe.h"
#include "int32.h"
#include "bios/bios32/bios32p.h"
#include "io.h"
#include "utils.h"
#include "vddsup.h"
#include "memory.h"
#include "dos/dos32krnl/memory.h"
/*
* Activate this line if you want to run NTVDM in standalone mode with:
* ntvdm.exe <program>
@ -106,6 +158,4 @@ VOID ConsoleReattach(HANDLE ConOutHandle);
VOID MenuEventHandler(PMENU_EVENT_RECORD MenuEvent);
VOID FocusEventHandler(PFOCUS_EVENT_RECORD FocusEvent);
#endif // _NTVDM_H_
/* EOF */
#endif /* _NTVDM_H_ */

View file

@ -6,15 +6,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
/* PRIVATE FUNCTIONS **********************************************************/
/* PUBLIC FUNCTIONS ***********************************************************/
VOID

View file

@ -24,6 +24,4 @@ FileLoadByHandle(IN HANDLE FileHandle,
IN ULONG FileSize,
OUT PULONG BytesRead);
#endif // _UTILS_H_
/* EOF */
#endif /* _UTILS_H_ */

View file

@ -6,19 +6,11 @@
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
#include "ntvdm.h"
#define NDEBUG
#include <debug.h>
#include "emulator.h"
#include "vddsup.h"
#include "cpu/bop.h"
#include <isvbop.h>
typedef VOID (WINAPI *VDD_PROC)(VOID);
typedef struct _VDD_MODULE

View file

@ -18,6 +18,4 @@ VOID VDDResumeUserHook(VOID);
VOID VDDSupInitialize(VOID);
#endif // _VDDSUP_H_
/* EOF */
#endif /* _VDDSUP_H_ */