BitWrangler wrote on 2024-12-16, 14:53:
That is sounding like the sensible avenue... as I was trying to say in my last post edit, doing it the way VGA does CGA might be a non starter. I have no doubt the original implementations of EGA can do that,
I'm not sure I understand you correctly. If you expect the "original implementation of EGA" to have better CGA compatiblity than a random PCI VGA card, that's not true. IBM designed the EGA to be "BIOS compatible" to the CGA cards with some small additions like allowing cursor positioning and display page selection via I/O port access, as well as the VSYNC/BLANK feedback from the status register. No IBM-made EGA or VGA card ever had port level compatibility to the IBM CGA card. This is a unique selling point of the third-party clone cards.
Actually, there are some differences between CGA modes displayed on an EGA card, and CGA modes displayed on a VGA card: The EGA card displays CGA modes at CGA/NTSC frequencies, 15kHz HSync, 60Hz VSync. On the other hand, the VGA card line-doubles the modes to 31.5kHz HSync, 70Hz VSync. Both the refresh rate (and thus game speed if it is frame rate locked) and horizontal sync rate deviates on VGA. Any software that is so close to the CGA that it requires a certain horizontal rate is likely accessing CGA in other ways that are not supported on EGA/VGA cards as well (e.g. in-frame CGA palette switching).
IBM did provide hardware support for Hercules compatible video memory layout on both the EGA and VGA card - although no mode actually uses it. Given that Hercules compatible video memory layout is just one extra signal compared to CGA graphics mode compatible video memory layout, IBM didn't pay a notable price for it. The Olivetti/AT&T 640x400 monochrome mode has a memory layout very similar to the hercules 720x348 mode, and should be supportable in a similar way on VGA. Given that this mode is initialized via BIOS, you might be able to add the AT&T mode without VM86 I/O port trapping - as long as the software trying to use that mode doesn't verify that the mainboard BIOS is by Olivetti or AT&T.