[FREELDR:PC] pcvideo.c: Fix two regression bugs (#8498)

- `PcVideoDetectVideoCard()`: Fix the call to Int 10h AX=1A00h.
  A 23-year old regression from commit 425bbb1543 (r3782), introduced
  by a copy-pasta error when converting video code from ASM to C.

- `PcVideoSetMode80x50_80x43()`: Fix setting the 80x50 VGA text-mode,
  which _is_ based on the 80x25 text-mode BIOS 0x03, see e.g.
  https://github.com/torvalds/linux/blob/c2f2b01b74be8b40a2173372bcd770723f87e7b2/arch/x86/boot/video-vga.c
  A 18-year old regression from commit 1b3e649577 (r25751), where the
  correct mode 0x03 was replaced by a VGA graphics mode 0x12, whereas
  the intent in this commit was to only switch to mode 0x12 only in
  `PcVideoPrepareForReactOS()` -- this was because at that time, bootvid
  and hal didn't support changing the video mode to what they needed.
  This has been fixed since.
This commit is contained in:
Hermès Bélusca-Maïto
2025-12-13 19:50:58 +01:00
parent c554298b8d
commit 19b9b0b995
+2 -3
View File
@@ -193,8 +193,7 @@ PcVideoDetectVideoCard(VOID)
* 0Ch MCGA w/ color analog display
* FFh unknown display type
*/
Regs.b.ah = 0x12;
Regs.b.bl = 0x10;
Regs.w.ax = 0x1A00;
Int386(0x10, &Regs, &Regs);
if (0x1a == Regs.b.al)
@@ -614,7 +613,7 @@ PcVideoSetMode80x50_80x43(VOID)
{
if (VIDEOCARD_VGA == PcVideoDetectVideoCard())
{
PcVideoSetBiosMode(0x12);
PcVideoSetBiosMode(0x03);
PcVideoSetFont8x8();
PcVideoSelectAlternatePrintScreen();
PcVideoDisableCursorEmulation();