MiSTer FPGA: 240p over HDMI (Direct Video)

The MiSTer FPGA project has been one of the most exciting things in retro gaming.  While I’ll soon have a video (or series) covering everything it can do, I wanted to take the time to highlight one specific feature in this post:  Direct Video.  This allows you to connect the DE-10’s HDMI port to a CRT, without the use of an I/O port!  All that’s needed is cheap DAC, a change to the .ini file and the most basic MiSTer setup.  See below for different configurations:

Zero-lag HDMI to VGA converters:
HD15-2-SCART for use with above converters:
DE-10 Nano & RAM Module:
MiSTer Setup:
Direct Video Details:

Quick Swap between ini files

Before I get into Direct Video, I need to sidetrack for a moment to describe another feature that most people will want to implement along with this one:  Alternate .ini files.  See, much of the MiSTer’s video configuration data is stored in the “MiSTer.ini” file located in the root of the main MiSTer storage.  Enabling Direct Video will require a change to the MiSTer.ini…but what if you want to swap between flat panels and CRT’s without editing the ini file each time?  Simply create a copy of the MiSTer.ini file with whatever changes you want and rename the second version “MiSTer_alt_1.ini”.  Then, every time you power on MiSTer, it will boot to the main MiSTer.ini file, but allow you the option to swap between the main and alternative ini’s!

To switch between modes, simply hold the following button combo’s after it boots:
Back + Right =  MiSTer.ini
Back + Left =  MiSTer_alt_1.ini
Back + Up  =  MiSTer_alt_2.ini
Back + Down =  MiSTer_alt_3.ini
EDIT 2021/06/12:  If you’ve updated your MiSTer, you can now select the alternate files by entering the menu, pressing left and choosing from each of the options listed there.  It still might be easiest to change it “blind” with the button combo, so you can power on your MiSTer first, set it to the alt file that enables Direct Mode, then power on your TV or monitor.

When you power the MiSTer off and back on, it will default to the original MiSTer.ini, however soft-resetting to the main menu retains the alternative .ini file.  This is handy for implementing the changes required for Direct Video, as well as adding things like the custom modelines atrac17 has been working on.  Keep in mind that if you’re using this feature along with Direct Video mode, you’ll want to power on your CRT after you’ve booted and switched modes.

How does it work?

Direct Video is a way of sending “super resolution” 240p:  A trick that sends a horizontal signal wide enough for most HDMI chips to understand, while sending a vertical signal that a standard 15KHz CRT can read (something like 1174×253).  The CRT doesn’t know the difference, the same way it doesn’t know the difference between horizontal resolutions of a console like the PlayStation;  As long as the vertical signal is correct, the entire horizontal signal is drawn.

This is done with zero lag added and you can potentially even use light guns via a SNAC adapter.  To enable this mode, Simply add “direct_video=1” to your MiSTer.ini and this mode will be enabled.  You’ll also want to set “composite_sync=1“, assuming the goal is RGBs (more info below).  That’s it!

Not all digital-to-analog converters (DAC’s) or HDMI splitters can understand this signal, but if you find one that does (the ones linked above should work), the image will look exactly like the original console resolution.  If you split the HDMI output before converting it to analog, you should be able to capture the signal, but it will be stretched horizontally;  No problem, just use your capture software to re-size to an integer of the original resolution and it’ll look perfect.  I demonstrated this in my CPSHDMI video (which also offers a super resolution option) at 8:54:

RGB Output:

Using Direct Video with an HDMI to VGA adapter will allow you to send a 15KHz signal – But there’s more!  Adding the second change noted above (composite_sync=1) will convert the output to be compatible with RGBs (not just RGBHV)!  I’m not going to pretend to know how this is done, but I tested three different HDMI to VGA DAC’s with *VGA to BNC cables and all worked perfectly connected directly to my Sony PVM RGB monitor, no sync combiner required.  I’d still recommend using the HD15-2-SCART connectior mentioned above, both for cost and ease-of-use, but you can use it in either mode and it’ll be perfectly safe.

BEWARE OF VOLTAGE!!:  I need to take a moment to remind everyone that the sync voltage of these adapters will be TLL-level.  That should be compatible with PVM’s and BVM’s (always check your service manual!), but if you’re connecting to SCART equipment, a 470ohm resistor will be required or you can destroy your equipment.

That means anyone looking to connect their MiSTer directly to an RGB monitor only needs a cheap DAC and either a *VGA-to-BNC cable, or a standard MiSTer SCART cable, which should have a resistor on the SCART line as mentioned above.  While I prefer the features of a full MiSTer setup with an I/O board, this is a great option for people on a budget, or people who just won’t use their CRT that often.

As stated above, if you’re looking to use the alternative ini switching, make sure to power on your RGB monitor after booting the MiSTer and switching modes.

*You can either use a VGA to 4BNC cable, or a VGA to 5BNC cable and just leave the 2nd sync wire disconnected.

Component Video Output:

Using an HDMI to YPbPr converter isn’t currently supported.  You can use an HDMI to VGA converter, set some options and make a custom cable if you’d like and instructions are in the Direct Video page:

This is fairly complicated though, so if you need component video (maybe for a consumer-grade CRT?), I strongly recommend just purchasing an I/O board and a basic VGA to Component passthrough cable.

VGA CRT Monitors:

If you’d like to connect a CRT VGA monitor, Direct Video is also suggested, as well as toggling one more option:  forced_scandoubler=1

This doubles the original signal from 15KHz to 31KHz, without using the built-in scaler at all.  This will get the most pure signal from the cores, while making them compatible with standard CRT VGA monitors.

If for whatever reason that mode doesn’t work for you (you’re using a 16:9 CRT without an aspect ratio option!?), you can just set the HDMI’s output to 640×480:  Remove the direct video line and set the video mode to 6 in the MiSTer.ini file (video_mode=6).

Setting the video mode to 6 won’t look as good on VGA monitors as the first method, however it’ll be compatible with all HDMI devices including splitters and DAC’s.  In fact, setting the HDMI output to 480p is an easy way to interface any HDMI device to a VGA monitor, including consoles from Analogue, PC’s and even a Raspberry Pi:  Simply set the resolution to 640×480 and then connect the DAC.

Full vs Limited Colors:

Regardless of which of the above methods you’re using, you might run into an issue with the colorspace.  See, some of these DAC’s process the full range of RGB colors, while others are limited.  If you run into this issue, games might seem too bright, but you should be able to correct the issue by setting the hdmi_limited option in the .ini file you’re using with a DAC:

    • Full Range (0-255): hdmi_limited=0.
    • Limited Range (16-235): hdmi_limited=1.
    • Limited Range common DAC variant (16-255): hdmi_limited=2.


So, that’s it!  All the extra information might make this all seem a lot more complicated than it really is!  As long as you understand the warnings and what to do if you run into problems, it’s basically:  Create a second .ini, buy a cheap DAC + cable and start gaming on your RGB monitor!

Liked it? Take a second to support Bob on Patreon!