X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=seabios.git;a=blobdiff_plain;f=vgasrc%2Fvbe.c;h=0ee69b4ad8257df408ff47b38e3ca45307719b3f;hp=77b09344c5019a15bfa24a53603f6727108ba09e;hb=e737b178e1232c4bec4bd5da721806a9dc176e15;hpb=cfd7ef9d8b38d9706671a4e88d40dcc4ac922b6a diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c index 77b0934..0ee69b4 100644 --- a/vgasrc/vbe.c +++ b/vgasrc/vbe.c @@ -305,8 +305,29 @@ fail: static void vbe_104f08(struct bregs *regs) { - debug_stub(regs); - regs->ax = 0x0100; + struct vgamode_s *vmode_g = get_current_mode(); + if (! vmode_g) + goto fail; + u8 memmodel = GET_GLOBAL(vmode_g->memmodel); + if (memmodel == MM_DIRECT || memmodel == MM_YUV) { + regs->ax = 0x034f; + return; + } + if (regs->bl > 1) + goto fail; + if (regs->bl == 0) { + int ret = vgahw_set_dacformat(vmode_g, regs->bh); + if (ret < 0) + goto fail; + } + int ret = vgahw_get_dacformat(vmode_g); + if (ret < 0) + goto fail; + regs->bh = ret; + regs->ax = 0x004f; + return; +fail: + regs->ax = 0x014f; } static void