Changeset 4027 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Aug 3, 2007 7:53:12 PM (17 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r4014 r4027 582 582 break; 583 583 } 584 } else if (s->vbe_index == VBE_DISPI_INDEX_CMONITORS) { 585 val = s->monitor_count; 584 } else if (s->vbe_index == VBE_DISPI_INDEX_VBOX_VIDEO) { 585 switch (s->vbox_video_command) 586 { 587 case VBOX_VIDEO_QUERY_MONITOR_COUNT: 588 val = s->monitor_count; 589 break; 590 case VBOX_VIDEO_QUERY_OFFSCREEN_HEAP_SIZE: 591 val = _1M; /* @todo make configurable */ 592 break; 593 } 594 Log(("VBE: s->vbox_video_command = 0x%x, s->monitor_count = %d read index=0x%x val=0x%x\n", s->monitor_count, s->vbe_index, val)); 586 595 } else { 587 596 val = s->vbe_regs[s->vbe_index]; … … 834 843 } 835 844 break; 836 case VBE_DISPI_INDEX_ CMONITORS:845 case VBE_DISPI_INDEX_VBOX_VIDEO: 837 846 #ifdef VBOX 838 847 #ifdef IN_RING3 … … 850 859 s->pDrv->pfnProcessDisplayData(s->pDrv, s->CTXSUFF(vram_ptr), val & 0xFFFF); 851 860 } 861 s->vbox_video_command = val; 852 862 #endif /* IN_RING3 */ 853 863 #endif /* VBOX */ … … 2755 2765 */ 2756 2766 if (s->vbe_index == VBE_DISPI_INDEX_ENABLE 2757 || s->vbe_index == VBE_DISPI_INDEX_ CMONITORS)2767 || s->vbe_index == VBE_DISPI_INDEX_VBOX_VIDEO) 2758 2768 { 2759 2769 Log(("vgaIOPortWriteVBEData: VBE_DISPI_INDEX_ENABLE - Switching to host...\n")); … … 2888 2898 if (cb == 2) 2889 2899 { 2900 /* Reading 16 bit value always reads the count of monitor. 2901 * That is for compatibility with old additions. 2902 */ 2903 VGAState *s = PDMINS2DATA(pDevIns, PVGASTATE); 2904 if (s->vbe_index == VBE_DISPI_INDEX_VBOX_VIDEO) 2905 { 2906 s->vbox_video_command = VBOX_VIDEO_QUERY_MONITOR_COUNT; 2907 } 2890 2908 *pu32 = vbe_ioport_read_data(PDMINS2DATA(pDevIns, PVGASTATE), Port); 2891 2909 return VINF_SUCCESS; … … 2893 2911 else if (cb == 4) 2894 2912 { 2895 /* Quick hack for getting the vram size. */2896 2913 VGAState *s = PDMINS2DATA(pDevIns, PVGASTATE); 2897 *pu32 = s->vram_size; 2914 if (s->vbe_index == VBE_DISPI_INDEX_VBOX_VIDEO) 2915 { 2916 *pu32 = vbe_ioport_read_data(PDMINS2DATA(pDevIns, PVGASTATE), Port); 2917 } 2918 else 2919 { 2920 /* Quick hack for getting the vram size. */ 2921 *pu32 = s->vram_size; 2922 } 2898 2923 return VINF_SUCCESS; 2899 2924 } … … 4320 4345 #ifdef CONFIG_BOCHS_VBE 4321 4346 pData->vbe_regs[VBE_DISPI_INDEX_ID] = VBE_DISPI_ID0; 4322 pData->vbe_regs[VBE_DISPI_INDEX_ CMONITORS] = pData->monitor_count;4347 pData->vbe_regs[VBE_DISPI_INDEX_VBOX_VIDEO] = pData->monitor_count; 4323 4348 pData->vbe_bank_mask = ((pData->vram_size >> 16) - 1); 4324 4349 #endif /* CONFIG_BOCHS_VBE */ … … 4556 4581 pData->monitor_count = 1; 4557 4582 } 4558 pData->vbe_regs[VBE_DISPI_INDEX_ CMONITORS] = pData->monitor_count;4583 pData->vbe_regs[VBE_DISPI_INDEX_VBOX_VIDEO] = pData->monitor_count; 4559 4584 Log(("VGA: MonitorCount=%d\n", pData->monitor_count)); 4560 4585 -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r3153 r4027 74 74 #define VBE_DISPI_INDEX_X_OFFSET 0x8 75 75 #define VBE_DISPI_INDEX_Y_OFFSET 0x9 76 #define VBE_DISPI_INDEX_ CMONITORS0xa76 #define VBE_DISPI_INDEX_VBOX_VIDEO 0xa 77 77 #define VBE_DISPI_INDEX_NB 0xb 78 78 … … 82 82 83 83 #ifdef VBOX 84 /* The VBOX interface id. Indicates support for VBE_DISPI_INDEX_ CMONITORS. */84 /* The VBOX interface id. Indicates support for VBE_DISPI_INDEX_VBOX_VIDEO. */ 85 85 #define VBE_DISPI_ID_VBOX_VIDEO 0xBE00 86 86 #endif /* VBOX */ … … 284 284 /** Number of virtual monitors */ 285 285 uint32_t monitor_count; 286 uint32_t Padding0; /* May be removed if more data is added */ 286 /** The VBoxVideo extension command issued by guest. */ 287 uint32_t vbox_video_command; 287 288 288 289 /** Whether to render the guest VRAM to the framebuffer memory. False only for some LFB modes. */
Note:
See TracChangeset
for help on using the changeset viewer.