Both modes ensure there is enough horiztonal resolution to fit the core.
They do this by reducing the vertical resolution as needed. Mode 5 keeps
the horizontal resolution fixed, which uses more bandwidth but reduces
the amount of resolution switches that can occur and prevents the OSD
from getting to narrow in rotated arcade cores.
Initialize the video_info with the current data if the fb_crc changes to
ensure it has valid data for the resolution if the resolution has not
changed.
Cores with Directvideo and composite sync don't seem to need
VSync aligned to HSync when pixel repetition is disabled which
saves time and effort adjusting cores.
The polarity setting is shared between analog and digital output, so
changing it when calculatinga video mode can interfere with analog
video output. If someone has a need to use a specific polarity they
can specify it as part of the video_mode.
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.
When a CRT lightgun starts reporting out-of-screen coordinates,
the last good on-screen coordinates are retained and passed through
for 50 ms. This improves GunCon 2 performance on NES, and generally
makes CRT-based guns a bit more reliable in games with a lot of dark
areas.
* PSX: improve game ID detection to support more games
This adds game ID prefixes for some demos, which fixes region detection
for those games.
* PSX: implement region detection based on the license string
This fixes region detection for many games, even if the game ID is not
properly detected.
* Fix PC Engine CD player controls ( #585 )
Correct LBA-MSF conversion for absolute offset in the SUBQ request function (relative remains without offset)
* Fix issue in PC Engine Tanjou Debut ( #594 )