Video modes Overview » History » Revision 6
Revision 5 (foft, 05/27/2018 09:54 PM) → Revision 6/7 (foft, 05/27/2018 09:55 PM)
h1. Video modes Overview The primary video output of the EclaireXL is via an ADC7125/CDK3405. This is a 3 channel 8-bit video DAC. The DAC was chosen predominently for RGB output. The FPGA can drive almost any vertical/horizontal sync frequency though in reality its based on the original Atari output and current HDMI TV standards. I observed that composite and svideo can also be generated with the same DAC. These are present, though are largely just there 'because we can' rather than designed to be the highest quality optimum output. I found some articles that DVI/HDMI are basically the same signal and can be created directly from some Xilinx FPGAs. Shortly after I found this had even been done with my core on the Reverse U16 board (https://github.com/mvvproject/ReVerSE-U16). Anyway it turned out to be very simple to implement at a board level, just some resistors and a port were needed. In the v2 board revision we added support to talk to the VGA or DVI/HDMI monitor via i2c. For now this is only used to tell if the screen is connected, though it can in theory be used to dynamically determine supported modes. To allow that there is a flexible clock generator chip on board, which we've tested works but do not really use yet. h2. Modes h3. RGB This is the original Atari vertical and horizontal sync frequency output as RGB. It is possible to output with either seperate syncs or composite sync (on hsync line). Often referred to as 15KHz (the horizontal sync frequency). The frequency very closely matches the Atari original ones, i.e. 49.86Hz vsync for PAL. Some, but not all, monitors support this mode. Slightly more of them support NTSC, since 56Hz is often the minimum vertical frequency. h3. Scandoubled The same as RGB except going via a scandoubler. Since many modern VGA monitors do not support <30KHz for horizontal sync. Essentially it keeps each line in a buffer and draws it twice. It is still based on the original Atari frequency, so 49.86Hz vsync for PAL. Many more monitors support this mode than 15KHz. As above, NTSC is more compatible. Often PAL modes appear horribly offset. This is a monitor issue, not an EclaireXL issue. It is because the minimum valid VGA frequency is 56Hz, so 50Hz is out of spec. Note that you may see corruption on the edges of the display. This is normal and was output by the original Atari hardware. If this bothers you see VGA mode below. h3. Svideo This is another 15KHz mode. One line of the DAC outputs LUMA (brightness) and the other line outputs CHROMA (colour). It is almost as good as RGB in theory, though for the EclaireXL RGB is much better! Originally I used RGB to Svideo converter logic and I now generate it using a method much like Atari did. Essentially they use a simple variable delay in GTIA for Chroma, to offset a square wave. h3. HDMI HDMI outputs digital video. It also includes audio packets, though to be honest these have some problems. So I suggest using the 3.5mm jack in preference. The video format is 576p50 or 480p59.97. Almost all TVs will work with this, though it is strictly only necessary for 576p50 to work in Europe and 480p59.97 to work in USA (these are mandatory in these regions). Which means its possible to use PAL and NTSC very reliably on a monitor with HDMI support, since almost all of them support it. Note that the vsync is not the same as the original Atari one. The pixel timings are also modified to match the HDMI standard. I've found HDMI TVs need to have this exactly spot-on or they say 'no signal'. So what I do is generate the HDMI signal of a precise 27MHz clock using the exact HDMI timings. Then on the Atari side I overclock it slightly (50/49.86) to match vsync. Finally there is a few lines of buffer to allow the two to communicate without glitches. I chop off the Atari corruption on the edges in this mode (like vgate...). h3. DVI Pretty much same as HDMI, except without the encoded audio packets. I output HDMI standard modes though, not DVI standard modes! This is because there is no standard DVI mode that is suitable for PAL. In theory we could use a standard mode for NTSC. h3. VGA This is using the HDMI reclocking logic, with edges removed, but outputting via the VGA port. I suggest using this with VGA monitors in preference to Scandoubled, unless you like the artifacts or want to keep the vsync exactly original. As with DVI note it is not outputting scandard VGA modes, since there is not one suitable for PAL. h3. Composite This is the two lines of svideo added up! So the monitor has to split them back out, leading to ... artifacting. I think I need to have a higher voltage range here so I've found I need to adjust the monitor to get decent brightness/saturation levels. I might be able to reduce the colour burst amplitude to achieve the same thing, any experts here? h2. Svideo/composite ports On the v1 board there are real svideo and composite ports. On the v2 board svideo and composite are output via the vga connector: For svideo luma is on the green output and chroma on the blue output. For composite luma is on the green output. h2. How to change mode Press F11, navigate in the menu to change the mode. It may then be applied immediately using 'Apply Settings'. This is temporary so if it doesn't work then you can power off/on to revert it. Once you are happy it may then be stored for later (with or without applying) using 'Save to flash'. So if you are switching monitor you can select it here, do not apply, save to flash. Then take it to the other monitor. This is all well and good if you have a monitor supporting all modes on both video connectors. However that is rarely the case. So sometimes it will be set up for a monitor it is not connected to, giving you 'no signal' or similar. Clearly its possible to write down the menu settings and change the mode with no picture in this case. It works, but is somewhat fiddly to do. I plan to add some kind of hot-keys to switch dynamically, but for now that does not exist. So another option is to put a 'settings' file under /atari800/rom/ on the sd card. This overrides the video and system settings on powerup, allowing you to force a video mode. See the [[SD Structure]] Setup]] section for more details on that.