mirror of
https://github.com/MiSTer-devel/Main_MiSTer.git
synced 2026-04-12 03:04:02 +00:00
edcb3fcefce4e22c37b4bddd6dd8032f7cbfdb6d
Integer Resolution Scaling Generate a video mode whose vertical resolution is an integer multiple of the cores vertical resolution. The video mode set via the `video_mode` parameter is considered the maximum resolution. There are two modes of operation: vscale_mode=4 - Both vertical and horizontal resolution are modified. The horizontal resolution is scaled in propotion to the vertical, so the aspect ratio is maintained. This will be most suited to VGA CRTs that expect a specific aspect ratio signal. vscale_mode=5 - Only the vertical resolution is modified. This will be suitable for most modern LCD/OLED displays. The additional horizontal resolution provides more space for wide aspect ratio cores. Video Mode Calculation CVT timing calculations are used to generate the modified video modes for Interger Resolution Scaling, this mode generation is also exposed as an additional way to specify video modes in the MiSTer.ini. Modes can be specified with just the width, height and refresh rate: `video_mode=1920,1200,60`. Whether to use the original CVT or the reduced blanking CVT-RB timings can be specified with an optional flag, e.g. `video_mode=1024,768,60,cvt`. Additionally the sync polarities can also be expressed using flags now, e.g. `video_mode=1280,110,40,220,720,5,5,20,74250,+hsync,-vsync` Code Changes More functionality was broken out of `video_mode_adjust`. `video_mode_select` determines what the correct base video mode is based on the timing and vsync_adjust configuration. The mode selected there is then passed to `video_resolution_adjust` which modifies it based on the integer resolution scaling selected. Other than that the functionality of `video_mode_adjust` remains the same. The `video_calculate_cvt` function was added to calculated video mode timings. `parse_custom_video_mode` was changed to support the additional flags. It now uses `str_tokenize` to split up the input string so it is more easy to manage the different variations of parameter counts allowed for the modes. `vmode_custom_param_t` was added to alias the items in the vmode_custom_t instead of using raw array indexing everywhere. `str_util.h/.cpp` added to provide some safer and easy to use string functions. `strcpyz`, `strncpyz`, `sprintfz` all ensure that the resulting string is null terminated and doesn't overrun memory.
Main_MiSTer Main Binary and Wiki Repo
This repo serves as the home for the MiSTer Main binaries and the Wiki.
For the purposes of getting google to crawl the wiki, here's a link to the (not for humans) crawlable wiki
If you're a human looking for the wiki, that's here
Languages
C
57.5%
C++
42.3%
HTML
0.1%