c0pperdragon / Amiga-Digital-Video

Add a digital video port to vintage Amiga machines
295 stars 30 forks source link

TVP7002 chip on GPIO #2

Closed c0pperdragon closed 4 years ago

c0pperdragon commented 4 years ago

@IanSB

Hi! I can not help but keep obsessing with the idea of a general upscaler based on the Raspberry Pi Zero (1.3 or older). As it looks, the video camera interface is very non-disclosed, so the best chance is still the GPIO header. Leaving performance issues inside the Pi aside (could possible be solved by using DMA), the header pins seem to be just enough to pull this off. In a bare-metal implementation, the ID_SD and ID_CL pins can be used to directly control the TVP7002, as it conveniently has a I2C control interface. With 24 pins for color, 1 for pixel clock, there is exactly one GPIO pin left to transfer the sync. The video chip generates hsync and vsync, but these could be XORed to form a poor-man's csync signal.

The chip has multiple video input lines, so the device could easily have ports for YPbPr as well as SCART (the first with either YPbPr or RGsB, the second with RGBS or RGsB).

Some control buttons can be done with an I/O-expander on the I2C bus to switch input source, output resolutions and to tweak the input sampling.

Going completely crazy, I could even imagine to integrate a solution to digitize stereo audio as well and make the data accessible through the I2C bus. With 1.7 MHz bus speed, this may just be fast enough to transfer 44kHz 16bit stereo audio.

All this of course implies that the Raspberry Pi Zero has the dedicated hardware to run the GPIO input as well as the I2C communication independently of the CPU. Even if audio is not possible, it would be an awesome device.

c0pperdragon commented 4 years ago

After some more consideration I come to the conclusion that a general upscaler is not feasable, mainly because my targeted devices (NES, SNES, PlayStation) can operate at various pixel clock speeds. The solution of the OSSC to just sample at 30 MHz is surely out of reach for the Raspberry Pi Zero. Manual re-adjustment of sample is rate is not convenient and I don't know if automatic adjustment is even possible.

So, I finally give up this idea.