aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Bothamy <cbothamy@users.sourceforge.net>2003-01-15 17:49:06 +0000
committerChristophe Bothamy <cbothamy@users.sourceforge.net>2003-01-15 17:49:06 +0000
commita46750352126ad4f130384d92c98a8c2863a8be1 (patch)
tree59f4abccb349c9b68913bee6ce7d457294d5fb23
parent81f55a47dd27472b0273e35af82afd24e78d9d05 (diff)
downloadvgabios-a46750352126ad4f130384d92c98a8c2863a8be1.tar.gz
- fix bug found by ams : a 8bits index value was compared to 0x100 in some cases
in biosfn_set_all_dac_reg, biosfn_read_all_dac_reg, biosfn_perform_gray_scale_summing
-rw-r--r--vgabios.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vgabios.c b/vgabios.c
index e05006d..2cc4162 100644
--- a/vgabios.c
+++ b/vgabios.c
@@ -1495,7 +1495,7 @@ Bit16u reg;Bit8u g;Bit8u b;Bit8u r;
// --------------------------------------------------------------------------------------------
static void biosfn_set_all_dac_reg (start,count,seg,offset)
Bit16u start;Bit16u count;Bit16u seg;Bit16u offset;
-{Bit8u i;
+{Bit16u i;
outb(VGAREG_DAC_WRITE_ADDRESS,start);
for(i=0;i<count;i++)
{outb(VGAREG_DAC_DATA,read_byte(seg,offset++));
@@ -1551,7 +1551,7 @@ Bit8u reg;Bit16u *tor;Bit16u *togb;
// --------------------------------------------------------------------------------------------
static void biosfn_read_all_dac_reg (start,count,seg,offset)
Bit16u start;Bit16u count;Bit16u seg;Bit16u offset;
-{Bit8u i;
+{Bit16u i;
outb(VGAREG_DAC_READ_ADDRESS,start);
for(i=0;i<count;i++)
{write_byte(seg,offset++,inb(VGAREG_DAC_DATA));
@@ -1594,8 +1594,9 @@ static void biosfn_read_video_dac_state (state) Bit16u *state;
// --------------------------------------------------------------------------------------------
static void biosfn_perform_gray_scale_summing (start,count)
Bit16u start;Bit16u count;
-{Bit8u index,r,g,b,d;
+{Bit8u r,g,b,d;
Bit16u i,m;
+ Bit16u index;
inb(VGAREG_ACTL_RESET);
outb(VGAREG_ACTL_ADDRESS,0x10);