Changeset 64960 in vbox
- Timestamp:
- Dec 19, 2016 2:53:24 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/BIOS/Makefile.kmk
r62514 r64960 160 160 VgaDefBiosLogo_SOURCES = $(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogo.c 161 161 VgaDefBiosLogo_CLEAN = $(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogo.c 162 ifndef VBOX_OSE 163 VgaDefBiosLogo_SOURCES += $(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogoNY.c 164 VgaDefBiosLogo_CLEAN += $(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogoNY.c 165 endif 162 166 163 167 # Rule for making the bios logo. … … 165 169 $(call MSG_TOOL,bin2c,VgaDefBiosLogo,$<,$@) 166 170 $(QUIET)$(VBOX_BIN2C) VgaDefBiosLogo $< $@ 171 172 # Rule for making the bios logo. 173 $$(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogoNY.c: $(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/puel_logo_ny.bmp $(VBOX_BIN2C) | $$(dir $$@) 174 $(call MSG_TOOL,bin2c,VgaDefBiosLogoNY,$<,$@) 175 $(QUIET)$(VBOX_BIN2C) VgaDefBiosLogoNY $< $@ 167 176 168 177 -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r64391 r64960 3871 3871 * @param cxLogo Logo width. 3872 3872 * @param cyLogo Logo height. 3873 * @param fInverse True if the bitmask is black on white (only for 1bpp) 3873 3874 * @param iStep Fade in/fade out step. 3874 3875 * @param pu32Palette Palette data. … … 3876 3877 * @param pbDst Destination buffer. 3877 3878 */ 3878 static void vbeShowBitmap(uint16_t cBits, uint16_t xLogo, uint16_t yLogo, uint16_t cxLogo, uint16_t cyLogo, uint8_t iStep, 3879 static void vbeShowBitmap(uint16_t cBits, uint16_t xLogo, uint16_t yLogo, uint16_t cxLogo, uint16_t cyLogo, 3880 bool fInverse, uint8_t iStep, 3879 3881 const uint32_t *pu32Palette, const uint8_t *pbSrc, uint8_t *pbDst) 3880 3882 { … … 3924 3926 for (i = 0; i < cxLogo; i++) 3925 3927 { 3926 uint8_t pix;3927 3928 3928 switch (cBits) 3929 3929 { … … 3933 3933 c = *pbSrc++; 3934 3934 3935 pix = (c & 1) ? 0xFF : 0; 3936 c >>= 1; 3937 3938 if (pix) 3935 if (c & 1) 3939 3936 { 3940 *pbTmpDst++ = pix * iStep / LOGO_SHOW_STEPS; 3941 *pbTmpDst++ = pix * iStep / LOGO_SHOW_STEPS; 3942 *pbTmpDst++ = pix * iStep / LOGO_SHOW_STEPS; 3943 pbTmpDst++; 3937 if (fInverse) 3938 { 3939 *pbTmpDst++ = 0; 3940 *pbTmpDst++ = 0; 3941 *pbTmpDst++ = 0; 3942 pbTmpDst++; 3943 } 3944 else 3945 { 3946 uint8_t pix = 0xFF * iStep / LOGO_SHOW_STEPS; 3947 *pbTmpDst++ = pix; 3948 *pbTmpDst++ = pix; 3949 *pbTmpDst++ = pix; 3950 pbTmpDst++; 3951 } 3944 3952 } 3945 3953 else 3946 3954 pbTmpDst += 4; 3947 3955 c >>= 1; 3948 3956 j = (j + 1) % 8; 3949 3957 break; … … 3955 3963 c = *pbSrc++; 3956 3964 3957 pix = (c >> 4) & 0xF;3965 uint8_t pix = (c >> 4) & 0xF; 3958 3966 c <<= 4; 3959 3967 … … 3976 3984 uint32_t u32Pal = pu32Palette[*pbSrc++]; 3977 3985 3978 pix = (u32Pal >> 16) & 0xFF;3986 uint8_t pix = (u32Pal >> 16) & 0xFF; 3979 3987 *pbTmpDst++ = pix * iStep / LOGO_SHOW_STEPS; 3980 3988 pix = (u32Pal >> 8) & 0xFF; … … 4055 4063 vbeShowBitmap(pThis->cLogoBits, xLogo, yLogo, 4056 4064 pThis->cxLogo, pThis->cyLogo, 4057 iStep, &pThis->au32LogoPalette[0],4065 false, iStep, &pThis->au32LogoPalette[0], 4058 4066 pbSrc, pbDst); 4059 4067 … … 4062 4070 vbeShowBitmap(1, LOGO_F12TEXT_X, LOGO_F12TEXT_Y, 4063 4071 LOGO_F12TEXT_WIDTH, LOGO_F12TEXT_HEIGHT, 4064 iStep, &pThis->au32LogoPalette[0],4072 pThis->fBootMenuInverse, iStep, &pThis->au32LogoPalette[0], 4065 4073 &g_abLogoF12BootText[0], pbDst); 4066 4074 … … 6069 6077 "HostWindowId\0" 6070 6078 #endif 6079 "SuppressNewYearSplash\0" 6071 6080 )) 6072 6081 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, … … 6919 6928 /* 6920 6929 * Allocate buffer for the logo data. 6921 * RT_MAX() is applied to let us fall back to default logo on read failure.6930 * Let us fall back to default logo on read failure. 6922 6931 */ 6923 pThis->cbLogo = sizeof(LogoHdr) + LogoHdr.cbLogo; 6924 pThis->pbLogo = (uint8_t *)PDMDevHlpMMHeapAlloc(pDevIns, RT_MAX(pThis->cbLogo, g_cbVgaDefBiosLogo + sizeof(LogoHdr))); 6932 pThis->cbLogo = LogoHdr.cbLogo; 6933 if (g_cbVgaDefBiosLogo) 6934 pThis->cbLogo = g_cbVgaDefBiosLogo; 6935 #ifndef VBOX_OSE 6936 if (g_cbVgaDefBiosLogoNY) 6937 pThis->cbLogo = g_cbVgaDefBiosLogoNY; 6938 #endif 6939 pThis->cbLogo += sizeof(LogoHdr); 6940 6941 pThis->pbLogo = (uint8_t *)PDMDevHlpMMHeapAlloc(pDevIns, pThis->cbLogo); 6925 6942 if (pThis->pbLogo) 6926 6943 { … … 6949 6966 || RT_FAILURE(rc)) 6950 6967 { 6951 memcpy(pLogoHdr + 1, g_abVgaDefBiosLogo, LogoHdr.cbLogo); 6968 #ifndef VBOX_OSE 6969 RTTIMESPEC Now; 6970 RTTimeLocalNow(&Now); 6971 RTTIME T; 6972 RTTimeLocalExplode(&T, &Now); 6973 bool fSuppressNewYearSplash = false; 6974 rc = CFGMR3QueryBoolDef(pCfg, "SuppressNewYearSplash", &fSuppressNewYearSplash, false); 6975 if ( !fSuppressNewYearSplash 6976 && (T.u16YearDay > 353 || T.u16YearDay < 10)) 6977 { 6978 pLogoHdr->cbLogo = LogoHdr.cbLogo = g_cbVgaDefBiosLogoNY; 6979 memcpy(pLogoHdr + 1, g_abVgaDefBiosLogoNY, LogoHdr.cbLogo); 6980 pThis->fBootMenuInverse = true; 6981 } 6982 else 6983 #endif 6984 memcpy(pLogoHdr + 1, g_abVgaDefBiosLogo, LogoHdr.cbLogo); 6952 6985 rc = vbeParseBitmap(pThis); 6953 6986 if (RT_FAILURE(rc)) -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r64482 r64960 585 585 /** Clear screen flag. */ 586 586 uint8_t fLogoClearScreen; 587 uint8_t Padding8[7]; 587 uint8_t fBootMenuInverse; 588 uint8_t Padding8[6]; 588 589 /** Palette data. */ 589 590 uint32_t au32LogoPalette[256]; -
trunk/src/VBox/Devices/build/VBoxDD.h
r64508 r64960 25 25 /** The default BIOS logo data. */ 26 26 extern const unsigned char g_abVgaDefBiosLogo[]; 27 extern const unsigned char g_abVgaDefBiosLogoNY[]; 27 28 /** The size of the default BIOS logo data. */ 28 29 extern const unsigned g_cbVgaDefBiosLogo; 30 extern const unsigned g_cbVgaDefBiosLogoNY; 29 31 30 32
Note:
See TracChangeset
for help on using the changeset viewer.