Reply 20 of 216, by Benedikt
Tronix wrote on 2020-06-25, 16:12:The idea is not new. The main problem is that Saleae Socket API does not allow to receive a continuous stream of data. But..
There is a very similar project using a fx2lp microcontroller Cypress CY7C68013A on demoboard LCSOFT CY7C68013A (like Chinese-clone Saleae 8 ch): https://github.com/y-salnikov/vcaptfx2 He replaces the firmware in the microcotnorler with his own (slightly modified fx2lafw version from sigrok project) and has Windows and Linux-based client for display captured image. It’s not really for CGA but very similar video output from Soviet home computers like БК0010-01 and ZX Spectrum clones. Pictures and hardware descriptions there: http://y-salnikov.github.io/vcaptfx2/
The problem here is that the author maneuvers his way around clock recovery by tapping into the original pixel clock signal.
While we can do that, as well, it is not the most practical approach.
One possible approach to the clock recovery problem would go like this:
- pre-select, guess or roughly measure the type of sync-frame found in the video signal
- guess the most likely pixel clock
- synthesize a facsimile sync-frame based on these parameters
- cross-correlate it to the sync-frame from the captured signal to measure the phase offset between pixel clock and sample clock
- resample the captured signal using the now fully recovered pixel clock and next-neighbor interpolation (for this should now keep exactly the right pixels)
Predator99 wrote on 2020-06-25, 18:29:Thanks for the links, didnt find this. Was surprised nobody tried before. Will try to install this, but I dont think it runs with CGA out of the box.
As mentioned above, I believe that he taps into the pixel clock signal.
I, personally, wanted to do this kind of thing with clock recovery a year or two ago, but I did not get past the concept stage.