First post, by VileR
- Rank
- l33t
VGA text mode has some functions that aren't used very often. Some of this behavior isn't specified 100% clearly, either in official or unofficial docs, and I also suspect there may be implementation differences between chipsets/video BIOSes.
In particular, a couple of things:
- Horizontal PEL panning: to get zero panning in text mode, what value to you write in each situation, and what are the *exact* register settings that this behavior depends on?
- Dual font/512-character mode: does this literally limit you to 8 foreground colors (i.e. attribute bit 3 selects only the font), or do you simply have 8 per font (i.e. bit 3 selects both font and color)?
Hopefully, some of you could help find out how this really works on different VGA boards.
I've attached two little test programs - grateful to anyone who could run these on a VGA-equipped DOS machine, and report back:
- TESTPAN.COM will attempt to determine what exactly controls the behavior of Pel Panning in text mode, and how.
It's known that if the character width is set to 8 dots, you need to write 0 to this register to get zero panning; if it's 9 dots, the correct value is 8.
However, setting the character dot-width involves more than one bit of VGA state, and it's not clear which of those bits is responsible for this change in the meaning of the Pel Panning reg.
DOSBox for one chalks it down to the 'Line Graphics Enable' bit in the Attribute Controller. Apparently this was tested on real hardware, and it sort of makes sense as well, but I'd like to know whether some VGA hardware out there does things differently.
So this program will test 4 different scenarios (9-dot mode w/Line Graphics off, 9-dot/LG on, 8-dot/LG off, 8-dot/LG on), and ask you to tweak the Pel Panning value until you get zero panning on screen.
You'll know this when you see two separate yellow lines, one on the left, one on the right:
When done, it'll list the values you selected for all 4 cases, and that's what I'd like to know.
(However, it's also possible that more than one value will be "correct" - e.g. in some of those scenarios, both 0 and 8 might do it. If you can, please try to check for this too.)
- TEST512.COM will show the effect of dual-font mode on color selection, using two different methods of setting it - one via the VGA hardware, one via the BIOS.
Here I'm 99% certain that the Intensity bit should affect both the font and the color (= you should see different colors in each column). Still, this is poorly defined, and maybe some implementations indirectly mess with the palette when you modify the character map through the BIOS, or something.
You'll get two iterations of this screen, first for the HW method then for the BIOS one - please note what you see in both cases.
If you feel like helping out, let me know your results and of course which VGA card/chipset you were using.
Thanks & cheers!