Commit Graph

68 Commits

Author SHA1 Message Date
Martin Donlon
edcb3fcefc video: Vertical Scaling Changes (#608)
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.
2022-05-21 01:48:19 +08:00
Sorgelig
d57ed83fbe video: detect default video resolution and dvi mode from EDID. 2022-05-20 21:34:44 +08:00
Sorgelig
13ecfc748c video: make HDMI game mode optional. 2022-05-12 06:15:57 +08:00
Sorgelig
5a6ecd790b input: initial support for wheels. 2022-04-21 04:22:39 +08:00
Thomas Sowell
f5fd16c26e Override configuration based on video mode (#567)
* Override configuration based on video mode

Configuration options can now be overridden based on the core's video
mode.

The config parser now supports sections with names in the format
"video=WIDTHxHEIGHT[@VREFRESH]".  When a core changes video mode, MiSTer
reloads the config file and checks for a section matching the new mode.
If one is found, the options in the section override options in the
MiSTer/core sections.

MiSTer will look for a section matching the width, height, and vertical
refresh rate first.  If none is found, it will fall back to a section
matching the width and height but not specifying a refresh rate.  If
there is still no match, no overrides will be used.

Also, VREFRESH must match exactly the output from video_info or the
logs.  To match 720x400 31.48KHz 70.1Hz, the section title would need to
be [video=720x400@70.1].

* Move video section variables out of cfg_t
2022-03-17 14:46:57 +08:00
zakk4223
6e18651521 Add support for rumble data from hps_io. Fix data truncation in spi_uio_cmd (#568)
Co-authored-by: Zakk <zakk@rsdio.com>
2022-03-13 15:21:19 +08:00
Sorgelig
f1b693c512 INI option to wait for specific mount before core start. 2022-02-17 02:40:59 +08:00
Sorgelig
98403213eb cfg: add ~ to allowed chars. 2022-01-23 03:37:06 +08:00
Sorgelig
21e35bbf2f video: support 64 phases for scaler, separate filters for horizontal/vertical/scanlines. 2022-01-05 21:22:04 +08:00
Sorgelig
547f510355 If osd_timeout=0 then don't timeout. 2021-12-22 07:26:45 +08:00
Sorgelig
4cee9159d0 Support for loadable Shadow Masks. 2021-11-26 21:23:21 +08:00
sorgelig
53c0a93948 Add bt_reset_before_pair INI option. 2021-09-17 01:17:50 +08:00
sorgelig
19eef030a8 input: support for joycon in combined/split modes, bt_auto_disconnect ini option. 2021-08-17 05:24:32 +08:00
sorgelig
1f9a325602 ini: spinner_axis option. 2021-07-26 22:45:44 +08:00
sorgelig
8ca10b48a7 INI option log_file_entry. 2021-07-15 18:30:12 +08:00
sorgelig
860ff14d3f Add milti-instance no_merge_vidpid INI option. 2021-07-08 15:05:19 +08:00
sorgelig
45da7eda57 Support additional core names (+core) in INI section. 2021-03-28 03:48:12 +08:00
sorgelig
c0c7c05dfa Support original core name and common arcade section in ini. 2021-03-26 14:53:42 +08:00
sorgelig
4b76e1f513 ini: support spaces in values. 2020-11-17 19:50:18 +08:00
sorgelig
471372f5ce Option for default scaler and audio filters in INI file. 2020-11-17 18:09:43 +08:00
sorgelig
17f909ab1f input: fix spinner_throttle range 2020-11-17 15:30:51 +08:00
sorgelig
70eb94355c input: support spinner from mouse. 2020-11-14 15:47:52 +08:00
sorgelig
d93481c26c INI options for custom aspect ratio. 2020-11-01 20:34:36 +08:00
paulb-nl
ddb3a8847e Add setting to disable merge for specific VID/PID.
For example J-PAC in dual X-input mode with VID/PID 045e:028e
2020-08-16 04:29:13 +08:00
sorgelig
772d3a71eb Add shared_folder INI option. 2020-07-03 05:52:19 +08:00
sorgelig
19cf3890d5 INI option to disable logo in Menu core. 2020-06-18 10:54:38 +08:00
sorgelig
6d4ea9983a input: merge jammasd and jpac/ipac into a common option. 2020-06-08 22:28:18 +08:00
bdlou
ee0f873081 Add J-PAC/I-PAC support
* Update cfg.cpp

* Update cfg.h

* Update input.cpp

Add support for J-PAC/I-PAC

* Update MiSTer.ini

Added J-PAC/I-PAC VID/PIDs to ini
2020-06-08 21:49:31 +08:00
sorgelig
cb9882203d Fix and tweak bootcore feature. 2020-06-08 07:22:05 +08:00
sorgelig
e118e4f3cb display 2 lines for long files. 2020-05-11 15:40:18 +08:00
sorgelig
bd9ea67c63 Add sniper mode option in ini. 2020-05-02 15:12:19 +08:00
sorgelig
ce45d3f2da input: support for JammaSD to joystick translation. 2020-04-24 07:50:58 +08:00
sorgelig
5a4df1c8a8 Always enable volume control. 2020-03-17 01:27:27 +08:00
sorgelig
f9b5b9bbc3 Support up to 3 alternative INI files (Back+DPAD in OSD). Some refactoring in cfg/ini parsing. 2020-03-17 00:20:09 +08:00
sorgelig
dda937af89 INI option to limit display refresh rate. 2020-03-12 00:40:19 +08:00
sorgelig
09d24f4091 input: INI option (controller_info) to display/disable buttons map upon first press. 2020-02-29 01:03:22 +08:00
sorgelig
e4d36a5548 Option in ini file to enable the recents. 2019-12-29 06:54:42 +08:00
sorgelig
b9e8ecd235 fix vscale_border type. 2019-12-04 21:22:49 +08:00
sorgelig
8ca087b7e5 Increase vscale_border limit to 399. 2019-12-04 19:37:49 +08:00
sorgelig
42f63deaee Allow fb_size=0 (automatic). 2019-11-02 08:54:06 +08:00
sorgelig
e6250a6db4 input: option to support positional default map. 2019-10-23 22:01:20 +08:00
sorgelig
f52d81f7bc OSD rotation option. 2019-10-03 01:37:57 +08:00
sorgelig
c24b973fc4 alt mode 2019-09-17 02:51:31 +08:00
sorgelig
20b52ee346 ini_parser: remove redundant parameter. 2019-08-31 16:17:13 +08:00
sorgelig
47400adef6 Support for hdmi_limited=2 (16-255). 2019-08-31 06:59:49 +08:00
sorgelig
988355c470 Experimental direct_video option in INI. 2019-08-20 22:59:34 +08:00
sorgelig
8c7560209b vga_sog option. 2019-06-06 01:20:43 +08:00
Martin White
e5c3b75167 Revert "Adds quiet boot option to hide menu duing countdown" 2019-06-04 23:26:47 +01:00
sorgelig
97866de58d Merge pull request #87 from Guddler/quiet_boot
Adds quiet boot option to hide menu duing countdown
2019-06-04 23:31:23 +08:00
Martin White
bae754cec2 Adds quiet boot option to hide menu duing countdown 2019-06-04 15:25:05 +01:00