VirtualBox

Changeset 93873 in vbox for trunk


Ignore:
Timestamp:
Feb 21, 2022 5:05:32 PM (3 years ago)
Author:
vboxsync
Message:

VGABIOS: Implemented INT 10h/112xH functions (graphical font set).

File:
1 edited

Legend:

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

    r93841 r93873  
    20152015static void biosfn_load_gfx_8_8_chars(uint16_t ES, uint16_t BP)
    20162016{
    2017 #ifdef VGA_DEBUG
    2018  unimplemented();
    2019 #endif
    2020 }
     2017    set_int_vector(0x1F, ES:>BP);
     2018}
     2019
     2020static void set_gfx_font(void _far *font, uint16_t cheight, uint8_t row_code, uint8_t rows)
     2021{
     2022    static  uint8_t row_tbl[] = { 0, 14, 25, 43 };
     2023
     2024    set_int_vector(0x43, font);
     2025    if (row_code) {
     2026        if (row_code > 3)
     2027            row_code = 2;   /* Default to 25 rows. */
     2028        rows = row_tbl[row_code];
     2029    }
     2030    /* Else 'rows' used as is. */
     2031
     2032    write_word(BIOSMEM_SEG, BIOSMEM_CHAR_HEIGHT, cheight);
     2033    write_word(BIOSMEM_SEG, BIOSMEM_NB_ROWS, rows - 1);
     2034}
     2035
    20212036static void biosfn_load_gfx_user_chars(uint16_t ES, uint16_t BP, uint16_t CX,
    20222037                                       uint8_t BL, uint8_t DL)
    20232038{
    2024 #ifdef VGA_DEBUG
    2025  unimplemented();
    2026 #endif
    2027 }
    2028 static void biosfn_load_gfx_8_14_chars(uint8_t BL)
    2029 {
    2030 #ifdef VGA_DEBUG
    2031  unimplemented();
    2032 #endif
    2033 }
    2034 static void biosfn_load_gfx_8_8_dd_chars(uint8_t BL)
    2035 {
    2036 #ifdef VGA_DEBUG
    2037  unimplemented();
    2038 #endif
    2039 }
    2040 static void biosfn_load_gfx_8_16_chars(uint8_t BL)
    2041 {
    2042 #ifdef VGA_DEBUG
    2043  unimplemented();
    2044 #endif
     2039    set_gfx_font(ES:>BP, CX, BL, DL);
     2040}
     2041
     2042/* Some references (RBIL) suggest that only BL is used; that is wrong,
     2043 * all of these subfunctions will use DL if BL is zero.
     2044 */
     2045static void biosfn_load_gfx_8_14_chars(uint8_t BL, uint8_t DL)
     2046{
     2047    set_gfx_font(vgafont14, 14, BL, DL);
     2048}
     2049static void biosfn_load_gfx_8_8_dd_chars(uint8_t BL, uint8_t DL)
     2050{
     2051    set_gfx_font(vgafont8, 8, BL, DL);
     2052}
     2053static void biosfn_load_gfx_8_16_chars(uint8_t BL, uint8_t DL)
     2054{
     2055    set_gfx_font(vgafont16, 16, BL, DL);
    20452056}
    20462057// --------------------------------------------------------------------------------------------
     
    26032614        break;
    26042615       case 0x22:
    2605         biosfn_load_gfx_8_14_chars(GET_BL());
     2616        biosfn_load_gfx_8_14_chars(GET_BL(),GET_DL());
    26062617        break;
    26072618       case 0x23:
    2608         biosfn_load_gfx_8_8_dd_chars(GET_BL());
     2619        biosfn_load_gfx_8_8_dd_chars(GET_BL(),GET_DL());
    26092620        break;
    26102621       case 0x24:
    2611         biosfn_load_gfx_8_16_chars(GET_BL());
     2622        biosfn_load_gfx_8_16_chars(GET_BL(),GET_DL());
    26122623        break;
    26132624       case 0x30:
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