From: Paolo Bonzini Date: Thu, 10 Jan 2013 12:41:36 +0000 (+0100) Subject: vgabios: implement AX=1120H..1124H functions X-Git-Tag: rel-1.7.2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4bd8aebf3534e10d9aa21e820903f2cf9120708c;p=seabios.git vgabios: implement AX=1120H..1124H functions These function only have to set INT 1Fh and INT 43h, and set the BDA height + number of rows. I could not find out whether AX=1120h should also set the character height to 8. I think not, because INT 43h might still point to 14- or 16-pixel high characters and in this case INT 1Fh will not be used at all. Signed-off-by: Paolo Bonzini --- diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c index b13d274..afaf018 100644 --- a/vgasrc/vgabios.c +++ b/vgasrc/vgabios.c @@ -796,6 +796,61 @@ handle_101114(struct bregs *regs) set_scan_lines(16); } +static void +handle_101120(struct bregs *regs) +{ + SET_IVT(0x1f, SEGOFF(regs->es, regs->bp)); +} + +void +load_gfx_font(u16 seg, u16 off, u8 height, u8 bl, u8 dl) +{ + u8 rows; + + SET_IVT(0x43, SEGOFF(seg, off)); + switch(bl) { + case 0: + rows = dl; + break; + case 1: + rows = 14; + break; + case 3: + rows = 43; + break; + case 2: + default: + rows = 25; + break; + } + SET_BDA(video_rows, rows - 1); + SET_BDA(char_height, height); +} + +static void +handle_101121(struct bregs *regs) +{ + load_gfx_font(regs->es, regs->bp, regs->cx, regs->bl, regs->dl); +} + +static void +handle_101122(struct bregs *regs) +{ + load_gfx_font(get_global_seg(), (u32)vgafont14, 14, regs->bl, regs->dl); +} + +static void +handle_101123(struct bregs *regs) +{ + load_gfx_font(get_global_seg(), (u32)vgafont8, 8, regs->bl, regs->dl); +} + +static void +handle_101124(struct bregs *regs) +{ + load_gfx_font(get_global_seg(), (u32)vgafont16, 16, regs->bl, regs->dl); +} + static void handle_101130(struct bregs *regs) { @@ -867,6 +922,11 @@ handle_1011(struct bregs *regs) case 0x12: handle_101112(regs); break; case 0x14: handle_101114(regs); break; case 0x30: handle_101130(regs); break; + case 0x20: handle_101120(regs); break; + case 0x21: handle_101121(regs); break; + case 0x22: handle_101122(regs); break; + case 0x23: handle_101123(regs); break; + case 0x24: handle_101124(regs); break; default: handle_1011XX(regs); break; } }