[SeaBIOS] [PATCH 04/15] Report stdvga modes in VBE via int10 (AX = 4F00h)

Christian Gmeiner christian.gmeiner at gmail.com
Tue Sep 4 08:45:34 CEST 2012


2012/9/3 Kevin O'Connor <kevin at koconnor.net>:
> On Mon, Sep 03, 2012 at 06:59:32PM +0200, Christian Gmeiner wrote:
>> Am 03.09.2012 18:07 schrieb "Christian Gmeiner" <christian.gmeiner at gmail.com
>> >:
>> >
>> > 2012/9/3 Kevin O'Connor <kevin at koconnor.net>:
>> > > On Sat, Sep 01, 2012 at 05:12:55PM +0200, Christian Gmeiner wrote:
>> > >> As all supported graphic adapters are supporting VGA we should
>> > >> list them in int10 (AX = 4F00h). Also clext.c and bochsvga.c
>> > >> are haveing a function named like is_XXX_mode() which checks
>> > >> if its a default VGA mode or a VESA mode. If its a normal VGA
>> > >> mode stdvga_set_mode() gets called.
>> > > [...]
>> > >>  void
>> > >>  stdvga_list_modes(u16 seg, u16 *dest, u16 *last)
>> > >>  {
>> > >> +    int i;
>> > >> +    for (i = 0; i < ARRAY_SIZE(vga_modes); i++) {
>> > >> +        struct stdvga_mode_s *stdmode_g = &vga_modes[i];
>> > >> +        u16 mode = GET_GLOBAL(stdmode_g->mode);
>> > >> +        if (mode == 0xffff)
>> > >> +            continue;
>> > >> +        SET_FARVAR(seg, *dest, mode);
>> > >> +        dest++;
>> > >> +    }
>> > >> +
>> > >>      SET_FARVAR(seg, *dest, 0xffff);
>> > >>  }
>> > >
>> > > This is a good idea.  However, I don't think vbe_104f01() will
>> > > correctly handle all the standard vga modes as it is coded today.
>> > >
>> >
>> > I will have a closer look at it during my following patches. If you want
>> you
>> > can skip this patch.
>> >
>>
>> Maybe it would be better to use this patch and update vga_modes array to
>> reflect the modes we can do now.
>
> All the modes work in the sense that one can switch to them.  (I've
> tested that.)  However, I think that some modes (eg, cga) wont be
> represented correctly by vbe_104f01.
>

Can you look at it?

---
Christian Gmeiner, MSc



More information about the SeaBIOS mailing list