c0pperdragon / LumaCode

Definition of the "LumaCode" signal standard with reference implementation
66 stars 2 forks source link

Atari ST highres #24

Open c0pperdragon opened 1 month ago

c0pperdragon commented 1 month ago

While my intended solution is not strictly an application of Lumacode, it is similar enough to he discussed here.

I had the idea that it may be possible to combine some signals on the Atari ST video port to just one single video signal to allow an analog RGBtoHDMI to handle this. My current attempt looks pretty promising. Using a test signal generator (I don't have an ST myself) and considering all documentation I could find online, this is now my solution:

Wire up a 13-pin connector with some resistors to an outgoing RCA socket: Pin 4 MONOMON -> Gnd Pin 9 HSYNC -> 2.2k -> Lum Pin 11 MONO -> 1.0k -> Lum Pin 12 VSYNC -> 2.2k -> Lum Pin 13 GND -> Gnd

Grounding Pin 4 is necessary to let the Atari boot in highres mode. For a complete solution, the Audio signal from Pin 1 needs to be provided by some extra socket (maybe via a stereo 3.5 headphone jack). But this is no concern for the first attempt.

Plugging my "RGBtoHDMI Mono & Lumacode" to this combined Lum signal creates a pixel-pefect display. While my signal generator may deliver a much cleaner signal than a true Atari ST would, I tried to compensate this by feeding the signal through a very long wire (17m) which caused no problems at all. So I am quite confident this is a viable solution.

How this actually works: Combining HSYNC and VSYNC with just resistors creates very strange-looking sync pulses with 3 different voltage levels. When setting the sampling threashold just between the 2rd and 3rd level, the RGBtoHDMI sees this as a simple "AND" combination which is already perfectly supported by the firmware. Inside the active video area the "MONO" signal also goes high for every white pixel, which pulls the voltage up to a 4rd level for which the threashold can be calibrated quite easily. As there is never a white pixel when any of the syncs are active (low) , there is no confusion.

c0pperdragon commented 1 month ago

I have prepared some experimental profiles for both the Atari ST monochrome (profile 0) and for the C128 80 columns monochrome (profile 1). Custom_Profile_1.txt Custom_Profile_0.txt

As these have been created with my test rig, these will probably have wrong voltage levels and wrong phase. You need to use the sampling menu to adjust.