Thanks, great data. That got me on the right track to look for issues.
I found one problem in the test program itself. On my 16MHz 286 PC (which I didn't originally see on my 80 MHz 486 PC), right after issuing an OUT I/O write command, I need to wait for a few NOPs, before issuing a IN I/O write command to read data back.
Otherwise without pausing between writes and reads, I got exactly the same problem as you were seeing - the reads would come out incorrect.
Uploaded a fixed test program now that adds 5 NOP commands after an I/O write, before issuing the next I/O read: https://github.com/juj/crt_terminator/commit/ … 2cfc9ae5R75-R79 . That fixes the test on my 286.
However, that is possibly not the root problem in the equation - but hopefully will help clear the smoke to zoom in to the remaining problems.
The hypothesis here is that there is an ISA I/O conflict with other hardware. And after removing the peripherals and the conflict, this test program problem unsurfaced.
So please give the above listed updated version a try. Hopefully it will start to report passes for the tests, and we can see what failures remain.
For the next steps, I am working on building a new firmware that has a battery of built-in diagnostics in it that can detect ISA bus conflicts, and allows disabling CRT Terminator's 8bpp palette path to rule out any conflict there. I'll post it soon once it is ready for testing.