diff --git a/MiSTer.ini b/MiSTer.ini index 749158b..0a85fd1 100644 --- a/MiSTer.ini +++ b/MiSTer.ini @@ -6,7 +6,8 @@ composite_sync=0 ; set to 1 for composite sync on HSync signal of VGA outp vga_scaler=0 ; set to 1 to connect VGA to scaler output. hdmi_audio_96k=0 ; set to 1 for 96khz/16bit HDMI audio (48khz/16bit otherwise) keyrah_mode=0x18d80002 ; VIDPID of keyrah for special code translation (0x23418037 for Arduino Micro) -volumectl=1 ; enable audio volume control by multimedia keys +volumectl=0 ; enable audio volume control by multimedia keys +vscale_integer=0 ; set to 1 to use only integer vertical scaling ;bootscreen=0 ; uncomment to disable boot screen of some cores like Minimig. ;mouse_throttle=10 ; 1-100 mouse speed divisor. Useful for very sensitive mouses diff --git a/cfg.cpp b/cfg.cpp index a9b795c..e846e3e 100644 --- a/cfg.cpp +++ b/cfg.cpp @@ -40,6 +40,7 @@ const ini_var_t ini_vars[] = { { "MOUSE_THROTTLE", (void*)(&(cfg.mouse_throttle)), UINT8, 1, 100, 1 }, { "BOOTSCREEN", (void*)(&(cfg.bootscreen)), UINT8, 0, 1, 1 }, { "VOLUMECTL", (void*)(&(cfg.volumectl)), UINT8, 0, 1, 1 }, + { "VSCALE_INTEGER", (void*)(&(cfg.vscale_integer)), UINT8, 0, 1, 1 }, }; // mist ini config diff --git a/cfg.h b/cfg.h index 3165141..597e473 100644 --- a/cfg.h +++ b/cfg.h @@ -29,6 +29,7 @@ typedef struct { uint8_t mouse_throttle; uint8_t bootscreen; uint8_t volumectl; + uint8_t vscale_integer; char video_conf[1024]; } cfg_t; diff --git a/user_io.cpp b/user_io.cpp index 84593fd..f195691 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -2750,6 +2750,18 @@ static uint32_t show_video_info(int force) Info(str, cfg.video_info * 1000); } + if (cfg.vscale_integer && height && (height <= vitems[5])) + { + uint32_t mag = vitems[5] / height; + height *= mag; + printf("Set Integer V scaling: %d\n", height); + spi_uio_cmd16(UIO_SETHEIGHT, height); + } + else + { + spi_uio_cmd16(UIO_SETHEIGHT, 0); + } + if (vtime && vtimeh) return vtime; } else