- fixed VBE y offset check (add x offset to start address after check)
This commit is contained in:
parent
60fab95d08
commit
139ea79c70
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: vga.cc,v 1.131 2006-07-08 13:05:50 vruppert Exp $
|
||||
// $Id: vga.cc,v 1.132 2006-07-11 07:49:23 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -3402,17 +3402,17 @@ Bit32u bx_vga_c::vbe_write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
BX_VGA_THIS s.vbe_offset_y=(Bit16u)value;
|
||||
BX_VGA_THIS s.vbe_virtual_start = BX_VGA_THIS s.vbe_offset_y * BX_VGA_THIS s.line_offset;
|
||||
if (BX_VGA_THIS s.vbe_bpp != VBE_DISPI_BPP_4) {
|
||||
BX_VGA_THIS s.vbe_virtual_start += (BX_VGA_THIS s.vbe_offset_x * BX_VGA_THIS s.vbe_bpp_multiplier);
|
||||
if ((BX_VGA_THIS s.vbe_virtual_start + BX_VGA_THIS s.vbe_visible_screen_size) > VBE_DISPI_TOTAL_VIDEO_MEMORY_BYTES)
|
||||
{
|
||||
BX_PANIC(("VBE offset y %d out of bounds",value));
|
||||
}
|
||||
BX_VGA_THIS s.vbe_virtual_start += (BX_VGA_THIS s.vbe_offset_x * BX_VGA_THIS s.vbe_bpp_multiplier);
|
||||
} else {
|
||||
BX_VGA_THIS s.vbe_virtual_start += (BX_VGA_THIS s.vbe_offset_x >> 3);
|
||||
if ((BX_VGA_THIS s.vbe_virtual_start + BX_VGA_THIS s.vbe_visible_screen_size) > (VBE_DISPI_TOTAL_VIDEO_MEMORY_BYTES / 4))
|
||||
{
|
||||
BX_PANIC(("VBE offset y %d out of bounds",value));
|
||||
}
|
||||
BX_VGA_THIS s.vbe_virtual_start += (BX_VGA_THIS s.vbe_offset_x >> 3);
|
||||
}
|
||||
needs_update = 1;
|
||||
} break;
|
||||
|
Loading…
Reference in New Issue
Block a user