Still working on converting the MGA signal to VGA. I do not have access to the dot clock, only the horizontal and vertical syncs (the video board is buried three boards down on the back of the machine and the signals are at the operator's pendant about 2 meters away). The basic problem is the MGA screen rate is 50HZ and VGA is 60Hz. If two SRAMs (such as FM25V05) are used, one reading the MGA the other writing the VGA the problem is mostly providing two clocks with the MGA clock the most critical. Two possible ways to sync to the MGA is to time the horizontal sync pulse and adjust the fast RC clock to match or use an external programmable frequency synthesizer such as a DL1085L. The horizontal sync is 18.265KHz so it should not be too hard to measure. Is one method preferable to the other?
The SRAMs have an SPI interface which means two clock rates, one for MGA and one for VGA. which might be problematic for one SAM4S to handle. Alternatively, since the data rate is 14.9MHz (18.265KHz * 816 bits/line) on the MGA and 25.427MHz (31.476KHz for 808 bits/line) for the VGA, two SAM4s and two SRAMs could be used, each SAM4S at the required clock speed and swapping control of the SRAMs to transfer the data.