This commit is contained in:
bbond007
2018-12-22 14:14:16 -05:00
6 changed files with 36 additions and 23 deletions

View File

@@ -7,9 +7,11 @@ 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=0 ; enable audio volume control by multimedia keys
vscale_integer=0 ; set to 1 to use only integer vertical scaling
vscale_mode=0 ; 0 - scale to fit the screen height.
; 1 - use integer scale only.
; 2 - use 0.5 steps of scale.
; 3 - use 0.25 steps of scale.
vscale_border=0 ; set vertical border for TVs cutting the upper/bottom parts of screen (1-99)
; vscale_integer and vscale_border are mutually exclusive!
;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

View File

@@ -40,7 +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 },
{ "VSCALE_MODE", (void*)(&(cfg.vscale_mode)), UINT8, 0, 3, 1 },
{ "VSCALE_BORDER", (void*)(&(cfg.vscale_border)), UINT8, 0, 100, 1 },
};

2
cfg.h
View File

@@ -29,7 +29,7 @@ typedef struct {
uint8_t mouse_throttle;
uint8_t bootscreen;
uint8_t volumectl;
uint8_t vscale_integer;
uint8_t vscale_mode;
uint8_t vscale_border;
char video_conf[1024];
} cfg_t;

View File

@@ -513,7 +513,7 @@ static uint32_t menu_key_get(void)
else if (CheckTimer(repeat))
{
repeat = GetTimer(REPEATRATE);
if (GetASCIIKey(c1) || ((menustate == MENU_8BIT_SYSTEM2) && (menusub == 6)))
if (GetASCIIKey(c1) || ((menustate == MENU_8BIT_SYSTEM2) && (menusub == 8)))
{
c = c1;
hold_cnt++;
@@ -732,6 +732,7 @@ void HandleUI(void)
static char helpstate = 0;
static char drive_num = 0;
static char flag;
static int cr = 0;
uint8_t keys[6] = { 0,0,0,0,0,0 };
uint16_t keys_ps2[6] = { 0,0,0,0,0,0 };
@@ -1389,6 +1390,8 @@ void HandleUI(void)
OsdWrite(n++, m ? " Reset the core" : " Reset settings", menusub == 7, user_io_core_type() == CORE_TYPE_ARCHIE);
OsdWrite(n++, m ? "" : " Save settings", menusub == 8, 0);
OsdWrite(n++);
cr = n;
OsdWrite(n++, " Reboot (hold \x16 cold reboot)", menusub == 9);
OsdWrite(n++, " About", menusub == 10);
@@ -1537,7 +1540,7 @@ void HandleUI(void)
sprintf(s, " Cold Reboot");
p = s + 5 - off;
OsdWrite(8, p, menusub == 6, 0);
OsdWrite(cr, p, menusub == 8, 0);
}
break;
case 10:

BIN
releases/MiSTer_20181221 Normal file

Binary file not shown.

View File

@@ -3064,24 +3064,32 @@ static uint32_t show_video_info(int force)
Info(str, cfg.video_info * 1000);
}
if (cfg.vscale_border && height && (height <= vitems[5]))
uint32_t scrh = vitems[5];
if (height && scrh)
{
uint32_t border = cfg.vscale_border * 2;
if ((border + 100) > vitems[5]) border = vitems[5] - 100;
height = vitems[5] - border;
printf("Set vertical scaling to : %d\n", height);
spi_uio_cmd16(UIO_SETHEIGHT, height);
}
else 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 (cfg.vscale_border)
{
uint32_t border = cfg.vscale_border * 2;
if ((border + 100) > scrh) border = scrh - 100;
scrh -= border;
}
if (cfg.vscale_mode)
{
uint32_t div = 1 << (cfg.vscale_mode - 1);
uint32_t mag = (scrh*div) / height;
scrh = (height * mag) / div;
}
if(cfg.vscale_border || cfg.vscale_mode)
{
printf("*** Set vertical scaling to : %d\n", scrh);
spi_uio_cmd16(UIO_SETHEIGHT, scrh);
}
else
{
spi_uio_cmd16(UIO_SETHEIGHT, 0);
}
}
if (vtime && vtimeh) ret = vtime;