VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

FreeVGA is a bit confusing on the matter of the effects of said bit:

LGA - Line Graphics Enable

This field is used in 9 bit wide character modes to provide continuity for the horizontal line characters in the range C0h-DFh. If this field is set to 0, then the 9th column of these characters is replicated from the 8th column of the character. Otherwise, if it is set to 1 then the 9th column is set to the background like the rest of the characters.

So, setting said bit to 0 makes the VGA text mode's 9th column use the 8th bit instead(duplicating the 8th pixel into the 9th pixel)? And setting it to 1 makes the 9th pixel become the background? Shouldn't that be reversed? So setting it makes it become the 8th pixel(bit 7), while clearing it makes it become background? What is correct behaviour? I notice that software like the MS-DOS setup breaks up it's characters atm.

It currently makes it become the background if the following is found:

		newx = 7; //Only 7 max!
if (GETBITS(VGA->registers->AttributeControllerRegisters.REGISTERS.ATTRIBUTEMODECONTROLREGISTER,2,1) || ((character & 0xE0) != 0xC0)) return 0; //9th bit is always background?

So having the bit set makes it(or not a line graphics character) makes the 9th pixel become background? Or should the bit be cleared instead?

Edit: https://downloads.reactivemicro.com/Apple%20I … GARegisters.pdf seems to confirm that the bit is supposed to be set to makes characters C0-DF become contiguous instead? Which one is correct?

Edit: Just made it so that the bit when cleared or not a line graphics character, becomes 0. When a line graphics character and the attribute controller mode control register bit 2 is set, it will duplicate the 8th bit into the 9th bit for rendering.
Is that correct behaviour?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io