VirtualBox

vbox的更動 7774 路徑 trunk/src/VBox/Devices/Graphics


忽略:
時間撮記:
2008-4-7 下午03:07:29 (17 年 以前)
作者:
vboxsync
訊息:

Moved the LOGO_* defines and LOGOHDR to a common header instead of keeping duplicates around the place.

位置:
trunk/src/VBox/Devices/Graphics
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r7760 r7774  
    9393#include <VBox/VBoxGuest.h>
    9494#include <VBox/VBoxVideo.h>
     95#include <VBox/bioslogo.h>
    9596
    9697#if defined(VBE_NEW_DYN_LIST) && defined(IN_RING3) && !defined(VBOX_DEVICE_STRUCT_TESTCASE)
     
    108109*******************************************************************************/
    109110/* "Press F12 to select boot device." bitmap. */
    110 static const uint8_t g_abLogoF12BootText[] = 
     111static const uint8_t g_abLogoF12BootText[] =
    111112{
    112113    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     
    53815382     * Register I/O Port for the BIOS Logo.
    53825383     */
    5383     rc = PDMDevHlpIOPortRegister(pDevIns, VBE_LOGO_PORT, 1, NULL, vbeIOPortWriteCMDLogo, vbeIOPortReadCMDLogo, NULL, NULL, "BIOS Logo");
     5384    rc = PDMDevHlpIOPortRegister(pDevIns, LOGO_IO_PORT, 1, NULL, vbeIOPortWriteCMDLogo, vbeIOPortReadCMDLogo, NULL, NULL, "BIOS Logo");
    53845385    if (VBOX_FAILURE(rc))
    53855386        return rc;
     
    53885389     * Construct the logo header.
    53895390     */
    5390     LOGOHDR LogoHdr = { LOGO_HDR_MAGIC, 0, 0, 0, 0, 0 };
    5391 
    5392     rc = CFGMR3QueryU8(pCfgHandle, "FadeIn", &LogoHdr.u8FadeIn);
     5391    LOGOHDR LogoHdr = { LOGO_HDR_MAGIC, 0, 0, 0, 0, 0, 0 };
     5392
     5393    rc = CFGMR3QueryU8(pCfgHandle, "FadeIn", &LogoHdr.fu8FadeIn);
    53935394    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    5394         LogoHdr.u8FadeIn = 1;
     5395        LogoHdr.fu8FadeIn = 1;
    53955396    else if (VBOX_FAILURE(rc))
    53965397        return PDMDEV_SET_ERROR(pDevIns, rc,
    53975398                                N_("Configuration error: Querying \"FadeIn\" as integer failed"));
    53985399
    5399     rc = CFGMR3QueryU8(pCfgHandle, "FadeOut", &LogoHdr.u8FadeOut);
     5400    rc = CFGMR3QueryU8(pCfgHandle, "FadeOut", &LogoHdr.fu8FadeOut);
    54005401    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    5401         LogoHdr.u8FadeOut = 1;
     5402        LogoHdr.fu8FadeOut = 1;
    54025403    else if (VBOX_FAILURE(rc))
    54035404        return PDMDEV_SET_ERROR(pDevIns, rc,
     
    54115412                                N_("Configuration error: Querying \"LogoTime\" as integer failed"));
    54125413
    5413     rc = CFGMR3QueryU8(pCfgHandle, "ShowBootMenu", &LogoHdr.u8ShowBootMenu);
     5414    rc = CFGMR3QueryU8(pCfgHandle, "ShowBootMenu", &LogoHdr.fu8ShowBootMenu);
    54145415    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    5415         LogoHdr.u8ShowBootMenu = 0;
     5416        LogoHdr.fu8ShowBootMenu = 0;
    54165417    else if (VBOX_FAILURE(rc))
    54175418        return PDMDEV_SET_ERROR(pDevIns, rc,
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r7760 r7774  
    385385#endif /* VBE_NEW_DYN_LIST */
    386386
    387 /** The extra port which is used to show the BIOS logo.
    388  * @remark duplicated in logo.c. */
    389 #define VBE_LOGO_PORT        0x3b8
    390 
    391 /** The BIOS logo fade in/fade out steps.
    392  * @remark duplicated in logo.c. */
    393 #define LOGO_SHOW_STEPS      64
    394 
    395 /** The BIOS boot menu text position. */
    396 #define LOGO_F12TEXT_X       340
    397 #define LOGO_F12TEXT_Y       455
    398 
    399 /** Width and height of the "Press F12 to select boot device." bitmap.
    400     Anything that exceeds the limit of F12BootText below is filled with
    401     background. */
    402 #define LOGO_F12TEXT_WIDTH   286
    403 #define LOGO_F12TEXT_HEIGHT  12
    404 
    405 /** The BIOS logo commands.
    406  * @remark duplicated in logo.c. */
    407 #define LOGO_IMAGE_DEFAULT   0
    408 #define LOGO_IMAGE_EXTERNAL  1
    409 
    410 #define LOGO_MAX_WIDTH       640
    411 #define LOGO_MAX_HEIGHT      480
    412 
    413 #define LOGO_CMD_NOP         0
    414 #define LOGO_CMD_SET_OFFSET  0x100
    415 #define LOGO_CMD_SET_X       0x200
    416 #define LOGO_CMD_SET_Y       0x300
    417 #define LOGO_CMD_SET_WIDTH   0x400
    418 #define LOGO_CMD_SET_HEIGHT  0x500
    419 #define LOGO_CMD_SET_DEPTH   0x600
    420 #define LOGO_CMD_SET_PALSIZE 0x700
    421 #define LOGO_CMD_SET_DEFAULT 0x800
    422 #define LOGO_CMD_SET_PAL     0x900
    423 #define LOGO_CMD_SHOW_BMP    0xA00
    424 #define LOGO_CMD_SHOW_TEXT   0xB00
    425 #define LOGO_CMD_CLS         0xC00
    426 
    427 /**
    428  * PC Bios logo data structure.
    429  */
    430 #pragma pack(2) /* pack(2) is important! (seems that bios compiled with pack(2)...) */ /** @todo r=bird: add 3 uint8_t's before cbLogo and it'll be just fine. */
    431 typedef struct LOGOHDR
    432 {
    433     /** Signature (LOGO_HDR_MAGIC/0x66BB). */
    434     uint16_t        u16Signature;
    435     /** Fade in - boolean. */
    436     uint8_t         u8FadeIn;
    437     /** Fade out - boolean. */
    438     uint8_t         u8FadeOut;
    439     /** Logo time (msec). */
    440     uint16_t        u16LogoMillies;
    441     /** Show setup - boolean. */
    442     uint8_t         u8ShowBootMenu;
    443     /** Logo file size. */
    444     uint32_t        cbLogo;
    445 } LOGOHDR, *PLOGOHDR;
    446 #pragma pack()
    447 
    448 /** The value of the LOGOHDR::u16Signature field. */
    449 #define LOGO_HDR_MAGIC      0x66BB
    450 
    451 /** The value which will switch you the default logo. */
    452 #define LOGO_DEFAULT_LOGO   0xFFFF
    453 
    454387#if !defined(VBOX) || defined(IN_RING3)
    455388static inline int c6_to_8(int v)
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette