VirtualBox

Ignore:
Timestamp:
Jul 7, 2017 1:51:26 PM (7 years ago)
Author:
vboxsync
Message:

VGABIOS: Properly update BDA offset 65h, 66h on mode set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/BIOS/vgabios.c

    r67548 r67853  
    642642// ============================================================================================
    643643
     644/* CGA-compatible MSR (0x3D8) register values for first modes 0-7. */
     645uint8_t cga_msr[8] = {
     646    0x2C, 0x28, 0x2D, 0x29, 0x2A, 0x2E, 0x1E, 0x29
     647};
     648
    644649void biosfn_set_video_mode(uint8_t mode)
    645650{// mode: Bit 7 is 1 if no clear screen
     
    818823 write_dword(BIOSMEM_SEG,BIOSMEM_VS_POINTER, (uint32_t)(void __far *)video_save_pointer_table);
    819824
    820  // FIXME
    821  write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MSR,0x00); // Unavailable on vanilla vga, but...
    822  write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_PAL,0x00); // Unavailable on vanilla vga, but...
     825 if (mode <= 7)
     826 {
     827     write_byte(BIOSMEM_SEG, BIOSMEM_CURRENT_MSR, cga_msr[mode]);           /* Like CGA reg. 0x3D8 */
     828     write_byte(BIOSMEM_SEG, BIOSMEM_CURRENT_PAL, mode == 6 ? 0x3F : 0x30); /* Like CGA reg. 0x3D9*/
     829 }
    823830
    824831 // Set cursor shape
Note: See TracChangeset for help on using the changeset viewer.

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