- now method set_initial_val() for string parameters allows setting the default

value for romimage/vgaromimage  options based on the builtin BXSHARE variable
- default ips value increased to 2000000
This commit is contained in:
Volker Ruppert 2005-10-15 10:43:55 +00:00
parent 9999d3ea2d
commit d2e158abf1
3 changed files with 15 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: config.cc,v 1.48 2005-10-10 19:32:53 vruppert Exp $
// $Id: config.cc,v 1.49 2005-10-15 10:43:55 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -824,7 +824,7 @@ void bx_init_options ()
"", BX_PATHNAME_LEN);
bx_options.rom.Opath->set_format ("Name of ROM BIOS image: %s");
sprintf(name, "%s/BIOS-bochs-latest", get_builtin_variable("BXSHARE"));
bx_options.rom.Opath->set (name);
bx_options.rom.Opath->set_initial_val (name);
bx_options.rom.Oaddress = new bx_param_num_c (BXP_ROM_ADDRESS,
"memory.rom.addr",
"The address at which the ROM image should be loaded",
@ -848,7 +848,7 @@ void bx_init_options ()
bx_options.vgarom.Opath->set_label ("VGA BIOS image");
#endif
sprintf(name, "%s/VGABIOS-lgpl-latest", get_builtin_variable("BXSHARE"));
bx_options.vgarom.Opath->set (name);
bx_options.vgarom.Opath->set_initial_val (name);
for (i=0; i<4; i++) {
sprintf (name, "memory.optrom.%d.path", i+1);
@ -1133,7 +1133,7 @@ void bx_init_options ()
"Emulated instructions per second (IPS)",
"Emulated instructions per second, used to calibrate bochs emulated time with wall clock time.",
1, BX_MAX_BIT32U,
1000000);
2000000);
bx_options.Otext_snapshot_check = new bx_param_bool_c (BXP_TEXT_SNAPSHOT_CHECK,
"Enable panic for use in bochs testing",
"Enable panic when text on screen matches snapchk.txt.\nUseful for regression testing.\nIn win32, turns off CR/LF in snapshots and cuts.",

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: siminterface.cc,v 1.109 2005-01-05 19:50:54 vruppert Exp $
// $Id: siminterface.cc,v 1.110 2005-10-15 10:43:55 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// See siminterface.h for description of the siminterface concept.
@ -1309,6 +1309,14 @@ bx_param_string_c::equals (const char *buf)
return (strncmp (val, buf, maxsize) == 0);
}
void bx_param_string_c::set_initial_val (char *buf) {
if (options->get () & RAW_BYTES)
memcpy (initial_val, buf, maxsize);
else
strncpy (initial_val, buf, maxsize);
set (initial_val);
}
bx_list_c::bx_list_c (bx_id id, int maxsize)
: bx_param_c (id, "list", "")
{

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: siminterface.h,v 1.143 2005-10-13 17:36:32 vruppert Exp $
// $Id: siminterface.h,v 1.144 2005-10-15 10:43:55 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Intro to siminterface by Bryce Denney:
@ -1121,6 +1121,7 @@ public:
void set_separator (char sep) {separator = sep; }
char get_separator () {return separator; }
int get_maxsize () {return maxsize; }
void set_initial_val (char *buf);
#if BX_USE_TEXTCONFIG
virtual void text_print (FILE *fp);
virtual int text_ask (FILE *fpin, FILE *fpout);