<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-70890650220703155</id><updated>2011-11-27T15:29:11.592-08:00</updated><category term='Visual Studio'/><category term='Drivers'/><category term='Physics'/><category term='Multi'/><category term='SP1'/><category term='Processor'/><category term='Samsung'/><category term='Threads'/><category term='ML-4500'/><category term='2008'/><category term='2005'/><category term='Optimization'/><category term='Printer'/><category term='Windows 7'/><category term='Core'/><title type='text'>Ash's Development Blog</title><subtitle type='html'>Development Blog.  Showing tips and tricks I've learnt along the way.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ashmcconnell.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ashmcconnell.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ash McConnell</name><uri>http://www.blogger.com/profile/06602075885194780037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_d3jigvBe2pM/SgWgi7le95I/AAAAAAAAAJ8/nROSzwfWocI/s1600-R/full_Bob_Question.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-70890650220703155.post-7319052638804909970</id><published>2011-11-20T14:06:00.001-08:00</published><updated>2011-11-20T14:06:47.540-08:00</updated><title type='text'>Blog has moved!</title><content type='html'>Hi Folks,&lt;br /&gt;&lt;br /&gt;I have decided to integrate my blog more closely with my website, so the blog has moved to: -&lt;br /&gt;&lt;br /&gt;http://siroccosoftware.com/devblog&lt;br /&gt;&lt;br /&gt;See you there!&lt;br /&gt;All the best,&lt;br /&gt;Ash&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/70890650220703155-7319052638804909970?l=ashmcconnell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashmcconnell.blogspot.com/feeds/7319052638804909970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashmcconnell.blogspot.com/2011/11/blog-has-moved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/7319052638804909970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/7319052638804909970'/><link rel='alternate' type='text/html' href='http://ashmcconnell.blogspot.com/2011/11/blog-has-moved.html' title='Blog has moved!'/><author><name>Ash McConnell</name><uri>http://www.blogger.com/profile/06602075885194780037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_d3jigvBe2pM/SgWgi7le95I/AAAAAAAAAJ8/nROSzwfWocI/s1600-R/full_Bob_Question.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-70890650220703155.post-1356957760292382937</id><published>2010-03-18T11:24:00.001-07:00</published><updated>2010-03-26T02:07:30.692-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Processor'/><category scheme='http://www.blogger.com/atom/ns#' term='Multi'/><category scheme='http://www.blogger.com/atom/ns#' term='Threads'/><category scheme='http://www.blogger.com/atom/ns#' term='Core'/><category scheme='http://www.blogger.com/atom/ns#' term='Physics'/><title type='text'>Physics on a Separate Thread</title><content type='html'>&lt;p&gt;After doing some profiling we found there are 2 main areas that use the CPU&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Graphics (Ogre + D3D + Drivers)&lt;/li&gt;&lt;li&gt;Physics – mostly the calculation of constraints&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;They use roughly 30% of the CPU each when the FPS is limited to 60fps – otherwise the Graphics just gobble up what is left of the CPU if the frame-rate is unlimited.&lt;br /&gt;&lt;br /&gt;This is pretty much what we expected - physics is the key part of the game / simulator.&lt;br /&gt;As there are so many dual core (and above) processors out there (&lt;a href="http://store.steampowered.com/hwsurvey/"&gt;82% of steam users and increasing&lt;/a&gt; )  we really need to support more multi-core processors.&lt;br /&gt;&lt;br /&gt;I think that the accepted approach to multi-thread code is to break everything down into smaller “tasks” and have some kind of task manager to pick each one up and execute it on a thread acquired from the thread-pool&lt;br /&gt;&lt;br /&gt;As physics is such a big chunk we thought that a quick win would be to put physics on a separate thread. I will try to describe the method I took to achieve this, as I've said above, this is my first threading adventure, so your mileage my vary.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:16pt;"&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the general method I used for running physics in parallel.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Cache the physics variables for use with the non-physics code&lt;/li&gt;&lt;li&gt;Queue the changes to the physics variables when called by non-physics code&lt;/li&gt;&lt;li&gt;Use a &lt;a href="http://en.wikipedia.org/wiki/Future_(programming)"&gt;Future &lt;/a&gt; (don't worry this will be explained later) to run physics updates in parallel with the non-physics code&lt;/li&gt;&lt;li&gt;Synchronise the physics variables when the physics updates are finished executing for this frame&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:16pt;"&gt;&lt;strong&gt;Breaking it apart!&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Our first goal is to logically separate the data to be used on the physics thread from the data to be used on the main (mostly-graphics) thread.&lt;br /&gt;&lt;br /&gt;In our game we calculate the forces that would be generated on the car / tyres / etc and these are resolved using &lt;a href="http://en.wikipedia.org/wiki/Constraint_algorithm"&gt;constraints &lt;/a&gt;, this eventually leads to positions / orientations / velocities and accelerations for each rigid-body in our game – mostly cars and tyres.&lt;br /&gt;&lt;br /&gt;To logically separate these physics we first need to make sure that none of the non-physics code access these variables directly. If one thread accesses a variable while another is trying to write to it or both try to write to the variable, bad things happen, usually resulting in a crash.&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:14pt;"&gt;Getters&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The approach I took was to cache all the variables that are needed by the rest of the code (this is a surprisingly small number of variables in my case). This caching function is called in between physics iterations by the main (graphics) thread&lt;br /&gt;&lt;strong&gt;&lt;span style=" ;font-family:Courier;font-size:8pt;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;strong&gt;&lt;span style=" ;font-family:Courier;font-size:8pt;"&gt;void Vehicle::cachePhysicsData(){&lt;br /&gt;_cache.pos =_chassisFront-&amp;gt;pRigidBody()-&amp;gt;GetPosition();&lt;br /&gt;_cache.ori = _chassisFront-&amp;gt;pRigidBody()-&amp;gt;GetOrientation();&lt;br /&gt;_cache.vel =_chassisFront-&amp;gt;pRigidBody()-&amp;gt;GetCOGVelocity();&lt;br /&gt;…&lt;br /&gt;…&lt;br /&gt;&lt;br /&gt;for(int i=0; i &amp;lt; 4; ++i){&lt;br /&gt;_cache.tyres[i].ori = _wheels[i]-&amp;gt;pRigidBody()-&amp;gt;GetOrientation();&lt;br /&gt;_cache.tyres[i].pos = _wheels[i]-&amp;gt;pRigidBody()-&amp;gt;GetPosition();&lt;br /&gt;...&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;I have removed most of the variables for brevity, but the same concept applies.&lt;br /&gt;For all the “getters” of the vehicle I return the cached version. For example,&lt;br /&gt;&lt;strong&gt;&lt;span style=" ;font-family:Courier;font-size:8pt;"&gt;Vector3D &amp;amp; Vehicle::getPosition()&lt;br /&gt;{&lt;br /&gt;return _cache.pos;&lt;br /&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;/blockquote&gt;&lt;strong&gt;&lt;span style=" ;font-family:Courier;font-size:8pt;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;This means that the graphics / logic thread can merrily work away while the physics thread calculates the next set of physics variables&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:14pt;"&gt;Setters&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;So that is all the “getters” working, what about the “setters”, what if we want to change the physics params (e.g. change the tyre pressure or the steering / brake / throttle position). We cannot do this directly either as it would mean writing to a variable in the physics area while the physics thread is potentially reading from it.&lt;br /&gt;The approach I took is to queue up these “setter” calls and then process them in between physics iterations. Here is an example showing of how I set the brake. SetBrake is called from the main thread and the setter's data is queued with a type (VPE_SET_BRAKE).&lt;br /&gt;&lt;span style="font-size:8pt;"&gt;&lt;strong&gt;&lt;span style="font-family:Courier;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:8pt;"&gt;&lt;strong&gt;&lt;span style="font-family:Courier;"&gt;&lt;blockquote&gt;void Vehicle::setBrake( re brakeZeroToOne )&lt;br /&gt;{&lt;br /&gt;EventFloatMessage *ev = new EventFloatMessage(VPE_SET_BRAKE, brakeZeroToOne);&lt;br /&gt;_cachedEvents.push_back(ev);&lt;br /&gt;}&lt;/blockquote&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;When we have finished the current physics iteration(s) we call the following function to call the “real” setBrakeInt function that actually modifies the brake constraint.&lt;br /&gt;&lt;span style="font-family:Courier;"&gt;&lt;strong&gt;&lt;span style="font-size:8pt;"&gt;&lt;blockquote&gt;void Vehicle::updateSettingsForNextPhysicsIteration(){&lt;br /&gt;vector&amp;lt;EventMessagePtr&amp;gt;::iterator ev = _cachedEvents.begin();&lt;br /&gt;for (; ev != _cachedEvents.end(); ++ev)&lt;br /&gt;{&lt;br /&gt;switch ((*ev)-&amp;gt;eventId)&lt;br /&gt;{&lt;br /&gt;case VPE_SET_BRAKE:&lt;br /&gt;{&lt;br /&gt;EventFloatMessage *fl = (EventFloatListMessage*)(*ev);&lt;br /&gt;setBrakeInt(fl-&amp;gt;dataList[0]);&lt;br /&gt;}&lt;br /&gt;break;&lt;br /&gt;…&lt;br /&gt;…&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;…&lt;br /&gt;…&lt;br /&gt;_cachedEvents.clear();&lt;br /&gt;}&lt;/blockquote&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;(*note* I have edited the code to remove a few complexities (mostly Boost::shared_ptrs) so it should be treated as pseudo-code)&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:14pt;"&gt;Putting it in the main loop&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;With our cachePhysicsData and updateSettingsWhenForNextPhysicsIteration functions we have gathered all our Physics data interactions in one ...err...two places. This allows us to do these interactions quickly while our physics thread isn't writing to physics data.&lt;br /&gt;&lt;br /&gt;Here is an outline of my main loop&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=" ;font-family:Courier;font-size:8pt;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style=" ;font-family:Courier;font-size:8pt;"&gt;&lt;blockquote&gt;_physThread = PhysicsThreadPtr(new PhysicsThread(_clock, _updateTimeMicroSecs, _physicsFunction));&lt;br /&gt;&lt;br /&gt;while (!_done)&lt;br /&gt;{&lt;br /&gt;Poco::ActiveResult&amp;lt;SiroccoTime&amp;gt; physToken = _physThread-&amp;gt;doPhysicsUpdates(_physicsT);&lt;br /&gt;&lt;br /&gt;while (t &amp;lt; (currentTime = _clock-&amp;gt;getTimeMicroseconds()))&lt;br /&gt;{&lt;br /&gt;runFixedHzTasks();&lt;br /&gt;&lt;br /&gt;t += (_updateTimeMicroSecs);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;runFrameRateHandlers(); // Includes rendering code&lt;br /&gt;physToken.wait(); // if the physics stuff is still going we wait&lt;br /&gt;_physicsT = physToken.data(); // physicsT is a time var so we know we have done the correct&lt;br /&gt;// number of physics steps per sec&lt;br /&gt;_physicsPrepFunction(); // Calls cachePhysicsData and updateSettings....&lt;br /&gt;&lt;br /&gt;}&lt;/blockquote&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Active Methods are &lt;a href="http://pocoproject.org/"&gt;Poco's &lt;/a&gt;implementation of &lt;a href="http://en.wikipedia.org/wiki/Future_(programming)"&gt;Futures&lt;/a&gt;.  . These allow the programmer to call a method and it will put it on a thread automatically from a thread-pool (by default). When the programmer wants the result of the call they ask for it by calling ActiveResult::wait then ActiveResult::data.&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;When we call wait this waits for the thread to finish executing, therefore it is safe to call cachePhysicsData and updateSettingsForNextPhysicsIteration&lt;br /&gt;&lt;br /&gt;Here is my Physics thread implementation that uses the Active Method (doPhysicsUpdates)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=" ;font-family:Courier;font-size:8pt;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style=" ;font-family:Courier;font-size:8pt;"&gt;&lt;blockquote&gt;class PhysicsThread{&lt;br /&gt;public:&lt;br /&gt;PhysicsThread(IClockPtr clock, long updateMicroSecs, boost::function&amp;lt; void (void) &amp;gt; callBackFunction)&lt;br /&gt;:doPhysicsUpdates(this, &amp;amp;PhysicsThread::doPhysicsUpdatesImpl),&lt;br /&gt;_clock(clock),&lt;br /&gt;_updatePhysicsFunction(callBackFunction),&lt;br /&gt;_updateTimeMicroSecs(updateMicroSecs)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Poco::ActiveMethod&amp;lt;__int64,__int64, PhysicsThread&amp;gt; doPhysicsUpdates;&lt;br /&gt;protected:&lt;br /&gt;__int64 doPhysicsUpdatesImpl(const __int64 &amp;amp;tIn){&lt;br /&gt;__int64 t = tIn;&lt;br /&gt;while (t &amp;lt; (_currentTime = _clock-&amp;gt;getTimeMicroseconds()))&lt;br /&gt;{&lt;br /&gt;_updatePhysicsFunction();&lt;br /&gt;t += (_updateTimeMicroSecs);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return t;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private:&lt;br /&gt;__int64 _currentTime;&lt;br /&gt;IClockPtr _clock;&lt;br /&gt;boost::function&amp;lt; void (void) &amp;gt; _updatePhysicsFunction;&lt;br /&gt;long _updateTimeMicroSecs;&lt;br /&gt;};&lt;/blockquote&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this method we do the amount of physics updates it takes for us to catch up with “real time” (hence the while statement).&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:16pt;"&gt;Summary&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To reiterate, this is the method we used: -&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Cache the physics variables for use with the non-physics code&lt;/li&gt;&lt;li&gt;Queue the changes to the physics variables when called by non-physics code&lt;/li&gt;&lt;li&gt;Use a &lt;a href="http://en.wikipedia.org/wiki/Future_(programming)"&gt;Future &lt;/a&gt;to run physics updates in parallel with the non-physics code&lt;/li&gt;&lt;li&gt;Synchronise the physics variables when the physics updates are finished executing for this frame&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The results so far are quite good. The overall FPS didn't increase much (perhaps 5-10%) on my quad core 6600, but when the FPS is around 300 it doesn't matter so much. I think the results will be more interesting on a lower powered dual core machine, more testing and tweaking needed! I think there is more to come.  The game feels a bit smoother, which makes a nice difference.&lt;br /&gt;&lt;br /&gt;As i've stated before, this is my first real expedition into multi-core coding, so if I have been an idiot and there is an obviously better way of approaching the problem, please let me know!&lt;p&gt;&lt;/p&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;*Update*&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;The results I obtained above were obviously a placebo as there was a problem with the timer (using QueryPerformanceTimer) using SetThreadAffinityMask to stick to the first processor.  The results are now much more interesting.  On my slow PC the difference in FPS (not the best measure - but a measure none-the-less) went from 130 to 180FPS.  On my development machine it went from 320 to 370FPS.  So IMO a significant improvement and well worth the effort.&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/70890650220703155-1356957760292382937?l=ashmcconnell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashmcconnell.blogspot.com/feeds/1356957760292382937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashmcconnell.blogspot.com/2010/03/physics-on-separate-thread.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/1356957760292382937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/1356957760292382937'/><link rel='alternate' type='text/html' href='http://ashmcconnell.blogspot.com/2010/03/physics-on-separate-thread.html' title='Physics on a Separate Thread'/><author><name>Ash McConnell</name><uri>http://www.blogger.com/profile/06602075885194780037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_d3jigvBe2pM/SgWgi7le95I/AAAAAAAAAJ8/nROSzwfWocI/s1600-R/full_Bob_Question.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-70890650220703155.post-1697363992296409154</id><published>2009-05-21T23:33:00.000-07:00</published><updated>2009-05-21T23:39:23.552-07:00</updated><title type='text'>Debugging Win 7 Sleep problems</title><content type='html'>There is a great post by Michael Aulia&lt;br /&gt;&lt;a href="http://www.michaelaulia.com/blogs/fix-windows-vista7-sleep-mode-from-waking-up-by-itself.html"&gt;&lt;br /&gt;http://www.michaelaulia.com/blogs/fix-windows-vista7-sleep-mode-from-waking-up-by-itself.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I had a slight problem getting it to work on Win 7.  When I ran the command to disable waking with my keyboard I got&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;C:\Users\Ash&gt;powercfg -DEVICEDISABLEWAKE "Microsoft USB Dual Receiver Wireless Keyboard (IntelliType Pro)"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;You do not have permission to enable or disable device wake.&lt;/span&gt;&lt;/blockquote&gt;The answer is simple, you just need to run the command window as Administrator, i.e. Press windows key; Type cmd; Right click on cmd from the list and Run as Administrator.&lt;br /&gt;&lt;br /&gt;By the way, my keyboard and mouse needed disabled as even if i didn't touch them it would wake the pc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/70890650220703155-1697363992296409154?l=ashmcconnell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashmcconnell.blogspot.com/feeds/1697363992296409154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashmcconnell.blogspot.com/2009/05/debugging-win-7-sleep-problems.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/1697363992296409154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/1697363992296409154'/><link rel='alternate' type='text/html' href='http://ashmcconnell.blogspot.com/2009/05/debugging-win-7-sleep-problems.html' title='Debugging Win 7 Sleep problems'/><author><name>Ash McConnell</name><uri>http://www.blogger.com/profile/06602075885194780037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_d3jigvBe2pM/SgWgi7le95I/AAAAAAAAAJ8/nROSzwfWocI/s1600-R/full_Bob_Question.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-70890650220703155.post-3395060404589280965</id><published>2009-05-20T13:30:00.000-07:00</published><updated>2009-05-21T00:40:44.073-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Printer'/><category scheme='http://www.blogger.com/atom/ns#' term='Samsung'/><category scheme='http://www.blogger.com/atom/ns#' term='Drivers'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='ML-4500'/><title type='text'>Getting a Samung Laser Printer to work in Windows 7</title><content type='html'>Figured out how to get my samsung laser printer working in Windows 7&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download the "Win Vista/2008 (version 3.01)" from here: - &lt;a href="http://www.samsung.com/us/support/download/supportDown.do?model_nm=ML-4500&amp;amp;mType=DR&amp;amp;vType=L&amp;amp;disp_nm=ML-4500"&gt;http://www.samsung.com/us/support/download/supportDown.do?model_nm=ML-4500&amp;amp;mType=DR&amp;amp;vType=L&amp;amp;disp_nm=ML-4500&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Uncompress it using winzip or winrar or the like.   Do not execute it, it will not work!&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Add a printer from the control panel (Control Panel-&gt;View Devices and Printers-&gt;Add a printer)&lt;/li&gt;&lt;li&gt;Go to "Have disk" and go to where you unzipped&lt;/li&gt;&lt;li&gt;Then Printer-&gt;GDI-&gt;VISTA (or VISTA64 if you installed Win7 - 64bit)-&gt;SPLV1.INF&lt;/li&gt;&lt;li&gt;Select your printer from the list (mine was a ML-4500)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;All should then work nicely, but your milage may vary - good luck&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/70890650220703155-3395060404589280965?l=ashmcconnell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashmcconnell.blogspot.com/feeds/3395060404589280965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashmcconnell.blogspot.com/2009/05/getting-samung-laser-printer-to-work-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/3395060404589280965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/3395060404589280965'/><link rel='alternate' type='text/html' href='http://ashmcconnell.blogspot.com/2009/05/getting-samung-laser-printer-to-work-in.html' title='Getting a Samung Laser Printer to work in Windows 7'/><author><name>Ash McConnell</name><uri>http://www.blogger.com/profile/06602075885194780037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_d3jigvBe2pM/SgWgi7le95I/AAAAAAAAAJ8/nROSzwfWocI/s1600-R/full_Bob_Question.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-70890650220703155.post-8423950860771883811</id><published>2009-05-09T08:07:00.000-07:00</published><updated>2009-05-09T08:28:48.011-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2005'/><category scheme='http://www.blogger.com/atom/ns#' term='SP1'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Optimization'/><title type='text'>Visual Studio 2005-2008SP1 Upgrade Bug</title><content type='html'>Hi Folks,&lt;br /&gt;&lt;br /&gt;I know its slightly daft to start a blog for a bug, but it cost me nearly a week of struggling to find, so hopefully it will help someone out :).&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Visual Studio 2008SP1 does not upgrade projects correctly - it disables optimization in release mode.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The workaround is to set the "Optimization" setting in Project-&gt;Properties-&gt;Config Props-&gt;C/C++ to disabled, then back to /O2 (Maximise speed).   This setting will now be bold which is how you know it is properly set.&lt;br /&gt;&lt;br /&gt;If you get something like: -&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;blockquote&gt;&lt;code&gt;11&gt;e:\workspace\trunk\sirocco\main\code\networkengine\serverraknet.cpp(907) : warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function&lt;/code&gt;&lt;/blockquote&gt;and you haven't explicitly turned off optimization with #pragma optimization( ... ), then you have the same problem as I had and your code is most likely running slowly.&lt;br /&gt;&lt;br /&gt;They say this is fixed in VS 2010, but it's something to look out for while people are still using VS 2008, especially if you are adding a dependency that has a VS2005 project file&lt;br /&gt;&lt;br /&gt;Hope this helps some googlers.&lt;br /&gt;All the best,&lt;br /&gt;Ash&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/70890650220703155-8423950860771883811?l=ashmcconnell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashmcconnell.blogspot.com/feeds/8423950860771883811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashmcconnell.blogspot.com/2009/05/visual-studio-2005-2008sp1-upgrade-bug.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/8423950860771883811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/70890650220703155/posts/default/8423950860771883811'/><link rel='alternate' type='text/html' href='http://ashmcconnell.blogspot.com/2009/05/visual-studio-2005-2008sp1-upgrade-bug.html' title='Visual Studio 2005-2008SP1 Upgrade Bug'/><author><name>Ash McConnell</name><uri>http://www.blogger.com/profile/06602075885194780037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_d3jigvBe2pM/SgWgi7le95I/AAAAAAAAAJ8/nROSzwfWocI/s1600-R/full_Bob_Question.jpg'/></author><thr:total>0</thr:total></entry></feed>
