Yeah, that is correct. The PALTSR approach is fundamentally fallible that way, and guarantees to be working only if the original game gates palette uploads inside an interrupts disabled block.
I did run tests way back to check on the "do VGA cards actually apply R/G/B palette colors after every single color component write, or only after the whole triplet?", and the result I got on a couple of cards that I tested (maybe CL-GD5422 and Tseng ET4000AX, I don't quite recall), was that the color was updated only after the final Blue component was updated. So if a sequence of red and green writes that might have been interrupted, but blue was not written, there wouldn't be any partial change. So I modeled that behavior to CRT Terminator FPGA's snooping of the palette registers as well.
Though I'm not sure if that behavior was ever specified in VGA, so it could be that one cannot guarantee that behavior to take place for all VGA adapters. But I think that is the source of the glitches that PALTSR gets, for example seen in Doom.
(Now that I think about this, that R/G partial upload behavior would be a semi-interesting quirk test to add to SNOOP, which has a bunch of these corner case quirk tests for various VGA adapters in it)
What makes the glitch worse is that when such an interruption occurs, the palette sub-index (are we on R, G or B) goes off sync "permanently" for the code that is resuming the palette upload after recovering from interrupts. So what happens is that the game will then program incorrect palette colors potentially for a long time to other palette indices, and might not get around to correcting it in quite a while, if ever. So the glitch leads to potentially a long period of incorrect colors, not just transient one frame.
One way that I thought to mitigate this problem might be for the PALTSR interrupt to use a heuristic : when the update interrupt it reads the currently active palette write index from 3C8h, it would compare it to what the active palette write index at the start of the previous interrupt run would be. If the previously active palette write index is different than the current one, the idea is to think "maybe we're right in the middle of an update", and the interrupt would skip mirroring the palette to CRTT. I.e. only when the palette index is seen to be identical twice in a row, the palette is mirrored to CRTT.
Actually, I now got encouraged to give that heuristic a try now in PALTSR.CPP, and at least running Doom timedemo 5 times, I did not see a single glitch (whereas before I would see some intermittent glitches every now and then). Maybe that heuristic might be useful - testing with more games will be needed. Nevertheless seems to work so well, so I pushed it to git: https://github.com/juj/crt_terminator/commit/ … ba100993R38-R46