From ab05a80e100c4dd7dfa1089ad8beb123da1b4de0 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Wed, 9 May 2018 17:37:01 +0800 Subject: [PATCH] INI option to disable boot screen of some cores. --- MiSTer.ini | 1 + cfg.cpp | 2 ++ cfg.h | 1 + minimig_boot.cpp | 40 ++++++++++++++++++++++------------------ 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/MiSTer.ini b/MiSTer.ini index c680859..425dba2 100644 --- a/MiSTer.ini +++ b/MiSTer.ini @@ -6,6 +6,7 @@ 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) +;bootscreen=0 ; uncomment to disable boot screen of some cores like Minimig. ; USER button emulation by keybaord. Usually it's reset button. ; 0 - lctrl+lalt+ralt (lctrl+lgui+rgui on keyrah) diff --git a/cfg.cpp b/cfg.cpp index 4c3e2f2..2e4bb23 100644 --- a/cfg.cpp +++ b/cfg.cpp @@ -12,6 +12,7 @@ cfg_t cfg; void MiSTer_ini_parse() { memset(&cfg, 0, sizeof(cfg)); + cfg.bootscreen = 1; ini_parse(&ini_cfg); } @@ -37,6 +38,7 @@ const ini_var_t ini_vars[] = { { "DVI_MODE", (void*)(&(cfg.dvi)), UINT8, 0, 1, 1 }, { "KBD_NOMOUSE", (void*)(&(cfg.kbd_nomouse)), UINT8, 0, 1, 1 }, { "MOUSE_THROTTLE", (void*)(&(cfg.mouse_throttle)), UINT8, 1, 100, 1 }, + { "BOOTSCREEN", (void*)(&(cfg.bootscreen)), UINT8, 0, 1, 1 }, }; // mist ini config diff --git a/cfg.h b/cfg.h index 4275aef..90b4571 100644 --- a/cfg.h +++ b/cfg.h @@ -27,6 +27,7 @@ typedef struct { uint8_t vsync_adjust; uint8_t kbd_nomouse; uint8_t mouse_throttle; + uint8_t bootscreen; char video_conf[1024]; } cfg_t; diff --git a/minimig_boot.cpp b/minimig_boot.cpp index 9b2e4ed..654afe3 100644 --- a/minimig_boot.cpp +++ b/minimig_boot.cpp @@ -12,6 +12,7 @@ #include "file_io.h" #include "minimig_config.h" #include "minimig_fdd.h" +#include "cfg.h" static uint8_t buffer[1024]; @@ -433,27 +434,30 @@ void BootInit() spi8(rstval); DisableOsd(); - //default video config till real config loaded. - ConfigVideo(0,0, 0x40); - ConfigAudio(0); + if (cfg.bootscreen) + { + //default video config till real config loaded. + ConfigVideo(0, 0, 0x40); + ConfigAudio(0); - WaitTimer(100); + WaitTimer(100); - BootEnableMem(); - BootClearScreen(SCREEN_ADDRESS, SCREEN_MEM_SIZE); - BootUploadLogo(); - BootUploadBall(); - BootUploadCopper(); - BootCustomInit(); + BootEnableMem(); + BootClearScreen(SCREEN_ADDRESS, SCREEN_MEM_SIZE); + BootUploadLogo(); + BootUploadBall(); + BootUploadCopper(); + BootCustomInit(); - WaitTimer(500); - char rtl_ver[128]; - sprintf(rtl_ver, "MINIMIG-AGA%s v%d.%d.%d by Rok Krajnc. MiSTer port by Sorgelig.", ver_beta ? " BETA" : "", ver_major, ver_minor, ver_minion); - BootPrintEx(rtl_ver); - BootPrintEx(" "); - BootPrintEx("Original Minimig by Dennis van Weeren"); - BootPrintEx("Updates by Jakub Bednarski, Tobias Gubener, Sascha Boing, A.M. Robinson & others"); - BootPrintEx(" "); + WaitTimer(500); + char rtl_ver[128]; + sprintf(rtl_ver, "MINIMIG-AGA%s v%d.%d.%d by Rok Krajnc. MiSTer port by Sorgelig.", ver_beta ? " BETA" : "", ver_major, ver_minor, ver_minion); + BootPrintEx(rtl_ver); + BootPrintEx(" "); + BootPrintEx("Original Minimig by Dennis van Weeren"); + BootPrintEx("Updates by Jakub Bednarski, Tobias Gubener, Sascha Boing, A.M. Robinson & others"); + BootPrintEx(" "); + } //eject all disk df[0].status = 0;