X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fsubsystems%2Fntvdm%2Fbios%2Fbios32%2Fbios32.c;h=6a4aaba280156b0d9ce0dc543481ebca322a5e99;hp=045e58c82bbae514593903c2845bd2a12863b94d;hb=02bef19b583fbdc09d284e1a8bc853ff5f91f647;hpb=de36490031fc50d59ea0c93c10305ad0aa07c850 diff --git a/reactos/subsystems/ntvdm/bios/bios32/bios32.c b/reactos/subsystems/ntvdm/bios/bios32/bios32.c index 045e58c82bb..6a4aaba2801 100644 --- a/reactos/subsystems/ntvdm/bios/bios32/bios32.c +++ b/reactos/subsystems/ntvdm/bios/bios32/bios32.c @@ -112,6 +112,20 @@ static VOID WINAPI BiosMiscService(LPWORD Stack) break; } + /* Get Configuration */ + case 0xC0: + { + /* Return the BIOS ROM Configuration Table address in ES:BX */ + setES(HIWORD(Bct)); + setBX(LOWORD(Bct)); + + /* Call successful; clear CF */ + setAH(0x00); + Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF; + + break; + } + default: { DPRINT1("BIOS Function INT 15h, AH = 0x%02X NOT IMPLEMENTED\n", @@ -336,6 +350,37 @@ static VOID InitializeBiosInt32(VOID) ((PULONG)BaseAddress)[0x49] = (ULONG)NULL; } +static VOID InitializeBiosInfo(VOID) +{ + Bct->Length = sizeof(*Bct); + Bct->Model = 0xFC; // PC-AT; see http://www.ctyme.com/intr/rb-1594.htm#Table515 + Bct->SubModel = 0x00; + Bct->BiosRevision = 0x01; + Bct->BiosFeature[0] = 0x64; // At the moment we don't support "INT 15/AH=4Fh called upon INT 09h" nor "wait for external event (INT 15/AH=41h) supported"; see http://www.ctyme.com/intr/rb-1594.htm#Table510 + Bct->BiosFeature[1] = 0x00; // We don't support anything from here; see http://www.ctyme.com/intr/rb-1594.htm#Table511 + Bct->BiosFeature[2] = 0x00; + Bct->BiosFeature[3] = 0x00; + Bct->BiosFeature[4] = 0x00; +} + +static VOID InitializeBiosData(VOID) +{ + UCHAR Low, High; + + /* Initialize the BDA contents */ + Bda->EquipmentList = BIOS_EQUIPMENT_LIST; + + /* + * Retrieve the conventional memory size + * in kB from CMOS, typically 640 kB. + */ + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_BASE_MEMORY_LOW); + Low = IOReadB(CMOS_DATA_PORT); + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_BASE_MEMORY_HIGH); + High = IOReadB(CMOS_DATA_PORT); + Bda->MemorySize = MAKEWORD(Low, High); +} + /* PUBLIC FUNCTIONS ***********************************************************/ /* @@ -344,7 +389,6 @@ static VOID InitializeBiosInt32(VOID) BOOLEAN Bios32Initialize(VOID) { BOOLEAN Success; - UCHAR Low, High; /* Initialize the stack */ // That's what says IBM... (stack at 30:00FF going downwards) @@ -356,18 +400,9 @@ BOOLEAN Bios32Initialize(VOID) /* Set data segment */ setDS(BDA_SEGMENT); - /* Initialize the BDA contents */ - Bda->EquipmentList = BIOS_EQUIPMENT_LIST; - - /* - * Retrieve the conventional memory size - * in kB from CMOS, typically 640 kB. - */ - IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_BASE_MEMORY_LOW); - Low = IOReadB(CMOS_DATA_PORT); - IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_BASE_MEMORY_HIGH); - High = IOReadB(CMOS_DATA_PORT); - Bda->MemorySize = MAKEWORD(Low, High); + /* Initialize the BDA and the BIOS ROM Information */ + InitializeBiosData(); + InitializeBiosInfo(); /* Register the BIOS 32-bit Interrupts */ InitializeBiosInt32();