video_mode INI setting supports several different methods of specifying the video mode.
video_mode setting is specified, MiSTer will attempt to determine the correct video mode using EDID information from the display device. This will only work for devices connected to the HDMI port. If a valid video mode cannot be determined then the default 720p mode will be used.
Video Mode Presets (video_mode)
MiSTer has 15 built in video mode presets ranging from 0-14. These presets cover a lot of common display modes used by televisions and computer monitors. Here's an example video_mode setting and a table below to explain what each of the preset modes are:
|Number||Resolution||Refresh (Hz)||Aspect Ratio||Name|
|7||1280x720||50||16:9||HD 720p PAL|
|9||1920x1080||50||16:9||FHD 1080p PAL|
Custom Video Modes
A custom mode can be set by specifying the width, height and refresh rate like so:Pixel repetition can be used to increase the resolution further, but it also has limits.
The VESA Coordinated Video Timings standard is used to calculate the timing information for the requested video mode. By default the reduced blanking version of the standard is used. This is compatible with most flat panel displays but may not be as well supported on older displays and CRT monitors. You can use regular CVT timings by adding the
cvt flag to the end of the video mode:
Video mode timing can be fully specified using a video modeline which consists of nine values defining the horizontal timing, vertical timing and pixel clock.
vactdefines the active (visible) size of the video mode in horizontal and vertical pixels, respectively.
hbpdefines the duration of horizontal front porch, sync and back porch in pixels.
vbpdefine the same properties, but for the vertical timing. Finally, the
fpixvalue is the frequency of the pixel clock in KHz (pixels clocks are usually specified in MHz, so multiply the Mhz value by a 1000 to get the value in KHz).
MiSTer modelines are similar to XFree86 modelines, but the information is expressed slightly differently. You can convert an XFree86 modeline to a MiSTer one using the custom video mode tool by morf77 available here which can be used in conjunction with a modeline calculator.
Some additional flags can be added to custom modes and modelines to modify the behavior.
-hsync- set the horizontal sync polarity
-hsync- set the vertical sync polarity
pr- use HDMI pixel repetition (custom modelines only)
cvt- use normal CVT timing (custom mode only)
cvtrb- use reduced blanking CVT timing (custom mode only)
HDMI Pixel Repetition (pr)
HDMI pixel repetition enables MiSTer to output a higher resolution video signal without using additional resources or requiring higher clock speeds. It does this by instructing the ADV7513 HDMI transmitter to duplicate each pixel that it sends to the display. This does not increase the fidelity of the final image, in most cases it will reduce it, but it does enable a wider selection of video modes.
MiSTer is limited to a maximum horizontal resolution of 2048 pixels and a maximum pixel clock of 210Mhz. This is enough to display a 2048x1536 image (209Mhz, iPad resolution), which is the maximum native resolution supported. It is also enough for 1920x1440 (184Mhz) which is a non-standard 4:3 resolution supported by some displays. The more commonly supported 2560x1440 mode is out of reach both because of its large horizontal resolution and because of its 240Mhz pixel clock.
Pixel repetition makes a mode like 2560x1440 possible by lowering the horizontal resolution to 1280 pixels which lowers the pixel clock to 120Mhz. The 1280x1440 image that the MiSTer scaler produces is stretched horizontally by the ADV7513 so the signal that the display receives is the full 2560x1440.
An update to the framework is required to support the non-uniform scaling for the cores output and pixel repetition is only supported for cores that have been updated. Older cores will have their output set to 1920x1080 if a mode requiring pixel repetition is requested.