- vga extension check added. Unsupported extension names now cause a panic

- vga extension option in bochsrc sample added
This commit is contained in:
Volker Ruppert 2005-02-10 09:48:12 +00:00
parent 5e420c7172
commit 5b57471245
4 changed files with 30 additions and 7 deletions

View File

@ -111,6 +111,15 @@ megs: 32
#vgaromimage: file=bios/VGABIOS-elpin-2.40
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
#=======================================================================
# VGA:
# Here you can specify the display extension to be used. With the value
# 'none' you can use standard VGA with no extension. Other supported
# values are 'vbe' for Bochs VBE and 'cirrus' for Cirrus SVGA support.
#=======================================================================
#vga: extension=cirrus
vga: extension=vbe
#=======================================================================
# FLOPPYA:
# Point this to pathname of floppy image file or device
@ -639,7 +648,7 @@ keyboard_mapping: enabled=0, map=
# also specify the devices connected to PCI slots. Up to 5 slots are
# available now. These devices are currently supported: ne2k, pcivga,
# pcidev and pcipnic. If Bochs is compiled with Cirrus SVGA support
# you'll have the choice 'cirrus' instead of 'pcivga'.
# you'll have the additional choice 'cirrus'.
#
# Example:
# i440fxsupport: enabled=1, slot1=pcivga, slot2=ne2k

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: svga_cirrus.cc,v 1.8 2005-02-09 22:00:28 vruppert Exp $
// $Id: svga_cirrus.cc,v 1.9 2005-02-10 09:48:12 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2004 Makoto Suzuki (suzu)
@ -268,6 +268,7 @@ bx_svga_cirrus_c::init(void)
svga_read_handler, svga_write_handler);
BX_CIRRUS_THIS bx_vga_c::init_systemtimer(
svga_timer_handler);
BX_CIRRUS_THIS extension_init = 1;
} else {
BX_CIRRUS_THIS bx_vga_c::init_iohandlers(
bx_vga_c::read_handler, bx_vga_c::write_handler);

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: vga.cc,v 1.113 2005-02-01 19:16:39 vruppert Exp $
// $Id: vga.cc,v 1.114 2005-02-10 09:48:12 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -134,6 +134,8 @@ bx_vga_c::init(void)
unsigned addr;
#endif
BX_VGA_THIS extension_init = 0;
BX_VGA_THIS extension_checked = 0;
#if !BX_SUPPORT_CLGD54XX
BX_VGA_THIS init_iohandlers(read_handler,write_handler);
#endif // !BX_SUPPORT_CLGD54XX
@ -321,6 +323,7 @@ bx_vga_c::init(void)
} else {
BX_VGA_THIS s.vbe_max_bpp=max_bpp;
}
BX_VGA_THIS extension_init = 1;
BX_INFO(("VBE Bochs Display Extension Enabled"));
}
@ -373,6 +376,14 @@ bx_vga_c::init_systemtimer(bx_timer_handler_t f_timer)
void
bx_vga_c::reset(unsigned type)
{
if (!BX_VGA_THIS extension_checked) {
if (!BX_VGA_THIS extension_init &&
(strlen(bx_options.Ovga_extension->getptr()) > 0) &&
strcmp(bx_options.Ovga_extension->getptr(), "none")) {
BX_PANIC(("unknown display extension: %s", bx_options.Ovga_extension->getptr()));
}
BX_VGA_THIS extension_checked = 1;
}
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: vga.h,v 1.44 2004-11-06 17:03:44 vruppert Exp $
// $Id: vga.h,v 1.45 2005-02-10 09:48:12 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -322,13 +322,15 @@ protected:
#endif
int timer_id;
bx_bool extension_init;
bx_bool extension_checked;
public:
static void timer_handler(void *);
BX_VGA_SMF void timer(void);
static void timer_handler(void *);
BX_VGA_SMF void timer(void);
protected:
BX_VGA_SMF void update(void);
BX_VGA_SMF void update(void);
BX_VGA_SMF void determine_screen_dimensions(unsigned *piHeight,
unsigned *piWidth);
};