- SB16 options dmatimer and loglevel now available at runtime (wx and win32)

- wxmain.cc: unused stuff removed
This commit is contained in:
Volker Ruppert 2004-05-23 10:47:00 +00:00
parent 25582ed29d
commit 98916b7710
5 changed files with 27 additions and 12 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: win32dialog.cc,v 1.20 2004-02-26 19:25:00 vruppert Exp $
// $Id: win32dialog.cc,v 1.21 2004-05-23 10:47:00 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
#include "config.h"
@ -303,10 +303,13 @@ void RuntimeDlgSetTab(HWND hDlg, int tabnum)
ShowWindow(GetDlgItem(hDlg, IDMISCLBL1), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDMISCLBL2), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDMISCLBL3), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDMISCLBL4), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDMISCLBL5), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDVGAUPDATE), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDMOUSE), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDKBDPASTE), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDUSERBTN), (tabnum == 2) ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDSBLOGLEV), (tabnum == 2) ? SW_SHOW : SW_HIDE);
}
void RuntimeDlgSetStdLogOpt(HWND hDlg)
@ -437,6 +440,8 @@ static BOOL CALLBACK RuntimeDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
SendMessage(GetDlgItem(hDlg, IDMOUSE), BM_SETCHECK, BST_CHECKED, 0);
}
SetDlgItemText(hDlg, IDUSERBTN, SIM->get_param_string(BXP_USER_SHORTCUT)->getptr());
SetDlgItemInt(hDlg, IDSB16TIMER, SIM->get_param_num(BXP_SB16_DMATIMER)->get(), FALSE);
SetDlgItemInt(hDlg, IDSBLOGLEV, SIM->get_param_num(BXP_SB16_LOGLEVEL)->get(), FALSE);
EnableWindow(GetDlgItem(hDlg, IDAPPLY), FALSE);
advanced = FALSE;
changed = 0;
@ -461,6 +466,8 @@ static BOOL CALLBACK RuntimeDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
case IDVGAUPDATE:
case IDKBDPASTE:
case IDUSERBTN:
case IDSB16TIMER:
case IDSBLOGLEV:
changed |= 0x04;
break;
}
@ -569,6 +576,10 @@ static BOOL CALLBACK RuntimeDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
SIM->get_param_num(BXP_MOUSE_ENABLED)->set(value==BST_CHECKED);
GetDlgItemText(hDlg, IDUSERBTN, buffer, sizeof(buffer));
SIM->get_param_string(BXP_USER_SHORTCUT)->set(buffer);
value = GetDlgItemInt(hDlg, IDSB16TIMER, NULL, FALSE);
SIM->get_param_num(BXP_SB16_DMATIMER)->set(value);
value = GetDlgItemInt(hDlg, IDSBLOGLEV, NULL, FALSE);
SIM->get_param_num(BXP_SB16_LOGLEVEL)->set(value);
}
EnableWindow(GetDlgItem(hDlg, IDAPPLY), FALSE);
changed = 0;

View File

@ -54,8 +54,12 @@
#define IDMISCLBL1 2491
#define IDMISCLBL2 2492
#define IDMISCLBL3 2493
#define IDMISCLBL4 2494
#define IDMISCLBL5 2495
#define IDVGAUPDATE 2510
#define IDMOUSE 2520
#define IDKBDPASTE 2530
#define IDUSERBTN 2540
#define IDAPPLY 2550
#define IDSB16TIMER 2550
#define IDSBLOGLEV 2560
#define IDAPPLY 2570

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////
// $Id: wxmain.cc,v 1.103 2004-02-15 12:40:06 vruppert Exp $
// $Id: wxmain.cc,v 1.104 2004-05-23 10:47:00 vruppert Exp $
/////////////////////////////////////////////////////////////////
//
// wxmain.cc implements the wxWindows frame, toolbar, menus, and dialogs.
@ -606,6 +606,7 @@ void MyFrame::OnEditSound(wxCommandEvent& WXUNUSED(event))
bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_SB16);
dlg.SetTitle (list->get_name ());
dlg.AddParam (list);
dlg.SetRuntimeFlag (sim_thread != NULL);
dlg.ShowModal ();
}
@ -915,7 +916,6 @@ void MyFrame::simStatusChanged (StatusChange change, bx_bool popupNotify) {
}
menuEdit->Enable( ID_Edit_Boot, canConfigure);
menuEdit->Enable( ID_Edit_Memory, canConfigure);
menuEdit->Enable( ID_Edit_Sound, canConfigure);
menuEdit->Enable( ID_Edit_Timing, canConfigure);
menuEdit->Enable( ID_Edit_Network, canConfigure);
menuEdit->Enable( ID_Edit_Serial_Parallel, canConfigure);
@ -928,12 +928,6 @@ void MyFrame::simStatusChanged (StatusChange change, bx_bool popupNotify) {
menuEdit->Enable (ID_Edit_FD_0, canConfigure || param->get_enabled ());
param = SIM->get_param(BXP_FLOPPYB);
menuEdit->Enable (ID_Edit_FD_1, canConfigure || param->get_enabled ());
/*
// this menu item removed, since you can configure the cdrom from the
// ATA controller menu items instead.
param = SIM->get_first_cdrom ();
menuEdit->Enable (ID_Edit_Cdrom, canConfigure || (param&&param->get_enabled ()));
*/
}
void MyFrame::OnStartSim(wxCommandEvent& event)

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: main.cc,v 1.274 2004-04-09 15:34:56 sshwarts Exp $
// $Id: main.cc,v 1.275 2004-05-23 10:46:59 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -1405,7 +1405,7 @@ void bx_init_options ()
0, 3,
0);
bx_options.sb16.Ologlevel = new bx_param_num_c (BXP_SB16_LOGLEVEL,
"Log mode",
"Log level",
"Controls how verbose the SB16 emulation is (0 = no log, 5 = all errors and infos).",
0, 5,
0);
@ -1420,6 +1420,8 @@ void bx_init_options ()
bx_options.sb16.Owavemode->set_options (bx_param_num_c::USE_SPIN_CONTROL);
bx_options.sb16.Ologlevel->set_options (bx_param_num_c::USE_SPIN_CONTROL);
#endif
bx_options.sb16.Odmatimer->set_runtime_param (1);
bx_options.sb16.Ologlevel->set_runtime_param (1);
bx_param_c *sb16_init_list[] = {
bx_options.sb16.Opresent,
bx_options.sb16.Omidimode,

View File

@ -103,6 +103,10 @@ BEGIN
EDITTEXT IDKBDPASTE, 95, 75, 70, 14, ES_NUMBER
LTEXT "Userbutton shortcut", IDMISCLBL3, 20, 97, 70, 14
EDITTEXT IDUSERBTN, 95, 95, 70, 14
LTEXT "SB16 DMA timer", IDMISCLBL4, 20, 117, 70, 14
EDITTEXT IDSB16TIMER, 95, 115, 70, 14, ES_NUMBER
LTEXT "SB16 loglevel", IDMISCLBL5, 20, 137, 70, 14
EDITTEXT IDSBLOGLEV, 95, 135, 70, 14, ES_NUMBER
DEFPUSHBUTTON "Continue simulation", IDOK, 15, 190, 70, 14
PUSHBUTTON "Quit simulation", IDCANCEL, 95, 190, 70, 14
PUSHBUTTON "Apply", IDAPPLY, 175, 190, 70, 14