Close

Flash A/D converter for analog R, G, B

A project log for MSX2(+) video to VGA conversion (proof of concept)

V9938 and V9958 Video display processors were successors to TMS99X8 - this is an attempt to convert their video signal to VGA using FPGA

zpekiczpekic 03/29/2021 at 04:040 Comments

Unlike their TMS99X8 video display ancestors used in MSX (and many other home computers and game consoles), the Yamaha V9938 / V9958 VDPs generate analog R, G, B along with sync signals:

VariationOutputInputDRAM
TMS9918A60Hz NTSC composite60Hz NTSC composite16k x 1bit
TMS9928A60Hz YPbPr16k x 1bit
TMS9929A50Hz YPbPr16k x 1bit
TMS911860Hz NTSC composite60Hz NTSC composite16k x 4bit
TMS912860Hz YPbPr16k x 4bit
TMS912950Hz YPbPr16k x 4bit

The voltage level on RGB outputs is in the following range:

The threshold voltage level must be set somewhere above VRGB0 and below VRGB7 - matched to the specific VDP driving the circuit. 

To feed the FPGA with digital R, G, B, an A/D converter is needed. There are two main concerns here:

One could of course use fast, high-precision, and expensive A/D converters. But for the proof of concept purposes, a super cheap voltage comparator circuit is sufficient:

When the voltage LM339 on + input is greater than - input, the output is "high" - meaning color is detected.

The voltage cutoff point is determined by running the demo code and and tweaking the potentiometer positions with a screwdriver until the colors looks acceptable:

The 1k pull-up resistors are pure ad-hoc improvisations too, prototyping the circuit on the breadboard I found that having them increases the picture quality, probably by generating faster output rise times. 

Other signals are directly led from VDP to FPGA:

Discussions