From eaf248fe87191e24828bfc79d2688d79073ce806 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Mon, 11 Nov 2013 17:59:04 +0000 Subject: [PATCH] [NTVDM] Implement CMOS registers 15h, 16h, 17h and 18h. svn path=/branches/ntvdm/; revision=60946 --- subsystems/ntvdm/cmos.c | 13 +++++++++++++ subsystems/ntvdm/cmos.h | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/subsystems/ntvdm/cmos.c b/subsystems/ntvdm/cmos.c index 8b1bbceac28..4b8a7f0d2a4 100644 --- a/subsystems/ntvdm/cmos.c +++ b/subsystems/ntvdm/cmos.c @@ -11,6 +11,7 @@ #define NDEBUG #include "cmos.h" +#include "bios.h" #include "pic.h" /* PRIVATE VARIABLES **********************************************************/ @@ -135,6 +136,18 @@ BYTE CmosReadData(VOID) return Value; } + case CMOS_REG_BASE_MEMORY_LOW: + return Bda->MemorySize & 0xFF; + + case CMOS_REG_BASE_MEMORY_HIGH: + return Bda->MemorySize >> 8; + + case CMOS_REG_EXT_MEMORY_LOW: + return ((MAX_ADDRESS - 0x100000) / 1024) & 0xFF; + + case CMOS_REG_EXT_MEMORY_HIGH: + return ((MAX_ADDRESS - 0x100000) / 1024) >> 8; + case CMOS_REG_STATUS_A: case CMOS_REG_STATUS_B: case CMOS_REG_STATUS_D: diff --git a/subsystems/ntvdm/cmos.h b/subsystems/ntvdm/cmos.h index 807e4e32cee..0e8d5f0c388 100644 --- a/subsystems/ntvdm/cmos.h +++ b/subsystems/ntvdm/cmos.h @@ -67,10 +67,13 @@ typedef enum _CMOS_REGISTERS CMOS_REG_STATUS_D, CMOS_REG_DIAGNOSTICS, CMOS_REG_SHUTDOWN_STATUS, + CMOS_REG_BASE_MEMORY_LOW = 0x15, + CMOS_REG_BASE_MEMORY_HIGH = 0x16, + CMOS_REG_EXT_MEMORY_LOW = 0x17, + CMOS_REG_EXT_MEMORY_HIGH = 0x18, CMOS_REG_MAX = 0x40 } CMOS_REGISTERS, *PCMOS_REGISTERS; - /* * CMOS Memory Map * -- 2.17.1