diff --git a/bochs/gui/wxdialog.cc b/bochs/gui/wxdialog.cc index aae4578f7..58f6b5595 100644 --- a/bochs/gui/wxdialog.cc +++ b/bochs/gui/wxdialog.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////// -// $Id: wxdialog.cc,v 1.64 2003-09-02 19:34:48 vruppert Exp $ +// $Id: wxdialog.cc,v 1.65 2003-09-04 16:58:27 vruppert Exp $ ///////////////////////////////////////////////////////////////// // Define BX_PLUGGABLE in files that can be compiled into plugins. For @@ -785,207 +785,6 @@ void AdvancedLogOptionsDialog::ShowHelp () wxMessageBox(MSG_NO_HELP, MSG_NO_HELP_CAPTION, wxOK | wxICON_ERROR, this ); } -////////////////////////////////////////////////////////////////////// -// ConfigMemoryDialog implementation -////////////////////////////////////////////////////////////////////// -// Structure: -// mainSizer: -// box1 = static box "Standard Options" -// box1sizer: -// box1gridSizer, 3 columns: -// "memsize" -// megs = textfield -// spacer -// "biosimg" -// biosImage = textfield -// browse button -// "biosaddr" -// biosAddr = textfield -// spacer -// "vgabiosimg" -// vgabios = textfield -// browse button -// "vgabiosaddr" -// "0xc0000" -// box2 = static box "Optional ROM images" -// box2sizer: -// box2gridSizer, 3 columns: -// "opt rom 1" -// romImage[0] = textfield -// browse button -// "opt rom 2" -// romImage[1] = textfield -// browse button -// "opt rom 3" -// romImage[2] = textfield -// browse button -// "opt rom 4" -// romImage[3] = textfield -// browse button -// buttonSizer: -// help -// cancel -// ok -// - -// all events go to OnEvent method -BEGIN_EVENT_TABLE(ConfigMemoryDialog, wxDialog) - EVT_BUTTON(-1, ConfigMemoryDialog::OnEvent) - EVT_CHECKBOX(-1, ConfigMemoryDialog::OnEvent) - EVT_TEXT(-1, ConfigMemoryDialog::OnEvent) -END_EVENT_TABLE() - - -ConfigMemoryDialog::ConfigMemoryDialog( - wxWindow* parent, - wxWindowID id) - : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, - wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) -{ - static char *box1_label[] = CONFIG_MEMORY_BOX1_LABELS; - static char *box2_label[] = CONFIG_MEMORY_BOX2_LABELS; - int n_browse = 0; - int insideStaticBoxMargin = 15; - SetTitle (CONFIG_MEMORY_TITLE); - mainSizer = new wxBoxSizer (wxVERTICAL); - wxStaticBox *box1 = new wxStaticBox (this, -1, CONFIG_MEMORY_BOX1_TITLE); - box1sizer = new wxStaticBoxSizer (box1, wxVERTICAL); - mainSizer->Add (box1sizer, 0, wxALL|wxGROW, 10); - wxStaticBox *box2 = new wxStaticBox (this, -1, CONFIG_MEMORY_BOX2_TITLE); - box2sizer = new wxStaticBoxSizer (box2, wxVERTICAL); - mainSizer->Add (box2sizer, 0, wxALL|wxGROW, 10); - buttonSizer = new wxBoxSizer (wxHORIZONTAL); - mainSizer->Add (buttonSizer, 0, wxALIGN_RIGHT); - - // box1 contents - box1gridSizer = new wxFlexGridSizer (3); - box1sizer->Add (box1gridSizer, 0, wxALL, insideStaticBoxMargin); -#define add(x) box1gridSizer->Add (x, 0, wxALL, 2) -#define addrt(x) box1gridSizer->Add (x, 0, wxALL|wxALIGN_RIGHT, 2) -#define newlabel(x) new wxStaticText (this, -1, x) -#define spacer() box1gridSizer->Add (1, 1); -#define newbrowse() (browseBtn[n_browse++] = new wxButton (this, ID_Browse, BTNLABEL_BROWSE)) -#define newlongtext() (new wxTextCtrl (this, -1, "", wxDefaultPosition, longTextSize)) - addrt (newlabel (box1_label[0])); - add (megs = new wxSpinCtrl (this, -1)); - spacer(); - addrt (newlabel (box1_label[1])); - add (biosImage = newlongtext ()); - add (newbrowse ()); - addrt (newlabel (box1_label[2])); - add (biosAddr = new wxTextCtrl (this, -1)); - spacer(); - addrt (newlabel (box1_label[3])); - add (vgabiosImage = newlongtext ()); - add (newbrowse ()); - addrt (newlabel (box1_label[4])); - add (newlabel (box1_label[5])); -#undef add -#undef addrt -#undef newlabel -#undef spacer - - // box2 contents - box2gridSizer = new wxFlexGridSizer (3); - box2sizer->Add (box2gridSizer, 0, wxALL, insideStaticBoxMargin); -#define add(x) box2gridSizer->Add (x, 0, wxALL, 2) -#define addrt(x) box2gridSizer->Add (x, 0, wxALL|wxALIGN_RIGHT, 2) -#define newlabel(x) new wxStaticText (this, -1, x) -#define spacer() box2gridSizer->Add (1, 1); - for (int i=0; iAdd (btn, 0, wxALL, 5); - // use wxID_CANCEL because pressing ESC produces this same code - btn = new wxButton (this, wxID_CANCEL, BTNLABEL_CANCEL); - buttonSizer->Add (btn, 0, wxALL, 5); - btn = new wxButton (this, wxID_OK, BTNLABEL_OK); - buttonSizer->Add (btn, 0, wxALL, 5); -} - -void ConfigMemoryDialog::Init() -{ - // lay it out! - SetAutoLayout(TRUE); - SetSizer(mainSizer); - mainSizer->Fit (this); - wxSize size = mainSizer->GetMinSize (); - wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ()); - int margin = 5; - SetSizeHints (size.GetWidth () + margin, size.GetHeight () + margin); - Center (); -} - -void ConfigMemoryDialog::OnEvent(wxCommandEvent& event) -{ - int id = event.GetId (); - wxLogMessage ("you pressed button id=%d", id); - switch (id) { - case ID_Browse: - { - // There are several browse buttons. Figure out which one was - // pressed, and which text control is next to it. - wxTextCtrl *text = NULL; - wxObject *source = event.GetEventObject (); - for (int i=0; iparent, pstr->id, ""); ckbx->SetValue (param->get ()); if (description) ckbx->SetToolTip(description); - sizer->Add (ckbx); + sizer->Add (ckbx, 0, wxALL, 2); if (!plain) sizer->Add (1, 1); // spacer pstr->u.checkbox = ckbx; idHash->Put (pstr->id, pstr); @@ -1312,7 +1111,7 @@ void ParamDialog::AddParam ( format = strdup(param->get_base () == 16 ? "0x%X" : "%d"); SetTextCtrl (textctrl, format, param->get ()); if (description) textctrl->SetToolTip(description); - sizer->Add (textctrl); + sizer->Add (textctrl, 0, wxALL, 2); if (!plain) sizer->Add (1, 1); // spacer pstr->u.text = textctrl; idHash->Put (pstr->id, pstr); @@ -1324,7 +1123,7 @@ void ParamDialog::AddParam ( if (!plain) ADD_LABEL (prompt); wxChoice *choice = new wxChoice (context->parent, pstr->id); if (description) choice->SetToolTip(description); - sizer->Add (choice, 0, wxADJUST_MINSIZE); + sizer->Add (choice, 0, wxADJUST_MINSIZE, 2); if (!plain) sizer->Add (1, 1); // spacer // fill in the choices int i=0; @@ -1358,14 +1157,14 @@ void ParamDialog::AddParam ( } else { txtctrl->SetValue (param->getptr ()); } - sizer->Add (txtctrl); + sizer->Add (txtctrl, 0, wxALL, 2); if (!plain) { if (isFilename) { // create Browse button pstr->browseButtonId = genId (); pstr->browseButton = new wxButton (context->parent, pstr->browseButtonId, BTNLABEL_BROWSE); - sizer->Add (pstr->browseButton, 0, wxALL, 5); + sizer->Add (pstr->browseButton, 0, wxALL, 2); idHash->Put (pstr->browseButtonId, pstr); // register under button id } else { sizer->Add (1, 1); // spacer @@ -1762,6 +1561,93 @@ void ParamDialog::ShowHelp () wxMessageBox(MSG_NO_HELP, MSG_NO_HELP_CAPTION, wxOK | wxICON_ERROR, this ); } +////////////////////////////////////////////////////////////////////// +// ConfigMemoryDialog implementation +////////////////////////////////////////////////////////////////////// +// Structure: +// mainSizer: +// box1 = static box "Standard Options" +// box1sizer: +// box1gridSizer, 3 columns: +// "memsize" +// megs = textfield +// spacer +// "biosimg" +// biosImage = textfield +// browse button +// "biosaddr" +// biosAddr = textfield +// spacer +// "vgabiosimg" +// vgabios = textfield +// browse button +// "vgabiosaddr" +// "0xc0000" +// box2 = static box "Optional ROM images" +// box2sizer: +// box2gridSizer, 3 columns: +// "opt rom 1" +// romImage[0] = textfield +// browse button +// "opt rom 2" +// romImage[1] = textfield +// browse button +// "opt rom 3" +// romImage[2] = textfield +// browse button +// "opt rom 4" +// romImage[3] = textfield +// browse button +// buttonSizer: +// help +// cancel +// ok +// + +// all events go to OnEvent method +BEGIN_EVENT_TABLE(ConfigMemoryDialog, wxDialog) + EVT_BUTTON(-1, ConfigMemoryDialog::OnEvent) + EVT_CHECKBOX(-1, ConfigMemoryDialog::OnEvent) + EVT_TEXT(-1, ConfigMemoryDialog::OnEvent) +END_EVENT_TABLE() + +ConfigMemoryDialog::ConfigMemoryDialog( + wxWindow* parent, + wxWindowID id) + : ParamDialog (parent, id) +{ + bx_id standardList[] = {BXP_MEM_SIZE, BXP_ROM_PATH, BXP_ROM_ADDRESS, + BXP_VGA_ROM_PATH, BXP_NULL}; + bx_id optionalList[] = {BXP_OPTROM1_PATH, BXP_OPTROM1_ADDRESS, + BXP_OPTROM2_PATH, BXP_OPTROM2_ADDRESS, + BXP_OPTROM3_PATH, BXP_OPTROM3_ADDRESS, + BXP_OPTROM4_PATH, BXP_OPTROM4_ADDRESS, BXP_NULL}; + int insideStaticBoxMargin = 15; + SetTitle (CONFIG_MEMORY_TITLE); + + // top level objects + wxStaticBox *box1 = new wxStaticBox (this, -1, CONFIG_MEMORY_BOX1_TITLE); + wxStaticBoxSizer *box1sizer = new wxStaticBoxSizer (box1, wxVERTICAL); + mainSizer->Add (box1sizer, 0, wxALL|wxGROW, 10); + + wxStaticBox *box2 = new wxStaticBox (this, -1, CONFIG_MEMORY_BOX2_TITLE); + wxStaticBoxSizer *box2sizer = new wxStaticBoxSizer (box2, wxVERTICAL); + mainSizer->Add (box2sizer, 0, wxALL|wxGROW, 10); + + // box1 contents + box1gridSizer = new wxFlexGridSizer (3); + box1sizer->Add (box1gridSizer, 0, wxALL, insideStaticBoxMargin); + AddParamList (standardList, box1gridSizer); + wxStaticText *vgabiosaddr1 = new wxStaticText (this, -1, "VGA BIOS address"); + box1gridSizer->Add (vgabiosaddr1, 0, wxALIGN_RIGHT|wxALL, 2); + wxStaticText *vgabiosaddr2 = new wxStaticText (this, -1, "0xC0000"); + box1gridSizer->Add (vgabiosaddr2, 0, wxALL, 2); + // box2 contents + box2gridSizer = new wxFlexGridSizer (3); + box2sizer->Add (box2gridSizer, 0, wxALL, insideStaticBoxMargin); + AddParamList (optionalList, box2gridSizer); +} + ///////////////////////////////////////////////////////////////// // CpuRegistersDialog ///////////////////////////////////////////////////////////////// diff --git a/bochs/gui/wxdialog.h b/bochs/gui/wxdialog.h index 2959a432b..fc31f2adc 100644 --- a/bochs/gui/wxdialog.h +++ b/bochs/gui/wxdialog.h @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////// -// $Id: wxdialog.h,v 1.50 2003-09-02 19:34:48 vruppert Exp $ +// $Id: wxdialog.h,v 1.51 2003-09-04 16:58:27 vruppert Exp $ //////////////////////////////////////////////////////////////////// // // wxWindows dialogs for Bochs @@ -208,94 +208,6 @@ public: DECLARE_EVENT_TABLE() }; -//////////////////////////////////////////////////////////////////////////// -// ConfigMemoryDialog -//////////////////////////////////////////////////////////////////////////// -// -// +--- Configure Memory ----------------------------------------------+ -// | | -// | +--- Standard Options ------------------------------------------+ | -// | | | | -// | | Memory size (megabytes): [_____] | | -// | | ROM BIOS image: [________________] [Browse] | | -// | | ROM BIOS address: [______] | | -// | | VGA BIOS image: [________________] [Browse] | | -// | | VGA BIOS address: 0xc0000 | | -// | | | | -// | +---------------------------------------------------------------+ | -// | | -// | +--- Optional ROM images ---------------------------------------+ | -// | | | | -// | | Optional ROM image #1: [________________] [Browse] | | -// | | Address: [______] | | -// | | | | -// | | Optional ROM image #2: [________________] [Browse] | | -// | | Address: [______] | | -// | | | | -// | | Optional ROM image #3: [________________] [Browse] | | -// | | Address: [______] | | -// | | | | -// | | Optional ROM image #4: [________________] [Browse] | | -// | | Address: [______] | | -// | | | | -// | +---------------------------------------------------------------+ | -// | [ Help ] [ Cancel ] [ Ok ] | -// +-------------------------------------------------------------------+ -// -// To use this dialog: -// After constructor, use SetSize(), SetBios(), SetBiosAddr(), SetVgaBios(), -// SetRom(), SetRomAddr() to set the initial values. Then call ShowModal() -// which will return wxID_OK or wxID_CANCEL. Use the Get* equivalent methods -// to find out the value from each field. -class ConfigMemoryDialog: public wxDialog -{ -private: -#define CONFIG_MEMORY_TITLE "Configure Memory" -#define CONFIG_MEMORY_BOX1_TITLE "Standard Options" -#define CONFIG_MEMORY_BOX2_TITLE "Optional ROM Images" -#define CONFIG_MEMORY_BOX1_LABELS { \ - "Memory size (megabytes):", \ - "ROM BIOS image:", \ - "ROM BIOS address:", \ - "VGA BIOS image:", \ - "VGA BIOS address:", \ - "0xC0000" } -#define CONFIG_MEMORY_BOX2_LABELS { \ - "Optional ROM image #1:", "Address:", \ - "Optional ROM image #2:", "Address:", \ - "Optional ROM image #3:", "Address:", \ - "Optional ROM image #4:", "Address:" \ - } -#define CONFIG_MEMORY_N_ROMS 4 - void Init (); // called automatically by ShowModal() - void ShowHelp (); - wxBoxSizer *mainSizer, *buttonSizer; - wxStaticBoxSizer *box1sizer, *box2sizer; - wxFlexGridSizer *box1gridSizer, *box2gridSizer; - wxSpinCtrl *megs; - wxTextCtrl *biosImage, *biosAddr, *vgabiosImage; - wxTextCtrl *rom[CONFIG_MEMORY_N_ROMS], *romAddr[CONFIG_MEMORY_N_ROMS]; -#define CONFIG_MEMORY_N_BROWSES 6 - wxButton *browseBtn[CONFIG_MEMORY_N_BROWSES]; -public: - ConfigMemoryDialog(wxWindow* parent, wxWindowID id); - void OnEvent (wxCommandEvent& event); - int ShowModal() { Init(); return wxDialog::ShowModal(); } - void SetSize (int val) { megs->SetValue (val); } - void SetBios (wxString filename) { biosImage->SetValue (filename); } - void SetVgaBios (wxString filename) { vgabiosImage->SetValue (filename); } - void SetRom (int n, wxString filename) { rom[n]->SetValue (filename); } - void SetBiosAddr (int addr) { SetTextCtrl (biosAddr, "0x%05X", addr); } - void SetRomAddr (int n, int addr) { SetTextCtrl (romAddr[n], "0x%05X", addr); } - int GetSize () { return megs->GetValue (); } - wxString GetBios () { return biosImage->GetValue (); } - wxString GetVgaBios () { return vgabiosImage->GetValue (); } - wxString GetRom (int n) { return rom[n]->GetValue (); } - int GetBiosAddr () { return GetTextCtrlInt (biosAddr); } - int GetRomAddr (int n) { return GetTextCtrlInt (romAddr[n]); } - -DECLARE_EVENT_TABLE() -}; //////////////////////////////////////////////////////////////////////////// // LogOptionsDialog @@ -591,6 +503,18 @@ public: DECLARE_EVENT_TABLE() }; +class ConfigMemoryDialog : public ParamDialog +{ +#define CONFIG_MEMORY_TITLE "Configure Memory" +#define CONFIG_MEMORY_BOX1_TITLE "Standard Options" +#define CONFIG_MEMORY_BOX2_TITLE "Optional ROM Images" +private: + wxFlexGridSizer *box1gridSizer, *box2gridSizer; +public: + ConfigMemoryDialog(wxWindow* parent, wxWindowID id); +DECLARE_EVENT_TABLE() +}; + //////////////////////////////////////////////////////////////////////////// // CpuRegistersDialog //////////////////////////////////////////////////////////////////////////// diff --git a/bochs/gui/wxmain.cc b/bochs/gui/wxmain.cc index a34c701b5..7b9b2336f 100644 --- a/bochs/gui/wxmain.cc +++ b/bochs/gui/wxmain.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////// -// $Id: wxmain.cc,v 1.97 2003-09-02 19:34:48 vruppert Exp $ +// $Id: wxmain.cc,v 1.98 2003-09-04 16:58:27 vruppert Exp $ ///////////////////////////////////////////////////////////////// // // wxmain.cc implements the wxWindows frame, toolbar, menus, and dialogs. @@ -593,48 +593,7 @@ void MyFrame::OnEditBoot(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnEditMemory(wxCommandEvent& WXUNUSED(event)) { ConfigMemoryDialog dlg (this, -1); - bx_param_num_c *megs = (bx_param_num_c*) SIM->get_param(BXP_MEM_SIZE); - bx_param_string_c *bios = (bx_param_string_c *) SIM->get_param (BXP_ROM_PATH); - bx_param_num_c *biosaddr = (bx_param_num_c*) SIM->get_param(BXP_ROM_ADDRESS); - bx_param_string_c *vgabios = (bx_param_string_c *) SIM->get_param (BXP_VGA_ROM_PATH); - static bx_id optRomPathParams[] = { - BXP_OPTROM1_PATH, BXP_OPTROM2_PATH, BXP_OPTROM3_PATH, BXP_OPTROM4_PATH - }; - static bx_id optRomAddrParams[] = { - BXP_OPTROM1_ADDRESS, BXP_OPTROM2_ADDRESS, BXP_OPTROM3_ADDRESS, BXP_OPTROM4_ADDRESS - }; - bx_param_string_c *optromPath[CONFIG_MEMORY_N_ROMS]; - bx_param_num_c *optromAddr[CONFIG_MEMORY_N_ROMS]; - int rom; - for (rom=0; romget_param (optRomPathParams[rom]); - optromAddr[rom] = (bx_param_num_c *) - SIM->get_param (optRomAddrParams[rom]); - } - dlg.SetSize (megs->get ()); - dlg.SetBios (wxString (bios->getptr ())); - dlg.SetBiosAddr (biosaddr->get ()); - dlg.SetVgaBios (wxString (vgabios->getptr ())); - for (rom=0; romgetptr ())); - dlg.SetRomAddr (rom, optromAddr[rom]->get ()); - } - int n = dlg.ShowModal (); - if (n == wxID_OK) { - char buf[1024]; - megs->set (dlg.GetSize ()); - safeWxStrcpy (buf, dlg.GetBios (), sizeof (buf)); - bios->set (buf); - biosaddr->set (dlg.GetBiosAddr ()); - safeWxStrcpy (buf, dlg.GetVgaBios (), sizeof (buf)); - vgabios->set (buf); - for (rom=0; romset (buf); - optromAddr[rom]->set (dlg.GetRomAddr (rom)); - } - } + dlg.ShowModal (); } void MyFrame::OnEditSound(wxCommandEvent& WXUNUSED(event)) diff --git a/bochs/main.cc b/bochs/main.cc index 145c16098..6bdea2c4b 100644 --- a/bochs/main.cc +++ b/bochs/main.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: main.cc,v 1.247 2003-09-02 19:34:48 vruppert Exp $ +// $Id: main.cc,v 1.248 2003-09-04 16:58:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -862,8 +862,12 @@ void bx_init_options () "Amount of RAM in megabytes", 1, BX_MAX_BIT32U, BX_DEFAULT_MEM_MEGS); - bx_options.memory.Osize->set_format ("Memory size in megabytes: %d"); bx_options.memory.Osize->set_ask_format ("Enter memory size (MB): [%d] "); +#if BX_WITH_WX + bx_options.memory.Osize->set_label ("Memory size (megabytes)"); +#else + bx_options.memory.Osize->set_format ("Memory size in megabytes: %d"); +#endif // initialize serial and parallel port options #define PAR_SER_INIT_LIST_MAX \ @@ -978,8 +982,13 @@ void bx_init_options () "The address at which the ROM image should be loaded", 0, BX_MAX_BIT32U, 0xf0000); - bx_options.rom.Oaddress->set_format ("ROM BIOS address: 0x%05x"); bx_options.rom.Oaddress->set_base (16); +#if BX_WITH_WX + bx_options.rom.Opath->set_label ("ROM BIOS image"); + bx_options.rom.Oaddress->set_label ("ROM BIOS address"); +#else + bx_options.rom.Oaddress->set_format ("ROM BIOS address: 0x%05x"); +#endif bx_options.optrom[0].Opath = new bx_param_filename_c (BXP_OPTROM1_PATH, "optional romimage #1", @@ -991,8 +1000,13 @@ void bx_init_options () "The address at which the optional ROM image #1 should be loaded", 0, BX_MAX_BIT32U, 0); - bx_options.optrom[0].Oaddress->set_format ("optional ROM #1 address: 0x%05x"); bx_options.optrom[0].Oaddress->set_base (16); +#if BX_WITH_WX + bx_options.optrom[0].Opath->set_label ("Optional ROM image #1"); + bx_options.optrom[0].Oaddress->set_label ("Address"); +#else + bx_options.optrom[0].Oaddress->set_format ("optional ROM #1 address: 0x%05x"); +#endif bx_options.optrom[1].Opath = new bx_param_filename_c (BXP_OPTROM2_PATH, "optional romimage #2", @@ -1004,8 +1018,13 @@ void bx_init_options () "The address at which the optional ROM image #2 should be loaded", 0, BX_MAX_BIT32U, 0); - bx_options.optrom[1].Oaddress->set_format ("optional ROM #2 address: 0x%05x"); bx_options.optrom[1].Oaddress->set_base (16); +#if BX_WITH_WX + bx_options.optrom[1].Opath->set_label ("Optional ROM image #2"); + bx_options.optrom[1].Oaddress->set_label ("Address"); +#else + bx_options.optrom[1].Oaddress->set_format ("optional ROM #2 address: 0x%05x"); +#endif bx_options.optrom[2].Opath = new bx_param_filename_c (BXP_OPTROM3_PATH, "optional romimage #3", @@ -1017,8 +1036,13 @@ void bx_init_options () "The address at which the optional ROM image #3 should be loaded", 0, BX_MAX_BIT32U, 0); - bx_options.optrom[2].Oaddress->set_format ("optional ROM #3 address: 0x%05x"); bx_options.optrom[2].Oaddress->set_base (16); +#if BX_WITH_WX + bx_options.optrom[2].Opath->set_label ("Optional ROM image #3"); + bx_options.optrom[2].Oaddress->set_label ("Address"); +#else + bx_options.optrom[2].Oaddress->set_format ("optional ROM #3 address: 0x%05x"); +#endif bx_options.optrom[3].Opath = new bx_param_filename_c (BXP_OPTROM4_PATH, "optional romimage #4", @@ -1030,14 +1054,22 @@ void bx_init_options () "The address at which the optional ROM image #4 should be loaded", 0, BX_MAX_BIT32U, 0); - bx_options.optrom[3].Oaddress->set_format ("optional ROM #4 address: 0x%05x"); bx_options.optrom[3].Oaddress->set_base (16); +#if BX_WITH_WX + bx_options.optrom[3].Opath->set_label ("Optional ROM image #4"); + bx_options.optrom[3].Oaddress->set_label ("Address"); +#else + bx_options.optrom[3].Oaddress->set_format ("optional ROM #4 address: 0x%05x"); +#endif bx_options.vgarom.Opath = new bx_param_filename_c (BXP_VGA_ROM_PATH, "vgaromimage", "Pathname of VGA ROM image to load", "", BX_PATHNAME_LEN); bx_options.vgarom.Opath->set_format ("Name of VGA BIOS image: %s"); +#if BX_WITH_WX + bx_options.vgarom.Opath->set_label ("VGA BIOS image"); +#endif bx_param_c *memory_init_list[] = { bx_options.memory.Osize, bx_options.vgarom.Opath,