Commit Graph

153 Commits

Author SHA1 Message Date
Alexey Melnikov
615a69b616 Support for CEC
* hdmi_cec

* Improve HDMI CEC startup

* hdmi_cec

* Improve HDMI CEC startup

* Use ADV7513 interrupt registers for CEC

Set ADV7513 main 0xE1 to the CEC I2C map address, 0xE2 to 0x00 to power the CEC block, and 0xE3 |= 0x0E for CEC control setup.

Keep HPD forced high through main 0xD6 = 0xC0 after the startup pulse, but clear main 0x94[7] so HPD does not drive the shared HDMI interrupt line.

Clear main 0xA1[6] so the monitor-sense/video-active block stays powered; ADV7513 interrupt status registers 0x94-0x97 are only valid while that block is alive.

Set main 0x95 = 0x07 to enable only CEC RX-ready interrupts, use main 0x97 to clear RX/TX interrupt latches, and clear 0x96/0x97 at init.

Read CEC RX-ready from CEC map 0x49, keep CEC RX enabled with 0x4A = 0x08, release consumed RX slots through 0x4A, and remove fallback polling of RX length registers 0x25/0x37/0x48.

Use main 0x97 bits for CEC TX done/retry/arbitration status, keep CEC TX disabled through 0x11 except while sending, and set the CEC clock divider 0x4E = 0x3D.

Gate RX handling on fpga_get_hdmi_int() so normal CEC polling no longer performs DDC/CEC I2C reads unless the FPGA HDMI interrupt bit is asserted.

Reply to CEC vendor/name discovery so displays can identify MiSTer after registration.

---------

Co-authored-by: misteraddons <51079966+misteraddons@users.noreply.github.com>
2026-05-14 17:57:10 +08:00
Sorgelig
342568f74d video: revert spd from block to byte write. 2026-05-09 22:29:21 +08:00
Sorgelig
a33df4c92b video: add spd_quirk. 2026-05-05 04:20:05 +08:00
Sorgelig
cf2017611d video: add video_off_logo option. 2026-05-05 03:52:37 +08:00
Sorgelig
8e0acf7e3b OSD: update video info while in menu. 2026-05-04 20:22:23 +08:00
Sorgelig
0a53ddb887 video: disable VRR for menu core. 2026-04-30 23:48:40 +08:00
Sorgelig
0f3a6ad82a video: VRR to obey refresh_min/max, remove redundant vrr_min/max_framerate parameters. 2026-04-30 02:25:54 +08:00
Sorgelig
32958d28d4 video: add VRR_MISTER mode. 2026-04-29 22:40:14 +08:00
Sorgelig
adbec3e99d Analog sticks debug mode. 2026-04-29 16:40:01 +08:00
Jon Abrams
cb320ab82c video: Power down unused HDMI-CEC on ADV7513 (#1156) 2026-04-13 15:38:28 +08:00
misteraddons
5b6bcfb2df video: Parse EDID manufacturer even if header invalid. Update dv_dac.txt (#1151) 2026-04-05 14:50:21 +08:00
Timothy Redaelli
6b21918ce2 Add video_off_hdmi option to power down HDMI on idle timeout (#1110)
When video_off_hdmi=1 is set in MiSTer.ini, the ADV7513 HDMI
transmitter is powered down via I2C when the video_off timeout
expires, allowing the connected monitor to enter sleep mode.
HDMI is restored when user activity is detected (OSD opens).
2026-03-09 03:05:58 +08:00
José Manuel Barroso Galindo
7a7bef3d06 Add video_mode FIFO command for CRT video mode switching (#1107)
* Add video_mode FIFO command for CRT video mode switching

- video.cpp: Add video_mode_cmd() that parses custom modelines and
  applies them via video_set_mode(), with hfreq safety check blocking
  modes outside 15625-16500Hz to protect 15kHz CRT monitors
- video.h: Declare video_mode_cmd()
- input.cpp: Dispatch "video_mode" commands from MiSTer_cmd FIFO
  to video_mode_cmd()

* Remove hfreq guard from video_mode_cmd

The horizontal frequency check was limiting the command to 15kHz modes only. Removing it allows custom modelines with any frequency to be applied. Software at the other end must take care of not calling this API with unsafe frequencies.
2026-03-04 14:39:07 +08:00
misteraddons
1024e7e73b Fix: ignore vga_mode=ypbpr unless direct video is active (#1105)
* Fix YPbPr gating and refresh CSC after direct_video auto-detect

* Fix direct_video ypbpr bug
2026-02-26 13:18:12 +08:00
Tony Toon
4d1a9fc2d3 input: autofire overhaul (#1091)
* frame-synchronized autofire, per-button rates, custom rates via mister.ini
* frame timer using core frame counter, fallback to timerfd
* improved button reference counting (previously limited to 2)
2026-01-22 13:07:44 +08:00
Christof Harnischmacher
b6207d423c video: send standard compliant SPD infoframe, when direct_video is not enabled (#1066) 2025-11-22 14:00:23 +08:00
Brendan Saricks
dfcd8e05be video: Rotation Direction in SPD (#1065) 2025-11-20 13:30:29 +08:00
Sorgelig
4002275336 video: code cleanup in spd/spare packets handling and fix for freesync mode. 2025-11-17 16:29:06 +08:00
Sorgelig
84c69a4b6c video: add rotation flag to SPD. 2025-11-13 14:28:50 +08:00
Sorgelig
8f88fc9237 video: change ID in SPD info frame for non-direct video. 2025-11-12 21:01:23 +08:00
Sorgelig
80697c01b4 video: send spd info in non-direct video mode. 2025-11-12 14:55:41 +08:00
misteraddons
26c7564b5d video: Make subcarrier a vga_mode option instead of standalone 2025-10-23 15:21:24 +08:00
misteraddons
0f667a8442 Video: Automatic Direct Video dv_dac.txt Parsing Fix (#1036)
* Simple Auto Direct Video

direct_video=2
Checks for 1024x768 HDMI resolution and sets direct_video=1
No hot plug detect
No EDID parsing
No device whitelist
No hdmi_limited set based on EDID whitelist

* Add EDID detection and set hdmi_limited for common DACs

- AG6200 sets hdmi_limited=2
- CS5213 sets hdmi_limited=0

* Fix logic to pass normal EDID resolution if not 1024x768

* Update MiSTer.ini

* Remove 1024x768 resolution check

- Only use mfg_id from EDID to identify known compatible DACs

* Add DAC id and settings to dv_dac.txt and dv_dac_user.txt

- mfg_id
- rgb range
- hdmi_audio_96khz
- composite_sync: 0, 1, or "" (default is "")
- dv_dac_user.txt for HDMI video upscalers that support direct video
  - device commented out by default

* Fix parsing of dv_dac.txt

DAC model name wasn't being displayed due to empty composite_sync field
2025-09-14 18:13:51 +08:00
misteraddons
4b591f58fc Automatic Direct Video (#1035)
* Simple Auto Direct Video

direct_video=2
Checks for 1024x768 HDMI resolution and sets direct_video=1
No hot plug detect
No EDID parsing
No device whitelist
No hdmi_limited set based on EDID whitelist

* Add EDID detection and set hdmi_limited for common DACs

- AG6200 sets hdmi_limited=2
- CS5213 sets hdmi_limited=0

* Fix logic to pass normal EDID resolution if not 1024x768

* Update MiSTer.ini

* Remove 1024x768 resolution check

- Only use mfg_id from EDID to identify known compatible DACs

* Add DAC id and settings to dv_dac.txt and dv_dac_user.txt

- mfg_id
- rgb range
- hdmi_audio_96khz
- composite_sync: 0, 1, or "" (default is "")
- dv_dac_user.txt for HDMI video upscalers that support direct video
  - device commented out by default
2025-09-12 14:08:50 +08:00
misteraddons
eef9cbd6d9 video: Support for chroma subcarrier over VGA
Adds "subcarrier" config flag, used to enable chroma subcarrier output over VGA Vsync for external RGB to NTSC/PAL converters.
2025-08-14 14:32:07 +08:00
zakk4223
5921122070 video: guard division by zero in spd_config_dv 2025-05-20 14:56:53 +08:00
zakk4223
1d201a300b Add interlaced video vertical filter (#976) 2025-03-31 14:30:30 +08:00
zakk4223
1976bbe81f Require at least one video info change before triggering change notification (#951) 2025-01-15 13:55:15 +08:00
MikeS11
9e2e0d7088 Increase YC Mode Arrary (#940)
Current Saturn core extends the requirements beyond 10 to 14 potentially more, increasing the array to 20 to fix the current limitation and allow for some buffer.
2024-12-16 12:58:10 +08:00
Sorgelig
e20d5e85ca video: skip dot files from backgrounds. 2024-11-27 18:59:24 +08:00
zakk4223
7f57504f92 Screenshot: don't squish video when it is rotated (#929) 2024-11-14 19:07:04 +08:00
Sorgelig
77b41d0c6a MGL/MRA: add same_dir attribute for setname. 2024-03-26 01:11:12 +08:00
Sorgelig
7b01e79b70 video: adjust SPD data. 2024-01-10 22:29:09 +08:00
Sorgelig
613f808ffb video: fix SPD infoframe. 2023-12-30 02:39:55 +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
MikeS11
222d61776f Update to YC Key Compare (#836)
- Add an expanded key option to include core pixel freq in key E.g. Corename_FPS_Fpix=PhaseInc
- Fixes issue with matching YC key when Saturn core changes from low res to high res mode, as the FPS remains the same when the pixel clocks change (E.g. 6.71Mhz vs 7.16Mhz)
- Tested with existing yc.txt list as well as new Saturn keys for yc.txt
2023-10-13 19:31:57 +08:00
Sorgelig
15a6841d35 video: wallpeper dir follows config name. 2023-05-08 00:42:35 +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
Sorgelig
5a3d8cd36f Fix text formatting. 2023-01-30 03:40:25 +08:00
Sam Hardeman
12597108ab Fix color controls bug affecting YPbPr + direct_video (#735) 2023-01-30 03:35:29 +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
2eb0e538ea video: HLG HDR mode with hdr=3
* Replace HDR metadata with one correctly tuned for BT2020

* Add HLG HDR mode for hdr=3, by request of Mathieulh
2023-01-05 00:06:37 +08:00
Sam Hardeman
9276306cf1 Replace HDR metadata with one correctly tuned for BT2020 (#721) 2023-01-02 16:27:07 +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