mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:43:12 +00:00
[NTVDM]: Move EMS support as a BIOS module (and initialize it after the BIOS has finished its initialization, including resetting the INT handlers).
svn path=/trunk/; revision=66675
This commit is contained in:
parent
6928fadeff
commit
9606bcd3f2
5 changed files with 16 additions and 6 deletions
|
@ -10,6 +10,7 @@ list(APPEND SOURCE
|
||||||
bios/bios32/kbdbios32.c
|
bios/bios32/kbdbios32.c
|
||||||
bios/bios32/vidbios32.c
|
bios/bios32/vidbios32.c
|
||||||
bios/bios32/moubios32.c
|
bios/bios32/moubios32.c
|
||||||
|
bios/bios32/ems.c
|
||||||
bios/bios.c
|
bios/bios.c
|
||||||
bios/kbdbios.c
|
bios/kbdbios.c
|
||||||
bios/rom.c
|
bios/rom.c
|
||||||
|
@ -33,7 +34,6 @@ list(APPEND SOURCE
|
||||||
dos/mouse32.c
|
dos/mouse32.c
|
||||||
dos/dem.c
|
dos/dem.c
|
||||||
clock.c
|
clock.c
|
||||||
ems.c
|
|
||||||
emulator.c
|
emulator.c
|
||||||
int32.c
|
int32.c
|
||||||
io.c
|
io.c
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include "vidbios32.h"
|
#include "vidbios32.h"
|
||||||
#include "moubios32.h"
|
#include "moubios32.h"
|
||||||
|
|
||||||
|
#include "ems.h"
|
||||||
|
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "hardware/cmos.h"
|
#include "hardware/cmos.h"
|
||||||
#include "hardware/pic.h"
|
#include "hardware/pic.h"
|
||||||
|
@ -665,6 +667,9 @@ Bios32Post(VOID)
|
||||||
|
|
||||||
SearchAndInitRoms(&BiosContext);
|
SearchAndInitRoms(&BiosContext);
|
||||||
|
|
||||||
|
/* Initialize EMS */
|
||||||
|
EmsInitialize();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* End of the 32-bit POST portion. We then fall back into 16-bit where
|
* End of the 32-bit POST portion. We then fall back into 16-bit where
|
||||||
* the rest of the POST code is executed, typically calling INT 19h
|
* the rest of the POST code is executed, typically calling INT 19h
|
||||||
|
@ -726,6 +731,7 @@ BOOLEAN Bios32Initialize(VOID)
|
||||||
|
|
||||||
VOID Bios32Cleanup(VOID)
|
VOID Bios32Cleanup(VOID)
|
||||||
{
|
{
|
||||||
|
EmsCleanup();
|
||||||
MouseBios32Cleanup();
|
MouseBios32Cleanup();
|
||||||
VidBios32Cleanup();
|
VidBios32Cleanup();
|
||||||
KbdBios32Cleanup();
|
KbdBios32Cleanup();
|
||||||
|
|
|
@ -195,6 +195,14 @@ static VOID WINAPI EmsIntHandler(LPWORD Stack)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Get EMM Version */
|
||||||
|
case 0x46:
|
||||||
|
{
|
||||||
|
setAH(EMS_STATUS_OK);
|
||||||
|
setAL(EMS_VERSION_NUM);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Move/Exchange Memory */
|
/* Move/Exchange Memory */
|
||||||
case 0x57:
|
case 0x57:
|
||||||
{
|
{
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
/* DEFINITIONS ****************************************************************/
|
/* DEFINITIONS ****************************************************************/
|
||||||
|
|
||||||
|
#define EMS_VERSION_NUM 0x04
|
||||||
#define EMS_INTERRUPT_NUM 0x67
|
#define EMS_INTERRUPT_NUM 0x67
|
||||||
#define EMS_SEGMENT 0xD000
|
#define EMS_SEGMENT 0xD000
|
||||||
#define EMS_MAX_HANDLES 16
|
#define EMS_MAX_HANDLES 16
|
|
@ -31,7 +31,6 @@
|
||||||
#include "hardware/sound/speaker.h"
|
#include "hardware/sound/speaker.h"
|
||||||
#include "hardware/pit.h"
|
#include "hardware/pit.h"
|
||||||
#include "hardware/video/vga.h"
|
#include "hardware/video/vga.h"
|
||||||
#include "ems.h"
|
|
||||||
|
|
||||||
#include "vddsup.h"
|
#include "vddsup.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
@ -469,9 +468,6 @@ BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput)
|
||||||
/* Initialize I/O ports */
|
/* Initialize I/O ports */
|
||||||
/* Initialize RAM */
|
/* Initialize RAM */
|
||||||
|
|
||||||
/* Initialize EMS */
|
|
||||||
EmsInitialize();
|
|
||||||
|
|
||||||
/* Initialize the CPU */
|
/* Initialize the CPU */
|
||||||
|
|
||||||
/* Initialize the internal clock */
|
/* Initialize the internal clock */
|
||||||
|
@ -557,7 +553,6 @@ VOID EmulatorCleanup(VOID)
|
||||||
|
|
||||||
PS2Cleanup();
|
PS2Cleanup();
|
||||||
|
|
||||||
EmsCleanup();
|
|
||||||
SpeakerCleanup();
|
SpeakerCleanup();
|
||||||
CmosCleanup();
|
CmosCleanup();
|
||||||
// PitCleanup();
|
// PitCleanup();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue