First post, by ockiller
I don't know if this has already been tried, I can't find much information on the topic of making EGA modes work again on Turing+ (it's completely broken from that generation onwards, only VGA and VESA modes remains functional).
The idea that I wanted to try was that a VGA mode 12h (640x480 planar 16 colors) isn't much different from say mode EGA mode 0Dh (320x200 planar 16 colors), so maybe it's possible to trap mode 0Dh, ask for mode 12h instead and tweak it to a 320x200 version. And it works indeed! In fact, modern Geforces seem to just ignore all CGA/EGA mode requests, they are no-op, but it seems that manual mode settings via the VGA registers still mostly works (tested on an Ada Geforce RTX 4060 Ti).
So here is my proof-of-concept (NASM source included), a small TSR that for now traps mode 0Dh only, and reconstruct it as close as I could with my limited knowledge of the VGA registers from mode 12h. It should be possible make such workarounds for other legacy graphics modes like CGA or EGA's 640x350 modes.
I also included a fix attempt at the wrong color palette of these old modes (the green/yellow/cyan tint that exists at least from the Maxwell generation), and it's the result of many failed attempts for which I still don't fully understand. I reproduce this palette bug with my fake mode 0Dh even on DOSbox so here it's only my fault. As I couldn't get any success remapping the EGA palette to the VGA DAC (I suspect some games to overwrite them after setting the graphics mode), I simply set the corresponding DAC colors. Thing is, which DAC indices to fix depend on the game! So, as it only concerns the bright colors (8-15) I just repeat them over the whole DAC range 8-63, and it seems to do the job for all the games I tested, including the Commander Keen series.
In theory this TSR shouldn't have a visible effect on a graphics card with a perfectly sane VGA BIOS, so it could be used on Maxwell+ too to fix the wrong color palette.