skiselev / 8088_bios

BIOS for Intel 8088 based computers
GNU General Public License v3.0
515 stars 61 forks source link

Update bios.asm #21

Closed horkthane closed 1 year ago

horkthane commented 1 year ago

Like a lot of people, I was experiencing the bug where if the VGA card boots into monochrome, text was not showing up on the screen. After stepping through the disassembled Triden 9000i bios, I saw it was reading the equipment list and testing it against 0x30 to determine whether to write characters to 0xb000 or 0xb800. It was also attempting to set those bits on initialization.

This line then turning around and wiping them to 00 was causing the VGA BIOS to write to b800 in monochrome mode 7.

horkthane commented 1 year ago

So it's a bit out of the era, but I was doing some more research on this. On a Asus P5A with a Riva 128, the equipment list bits for initial/active video mode get initialed to 0b10. The same goes for a Geforce 2 MX on an MVP3 based board, and a Geforce 2 GTS on a CUSL2-C board. I actually haven't found a system that initializes those equipment bits to 0b00. I was taking a peak at the GLaBIOS source as well, and if I'm reading it right, it interprets 0b00 after VGA initialization to be an error, and then leaves it alone if it's not.

I'm increasingly confident the initial/active video mode bits are set by the EGA/VGA bios initialization, and then should be left alone.

horkthane commented 1 year ago

Took a wild stab and printing out the correct detected display without checking the equipment bits for EGA/VGA. Untested, since I don't have any non-VGA cards.

skiselev commented 1 year ago

Thank you for your research and the fix!