forgot to add these files
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@280 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
f9958724fb
commit
73f7325e93
|
@ -1,9 +1,9 @@
|
||||||
Important:
|
Important:
|
||||||
- Many games show emulation warnings in the log window (unaligned read, bad read/write addresse)
|
- Many games show emulation warnings in the log window (unaligned read, bad read/write address)
|
||||||
- Metroid Fusion, Advance Wars 2...
|
- Test: Metroid Fusion, Advance Wars 2
|
||||||
|
|
||||||
- Gfx.cpp/h optimization
|
- Gfx.cpp/h optimization
|
||||||
- Test: final fantasy 4 airship intro
|
- Test: Final Fantasy 4 airship intro
|
||||||
|
|
||||||
- Improve automatic 64k/128k flash save detection
|
- Improve automatic 64k/128k flash save detection
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "BIOSDialog.h"
|
||||||
|
|
||||||
|
|
||||||
|
// BIOSDialog dialog
|
||||||
|
|
||||||
|
IMPLEMENT_DYNAMIC(BIOSDialog, CDialog)
|
||||||
|
|
||||||
|
BIOSDialog::BIOSDialog(CWnd* pParent /*=NULL*/)
|
||||||
|
: CDialog(BIOSDialog::IDD, pParent)
|
||||||
|
, m_enableBIOS_GB(FALSE)
|
||||||
|
, m_enableBIOS_GBA(FALSE)
|
||||||
|
, m_skipLogo(FALSE)
|
||||||
|
, m_pathGB(_T(""))
|
||||||
|
, m_pathGBA(_T(""))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
BIOSDialog::~BIOSDialog()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void BIOSDialog::DoDataExchange(CDataExchange* pDX)
|
||||||
|
{
|
||||||
|
CDialog::DoDataExchange(pDX);
|
||||||
|
DDX_Check(pDX, IDC_ENABLE_GB_BIOS, m_enableBIOS_GB);
|
||||||
|
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_GBA_BIOS_PATH, m_pathGBA);
|
||||||
|
DDX_Control(pDX, IDC_GB_BIOS_PATH, m_editGB);
|
||||||
|
DDX_Control(pDX, IDC_GBA_BIOS_PATH, m_editGBA);
|
||||||
|
|
||||||
|
if( pDX->m_bSaveAndValidate == TRUE ) {
|
||||||
|
// disable BIOS usage when it does not exist
|
||||||
|
if( !fileExists( m_pathGBA ) ) {
|
||||||
|
m_enableBIOS_GBA = FALSE;
|
||||||
|
}
|
||||||
|
if( !fileExists( m_pathGB ) ) {
|
||||||
|
m_enableBIOS_GB = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_MESSAGE_MAP(BIOSDialog, CDialog)
|
||||||
|
ON_BN_CLICKED(IDC_SELECT_GB_BIOS_PATH, &BIOSDialog::OnBnClickedSelectGbBiosPath)
|
||||||
|
ON_BN_CLICKED(IDC_SELECT_GBA_BIOS_PATH, &BIOSDialog::OnBnClickedSelectGbaBiosPath)
|
||||||
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
|
|
||||||
|
// BIOSDialog message handlers
|
||||||
|
|
||||||
|
void BIOSDialog::OnBnClickedSelectGbBiosPath()
|
||||||
|
{
|
||||||
|
CString current;
|
||||||
|
m_editGB.GetWindowText( current );
|
||||||
|
if( !fileExists( current ) ) {
|
||||||
|
current = _T("");
|
||||||
|
}
|
||||||
|
|
||||||
|
CFileDialog dlg(
|
||||||
|
TRUE,
|
||||||
|
NULL,
|
||||||
|
current,
|
||||||
|
OFN_DONTADDTORECENT | OFN_FILEMUSTEXIST,
|
||||||
|
_T("BIOS Files (*.bin;*.rom)|*.bin;*.rom|All Files (*.*)|*.*||"),
|
||||||
|
this,
|
||||||
|
0 );
|
||||||
|
|
||||||
|
if( IDOK == dlg.DoModal() ) {
|
||||||
|
m_editGB.SetWindowText( dlg.GetPathName() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void BIOSDialog::OnBnClickedSelectGbaBiosPath()
|
||||||
|
{
|
||||||
|
CString current;
|
||||||
|
m_editGBA.GetWindowText( current );
|
||||||
|
if( !fileExists( current ) ) {
|
||||||
|
current = _T("");
|
||||||
|
}
|
||||||
|
|
||||||
|
CFileDialog dlg(
|
||||||
|
TRUE,
|
||||||
|
NULL,
|
||||||
|
current,
|
||||||
|
OFN_DONTADDTORECENT | OFN_FILEMUSTEXIST,
|
||||||
|
_T("BIOS Files (*.bin;*.rom)|*.bin;*.rom|All Files (*.*)|*.*||"),
|
||||||
|
this,
|
||||||
|
0 );
|
||||||
|
|
||||||
|
if( IDOK == dlg.DoModal() ) {
|
||||||
|
m_editGBA.SetWindowText( dlg.GetPathName() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BIOSDialog::fileExists(CString& file)
|
||||||
|
{
|
||||||
|
CFileStatus stat;
|
||||||
|
BOOL retVal = CFile::GetStatus( file, stat );
|
||||||
|
bool noFile = false;
|
||||||
|
if( retVal == TRUE ) {
|
||||||
|
noFile |= ( stat.m_attribute & CFile::directory ) != 0;
|
||||||
|
}
|
||||||
|
return ( retVal == TRUE ) && !noFile;
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
#pragma once
|
||||||
|
#include "afxwin.h"
|
||||||
|
|
||||||
|
|
||||||
|
// BIOSDialog dialog
|
||||||
|
|
||||||
|
class BIOSDialog : public CDialog
|
||||||
|
{
|
||||||
|
DECLARE_DYNAMIC(BIOSDialog)
|
||||||
|
|
||||||
|
public:
|
||||||
|
BIOSDialog(CWnd* pParent = NULL); // standard constructor
|
||||||
|
virtual ~BIOSDialog();
|
||||||
|
|
||||||
|
// Dialog Data
|
||||||
|
enum { IDD = IDD_BIOS };
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||||
|
|
||||||
|
DECLARE_MESSAGE_MAP()
|
||||||
|
private:
|
||||||
|
CEdit m_editGB;
|
||||||
|
CEdit m_editGBA;
|
||||||
|
bool fileExists(CString& file);
|
||||||
|
afx_msg void OnBnClickedSelectGbBiosPath();
|
||||||
|
afx_msg void OnBnClickedSelectGbaBiosPath();
|
||||||
|
public:
|
||||||
|
BOOL m_enableBIOS_GB;
|
||||||
|
BOOL m_enableBIOS_GBA;
|
||||||
|
BOOL m_skipLogo;
|
||||||
|
CString m_pathGB;
|
||||||
|
CString m_pathGBA;
|
||||||
|
};
|
Loading…
Reference in New Issue