diff --git a/stella/Changes.txt b/stella/Changes.txt index 6c09ed4eb..35f18e126 100644 --- a/stella/Changes.txt +++ b/stella/Changes.txt @@ -15,7 +15,9 @@ 2.7 to 2.7.1: (Jan. 26, 2009) * Fixed issue with sound not working in OpenGL video mode in Windows with - ATI video hardware. + ATI video hardware. Related to this, added '-audiofirst' commandline + argument, which initializes audio before video when emulating a ROM + (this is what was causing the sound to not work). * Fixed bug where volume wasn't being saved in 'Audio Settings' when started from the ROM launcher. diff --git a/stella/docs/index.html b/stella/docs/index.html index 0b3822abf..c6f985689 100644 --- a/stella/docs/index.html +++ b/stella/docs/index.html @@ -763,6 +763,14 @@ saving a ROM state file. + +
-audiofirst <1|0>
+ Initialize the audio subsystem before video when emulating a + ROM. This seems to be required when using ATI video cards + in OpenGL mode in Windows. Since it doesn't hurt other + systems, the default is 1. + +
-ssdir <path>
The directory to save snapshot files to. diff --git a/stella/src/emucore/OSystem.cxx b/stella/src/emucore/OSystem.cxx index 8824e4132..77e03ef41 100644 --- a/stella/src/emucore/OSystem.cxx +++ b/stella/src/emucore/OSystem.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: OSystem.cxx,v 1.151 2009-01-21 12:03:17 stephena Exp $ +// $Id: OSystem.cxx,v 1.152 2009-01-21 15:32:15 stephena Exp $ //============================================================================ #include @@ -448,6 +448,7 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum) #ifdef CHEATCODE_SUPPORT myCheatManager->loadCheats(myRomMD5); #endif + bool audiofirst = mySettings->getBool("audiofirst"); ////////////////////////////////////////////////////////////////////////// // For some reason, ATI video drivers for OpenGL in Win32 cause problems // if the sound isn't initialized before the video @@ -457,7 +458,7 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum) // http://www.atariage.com/forums/index.php?showtopic=126090&view=findpost&p=1648693 // Hopefully it won't break anything else ////////////////////////////////////////////////////////////////////////// - myConsole->initializeAudio(); + if(audiofirst) myConsole->initializeAudio(); myEventHandler->reset(EventHandler::S_EMULATE); if(!createFrameBuffer()) // Takes care of initializeVideo() { @@ -465,6 +466,7 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum) myEventHandler->reset(EventHandler::S_LAUNCHER); return false; } + if(!audiofirst) myConsole->initializeAudio(); #ifdef DEBUGGER_SUPPORT myDebugger->setConsole(myConsole); myDebugger->initialize(); diff --git a/stella/src/emucore/Settings.cxx b/stella/src/emucore/Settings.cxx index 99c34ad55..2e9b0edde 100644 --- a/stella/src/emucore/Settings.cxx +++ b/stella/src/emucore/Settings.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Settings.cxx,v 1.160 2009-01-21 12:03:17 stephena Exp $ +// $Id: Settings.cxx,v 1.161 2009-01-21 15:32:15 stephena Exp $ //============================================================================ #include @@ -106,6 +106,7 @@ Settings::Settings(OSystem* osystem) setInternal("tiafloat", "true"); setInternal("avoxport", ""); setInternal("stats", "false"); + setInternal("audiofirst", "true"); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -327,6 +328,7 @@ void Settings::usage() << " -sa1 Stelladaptor 1 emulates specified joystick port\n" << " -sa2 Stelladaptor 2 emulates specified joystick port\n" << " -autoslot <1|0> Automatically switch to next save slot when state saving\n" + << " -audiofirst <1|0> Initial audio before video (required for some ATI video cards)\n" << " -ssdir The directory to save snapshot files to\n" << " -sssingle <1|0> Generate single snapshot instead of many\n" << " -ss1x <1|0> Generate TIA snapshot in 1x mode (ignore scaling)\n"