Skip to content

Commit 19b9b0b

Browse files
committed
[FREELDR:PC] pcvideo.c: Fix two regression bugs (reactos#8498)
- `PcVideoDetectVideoCard()`: Fix the call to Int 10h AX=1A00h. A 23-year old regression from commit 425bbb1 (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 1b3e649 (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.
1 parent c554298 commit 19b9b0b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

boot/freeldr/freeldr/arch/i386/pc/pcvideo.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ PcVideoDetectVideoCard(VOID)
193193
* 0Ch MCGA w/ color analog display
194194
* FFh unknown display type
195195
*/
196-
Regs.b.ah = 0x12;
197-
Regs.b.bl = 0x10;
196+
Regs.w.ax = 0x1A00;
198197
Int386(0x10, &Regs, &Regs);
199198

200199
if (0x1a == Regs.b.al)
@@ -614,7 +613,7 @@ PcVideoSetMode80x50_80x43(VOID)
614613
{
615614
if (VIDEOCARD_VGA == PcVideoDetectVideoCard())
616615
{
617-
PcVideoSetBiosMode(0x12);
616+
PcVideoSetBiosMode(0x03);
618617
PcVideoSetFont8x8();
619618
PcVideoSelectAlternatePrintScreen();
620619
PcVideoDisableCursorEmulation();

0 commit comments

Comments
 (0)