From 75ed6f5fadf60825848f534d9e9b378c8fd5fe32 Mon Sep 17 00:00:00 2001
From: spacy51 <spacy51@a31d4220-a93d-0410-bf67-fe4944624d44>
Date: Wed, 9 Jan 2008 12:44:54 +0000
Subject: [PATCH] ADDED: BIOS settings dialog MODIFIED: Seperate BIOS settings
 for GB mono and GBA REMOVED: Old BIOS settings menu entries

---
 VBA.vcproj                   | 22 +++------
 res/todo.txt                 |  3 +-
 src/GBA.cpp                  |  2 +
 src/gb/GB.cpp                |  2 +
 src/win32/Commands.cpp       |  3 --
 src/win32/MainWnd.cpp        | 21 ++------
 src/win32/MainWnd.h          |  6 +--
 src/win32/MainWndOptions.cpp | 65 ++++++++----------------
 src/win32/MainWndTools.cpp   |  2 +-
 src/win32/VBA.cpp            | 30 +++++++++---
 src/win32/VBA.h              |  6 ++-
 src/win32/VBA.rc             | 95 +++++++++++++++++-------------------
 src/win32/resource.h         | 15 ++++--
 13 files changed, 124 insertions(+), 148 deletions(-)

diff --git a/VBA.vcproj b/VBA.vcproj
index da17ce4c..417b8f91 100644
--- a/VBA.vcproj
+++ b/VBA.vcproj
@@ -861,6 +861,10 @@
 					RelativePath=".\src\win32\AVIWrite.cpp"
 					>
 				</File>
+				<File
+					RelativePath=".\src\win32\BIOSDialog.cpp"
+					>
+				</File>
 				<File
 					RelativePath=".\src\win32\BitmapControl.cpp"
 					>
@@ -1419,6 +1423,10 @@
 					RelativePath=".\src\win32\AVIWrite.h"
 					>
 				</File>
+				<File
+					RelativePath=".\src\win32\BIOSDialog.h"
+					>
+				</File>
 				<File
 					RelativePath=".\src\win32\BitmapControl.h"
 					>
@@ -1816,13 +1824,6 @@
 				<File
 					RelativePath=".\src\hq\asm\hq3x32.cpp"
 					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
 					<FileConfiguration
 						Name="Debug|x64"
 						ExcludedFromBuild="true"
@@ -1831,13 +1832,6 @@
 							Name="VCCLCompilerTool"
 						/>
 					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
 					<FileConfiguration
 						Name="Release|x64"
 						ExcludedFromBuild="true"
diff --git a/res/todo.txt b/res/todo.txt
index b5885211..7dd5b1c2 100644
--- a/res/todo.txt
+++ b/res/todo.txt
@@ -1,4 +1,5 @@
 Important:
 
 Unimportant:
-- DDraw, D3D, OGL: Add full screen device & frequency selection
\ No newline at end of file
+- DDraw, D3D, OGL: Add full screen device & frequency selection
+- Verify BIOS files by checksums instead by file extension
\ No newline at end of file
diff --git a/src/GBA.cpp b/src/GBA.cpp
index 26f4d35e..48765cc6 100644
--- a/src/GBA.cpp
+++ b/src/GBA.cpp
@@ -1197,6 +1197,8 @@ bool CPUIsGBABios(const char * file)
         return true;
       if(_stricmp(p, ".bios") == 0)
         return true;
+      if(_stricmp(p, ".rom") == 0)
+        return true;
     }
   }
   
diff --git a/src/gb/GB.cpp b/src/gb/GB.cpp
index cc9dbfcb..682e7cb4 100644
--- a/src/gb/GB.cpp
+++ b/src/gb/GB.cpp
@@ -2104,6 +2104,8 @@ bool CPUIsGBBios(const char * file)
         return true;
       if(_stricmp(p, ".bios") == 0)
         return true;
+      if(_stricmp(p, ".rom") == 0)
+        return true;
     }
   }
 
diff --git a/src/win32/Commands.cpp b/src/win32/Commands.cpp
index daa9f328..12f9b6f0 100644
--- a/src/win32/Commands.cpp
+++ b/src/win32/Commands.cpp
@@ -126,10 +126,7 @@ struct {
   { "OptionsVideoLayersOBJWIN", ID_OPTIONS_VIDEO_LAYERS_OBJWIN },
   { "OptionsEmulatorAssociate", ID_OPTIONS_EMULATOR_ASSOCIATE },
   { "OptionsEmulatorDirectories", ID_OPTIONS_EMULATOR_DIRECTORIES },
-  { "OptionsEmulatorSelectBIOS", ID_OPTIONS_EMULATOR_SELECTBIOSFILE },
-  { "OptionsEmulatorUseBIOS", ID_OPTIONS_EMULATOR_USEBIOSFILE },
   { "OptionsEmulatorGameOverrides", ID_OPTIONS_EMULATOR_GAMEOVERRIDES },
-  { "OptionsEmulatorSkipBIOS", ID_OPTIONS_EMULATOR_SKIPBIOS },
   { "OptionsEmulatorShowSpeedNone", ID_OPTIONS_EMULATOR_SHOWSPEED_NONE },
   { "OptionsEmulatorShowSpeedPercentage", ID_OPTIONS_EMULATOR_SHOWSPEED_PERCENTAGE },
   { "OptionsEmulatorShowSpeedDetailed", ID_OPTIONS_EMULATOR_SHOWSPEED_DETAILED },
diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp
index f266077f..0c2cafa8 100644
--- a/src/win32/MainWnd.cpp
+++ b/src/win32/MainWnd.cpp
@@ -216,11 +216,6 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
   ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SAVETYPE_FLASH512K, OnUpdateOptionsEmulatorSavetypeFlash512k)
   ON_COMMAND(ID_OPTIONS_EMULATOR_SAVETYPE_FLASH1M, OnOptionsEmulatorSavetypeFlash1m)
   ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SAVETYPE_FLASH1M, OnUpdateOptionsEmulatorSavetypeFlash1m)
-  ON_COMMAND(ID_OPTIONS_EMULATOR_USEBIOSFILE, OnOptionsEmulatorUsebiosfile)
-  ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_USEBIOSFILE, OnUpdateOptionsEmulatorUsebiosfile)
-  ON_COMMAND(ID_OPTIONS_EMULATOR_SKIPBIOS, OnOptionsEmulatorSkipbios)
-  ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SKIPBIOS, OnUpdateOptionsEmulatorSkipbios)
-  ON_COMMAND(ID_OPTIONS_EMULATOR_SELECTBIOSFILE, OnOptionsEmulatorSelectbiosfile)
   ON_COMMAND(ID_OPTIONS_EMULATOR_PNGFORMAT, OnOptionsEmulatorPngformat)
   ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_PNGFORMAT, OnUpdateOptionsEmulatorPngformat)
   ON_COMMAND(ID_OPTIONS_EMULATOR_BMPFORMAT, OnOptionsEmulatorBmpformat)
@@ -454,6 +449,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
   ON_UPDATE_COMMAND_UI(ID_RENDERAPI_D3DMOTIONBLUR, &MainWnd::OnUpdateRenderapiD3dmotionblur)
   ON_WM_NCLBUTTONDOWN()
   ON_WM_WINDOWPOSCHANGING()
+  ON_COMMAND(ID_EMULATOR_BIOSFILES, &MainWnd::OnEmulatorBiosfiles)
   END_MESSAGE_MAP()
 
 
@@ -526,17 +522,8 @@ bool MainWnd::FileRun()
     // used for the handling of the gb Boot Rom
     if (gbHardware & 5)
     {
-      char tempName[2048];
-      GetModuleFileName(NULL, tempName, 2048);
-
-      char *p = strrchr(tempName, '\\');
-      if(p)
-        *p = 0;
-
-      strcat(tempName, "\\DMG_ROM.bin");
-
-      skipBios = theApp.skipBiosFile ? true : false;
-      gbCPUInit(tempName, theApp.useBiosFile ? true : false);
+      skipBios = theApp.skipBiosFile;
+	  gbCPUInit(theApp.biosFileNameGB, theApp.useBiosFileGB);
     }
 
 
@@ -640,7 +627,7 @@ bool MainWnd::FileRun()
 
   if(type == IMAGE_GBA) {
     skipBios = theApp.skipBiosFile ? true : false;
-    CPUInit((char *)(LPCTSTR)theApp.biosFileName, theApp.useBiosFile ? true : false);
+    CPUInit((char *)(LPCTSTR)theApp.biosFileNameGBA, theApp.useBiosFileGBA ? true : false);
     CPUReset();
   }
 
diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h
index 00013a3a..4c3e146b 100644
--- a/src/win32/MainWnd.h
+++ b/src/win32/MainWnd.h
@@ -248,11 +248,6 @@ class MainWnd : public CWnd
   afx_msg void OnUpdateOptionsEmulatorSavetypeFlash512k(CCmdUI* pCmdUI);
   afx_msg void OnOptionsEmulatorSavetypeFlash1m();
   afx_msg void OnUpdateOptionsEmulatorSavetypeFlash1m(CCmdUI* pCmdUI);
-  afx_msg void OnOptionsEmulatorUsebiosfile();
-  afx_msg void OnUpdateOptionsEmulatorUsebiosfile(CCmdUI* pCmdUI);
-  afx_msg void OnOptionsEmulatorSkipbios();
-  afx_msg void OnUpdateOptionsEmulatorSkipbios(CCmdUI* pCmdUI);
-  afx_msg void OnOptionsEmulatorSelectbiosfile();
   afx_msg void OnOptionsEmulatorPngformat();
   afx_msg void OnUpdateOptionsEmulatorPngformat(CCmdUI* pCmdUI);
   afx_msg void OnOptionsEmulatorBmpformat();
@@ -447,6 +442,7 @@ public:
 	afx_msg void OnUpdateRenderapiD3dmotionblur(CCmdUI *pCmdUI);
 	afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
 	afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
+	afx_msg void OnEmulatorBiosfiles();
 };
 
 /////////////////////////////////////////////////////////////////////////////
diff --git a/src/win32/MainWndOptions.cpp b/src/win32/MainWndOptions.cpp
index 2c61b8f6..b10a93cc 100644
--- a/src/win32/MainWndOptions.cpp
+++ b/src/win32/MainWndOptions.cpp
@@ -35,6 +35,7 @@
 #include "WinResUtil.h"
 #include "SelectPlugin.h"
 #include "OALConfig.h"
+#include "BIOSDialog.h"
 
 #include "../System.h"
 #include "../agbprint.h"
@@ -890,50 +891,6 @@ void MainWnd::OnUpdateOptionsEmulatorSavetypeFlash1m(CCmdUI* pCmdUI)
   pCmdUI->SetCheck(flashSize == 0x20000);
 }
 
-void MainWnd::OnOptionsEmulatorUsebiosfile()
-{
-  if(!theApp.biosFileName.IsEmpty())
-    theApp.useBiosFile = !theApp.useBiosFile;
-}
-
-void MainWnd::OnUpdateOptionsEmulatorUsebiosfile(CCmdUI* pCmdUI)
-{
-  pCmdUI->SetCheck(theApp.useBiosFile);
-  pCmdUI->Enable(!theApp.biosFileName.IsEmpty());
-}
-
-void MainWnd::OnOptionsEmulatorSkipbios()
-{
-  theApp.skipBiosFile = !theApp.skipBiosFile;
-}
-
-void MainWnd::OnUpdateOptionsEmulatorSkipbios(CCmdUI* pCmdUI)
-{
-  pCmdUI->SetCheck(theApp.skipBiosFile);
-}
-
-void MainWnd::OnOptionsEmulatorSelectbiosfile()
-{
-  theApp.winCheckFullscreen();
-  LPCTSTR exts[] = { "" };
-  CString filter = winLoadFilter(IDS_FILTER_BIOS);
-  CString title = winResLoadString(IDS_SELECT_BIOS_FILE);
-
-  FileDlg dlg(this,
-              theApp.biosFileName,
-              filter,
-              0,
-              "BIOS",
-              exts,
-              "",
-              title,
-              false);
-
-  if(dlg.DoModal() == IDOK) {
-    theApp.biosFileName = dlg.GetPathName();
-  }
-}
-
 void MainWnd::OnOptionsEmulatorPngformat()
 {
   theApp.captureFormat = 0;
@@ -2047,3 +2004,23 @@ void MainWnd::OnUpdateRenderapiD3dmotionblur(CCmdUI *pCmdUI)
 	pCmdUI->Enable( FALSE );
 #endif
 }
+
+void MainWnd::OnEmulatorBiosfiles()
+{
+	theApp.winCheckFullscreen();
+
+	BIOSDialog dlg;
+	dlg.m_enableBIOS_GBA = theApp.useBiosFileGBA ? TRUE : FALSE;
+	dlg.m_enableBIOS_GB = theApp.useBiosFileGB ? TRUE : FALSE;
+	dlg.m_skipLogo = theApp.skipBiosFile ? TRUE : FALSE;
+	dlg.m_pathGBA = theApp.biosFileNameGBA;
+	dlg.m_pathGB = theApp.biosFileNameGB;
+
+	if( IDOK == dlg.DoModal() ) {
+		theApp.useBiosFileGBA = dlg.m_enableBIOS_GBA == TRUE;
+		theApp.useBiosFileGB = dlg.m_enableBIOS_GB == TRUE;
+		theApp.skipBiosFile = dlg.m_skipLogo == TRUE;
+		theApp.biosFileNameGBA = dlg.m_pathGBA;
+		theApp.biosFileNameGB = dlg.m_pathGB;
+	}
+}
diff --git a/src/win32/MainWndTools.cpp b/src/win32/MainWndTools.cpp
index 25528ea1..2c31488f 100644
--- a/src/win32/MainWndTools.cpp
+++ b/src/win32/MainWndTools.cpp
@@ -220,7 +220,7 @@ void MainWnd::OnToolsDebugGdb()
 
       theApp.emulator = GBASystem;
 
-      CPUInit(theApp.biosFileName, theApp.useBiosFile ? true : false);
+      CPUInit(theApp.biosFileNameGBA, theApp.useBiosFileGBA ? true : false);
       CPUReset();
     }
   }
diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp
index 91eb7b24..e743dfe8 100644
--- a/src/win32/VBA.cpp
+++ b/src/win32/VBA.cpp
@@ -246,8 +246,11 @@ VBA::VBA()
   popup = NULL;
   cartridgeType = IMAGE_GBA;
   soundInitialized = false;
-  useBiosFile = false;
+  useBiosFileGBA = false;
+  useBiosFileGB = false;
   skipBiosFile = false;
+  biosFileNameGBA = _T("");
+  biosFileNameGB = _T("");
   active = true;
   paused = false;
   recentFreeze = false;
@@ -1483,14 +1486,22 @@ void VBA::loadSettings()
   if(windowPositionY < 0)
     windowPositionY = 0;
 
-  useBiosFile = regQueryDwordValue("useBios", 0) ? true: false;
+  useBiosFileGBA = ( regQueryDwordValue("useBiosGBA", 0) == 1 ) ? true : false;
+
+  useBiosFileGB = ( regQueryDwordValue("useBiosGB", 0) == 1 ) ? true : false;
 
   skipBiosFile = regQueryDwordValue("skipBios", 0) ? true : false;
 
-  buffer = regQueryStringValue("biosFile", "");
+  buffer = regQueryStringValue("biosFileGBA", "");
 
   if(!buffer.IsEmpty()) {
-    biosFileName = buffer;
+    biosFileNameGBA = buffer;
+  }
+
+  buffer = regQueryStringValue("biosFileGB", "");
+
+  if(!buffer.IsEmpty()) {
+    biosFileNameGB = buffer;
   }
 
   int res = regQueryDwordValue("soundEnable", 0x30f);
@@ -2536,12 +2547,17 @@ void VBA::saveSettings()
   regSetDwordValue("windowX", windowPositionX);
   regSetDwordValue("windowY", windowPositionY);
 
-  regSetDwordValue("useBios", useBiosFile);
+  regSetDwordValue("useBiosGBA", useBiosFileGBA);
+
+  regSetDwordValue("useBiosGB", useBiosFileGB);
 
   regSetDwordValue("skipBios", skipBiosFile);
 
-  if(!biosFileName.IsEmpty())
-    regSetStringValue("biosFile", biosFileName);
+  if(!biosFileNameGBA.IsEmpty())
+    regSetStringValue("biosFileGBA", biosFileNameGBA);
+
+  if(!biosFileNameGB.IsEmpty())
+    regSetStringValue("biosFileGB", biosFileNameGB);
 
   regSetDwordValue("soundEnable", soundGetEnable() & 0x30f);
 
diff --git a/src/win32/VBA.h b/src/win32/VBA.h
index ca1661e7..d5f4884d 100644
--- a/src/win32/VBA.h
+++ b/src/win32/VBA.h
@@ -117,9 +117,11 @@ class VBA : public CWinApp
   IDisplay *display;
   IMAGE_TYPE cartridgeType;
   bool soundInitialized;
-  bool useBiosFile;
+  bool useBiosFileGBA;
+  bool useBiosFileGB;
   bool skipBiosFile;
-  CString biosFileName;
+  CString biosFileNameGBA;
+  CString biosFileNameGB;
   bool active;
   bool paused;
   CString recentFiles[10];
diff --git a/src/win32/VBA.rc b/src/win32/VBA.rc
index c2180643..fa04adc6 100644
--- a/src/win32/VBA.rc
+++ b/src/win32/VBA.rc
@@ -13,11 +13,11 @@
 #undef APSTUDIO_READONLY_SYMBOLS
 
 /////////////////////////////////////////////////////////////////////////////
-// German (Germany) resources
+// English (U.S.) resources
 
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
 #ifdef _WIN32
-LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 #pragma code_page(1252)
 #endif //_WIN32
 
@@ -40,43 +40,6 @@ BEGIN
     CTEXT           "bufferInfo",IDC_BUFFERINFO,12,72,144,12,0,WS_EX_DLGMODALFRAME
 END
 
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
-BEGIN
-    IDD_OAL_CONFIG, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 160
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 107
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-#endif    // German (Germany) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
 IDD_SELECT_PLUGIN DIALOG  0, 0, 201, 120
 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Select Filter Plugin"
@@ -194,23 +157,23 @@ CAPTION "Directories"
 FONT 8, "MS Sans Serif", 0, 0, 0x0
 BEGIN
     GROUPBOX        "Gameboy Advance ROM Images",IDC_STATIC,6,6,210,42
-    EDITTEXT        IDC_ROM_PATH,12,18,198,12,ES_RIGHT | ES_AUTOHSCROLL
+    EDITTEXT        IDC_ROM_PATH,12,18,198,12,ES_AUTOHSCROLL
     PUSHBUTTON      "Browse...",IDC_ROM_DIR,12,30,90,12
     PUSHBUTTON      "Reset",IDC_ROM_DIR_RESET,120,30,90,12
     GROUPBOX        "Gameboy / Gameboy Color ROM Images",IDC_STATIC,6,48,210,42
-    EDITTEXT        IDC_GBROM_PATH,12,60,198,12,ES_RIGHT | ES_AUTOHSCROLL
+    EDITTEXT        IDC_GBROM_PATH,12,60,198,12,ES_AUTOHSCROLL
     PUSHBUTTON      "Browse...",IDC_GBROM_DIR,12,72,90,12
     PUSHBUTTON      "Reset",IDC_GBROM_DIR_RESET,120,72,84,12
     GROUPBOX        "Gameboy Internal Battery Saves",IDC_STATIC,6,90,210,42
-    EDITTEXT        IDC_BATTERY_PATH,12,102,198,12,ES_RIGHT | ES_AUTOHSCROLL
+    EDITTEXT        IDC_BATTERY_PATH,12,102,198,12,ES_AUTOHSCROLL
     PUSHBUTTON      "Browse...",IDC_BATTERY_DIR,12,114,90,12
     PUSHBUTTON      "Reset",IDC_BATTERY_DIR_RESET,120,114,90,12
     GROUPBOX        "VisualBoyAdvance Save Games",IDC_STATIC,6,132,210,42
-    EDITTEXT        IDC_SAVE_PATH,12,144,198,12,ES_RIGHT | ES_AUTOHSCROLL
+    EDITTEXT        IDC_SAVE_PATH,12,144,198,12,ES_AUTOHSCROLL
     PUSHBUTTON      "Browse...",IDC_SAVE_DIR,12,156,90,12
     PUSHBUTTON      "Reset",IDC_SAVE_DIR_RESET,120,156,90,12
     GROUPBOX        "Screenshots",IDC_STATIC,6,174,210,42
-    EDITTEXT        IDC_CAPTURE_PATH,12,186,198,12,ES_RIGHT | ES_AUTOHSCROLL
+    EDITTEXT        IDC_CAPTURE_PATH,12,186,198,12,ES_AUTOHSCROLL
     PUSHBUTTON      "Browse...",IDC_CAPTURE_DIR,12,198,90,12
     PUSHBUTTON      "Reset",IDC_CAPTURE_DIR_RESET,120,198,90,12
     DEFPUSHBUTTON   "OK",IDOK,120,234,90,12
@@ -1133,6 +1096,25 @@ BEGIN
     EDITTEXT        IDC_COMMENT,84,24,180,12,ES_AUTOHSCROLL
 END
 
+IDD_BIOS DIALOGEX 0, 0, 220, 126
+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
+    GROUPBOX        "Game Boy mono",IDC_STATIC,6,6,210,30
+    GROUPBOX        "Game Boy Advance",IDC_STATIC,6,48,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
+    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
+    PUSHBUTTON      "...",IDC_SELECT_GB_BIOS_PATH,192,18,18,12
+    PUSHBUTTON      "...",IDC_SELECT_GBA_BIOS_PATH,192,60,18,12
+END
+
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -1142,6 +1124,14 @@ END
 #ifdef APSTUDIO_INVOKED
 GUIDELINES DESIGNINFO 
 BEGIN
+    IDD_OAL_CONFIG, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 160
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 107
+    END
+
     IDD_OPENDLG, DIALOG
     BEGIN
         RIGHTMARGIN, 165
@@ -1474,6 +1464,14 @@ BEGIN
         TOPMARGIN, 7
         BOTTOMMARGIN, 105
     END
+
+    IDD_BIOS, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 213
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 119
+    END
 END
 #endif    // APSTUDIO_INVOKED
 
@@ -1786,6 +1784,7 @@ BEGIN
         BEGIN
             MENUITEM "&Associate...",               ID_OPTIONS_EMULATOR_ASSOCIATE
             MENUITEM "&Directories...",             ID_OPTIONS_EMULATOR_DIRECTORIES
+            MENUITEM "BIOS Files...",               ID_EMULATOR_BIOSFILES
             POPUP "&Priority"
             BEGIN
                 MENUITEM "&Highest",                    ID_OPTIONS_PRIORITY_HIGHEST
@@ -1820,10 +1819,6 @@ BEGIN
                 MENUITEM "Flash 128 KB",                ID_OPTIONS_EMULATOR_SAVETYPE_FLASH1M
             END
             MENUITEM SEPARATOR
-            MENUITEM "&Use BIOS file",              ID_OPTIONS_EMULATOR_USEBIOSFILE
-            MENUITEM "Skip BIOS",                   ID_OPTIONS_EMULATOR_SKIPBIOS
-            MENUITEM "S&elect BIOS file...",        ID_OPTIONS_EMULATOR_SELECTBIOSFILE
-            MENUITEM SEPARATOR
             POPUP "Screenshot &Format"
             BEGIN
                 MENUITEM "&PNG",                        ID_OPTIONS_EMULATOR_PNGFORMAT
@@ -2084,7 +2079,6 @@ STRINGTABLE
 BEGIN
     IDS_SELECT_SAVE_DIR     "Select Save Directory:"
     IDS_SELECT_CAPTURE_DIR  "Select Capture directory:"
-    IDS_SELECT_BIOS_FILE    "Select BIOS file"
     IDS_RESET               "Reset"
     IDS_AUTOFIRE_A_DISABLED "autofire A disabled"
     IDS_AUTOFIRE_A          "autofire A"
@@ -2126,7 +2120,6 @@ BEGIN
     IDS_FAILED_TO_LOAD_LIBRARY "Failed to load library %s"
     IDS_FAILED_TO_GET_LOCINFO "Failed to get locale information"
     IDS_SELECT_CHEAT_LIST_NAME "Select cheat list name"
-    IDS_FILTER_BIOS         "Gameboy Advance BIOS_*.BIN;*.AGB;*.GBA;*.BIOS;*.ZIP;*.Z;*.7Z;*.GZ__"
     IDS_FILTER_ROM          "All Gameboy _*.BIN;*.AGB;*.GBA;*.MB;*.ELF;*.GB;*.SGB;*.CGB;*.GBC;*.ZIP;*.7Z;*.Z;*.GZ_Gameboy Advance_*.BIN;*.AGB;*.GBA_Gameboy_*.GB;*.SGB_Gameboy Color_*.CGB;*.GBC__"
     IDS_FILTER_SGM          "VisualBoyAdvance Save Game_*.SGM__"
     IDS_FILTER_CHEAT_LIST   "VisualBoyAdvance Cheat List_*.CLT__"
diff --git a/src/win32/resource.h b/src/win32/resource.h
index 45fee8b5..7644e8af 100644
--- a/src/win32/resource.h
+++ b/src/win32/resource.h
@@ -98,6 +98,7 @@
 #define IDD_SELECT                      159
 #define IDD_SELECT_PLUGIN               159
 #define IDD_OAL_CONFIG                  160
+#define IDD_BIOS                        161
 #define IDC_R0                          1000
 #define IDC_EDIT_UP                     1000
 #define IDC_R1                          1001
@@ -512,6 +513,13 @@
 #define IDC_DEVICE                      1269
 #define IDC_SLIDER_BUFFERCOUNT          1270
 #define IDC_BUFFERINFO                  1271
+#define IDC_GB_BIOS_PATH                1272
+#define IDC_GBA_BIOS_PATH               1273
+#define IDC_SKIP_BOOT_LOGO              1274
+#define IDC_ENABLE_GB_BIOS              1275
+#define IDC_ENABLE_GBA_BIOS             1276
+#define IDC_SELECT_GB_BIOS_PATH         1277
+#define IDC_SELECT_GBA_BIOS_PATH        1278
 #define IDS_OAL_NODEVICE                2000
 #define IDS_OAL_NODLL                   2001
 #define IDS_AVI_CANNOT_CREATE_AVI       2002
@@ -824,14 +832,15 @@
 #define ID_OPTIONS_SPEED                40353
 #define ID_RENDERAPI_MOTIONBLUR         40354
 #define ID_RENDERAPI_D3DMOTIONBLUR      40355
+#define ID_EMULATOR_BIOSFILES           40356
 
 // Next default values for new objects
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        161
-#define _APS_NEXT_COMMAND_VALUE         40356
-#define _APS_NEXT_CONTROL_VALUE         1272
+#define _APS_NEXT_RESOURCE_VALUE        162
+#define _APS_NEXT_COMMAND_VALUE         40357
+#define _APS_NEXT_CONTROL_VALUE         1278
 #define _APS_NEXT_SYMED_VALUE           103
 #endif
 #endif