First post, by augnober
When running Star Control 2, DOSBox shares a palette problem with many newer graphics cards (the problems started appearing on some graphics cards at least as long ago as the Pentium133 era). This is something I've looked into before, and have patched (hacked starcon2.exe) to correct on offending systems. The quickest way to reliably encounter this problem is to start the game and fly your ship towards Earth. You'll be intercepted by an alien ship and you'll see that the colours are completely screwed up.
This seems to be an issue where older VGA cards shared some undocumented functionality which stopped being found in later cards. If you're interested in implementing the behaviour seen on the older graphics cards (which will fix Star Control 2 in DOSBox), here's what I found:
Normally, to set the palette on standard VGA, you:
1. To port 0x3c8, output the first colour to change
2. Output rgb values to 0x3c9 for each colour in sequence
Star Control 2 however outputs to port 0x3c7 instead (0x3c7 is normally the port that you output to to indicate that you're about to READ palette information.. not set). The difference is almost that simple. However, inexplicably, rather than outputting the first colour to change to 0x3c7, it outputs this value minus one. Amazingly, this code set the palette correctly on videocards of the time... but unfortunately, doesn't work in DOSBox or most current videocards.
Perhaps there are other games that exhibit this behaviour... Probably not. Star Control 2 often makes "Best PC Games Ever" lists though, so it may be worthy of a fix 😀