VDPdigitizer (for Master System) - c0pperdragon/LumaCode GitHub Wiki
The VDPdigitizer is a small modification board for the Sega Master System game console. It will re-quantize the RGB signals comming from the Video Display Processor into digital 6-bit RGB values and serialize this to a Lumacode signal. This can then be upscaled with a Lumacode-compatible upscaler to pixel perfect HDMI.
Mod kit
The kit consists of a small board and a length of 2-wire cable.
Installation
I show the installation in my Master System II that has a 315-5246 VDP chip. For the original Master System it will be very similiar, but the signals can be found at slightly different places on the older 315-5124 VDP (which is the one that has the pins in the usual arrangement but with narrower pitch). Connect wires from the holes at the edge of the mod board according to this table. It is not necessary to solder everything directly to the graphics chip, but you can use any place that is connected through a trace to the relevant pin. Use a multimeter to find the most convenient point for soldering. Power (GND and 5V) can be taken directly from the voltage regulator.
Signal | VDP pin (315-5124) | VDP pin (315-5246) |
---|---|---|
Green | 27 | 28 |
Blue | 28 | 29 |
Red | 26 | 27 |
CS (sync) | 29 | 30 |
CLK | 30 | 35 |
The lumacode output can be wired to the analog RF output socket after cutting its traces to the original circuitry. GND goes to the outer shield and LUM to the inner conductor.
Installation variant: SMS 1 with later VDP chip
This picture was sent by a user who removed the RF modulator entirely and used the space to also add an extra audio jack alongside the lumacode output.
RGBtoHDMI firmware
Currently, the latest beta release supports decoding lumacode from this machine, but does not yet provide a profile and palette file. After installing this release on your SDcard, you need to add the content of this archive to the SDcard as well: master_system_extra_files.zip
Calibrating the upscaler
The small button on the board is needed for calibrating the threashold voltages for re-quantizing the RGB signals. When pressed, the board enters calibration mode and outputs a black and white image with some extra details on the side. Before you start calibrating the VDPdigitizer board to the output of the VDP, make sure that your upscaler is calibrated to the lumacode signal from the VDPdigitzer. Use the 4-step color gradient on the side for reference and set your upscaler to show this perfectly and with some margin for error as well (do not worry about the image itself during this step). It is very important the get this correct first, otherwise the second calibration step is basically impossible to do.
Calibrating the VDPdigitizer itself
You need to correctly set 3 voltage threashold values for all 3 of the R,G,B channels. Moreover, you need to do this for each of 3 different time phases for each channel to accomodate for variances of the brightnes that occur in a 3-pixel cycle (creating the well-known jailbars). So in total this comes to 27 different values that can be tweaked individually. If you are lucky, the factory settings already work, but I would not count on this.
The calibration menu consists of 4 lines: On top is the current page number (R1, R2, R3, G1, G2, G3, B1, B2, B3) for which you can change voltages in the other three lines. Navigate the cursor through the lines with short presses of the button and change the value with long presses. Each page shows the values of the three threashold voltages for a given color channel (R,G,B) and given time phase (1,2,3). Three values are needed to seperate out the possible 4 luminance values.
The rest of the screen shows just this single color channel on this time phase. It is shown in grayscales here so you can better distinguish what is detected. Use some game where you have many different colors on the screen at the same time and pause the game, so you can do the calibration. By changing the three values you need to make the 4 different levels of gray appear somewhere on the screen at the same time without any flickering. Make sure to leave some safety margin. Repeat this for all 9 color/phase combinations.
After some time of inactivity, the board exits calibration mode and also saves your settings at this point.
Taking care of audio
The VDPdigitizer only creates a lumacode signal that encodes the video. If you happen to have a machine that natively only creates an RF signal with video and audio combined, you may want to add some extra modification to get normal analog audio as well. I don't want to go into much details here as there will probably be enough and better resources online on how to do that. My own installation picture may still give you a hint, though.
Details on color encoding
The specific lumacode signal that comes from the VDPdigitizer follows the overall standard for lumacode and has 3 samples for each pixel. With 4 possible luminance values, each sample encodes exactly one of the 3 original color components, in this order: Red, Green, Blue. It can not get more straight-forward than that ;-).