~ubuntu-branches/ubuntu/saucy/seabios/saucy-proposed

« back to all changes in this revision

Viewing changes to vgasrc/stdvga.c

  • Committer: Package Import Robot
  • Author(s): Michael Tokarev
  • Date: 2013-07-08 21:34:44 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20130708213444-6ed9q23j39x143lu
Tags: 1.7.3-1
Multi-Arch: allowed

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
// This file may be distributed under the terms of the GNU LGPLv3 license.
7
7
 
8
8
#include "vgabios.h" // struct vgamode_s
9
 
#include "stdvga.h" // stdvga_init
 
9
#include "stdvga.h" // stdvga_setup
10
10
#include "ioport.h" // outb
11
11
#include "farptr.h" // SET_FARVAR
12
12
#include "biosvar.h" // GET_GLOBAL
123
123
        u16 intensity = ((77 * rgb[0] + 151 * rgb[1] + 28 * rgb[2]) + 0x80) >> 8;
124
124
        if (intensity > 0x3f)
125
125
            intensity = 0x3f;
 
126
        rgb[0] = rgb[1] = rgb[2] = intensity;
126
127
 
127
128
        stdvga_dac_write(GET_SEG(SS), rgb, i, 1);
128
129
    }
490
491
}
491
492
 
492
493
int
493
 
stdvga_init(void)
 
494
stdvga_setup(void)
494
495
{
495
496
    // switch to color mode and enable CPU access 480 lines
496
497
    stdvga_misc_write(0xc3);