Commit Graph

1576 Commits

Author SHA1 Message Date
Sorgelig
bd1eab9bf7 SNES: move MSU1 data buffer for bigger video buffer. 2022-07-08 02:56:08 +08:00
Cray Elliott
adef6c30e2 Super Game Boy: test for file extension size (#653)
it was hard coded to 4 which caused MSU-1 files to not be found for
.GB extension ROMs
2022-07-02 01:18:17 +08:00
Sorgelig
ef52c42b1c menu: alternating info between battery and resolution if battery available. 2022-07-01 04:31:04 +08:00
Sorgelig
9eca861734 video: another method to make a base VRR video mode. 2022-07-01 04:11:45 +08:00
Sorgelig
0afae31c31 video: don't use VRR logic if vsync_adjust is not 0. 2022-07-01 00:16:06 +08:00
Sorgelig
84ade779df video: adjust VRR vblank to a minimum possible value instead of discarding. 2022-06-30 22:59:16 +08:00
Sorgelig
d1e2d37421 video: support for fractional frame rate in video_mode parameter. 2022-06-30 22:47:47 +08:00
Sorgelig
73e90981f4 menu: fix name scroll overlap with help scroll. 2022-06-30 22:27:43 +08:00
Sorgelig
d9a04ba93e menu: update minimig joystick mode option. 2022-06-30 22:26:27 +08:00
zakk4223
b38dada0b5 video: don't modify hdmi packet enable register when doing initial config
Co-authored-by: Zakk <zakk@rsdio.com>
2022-06-29 23:34:50 +08:00
Sorgelig
7d8b477efc video: don't use VRR logic if vsync_adjust=2. 2022-06-29 20:19:40 +08:00
Sorgelig
d0bb16f4ff video: more conservative default VRR max refresh rate. 2022-06-29 08:47:33 +08:00
Sorgelig
5de6c5e231 video: VRR support for core, some code formatting. 2022-06-29 08:44:30 +08:00
Martin Donlon
f8ee846400 Fix fb_size=2 (#651)
Initialize fb_scale from fb_size.
2022-06-27 20:04:48 +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
Sorgelig
8eb1a6476c menu: system menu defaults to exit. 2022-06-23 23:54:48 +08:00
paulb-nl
1112204dec user_io: add is_sgb() for Super Game Boy MSU (#649) 2022-06-23 22:42:39 +08:00
zakk4223
6d65491ae4 Set FD_CLOEXEC on underlying CHD file descriptors (#646)
Co-authored-by: Zakk <zakk@rsdio.com>
2022-06-21 00:08:31 +08:00
arit
35b4e8f6fa Cheat menu performance (#643)
* Modify cheat_rec_t data type for planned changes to active cheat handling.

* Reorganized cheats_toogle and cheats_send to cache activated cheats and prevent opening files for all active cheats with each toggle.

* Added consistency checks.
2022-06-19 03:17:12 +08:00
arit
8d60ab7779 Added menu rollover logic from file select to cheat select menu. (#638) 2022-06-09 05:29:55 +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
Sorgelig
ba837a789e input: fix: vibration test could stick. 2022-06-06 19:54:10 +08:00
Sorgelig
a20b86d3cd input: enable vibration test by holding L button. 2022-06-06 19:43:10 +08:00
JB
1845079eb6 input: Added Gun4IR lightgun support to input.cpp (#633)
Added support for the Gun4IR lightgun to the lightgun input list, for native support.
2022-06-06 00:01:02 +08:00
Martin Donlon
b8a4c3f5e9 Support for HDMI pixel repetition (#631)
Send pixel repetition as high bit of video width
Half linux framebuffer size when PR is in use
If a modes width is > 2048 then use pixel repetition
Add video_mode 14 2560x1440.
Fallback to mode 8 if core doesn't support PR
2022-06-05 23:59:48 +08:00
Matheus Fraguas
439db2d5bc input: Also uses joystick button on lightgun calibration (#627)
Previous implementation only catchs gamepad buttons BTN_GAMEPAD.
This commit add support for joystick button BTN_JOYSTICK.
Useful for lightgun devices using HID report type Joystick.
2022-05-31 03:29:38 +08:00
Sorgelig
1bce9c51f9 Release 20220529. 2022-05-29 21:47:00 +08:00
Martin Donlon
b5f5c35cd7 video: Change refresh min/max to a floating point value (#625) 2022-05-27 22:40:25 +08:00
RobertPeip
5abb115777 always write savestate count initial values -> fixes creation of non existing savestates (#624) 2022-05-27 02:44:27 +08:00
Sorgelig
afb4b7a35c user_io: remove savestate counter writeback. 2022-05-26 22:22:56 +08:00
Sorgelig
373499dee2 PSX: add psx_poll (for heartbeat). 2022-05-26 22:15:25 +08:00
Martin Donlon
a9a2869765 Fix video_info (#623)
video_info wasn't being updated correctly when `force` was set, it was getting
overridden by the previous value because the `res_changed` check was
false.
2022-05-26 18:09:40 +08:00
RobertPeip
8f76789ca0 fix savestate handling by setting the count part of the savestate header to -1 after every modification or ack from HPS (#622) 2022-05-25 19:37:21 +08:00
jaysonlarose
ac86f967a4 input: Changed wh_break to wh_brake. (#621) 2022-05-25 18:22:45 +08:00
Martin Donlon
df89fa675f Account for aspect ratio in vscale_mode 4/5 (#620)
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.
2022-05-25 00:49:12 +08:00
paulb-nl
357fbb630e video: Use pixel repetition with Directvideo in Menu core only (#618)
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.
2022-05-24 06:30:21 +08:00
Sorgelig
549025460b video: get framebuffer parameters from core. 2022-05-24 04:38:26 +08:00
Sorgelig
ea1aaa4f58 video: print error if ADV7513 not found. 2022-05-23 21:56:10 +08:00
Martin Donlon
7472a45662 video: Set content type to zero when not using game mode (#614)
This field should just be ignored, however in earlier versions of the CEA-861
spec this field was reserved and supposed to be initialized to 0.
2022-05-23 20:18:04 +08:00
mrfpga
1ec42b777b add Coleco Adam (#613) 2022-05-23 20:09:30 +08:00
Sorgelig
18785a56d8 video: revert vscale_mode=4 and add vscale_mode=6. 2022-05-23 03:18:49 +08:00
Sorgelig
1d2c72dfc4 video: auto cvt-rb calculation, fix vscale_mode=4. 2022-05-23 02:33:35 +08:00
Sorgelig
68b63caa00 Update default ini for video resolution detection. 2022-05-23 00:47:02 +08:00
Sorgelig
46971a3b17 saturn: fix warning. 2022-05-23 00:44:11 +08:00
Sergey Dvodnenko
2bc233b851 Saturn: initial support. (#612) 2022-05-22 20:09:13 +08:00
Martin Donlon
e1a58541c0 video: Don't set sync polarity when calculating modes (#611)
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.
2022-05-22 16:58:14 +08:00
Sorgelig
168aae3f07 video: fix formatting. 2022-05-21 02:28:06 +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
Martin Donlon
b43e5cfc34 video: Only set scan information when in game mode (#609) 2022-05-21 00:24:49 +08:00
Sorgelig
d57ed83fbe video: detect default video resolution and dvi mode from EDID. 2022-05-20 21:34:44 +08:00