All Projects → atrac17 → MiSTer_Integer_Modelines

atrac17 / MiSTer_Integer_Modelines

Licence: GPL-3.0 license
This repository contains video modes for FPGA cores on the MiSTer platform, tools and information for creating custom hybrid scaling integer profiles for the OSSC, and video modes for the OSSC DEXX-Pro Lite.

Projects that are alternatives of or similar to MiSTer Integer Modelines

save-file-converter
Converter for retro console save files found around the Internet. All common formats for NES/SNES/GBA/N64/TG16/SMS/Genesis/Neo Geo/PS1 supported. Decrypts PSP saves. Converts to and from Retron 5 and MiSTer
Stars: ✭ 56 (-31.71%)
Mutual labels:  misterfpga
EDSAC
FPGA Verilog implementation of 1949 EDSAC Computer with animated tape reader, panel, teleprinter and CRT scope
Stars: ✭ 28 (-65.85%)
Mutual labels:  misterfpga

Integer Modelines for MiSTer / OSSC DEXX-Pro Lite


Please read all information provided in the repository thoroughly.

  1. Basic Information
  2. Using Non-Standard Video Modes To Produce Hybrid Scaling
  3. MiSTer Provided Scaling Methods
  4. MiSTer.ini Information Related To This Repository
  5. MiSTer.ini Recommended Settings
  6. OSSC DEXX-Pro Lite Add-On Provided Scaling Methods
  7. OSSC DEXX-Pro Lite Add-On Custom_Scaling.txt Information
  8. Integer Video Mode Calculation Examples
  9. Tools Utilized To Create Integer Video Modes
  10. Tools Utilized To Create New EDID Resolutions
  11. Console / Handheld Video Modes & Timings
  12. Arcade Video Modes & Timings
  13. Video Modes & Timings Templates
  14. Repository License
  15. Developer Support

Basic Information:

  • Video Modes designed for monitors that upscale the provided resolution from the DE-10 Nano. This is known as Display Scaling; a hybrid scaling technique.

  • Video Modes designed for LCD displays with a resolution of 1280x1024 and 5:4 aspect ratio; these video modes utilize step-integer scaling.

  • Video Modes designed for 120 Hz capable displays; compatible with Black Frame Insertion (BFI) options from the DEXX-Pro or MiSTer framework (BFI for the DE-10 Nano is currently a work in progress).

  • Preconfigured MiSTer.ini / custom_scaler.txt files containing sensibly-grouped sets of video modes and timings available for download with all necessary documentation corresponding to the provided video modes.

Using Non-Standard Video Modes To Produce Hybrid Scaling:

MiSTer integer-scales the content up to the full height of the provided video mode (defined as a perfect integer size of the original content), the display scales the largest integer image possible by non-integer scaling the provided resolution to the displays native vertical resolution. This fills the entire screen height. Non-integer scaling is minimized utilizing this method; thus, scaling imperfections are drastically reduced, becoming unperceivable to the human eye.

Cavaet:

Not all displays are compatible with non-standard video modes. Your display may not accept all or any of them. Displays supporting Variable Refresh Rate (VRR), Nvidia G-Sync, or AMD FreeSync are likely to be compatible.

MiSTer Provided Scaling Methods:

Integer scaling yields pixel-perfect upscaling, but also means the image is unable to fill the display's full height; known as vscale_mode=1. Step-integer scaling is available; scaling is done at 1/2 or 1/4 of the provided resolution; known as vscale_mode=2 and vscale_mode=3.

Non-integer scaling fills the displays height, but introduces scaling artifacts (uneven scanlines, "shimmering" during vertical scrolling, etc); known as vscale_mode=0.

MiSTer's "auto display scaling" yields similar results; the algorithm used for Coordinated Video Timings (CVT) is calculated different and video modes do not correspond to the native refresh rate from the provided content. The basis for "auto display scaling" is sourced from this repositories previous information. Visit MiSTerFPGA MKDocs for further information.

MiSTer.ini Information Related To This Repository:

The defaults for pre-configured MiSTer.ini files provided are:

video_mode=0    (720p)
vscale_mode=1   (Integer Scale Only)
vsync_adjust=1  (HDMI vsync refresh rate adjusted to match core)

The calculated video modes provided will also function with vsync_adjust=0 (retaining the native refresh rate) and vsync_adjust=2 (this will deviate from the native refresh rate); vscale_mode=0 and vsync_adjust=0 require extensive testing. End users will not experience issues when scaling (uneven scanlines, "shimmering" during vertical scrolling, etc) using the calculated modelines provided.

Due to the horizontal limitation of the DE-10 Nano's scaler and ADV7513, video modes exceeding the horizontal capability utilize -1x for the horizontal scale. This will not affect the aspect ratio on your displays that take advantage of the video mode provided. These are display dependent; nothing is a universal standard.

Integer-step scaled video modes are available for 1280x1024 LCD displays. Integer step-scaled video modes specify the vscale_mode in the pre-configured MiSTer.ini file. When utilitzing integer scaled video modes set the defaults in the OSD for pre-configured integer step-scaled MiSTer.ini files provided:

aspect ratio: full screen
custom_aspect_ratio:XX:XX

The custom aspect ratio is set for the contents Display Aspect Ratio (DAR); this is the correct aspect ratio for a modern display. When utilizing integer-step scaled video modes with aspect ratio: full screen in the MiSTer OSD, this properly displays the provided video mode for a 5:4 aspect ratio display (1280x1024).

Compatible with Variable Refresh Rate (VRR) settings supported by MiSTer. The default setting in the pre-configured MiSTer.ini files provided:

vrr_mode=0
vrr_freesync_min_framerate=46
vrr_freesync_max_framerate=120

End-Users need to select their vrr_mode as each display will be different. Visit MiSTerFPGA MKDocs for more information on VRR support and vsync_adjust.

MiSTer.ini Recommended Settings:

In-conjunction with the provided video modes and settings defined in the pre-configured MiSTer.ini files the following options are recommended; results may vary based on display type. These settings will result in vsync_adjust=2 keeping the native core timing based on the calculated video mode.

120Hz Capable Displays

vrr_mode=1
vrr_freesync_min_framerate=46
vrr_freesync_max_framerate=120
vsync_adjust=2

60Hz Capable Displays

vrr_mode=1
vrr_freesync_min_framerate=46
vrr_freesync_max_framerate=60
vsync_adjust=2

75Hz Capable Displays

vrr_mode=1
vrr_freesync_min_framerate=46
vrr_freesync_max_framerate=75
vsync_adjust=2

OSSC DEXX-Pro Lite Add-On Provided Scaling Methods:

  • WIP; OSSC DEXX-Pro Lite Add-On being assembled by cyo.the.vile

OSSC DEXX-Pro Lite Add-On Custom_Scaling.txt Information:

  • WIP; OSSC DEXX-Pro Lite Add-On being assembled by cyo.the.vile

Integer Video Mode Information

Integer Video Mode Calculation Examples:

Integer scaled modelines for HDMI displays are based off the vertical refresh rate (found by calculating the pixel clock, horizontal total, and vertical total) and visible resolution.

Integer scaled modelines for CRT displays are based off the vertical refresh rate (found by calculating the pixel clock, horizontal total, and vertical total), visible resolution and providing the total resolution.

Visible resolution plus horizontal and vertical blanking equal the horizontal and vertical total lines for the specified video modes.


Vertical Refresh Rate Formula

Pixel Clock

Horizontal
Resolution (Total)

Vertical
Resolution (Total)

Refresh Rate Formula

Refresh Rate

Horizontal
Resolution (Visible)

Vertical
Resolution (Visible)

8.00 MHz

512

256

8 / 512 / 256 =
0.00006103515625

61.035 Hz

384

224


Coordinated Video Timings-Standard Blanking (CVT-Standard VESA-2013-3 v1.2) based off the calculated vertical refresh rate, utilizing negative sync polarity on the horizontal, positive sync polarity on the vertical, and the total resolution.

Total resolution is required for accurate modeline calculations based off the pixel clock. For this example, the horizontal total is 512 lines and the vertical total is 256 lines.


CVT-Standard Modeline Calculation (Manual)

Active Resolution (Visible)
hact / vact

Front Porch
hfp / vfp

Sync Width
hs / vs

Back Porch
hbp / vbp

Pixel Clock
fpix

video_mode=hact,hfp,hs,hbp,vact,vfp,vs,vbp,fpix

384 / 224

16 / 3

32 / 10

80 / 19

8.000

video_mode=384,16,32,80,224,3,10,19,8000


Coordinated Video Timings-Reduced Blanking (CVT-RB; VESA-2013-3 v1.2) based off the calculated vertical refresh rate, utilizing positive sync polarity on the horizontal, negative sync polarity on the vertical, and the visible resolution.

The pixel clock for 4x integer scaling in the example below is exact (native refresh rate); in-line with reduced blanking standards lowering the overall pixel clock. It is not 1/4 rounded using an algorithm like "auto display scaling".


CVT-RB Modeline Calculation (4x Integer Scale)

Active Resolution (Visible)
hact / vact

Front Porch
hfp / vfp

Sync Width
hs / vs

Back Porch
hbp / vbp

Pixel Clock
fpix

video_mode=hact,hfp,hs,hbp,vact,vfp,vs,vbp,fpix

1536 / 896

48 / 3

32 / 10

80 / 13

95.442

video_mode=1536,48,32,80,896,3,10,13,954429


Tools Utilized To Create Integer Video Modes:

Tools Utilized To Create New EDID Resolutions:

  • Dump EDID by NirSoft; quick tool for finding vendor specific information about your display.

  • EDID Repository using the information above, locate your display in the digital housed in this repository for proper EDID information.

  • EDID/DisplayID Writer by ToastyX; follow the instructions provided (USE AT YOUR OWN RISK). Used to create resolutions (i.e. 2048x1440, 1920x1440) that exceed the horizontal resolution of 2048; assists with EDID parsing.

Console / Handheld Video Modes & Timings
For MiSTer cores & the DEXX-Pro Lite Add-On

Arcade Video Modes & Timings
For MiSTer cores & the DEXX-Pro Lite Add-On

Video Modes & Timings Templates
For MiSTer cores & the DEXX-Pro Lite Add-On

License

This repository and project is licensed under the GNU General Public License v3.0. If you utilize the information elsewhere, reference the source repository and provide credit to the author(s).

Support

Please consider showing support for this and future projects on my Patreon. While it isn't necessary, it's greatly appreciated.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].