Add GBC BIOS selection
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@928 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
dccf885304
commit
baced7498d
|
@ -26,11 +26,14 @@ void BIOSDialog::DoDataExchange(CDataExchange* pDX)
|
|||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Check(pDX, IDC_ENABLE_GB_BIOS, m_enableBIOS_GB);
|
||||
DDX_Check(pDX, IDC_ENABLE_GBC_BIOS, m_enableBIOS_GBC);
|
||||
DDX_Check(pDX, IDC_ENABLE_GBA_BIOS, m_enableBIOS_GBA);
|
||||
DDX_Check(pDX, IDC_SKIP_BOOT_LOGO, m_skipLogo);
|
||||
DDX_Text(pDX, IDC_GB_BIOS_PATH, m_pathGB);
|
||||
DDX_Text(pDX, IDC_GBC_BIOS_PATH, m_pathGBC);
|
||||
DDX_Text(pDX, IDC_GBA_BIOS_PATH, m_pathGBA);
|
||||
DDX_Control(pDX, IDC_GB_BIOS_PATH, m_editGB);
|
||||
DDX_Control(pDX, IDC_GBC_BIOS_PATH, m_editGBC);
|
||||
DDX_Control(pDX, IDC_GBA_BIOS_PATH, m_editGBA);
|
||||
|
||||
if( pDX->m_bSaveAndValidate == TRUE ) {
|
||||
|
@ -38,6 +41,9 @@ void BIOSDialog::DoDataExchange(CDataExchange* pDX)
|
|||
if( !fileExists( m_pathGBA ) ) {
|
||||
m_enableBIOS_GBA = FALSE;
|
||||
}
|
||||
if( !fileExists( m_pathGBC ) ) {
|
||||
m_enableBIOS_GBC = FALSE;
|
||||
}
|
||||
if( !fileExists( m_pathGB ) ) {
|
||||
m_enableBIOS_GB = FALSE;
|
||||
}
|
||||
|
@ -47,6 +53,7 @@ void BIOSDialog::DoDataExchange(CDataExchange* pDX)
|
|||
|
||||
BEGIN_MESSAGE_MAP(BIOSDialog, CDialog)
|
||||
ON_BN_CLICKED(IDC_SELECT_GB_BIOS_PATH, &BIOSDialog::OnBnClickedSelectGbBiosPath)
|
||||
ON_BN_CLICKED(IDC_SELECT_GBC_BIOS_PATH, &BIOSDialog::OnBnClickedSelectGbcBiosPath)
|
||||
ON_BN_CLICKED(IDC_SELECT_GBA_BIOS_PATH, &BIOSDialog::OnBnClickedSelectGbaBiosPath)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
@ -75,6 +82,28 @@ void BIOSDialog::OnBnClickedSelectGbBiosPath()
|
|||
}
|
||||
}
|
||||
|
||||
void BIOSDialog::OnBnClickedSelectGbcBiosPath()
|
||||
{
|
||||
CString current;
|
||||
m_editGBC.GetWindowText( current );
|
||||
if( !fileExists( current ) ) {
|
||||
current = _T("");
|
||||
}
|
||||
|
||||
CFileDialog dlg(
|
||||
TRUE,
|
||||
NULL,
|
||||
current,
|
||||
OFN_DONTADDTORECENT | OFN_FILEMUSTEXIST,
|
||||
_T("BIOS Files (*.bin;*.gbc)|*.bin;*.gbc|All Files (*.*)|*.*||"),
|
||||
this,
|
||||
0 );
|
||||
|
||||
if( IDOK == dlg.DoModal() ) {
|
||||
m_editGBC.SetWindowText( dlg.GetPathName() );
|
||||
}
|
||||
}
|
||||
|
||||
void BIOSDialog::OnBnClickedSelectGbaBiosPath()
|
||||
{
|
||||
CString current;
|
||||
|
|
|
@ -20,14 +20,18 @@ protected:
|
|||
DECLARE_MESSAGE_MAP()
|
||||
private:
|
||||
CEdit m_editGB;
|
||||
CEdit m_editGBC;
|
||||
CEdit m_editGBA;
|
||||
bool fileExists(CString& file);
|
||||
afx_msg void OnBnClickedSelectGbBiosPath();
|
||||
afx_msg void OnBnClickedSelectGbcBiosPath();
|
||||
afx_msg void OnBnClickedSelectGbaBiosPath();
|
||||
public:
|
||||
BOOL m_enableBIOS_GB;
|
||||
BOOL m_enableBIOS_GBC;
|
||||
BOOL m_enableBIOS_GBA;
|
||||
BOOL m_skipLogo;
|
||||
CString m_pathGB;
|
||||
CString m_pathGBC;
|
||||
CString m_pathGBA;
|
||||
};
|
||||
|
|
|
@ -1774,16 +1774,20 @@ void MainWnd::OnEmulatorBiosfiles()
|
|||
{
|
||||
BIOSDialog dlg;
|
||||
dlg.m_enableBIOS_GBA = theApp.useBiosFileGBA ? TRUE : FALSE;
|
||||
dlg.m_enableBIOS_GBC = theApp.useBiosFileGBC ? TRUE : FALSE;
|
||||
dlg.m_enableBIOS_GB = theApp.useBiosFileGB ? TRUE : FALSE;
|
||||
dlg.m_skipLogo = theApp.skipBiosFile ? TRUE : FALSE;
|
||||
dlg.m_pathGBA = theApp.biosFileNameGBA;
|
||||
dlg.m_pathGBC = theApp.biosFileNameGBC;
|
||||
dlg.m_pathGB = theApp.biosFileNameGB;
|
||||
|
||||
if( IDOK == dlg.DoModal() ) {
|
||||
theApp.useBiosFileGBA = dlg.m_enableBIOS_GBA == TRUE;
|
||||
theApp.useBiosFileGBC = dlg.m_enableBIOS_GBC == TRUE;
|
||||
theApp.useBiosFileGB = dlg.m_enableBIOS_GB == TRUE;
|
||||
theApp.skipBiosFile = dlg.m_skipLogo == TRUE;
|
||||
theApp.biosFileNameGBA = dlg.m_pathGBA;
|
||||
theApp.biosFileNameGBC = dlg.m_pathGBC;
|
||||
theApp.biosFileNameGB = dlg.m_pathGB;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,9 +232,11 @@ VBA::VBA()
|
|||
cartridgeType = IMAGE_GBA;
|
||||
soundInitialized = false;
|
||||
useBiosFileGBA = false;
|
||||
useBiosFileGBC = false;
|
||||
useBiosFileGB = false;
|
||||
skipBiosFile = false;
|
||||
biosFileNameGBA = _T("");
|
||||
biosFileNameGBC = _T("");
|
||||
biosFileNameGB = _T("");
|
||||
active = true;
|
||||
paused = false;
|
||||
|
@ -1410,6 +1412,8 @@ void VBA::loadSettings()
|
|||
|
||||
useBiosFileGBA = ( regQueryDwordValue("useBiosGBA", 0) == 1 ) ? true : false;
|
||||
|
||||
useBiosFileGBC = ( regQueryDwordValue("useBiosGBC", 0) == 1 ) ? true : false;
|
||||
|
||||
useBiosFileGB = ( regQueryDwordValue("useBiosGB", 0) == 1 ) ? true : false;
|
||||
|
||||
skipBiosFile = regQueryDwordValue("skipBios", 0) ? true : false;
|
||||
|
@ -1420,6 +1424,12 @@ void VBA::loadSettings()
|
|||
biosFileNameGBA = buffer;
|
||||
}
|
||||
|
||||
buffer = regQueryStringValue("biosFileGBC", "");
|
||||
|
||||
if(!buffer.IsEmpty()) {
|
||||
biosFileNameGBC = buffer;
|
||||
}
|
||||
|
||||
buffer = regQueryStringValue("biosFileGB", "");
|
||||
|
||||
if(!buffer.IsEmpty()) {
|
||||
|
@ -2432,6 +2442,8 @@ void VBA::saveSettings()
|
|||
|
||||
regSetDwordValue("useBiosGBA", useBiosFileGBA);
|
||||
|
||||
regSetDwordValue("useBiosGBC", useBiosFileGBC);
|
||||
|
||||
regSetDwordValue("useBiosGB", useBiosFileGB);
|
||||
|
||||
regSetDwordValue("skipBios", skipBiosFile);
|
||||
|
@ -2439,6 +2451,9 @@ void VBA::saveSettings()
|
|||
if(!biosFileNameGBA.IsEmpty())
|
||||
regSetStringValue("biosFileGBA", biosFileNameGBA);
|
||||
|
||||
if(!biosFileNameGBC.IsEmpty())
|
||||
regSetStringValue("biosFileGBC", biosFileNameGBC);
|
||||
|
||||
if(!biosFileNameGB.IsEmpty())
|
||||
regSetStringValue("biosFileGB", biosFileNameGB);
|
||||
|
||||
|
|
|
@ -95,9 +95,11 @@ class VBA : public CWinApp
|
|||
IMAGE_TYPE cartridgeType;
|
||||
bool soundInitialized;
|
||||
bool useBiosFileGBA;
|
||||
bool useBiosFileGBC;
|
||||
bool useBiosFileGB;
|
||||
bool skipBiosFile;
|
||||
CString biosFileNameGBA;
|
||||
CString biosFileNameGBC;
|
||||
CString biosFileNameGB;
|
||||
bool active;
|
||||
bool paused;
|
||||
|
|
|
@ -1131,23 +1131,27 @@ BEGIN
|
|||
EDITTEXT IDC_COMMENT,84,24,180,12,ES_AUTOHSCROLL
|
||||
END
|
||||
|
||||
IDD_BIOS DIALOGEX 0, 0, 220, 126
|
||||
IDD_BIOS DIALOGEX 0, 0, 220, 159
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "BIOS Files"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,84,102,60,18
|
||||
PUSHBUTTON "Cancel",IDCANCEL,150,102,60,18
|
||||
DEFPUSHBUTTON "OK",IDOK,84,132,60,18
|
||||
PUSHBUTTON "Cancel",IDCANCEL,150,132,60,18
|
||||
GROUPBOX "Game Boy mono",IDC_STATIC,6,6,210,30
|
||||
GROUPBOX "Game Boy Advance",IDC_STATIC,6,48,210,30
|
||||
GROUPBOX "Game Boy Advance",IDC_STATIC,6,78,210,30
|
||||
EDITTEXT IDC_GB_BIOS_PATH,12,18,180,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_GBA_BIOS_PATH,12,60,180,12,ES_AUTOHSCROLL
|
||||
GROUPBOX "Options",IDC_STATIC,6,90,72,30
|
||||
CONTROL "Skip boot logo",IDC_SKIP_BOOT_LOGO,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,12,102,60,12
|
||||
EDITTEXT IDC_GBA_BIOS_PATH,12,90,180,12,ES_AUTOHSCROLL
|
||||
GROUPBOX "Options",IDC_STATIC,6,121,72,30
|
||||
CONTROL "Skip boot logo",IDC_SKIP_BOOT_LOGO,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,12,132,60,12
|
||||
CONTROL "Enable",IDC_ENABLE_GB_BIOS,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,174,6,36,8
|
||||
CONTROL "Enable",IDC_ENABLE_GBA_BIOS,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,174,48,36,8
|
||||
CONTROL "Enable",IDC_ENABLE_GBA_BIOS,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,174,78,36,8
|
||||
PUSHBUTTON "...",IDC_SELECT_GB_BIOS_PATH,192,18,18,12
|
||||
PUSHBUTTON "...",IDC_SELECT_GBA_BIOS_PATH,192,60,18,12
|
||||
PUSHBUTTON "...",IDC_SELECT_GBA_BIOS_PATH,192,90,18,12
|
||||
GROUPBOX "Game Boy Color",IDC_STATIC,6,42,210,30
|
||||
EDITTEXT IDC_GBC_BIOS_PATH,12,53,180,12,ES_AUTOHSCROLL
|
||||
CONTROL "Enable",IDC_ENABLE_GBC_BIOS,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,174,42,36,8
|
||||
PUSHBUTTON "...",IDC_SELECT_GBC_BIOS_PATH,192,53,18,12
|
||||
END
|
||||
|
||||
IDD_FULLSCREEN DIALOGEX 0, 0, 167, 96
|
||||
|
@ -1541,7 +1545,7 @@ BEGIN
|
|||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 213
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 119
|
||||
BOTTOMMARGIN, 152
|
||||
END
|
||||
|
||||
IDD_FULLSCREEN, DIALOG
|
||||
|
|
|
@ -536,8 +536,12 @@
|
|||
#define IDC_SELECT_GB_BIOS_PATH 1277
|
||||
#define IDC_SELECT_GBA_BIOS_PATH 1278
|
||||
#define IDC_CLEAR_ALL 1278
|
||||
#define IDC_GBC_BIOS_PATH 1279
|
||||
#define IDC_COMBO_RESOLUTION 1280
|
||||
#define IDC_ENABLE_GBC_BIOS 1280
|
||||
#define IDC_COMBO_COLOR_DEPTH 1281
|
||||
#define IDC_SELECT_GB_BIOS_PATH2 1281
|
||||
#define IDC_SELECT_GBC_BIOS_PATH 1281
|
||||
#define IDC_COMBO_REFRESH_RATE 1282
|
||||
#define IDC_COMBO_DEVICE 1283
|
||||
#define IDC_CHECK1 1284
|
||||
|
@ -587,8 +591,6 @@
|
|||
#define ID_OPTIONS_VIDEO_X4 40013
|
||||
#define ID_OPTIONS_VIDEO_X5 40014
|
||||
#define ID_OPTIONS_VIDEO_X6 40015
|
||||
#define ID_FILE_PAUSE 40373
|
||||
#define ID_OPTIONS_EMULATOR_DIRECTORIES 40374
|
||||
#define ID_OPTIONS_JOYPAD 40016
|
||||
#define ID_OPTIONS_EMULATOR_SYNCHRONIZE 40017
|
||||
#define ID_FILE_RESET 40018
|
||||
|
@ -872,6 +874,8 @@
|
|||
#define ID_OPTIONS_VIDEO_LAYERS_RESET 40367
|
||||
#define ID_LOADGAME_DONOTCHANGECHEATLIST 40371
|
||||
#define ID_OPTIONS_EMULATOR_SAVETYPE_DETECTNOW 40372
|
||||
#define ID_FILE_PAUSE 40373
|
||||
#define ID_OPTIONS_EMULATOR_DIRECTORIES 40374
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue