From b62ad02740f9a21a31bc90bbab1b01eef2360a43 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Fri, 9 Aug 2013 13:14:56 +0000 Subject: [PATCH] [NTVDM] - Enable TESTING by default until the correct way to load ntvdm is found. - Calculate the character height instead of hardcoding in the BDA. svn path=/branches/ntvdm/; revision=59678 --- subsystems/ntvdm/bios.c | 5 ++++- subsystems/ntvdm/ntvdm.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/subsystems/ntvdm/bios.c b/subsystems/ntvdm/bios.c index e37fc08c11b..37e84dff8a7 100644 --- a/subsystems/ntvdm/bios.c +++ b/subsystems/ntvdm/bios.c @@ -306,7 +306,10 @@ BOOLEAN BiosSetVideoMode(BYTE ModeNumber) Bda->VideoPage = 0; Bda->VideoPageSize = BIOS_PAGE_SIZE; Bda->VideoPageOffset = 0; - Bda->CharacterHeight = 16; + + /* Get the character height */ + VgaWritePort(VGA_CRTC_INDEX, VGA_CRTC_MAX_SCAN_LINE_REG); + Bda->CharacterHeight = 1 + (VgaReadPort(VGA_CRTC_DATA) & 0x1F); Resolution = VgaGetDisplayResolution(); Bda->ScreenColumns = Resolution.X; diff --git a/subsystems/ntvdm/ntvdm.c b/subsystems/ntvdm/ntvdm.c index a6d6a2a654a..fae599f961f 100644 --- a/subsystems/ntvdm/ntvdm.c +++ b/subsystems/ntvdm/ntvdm.c @@ -23,7 +23,7 @@ * Activate this line if you want to be able to test NTVDM with: * ntvdm.exe */ -// #define TESTING +#define TESTING /* PUBLIC VARIABLES ***********************************************************/ -- 2.17.1