forgot to add these files

This commit is contained in:
spacy51 2008-01-09 22:58:05 +00:00
parent 7986bd0c91
commit 3a70092561
3 changed files with 144 additions and 3 deletions

View File

@ -1,9 +1,9 @@
Important:
- Many games show emulation warnings in the log window (unaligned read, bad read/write addresse)
- Metroid Fusion, Advance Wars 2...
- Many games show emulation warnings in the log window (unaligned read, bad read/write address)
- Test: Metroid Fusion, Advance Wars 2
- Gfx.cpp/h optimization
- Test: final fantasy 4 airship intro
- Test: Final Fantasy 4 airship intro
- Improve automatic 64k/128k flash save detection

107
src/win32/BIOSDialog.cpp Normal file
View File

@ -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;
}

34
src/win32/BIOSDialog.h Normal file
View File

@ -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;
};