VOGONS


First post, by VileR

User metadata
Rank l33t
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:

  1. 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?
  2. 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:

The attachment VGAtests.zip is no longer available
  • 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:

    TESTPAN.png

    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.

    TEST512.png

    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!

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 1 of 9, by konc

User metadata
Rank l33t
Rank
l33t

For all cards below
-ISA Cirrus Logic CL-GD5424
-AGP GeForce2 MX200
-AGP Voodoo3
TESTPAN.COM values selected: 8, 8, 0, 0 (No other value produced a correct result)
TEST512.COM colours were different in both cases, like in your screenshot

Do you have any preference about the cards tested, or cards that don't make any sense to test? Like early or 8-bit chipsets, ISA-PCI, GeForce era?

(Edit: added more cards)

Last edited by konc on 2025-09-03, 17:32. Edited 1 time in total.

Reply 2 of 9, by VileR

User metadata
Rank l33t
Rank
l33t
konc wrote on 2025-09-02, 16:34:
On an ISA Cirrus Logic CL-GD5424 TESTPAN.COM values selected: 8, 8, 0, 0 (No other value produced a correct result) TEST512.COM […]
Show full quote

On an ISA Cirrus Logic CL-GD5424
TESTPAN.COM values selected: 8, 8, 0, 0
(No other value produced a correct result)
TEST512.COM colours were different in both cases, like in your screenshot

Nice, thanks for checking! So at least on this card the Line Graphics bit makes no difference, i.e. it's all down to bit 0 ("8/9DM") in the sequencer's clocking mode register.

The reason I expected Line Graphics to matter (besides DOSBox matching this behavior) is that this bit resides in the attribute controller, together with pixel panning. And the design evolved from EGA, where the attribute controller was a separate physical IC - it makes sense that the relevant logic would all reside there, independent of the sequencer (on a different chip). But maybe this was changed on VGA, or just on some chipsets, like this one.

Do you have any preference about the cards tested, or cards that don't make any sense to test? Like early or 8-bit chipsets, ISA-PCI, GeForce era?

Pretty much anything from the earliest 8-bit ISA cards up to the AGP era would do, or even a bit later - basically any chipset designed when text mode was still in common use. Anything much later than that is likely to have half-assed "legacy" VGA compatibility anyway, so it wouldn't be very instructive.

(I've been putting a bit of work into my Fontraption editor again, so a decent sample size would be helpful - my ulterior motive here is to ensure correct display in the editor and the font TSRs it generates... regardless, it'd be good to have some verified info out there for anyone who might need it.)

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 4 of 9, by alrj

User metadata
Rank Newbie
Rank
Newbie

I tested the following cards, with identical results for all of them:

  • Trident TVGA 9000C ISA,
  • Cirrus Logic CL-GD5428 VLB,
  • S3 Virge/DX PCI,
  • S3 Trio64 PCI,
  • ATI Rage 128 Pro AGP,
  • NVidia Riva TNT2 AGP

With all cards, bit 3 also affected intensity in both tests, and the panning values were 8, 8, 0, 0

Reply 5 of 9, by keropi

User metadata
Rank l33t++
Rank
l33t++

made a couple tests too, don't have the ability to test more cards atm....

ISA CL-5428 (upgraded PC7486SLC33 Amstrad system) :
testpan: 8,8,8,8
test512: both tests like the example photo

S3 Vision864 VLB (IBM 466DX2/Tp system) :
testpan: 8,8,8,8
test512: both tests like the example photo

I can do one more test tomorrow - Virge/PCI but I think it's already covered

🎵 🎧 MK1869, PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 6 of 9, by VileR

User metadata
Rank l33t
Rank
l33t
furan wrote on 2025-09-03, 01:33:
It might be useful to look at GPLGPU's VGA (based off Number 9 TTRIV IIRC). […]
Show full quote

It might be useful to look at GPLGPU's VGA (based off Number 9 TTRIV IIRC).

https://github.com/asicguy/gplgpu/tree/35a798 … a29fa47/hdl/vga

You have to follow stuff around a bit (here's a search on the 9 dot attrib usage):
https://github.com/search?q=repo%3Aasicguy%2F … _9dot&type=code

Looks very useful indeed, at least when one can make sense of verilog, but I have no pretensions to such skills. 😀 Either way, appreciate the pointer.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 7 of 9, by VileR

User metadata
Rank l33t
Rank
l33t
alrj wrote on 2025-09-03, 09:27:
I tested the following cards, with identical results for all of them: […]
Show full quote

I tested the following cards, with identical results for all of them:

  • Trident TVGA 9000C ISA,
  • Cirrus Logic CL-GD5428 VLB,
  • S3 Virge/DX PCI,
  • S3 Trio64 PCI,
  • ATI Rage 128 Pro AGP,
  • NVidia Riva TNT2 AGP

With all cards, bit 3 also affected intensity in both tests, and the panning values were 8, 8, 0, 0

Very nice, much obliged! A clear pattern is emerging...

keropi wrote on 2025-09-03, 16:53:
made a couple tests too, don't have the ability to test more cards atm.... […]
Show full quote

made a couple tests too, don't have the ability to test more cards atm....

ISA CL-5428 (upgraded PC7486SLC33 Amstrad system) :
testpan: 8,8,8,8
test512: both tests like the example photo

S3 Vision864 VLB (IBM 466DX2/Tp system) :
testpan: 8,8,8,8
test512: both tests like the example photo

I can do one more test tomorrow - Virge/PCI but I think it's already covered

Thanks for your tests as well!! Yeah, the Virge/PCI result above should be enough.

Although it's curious that your ISA CL-5428 shows different panning behavior, compared to alrj's VLB version. Could it be that both 0 and 8 produce the same 'correct' result in those last two tests (8-dot mode)?

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 8 of 9, by keropi

User metadata
Rank l33t++
Rank
l33t++
VileR wrote on 2025-09-03, 20:32:

[...]
Although it's curious that your ISA CL-5428 shows different panning behavior, compared to alrj's VLB version. Could it be that both 0 and 8 produce the same 'correct' result in those last two tests (8-dot mode)?

I tested again and indeed 8-8-0-0 works , I have an EIZO F35 crt screen that surprisingly has an "auto adjust" button
Once I had a correct "auto adjusted" base then 0-0 worked fine for the last 2 tests of testpan
so it was a screen issue in the end...

🎵 🎧 MK1869, PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 9 of 9, by VileR

User metadata
Rank l33t
Rank
l33t
keropi wrote on 2025-09-04, 19:48:

I tested again and indeed 8-8-0-0 works , I have an EIZO F35 crt screen that surprisingly has an "auto adjust" button
Once I had a correct "auto adjusted" base then 0-0 worked fine for the last 2 tests of testpan
so it was a screen issue in the end...

oh, silicon once again presuming to know better than the user. 😀   Makes sense then... thanks!

Got a decent sample size here already, but if anyone else cares to give it a go, more would always be welcome.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]