diff --git a/src/ints/int10_vesa.cpp b/src/ints/int10_vesa.cpp index ca2ac628..2d9378db 100644 --- a/src/ints/int10_vesa.cpp +++ b/src/ints/int10_vesa.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: int10_vesa.cpp,v 1.15 2005-03-24 21:41:26 qbix79 Exp $ */ +/* $Id: int10_vesa.cpp,v 1.16 2005-04-27 18:58:08 qbix79 Exp $ */ #include #include @@ -95,8 +95,8 @@ Bit8u VESA_GetSVGAInformation(Bit16u seg,Bit16u off) { } /* Fill common data */ MEM_BlockWrite(buffer,(void *)"VESA",4); //Identification + mem_writew(buffer+0x04,0x200); //Vesa version 0x200 if (vbe2) { - mem_writew(buffer+0x04,0x200); //Vesa version 0x200 mem_writed(buffer+0x06,RealMake(seg,vbe2_pos)); for (i=0;i255) return 0x1; if (index+count>256) return 0x1; IO_Write(0x3c8,index); while (count) { - IO_Write(0x3c9,mem_readb(data++)); - IO_Write(0x3c9,mem_readb(data++)); - IO_Write(0x3c9,mem_readb(data++)); + b = mem_readb(data++); + g = mem_readb(data++); + r = mem_readb(data++); data++; + IO_Write(0x3c9,r); + IO_Write(0x3c9,g); + IO_Write(0x3c9,b); count--; } return 0x00; @@ -201,13 +205,17 @@ Bit8u VESA_SetPalette(PhysPt data,Bitu index,Bitu count) { Bit8u VESA_GetPalette(PhysPt data,Bitu index,Bitu count) { + Bit8u r,g,b; if (index>255) return 0x1; if (index+count>256) return 0x1; IO_Write(0x3c7,index); while (count) { - mem_writeb(data++,IO_Read(0x3c9)); - mem_writeb(data++,IO_Read(0x3c9)); - mem_writeb(data++,IO_Read(0x3c9)); + r = IO_Read(0x3c9); + g = IO_Read(0x3c9); + b = IO_Read(0x3c9); + mem_writeb(data++,b); + mem_writeb(data++,g); + mem_writeb(data++,r); data++; count--; }