Changeset 7774 in vbox
- Timestamp:
- Apr 7, 2008 3:07:29 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r7760 r7774 93 93 #include <VBox/VBoxGuest.h> 94 94 #include <VBox/VBoxVideo.h> 95 #include <VBox/bioslogo.h> 95 96 96 97 #if defined(VBE_NEW_DYN_LIST) && defined(IN_RING3) && !defined(VBOX_DEVICE_STRUCT_TESTCASE) … … 108 109 *******************************************************************************/ 109 110 /* "Press F12 to select boot device." bitmap. */ 110 static const uint8_t g_abLogoF12BootText[] = 111 static const uint8_t g_abLogoF12BootText[] = 111 112 { 112 113 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, … … 5381 5382 * Register I/O Port for the BIOS Logo. 5382 5383 */ 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"); 5384 5385 if (VBOX_FAILURE(rc)) 5385 5386 return rc; … … 5388 5389 * Construct the logo header. 5389 5390 */ 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); 5393 5394 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 5394 LogoHdr. u8FadeIn = 1;5395 LogoHdr.fu8FadeIn = 1; 5395 5396 else if (VBOX_FAILURE(rc)) 5396 5397 return PDMDEV_SET_ERROR(pDevIns, rc, 5397 5398 N_("Configuration error: Querying \"FadeIn\" as integer failed")); 5398 5399 5399 rc = CFGMR3QueryU8(pCfgHandle, "FadeOut", &LogoHdr. u8FadeOut);5400 rc = CFGMR3QueryU8(pCfgHandle, "FadeOut", &LogoHdr.fu8FadeOut); 5400 5401 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 5401 LogoHdr. u8FadeOut = 1;5402 LogoHdr.fu8FadeOut = 1; 5402 5403 else if (VBOX_FAILURE(rc)) 5403 5404 return PDMDEV_SET_ERROR(pDevIns, rc, … … 5411 5412 N_("Configuration error: Querying \"LogoTime\" as integer failed")); 5412 5413 5413 rc = CFGMR3QueryU8(pCfgHandle, "ShowBootMenu", &LogoHdr. u8ShowBootMenu);5414 rc = CFGMR3QueryU8(pCfgHandle, "ShowBootMenu", &LogoHdr.fu8ShowBootMenu); 5414 5415 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 5415 LogoHdr. u8ShowBootMenu = 0;5416 LogoHdr.fu8ShowBootMenu = 0; 5416 5417 else if (VBOX_FAILURE(rc)) 5417 5418 return PDMDEV_SET_ERROR(pDevIns, rc, -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r7760 r7774 385 385 #endif /* VBE_NEW_DYN_LIST */ 386 386 387 /** The extra port which is used to show the BIOS logo.388 * @remark duplicated in logo.c. */389 #define VBE_LOGO_PORT 0x3b8390 391 /** The BIOS logo fade in/fade out steps.392 * @remark duplicated in logo.c. */393 #define LOGO_SHOW_STEPS 64394 395 /** The BIOS boot menu text position. */396 #define LOGO_F12TEXT_X 340397 #define LOGO_F12TEXT_Y 455398 399 /** Width and height of the "Press F12 to select boot device." bitmap.400 Anything that exceeds the limit of F12BootText below is filled with401 background. */402 #define LOGO_F12TEXT_WIDTH 286403 #define LOGO_F12TEXT_HEIGHT 12404 405 /** The BIOS logo commands.406 * @remark duplicated in logo.c. */407 #define LOGO_IMAGE_DEFAULT 0408 #define LOGO_IMAGE_EXTERNAL 1409 410 #define LOGO_MAX_WIDTH 640411 #define LOGO_MAX_HEIGHT 480412 413 #define LOGO_CMD_NOP 0414 #define LOGO_CMD_SET_OFFSET 0x100415 #define LOGO_CMD_SET_X 0x200416 #define LOGO_CMD_SET_Y 0x300417 #define LOGO_CMD_SET_WIDTH 0x400418 #define LOGO_CMD_SET_HEIGHT 0x500419 #define LOGO_CMD_SET_DEPTH 0x600420 #define LOGO_CMD_SET_PALSIZE 0x700421 #define LOGO_CMD_SET_DEFAULT 0x800422 #define LOGO_CMD_SET_PAL 0x900423 #define LOGO_CMD_SHOW_BMP 0xA00424 #define LOGO_CMD_SHOW_TEXT 0xB00425 #define LOGO_CMD_CLS 0xC00426 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 LOGOHDR432 {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 0x66BB450 451 /** The value which will switch you the default logo. */452 #define LOGO_DEFAULT_LOGO 0xFFFF453 454 387 #if !defined(VBOX) || defined(IN_RING3) 455 388 static inline int c6_to_8(int v) -
trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk
r7759 r7774 61 61 62 62 # 1. precompile rombios.c 63 $(PATH_TARGET)/_rombios_.c: $(PATH_SUB_CURRENT)/rombios.c $(PATH_SUB_CURRENT)/logo.c $(PATH_SUB_CURRENT)/apmbios.S $(PATH_SUB_CURRENT)/../DevPcBios.h | $(call DIRDEP,$(TARGET_PATH)) 63 $(PATH_TARGET)/_rombios_.c: $(PATH_SUB_CURRENT)/rombios.c $(PATH_SUB_CURRENT)/logo.c $(PATH_SUB_CURRENT)/apmbios.S \ 64 $(PATH_SUB_CURRENT)/../DevPcBios.h $(PATH_ROOT)/include/VBox/bioslogo.h | $(call DIRDEP,$(TARGET_PATH)) 64 65 $(call MSG_TOOL,cpp,PcBiosBin,$<,$@) 65 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(VBOX_PATH_DEVICES_SRC)/PC -I$(PATH_ROOT)/include -I$(PATH_OUT) -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P -o $@ $<66 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(VBOX_PATH_DEVICES_SRC)/PC -I$(PATH_ROOT)/include -I$(PATH_OUT) -DBX_SMP_PROCESSORS=1 -DVBOX -DVBOX_PC_BIOS $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P -o $@ $< 66 67 67 68 # 2. compile to intermediate asm file - tempfile clashes, make sure it's built alone. -
trunk/src/VBox/Devices/PC/BIOS/logo.c
r7759 r7774 13 13 #define F12_WAIT_TIME (3 * WAIT_HZ) /* 3 seconds. Used only if logo disabled. */ 14 14 15 #define LOGO_SHOW_STEPS 64 16 17 #define LOGO_IMAGE_DEFAULT 0 18 #define LOGO_IMAGE_EXTERNAL 1 19 20 #define LOGO_CMD_NOP 0 21 #define LOGO_CMD_SET_OFFSET 0x100 22 #define LOGO_CMD_SET_X 0x200 23 #define LOGO_CMD_SET_Y 0x300 24 #define LOGO_CMD_SET_WIDTH 0x400 25 #define LOGO_CMD_SET_HEIGHT 0x500 26 #define LOGO_CMD_SET_DEPTH 0x600 27 #define LOGO_CMD_SET_PALSIZE 0x700 28 #define LOGO_CMD_SET_DEFAULT 0x800 29 #define LOGO_CMD_SET_PAL 0x900 30 #define LOGO_CMD_SHOW_BMP 0xA00 31 #define LOGO_CMD_SHOW_TEXT 0xB00 32 #define LOGO_CMD_CLS 0xC00 33 34 #define LOGO_IO_PORT 0x3b8 15 #define uint8_t Bit8u 16 #define uint16_t Bit16u 17 #define uint32_t Bit32u 18 #include <VBox/bioslogo.h> 35 19 36 20 typedef struct … … 101 85 } WINHDR; 102 86 103 // Logo settings header104 typedef struct105 {106 Bit16u Signature;107 Bit8u FadeIn;108 Bit8u FadeOut;109 Bit16u LogoTime;110 Bit8u ShowBootMenu;111 Bit32u LogoSize;112 113 } LOGOHDR;114 115 87 116 88 static unsigned char get_mode(); … … 561 533 562 534 // Get main signature 563 tmp = read_logo_word(&logo_hdr-> Signature);535 tmp = read_logo_word(&logo_hdr->u16Signature); 564 536 if (tmp != 0x66BB) 565 537 goto done; 566 538 567 539 // Get options 568 is_fade_in = read_logo_byte(&logo_hdr-> FadeIn);569 is_fade_out = read_logo_byte(&logo_hdr-> FadeOut);570 logo_time = read_logo_word(&logo_hdr-> LogoTime);571 uBootMenu = read_logo_byte(&logo_hdr-> ShowBootMenu);540 is_fade_in = read_logo_byte(&logo_hdr->fu8FadeIn); 541 is_fade_out = read_logo_byte(&logo_hdr->fu8FadeOut); 542 logo_time = read_logo_word(&logo_hdr->u16LogoMillies); 543 uBootMenu = read_logo_byte(&logo_hdr->fu8ShowBootMenu); 572 544 573 545 // Is Logo disabled? … … 702 674 if (uBootMenu == 2) 703 675 show_boot_text(i); 704 676 705 677 wait(16 / WAIT_MS, 0); 706 678 }
Note:
See TracChangeset
for help on using the changeset viewer.