Commit Graph

108 Commits

Author SHA1 Message Date
rsn8887
0dc30fe656 Revert "Fixed potential buffer overruns when adding too many .ini array elements. (#923)" (#947)
This reverts commit 59916ebc52.
Max is not an array size, it is the maximum allowed
entry value.
2025-01-07 17:37:41 +08:00
Steve Robb
59916ebc52 Fixed potential buffer overruns when adding too many .ini array elements. (#923)
Co-authored-by: Steve Robb <softnfuzzyrobb@gmail.com>
2024-10-10 20:07:05 +08:00
Steve Robb
f543dddcb1 Allow overriding of array variables by a different section 2024-10-07 12:43:58 +08:00
Sorgelig
e61b111858 Add INI option Main for custom binary. 2024-03-25 23:36:19 +08:00
Sorgelig
bed1ca424a Set debug=0 by default. 2024-02-13 02:08:09 +08:00
zakk4223
96f3f685e4 Don't leak /dev/null file descriptor (#874) 2024-02-13 01:31:12 +08:00
Sorgelig
11d35160ff INI: add DEBUG option to disable logging to console. 2024-02-12 00:07:14 +08:00
Sorgelig
18b2ee21e9 video: send SPD info frame in direct_video mode. 2023-12-23 06:48:31 +08:00
Sorgelig
0419387578 video: support for direct_video=2 mode (experimental). 2023-12-20 21:37:55 +08:00
Rikard Bengtsson
542b6f4d73 Added dead zone configuration (#857)
User can define dead zone by device identifier and a radius.
2023-12-01 17:51:05 +08:00
Javier Rodas
4236d70433 Add a second JAMMA quirk to support 4-player JAMMA-VERSUS with two JammaSD/J-PAC (or similar USB JAMMA) controller interfaces. (#811) 2023-09-05 05:44:00 +08:00
Alexey Melnikov
8c3c28e29a OSD Locking (#794)
Add osd_lock and osd_lock_time config options
When osd_lock is set it specifies a sequence of button pressed that must be pressed in order to gain access to the OSD while running a core.
osd_lock_time is the time (in seconds) before you will be prompted again for the unlock code after you have closes the OSD.

Co-authored-by: Martin Donlon <github-martin@donlons.com>
2023-08-03 15:03:47 +08:00
Sorgelig
d5f41db979 input: support for multiple input devices mapping per player. 2023-05-28 21:41:58 +08:00
Sorgelig
872b433ed5 input: add selective unique mapping. 2023-05-22 20:18:24 +08:00
Sorgelig
d6eefdcbdc input: make unique mapping per port. 2023-05-21 02:28:34 +08:00
Alexey Melnikov
0ebf137532 input: Controller unique mapping (preliminary)
Add ini option `unique_mapping` which makes controller mappings unique to the physical port the controller is connected to.
Calculates a uint32_t unique_hash for each device during enumeration.

Co-authored-by: Martin Donlon <github-martin@donlons.com>
2023-05-21 02:14:27 +08:00
Sorgelig
5be5b35e82 Support for named INI files. 2023-02-25 20:34:37 +08:00
Matheus Fraguas
0c03e569a8 Support to use mouse wheel as spinner. (#744) 2023-02-22 04:13:20 +08:00
MikeS11
60c9f806ea Video: Y/C Update (#743)
Update Y/C Parser
- Added the Y/C tuned phase inc's into the yc.txt file.
- Fixed an issue with the parser handling spaces in the core name
Removed force SOG on CVBS / SVIDEO Modes
2023-02-19 04:22:32 +08:00
Sam Hardeman
6a8eda7d43 Add functionality to change MaxCLL (peak nits) and MaxFALL (avg nits) + HDR with HDMI limited bugfix (#740) 2023-02-12 23:54:32 +08:00
Sorgelig
6dcd754ac9 video: support for PAL-60 and PAL-M modes for S-Video and CVBS. 2023-02-08 22:53:45 +08:00
Sorgelig
a91f03d56e Support for YC phase_inc override. 2023-02-08 20:47:35 +08:00
Sorgelig
8d735d4e77 Add control for S-Video/CVBS module. Add vga_mode parameter into INI. 2023-02-08 10:22:50 +08:00
Martin Donlon
4d0caf154b video: default preset and reset option.
`preset_default` option added to ini. Filename is relative to the presets/ path.

"Reset to defaults" option added to video processing menu which will delete the config files and reload the default configuration.
2023-02-07 02:55:52 +08:00
Sam Hardeman
bfc6dfde3d video: Re-ordering of HDR options to make HLG default + clean-up in ini explanation (#730) 2023-01-15 04:37:52 +08:00
Sam Hardeman
2b279d1488 video: HDR display/output support (BT2020 / DCI P3) (#718)
* Merge branch 'hdr' of https://github.com/wickerwaka/Main_MiSTer into feature-hdr

Merged in wickerwaka's old HDR branch and integrated the BT2020 and DCI P3 color space conversion matrices. Changed "hdr" option to be a selection of matrix instead of saturation option.

* Add HDR example to MiSTer ini
2022-12-22 02:43:15 +08:00
Sam Hardeman
3214046c50 Feature: HDMI color controls via tranceiver CSC (#715)
* Addition of HDMI color controls (brightness, contrast, saturation, hue, gain, offset) that can be tweaked via MiSTer.ini (examples in-file). These controls are used to construct a matrix for the HDMI chip's color space converter. Due to the nature of this change, HDMI limited and YCbCr options have been reworked and combined into the color matrix routine (hdmi_config_set_csc)

* Change cc_ prefix to video_, as per suggestion and inline with existing video options.
2022-12-21 13:38:47 +08:00
Sorgelig
2d40444af0 ini option to disable autofire. 2022-11-28 20:46:42 +08:00
birdybro
c24a7ac742 Fix no_merge_vidpid parsing bug (#712) 2022-11-28 20:04:30 +08:00
Sorgelig
f95046edaf Debug print of current config. 2022-11-24 20:52:05 +08:00
Sorgelig
6bda023db8 Add INI option for permanent controller assignment to specific player. 2022-10-31 19:53:50 +08:00
Sorgelig
f49b648dea cfg: fix integer parsing. 2022-10-09 16:55:15 +08:00
Martin Donlon
801a5ea0d2 If errors are detected in INI settings display an info message for 5 seconds at core startup. (#696)
Added `cfg_error` function for reporting errors in the ini.
Report errors when parsing video_mode information.
Report out of bounds settings.
Report unknown settings.
Detect numeric parse failures.
2022-09-25 04:32:39 +08:00
Martin Donlon
a845f8407f video: Add support for [arcade_vertical] section (#691) 2022-09-11 15:12:46 +08:00
Sorgelig
3192baa0f3 Add video_off timeout in MiSTer.ini 2022-08-04 02:43:58 +08:00
Sorgelig
5de6c5e231 video: VRR support for core, some code formatting. 2022-06-29 08:44:30 +08:00
zakk4223
0a5488d48f video: send freesync/VRR enable frames if the display supports it
* Support enabling VRR on displays that advertise it

* Disable SPD and Spare packet registers when they aren't needed. Update ini

Co-authored-by: Zakk <zakk@rsdio.com>
2022-06-26 22:57:09 +08:00
Martin Donlon
db9b8676f9 video: Removed loop from vscale calculations, calculate max horizontal and (#636)
vertical scale and use the minimum.

vscale_mode has been changed to make it more reliable.

vscale_mode=4 - Generate modes that match the cores aspect ratio.
Generally better, will work with more cores and produce most optimal
resolutions, but will not be compatible with displays that always
stretch the image to fill.

vscale_mode=5 - Generate modes that match the original display aspect
ratio, if the core needs a wider aspect then the resolution is not
changed. Compatible with a wider range of displays.

Updated INI with a clearer description.

Removed mode 6 since it was not being used and adjusting display width
doesn't enable integer horizontal scaling.

uh undo
2022-06-08 16:40:06 +08:00
Martin Donlon
b5f5c35cd7 video: Change refresh min/max to a floating point value (#625) 2022-05-27 22:40:25 +08:00
Sorgelig
18785a56d8 video: revert vscale_mode=4 and add vscale_mode=6. 2022-05-23 03:18:49 +08:00
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