Current version

v1.10.4 (stable)

Navigation

Main page
Archived news
Downloads
Documentation
   Capture
   Compiling
   Processing
   Crashes
Features
Filters
Plugin SDK
Knowledge base
Donate
Contact info
Forum
 
Other projects
   Altirra

Search

Calendar

« February 2013 »
S M T W T F S
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28    

Archives

01 Aug - 31 Aug 2013
01 May - 31 May 2013
01 Mar - 31 Mar 2013
01 Feb - 29 Feb 2013
01 Dec - 31 Dec 2012
01 Nov - 30 Nov 2012
01 Oct - 31 Oct 2012
01 Sep - 30 Sep 2012
01 Aug - 31 Aug 2012
01 June - 30 June 2012
01 May - 31 May 2012
01 Apr - 30 Apr 2012
01 Dec - 31 Dec 2011
01 Nov - 30 Nov 2011
01 Oct - 31 Oct 2011
01 Sep - 30 Sep 2011
01 Aug - 31 Aug 2011
01 Jul - 31 Jul 2011
01 June - 30 June 2011
01 May - 31 May 2011
01 Apr - 30 Apr 2011
01 Mar - 31 Mar 2011
01 Feb - 29 Feb 2011
01 Jan - 31 Jan 2011
01 Dec - 31 Dec 2010
01 Nov - 30 Nov 2010
01 Oct - 31 Oct 2010
01 Sep - 30 Sep 2010
01 Aug - 31 Aug 2010
01 Jul - 31 Jul 2010
01 June - 30 June 2010
01 May - 31 May 2010
01 Apr - 30 Apr 2010
01 Mar - 31 Mar 2010
01 Feb - 29 Feb 2010
01 Jan - 31 Jan 2010
01 Dec - 31 Dec 2009
01 Nov - 30 Nov 2009
01 Oct - 31 Oct 2009
01 Sep - 30 Sep 2009
01 Aug - 31 Aug 2009
01 Jul - 31 Jul 2009
01 June - 30 June 2009
01 May - 31 May 2009
01 Apr - 30 Apr 2009
01 Mar - 31 Mar 2009
01 Feb - 29 Feb 2009
01 Jan - 31 Jan 2009
01 Dec - 31 Dec 2008
01 Nov - 30 Nov 2008
01 Oct - 31 Oct 2008
01 Sep - 30 Sep 2008
01 Aug - 31 Aug 2008
01 Jul - 31 Jul 2008
01 June - 30 June 2008
01 May - 31 May 2008
01 Apr - 30 Apr 2008
01 Mar - 31 Mar 2008
01 Feb - 29 Feb 2008
01 Jan - 31 Jan 2008
01 Dec - 31 Dec 2007
01 Nov - 30 Nov 2007
01 Oct - 31 Oct 2007
01 Sep - 30 Sep 2007
01 Aug - 31 Aug 2007
01 Jul - 31 Jul 2007
01 June - 30 June 2007
01 May - 31 May 2007
01 Apr - 30 Apr 2007
01 Mar - 31 Mar 2007
01 Feb - 29 Feb 2007
01 Jan - 31 Jan 2007
01 Dec - 31 Dec 2006
01 Nov - 30 Nov 2006
01 Oct - 31 Oct 2006
01 Sep - 30 Sep 2006
01 Aug - 31 Aug 2006
01 Jul - 31 Jul 2006
01 June - 30 June 2006
01 May - 31 May 2006
01 Apr - 30 Apr 2006
01 Mar - 31 Mar 2006
01 Feb - 29 Feb 2006
01 Jan - 31 Jan 2006
01 Dec - 31 Dec 2005
01 Nov - 30 Nov 2005
01 Oct - 31 Oct 2005
01 Sep - 30 Sep 2005
01 Aug - 31 Aug 2005
01 Jul - 31 Jul 2005
01 June - 30 June 2005
01 May - 31 May 2005
01 Apr - 30 Apr 2005
01 Mar - 31 Mar 2005
01 Feb - 29 Feb 2005
01 Jan - 31 Jan 2005
01 Dec - 31 Dec 2004
01 Nov - 30 Nov 2004
01 Oct - 31 Oct 2004
01 Sep - 30 Sep 2004
01 Aug - 31 Aug 2004

Stuff

Powered by Pivot  
XML: RSS feed 
XML: Atom feed 

§ I game on Advanced Server

Larry Osterman's blog entry about using a server version of Windows as a desktop OS reminds me of a post I once saw on a forum:

A: I'm having trouble running Half Life on my gaming rig. Can anyone help me?

B: Maybe. What OS are you running?

A: Windows 2000 Advanced Server

Hopefully from the Microsoft company store....

Truth be told, it probably should have worked fine. I got NT4 Server as a gift and used to run it as my desktop OS, because for development it was much better than Windows 98. The only real downside, IIRC, was that a whole bunch of programs detected the Server version and refused to run because you were supposed to buy the far more expensive edition (which did pretty much the same thing).

(Read more....)

§ Wine's DirectDraw implementation

I had a support question about VirtualDub blanking out screens again in Wine, so I decided to take another look out of curiosity.

A long time ago, when I released VirtualDub 1.5.5, I started receiving reports of issues with Wine. Specifically, as soon as VirtualDub tried to display any video, the entire screen would be overwritten. Wine was fairly immature at the time and still had a lot of major problems with commercial applications, so I wasn't surprised to determine that it was an issue with Wine and left it as such. That was the first version that had full support for DirectDraw video display, and so the workaround was to disable it in Options and fall back to GDI.

Surprisingly, there are still display compatibility issues with VirtualDub running under Wine.

VirtualDub doesn't do anything too fancy in its default DirectDraw mode. It creates a single off-screen surface in default memory (usually video, can be system) and then calls Blt() to draw it onto the primary surface through a clipper. I use the older DirectDraw 3 API, because that was the highest version supported by Windows NT 4.0 and there isn't anything in DirectDraw 6 or 7 that I need. There was a problem with Windows Vista where the panes sometimes wouldn't update (mixed DX and GDI in the same window no longer allowed, first I'd ever heard of it), but I fixed that by splitting off the display minidrivers to a child window, at the cost of flickering at mode switches. As far as I know, everything works now, both in XP and Vista. But it doesn't work in Wine, at least not so well.

In Wine 1.0, the current stable release, the old screen blanking problem is still around. I didn't have a debugging setup that I could use to check the Wine code -- realistically, I shouldn't even have been installing and running Wine on a running MythTV box -- but as best as I could tell from behavior and the Wine source, here's what's going on:

Note that VirtualDub is blitting with both a destination subrect and a clipper attached, so the entire screen should definitely not be getting overwritten in this way.

In the current alpha release -- I think it was Wine-1.1.2 that I tested -- the situation is a bit better, as the video panes no longer blank the screen. There appear to be two changes possibly involved, although I'm not sure which are in the mainline:

The clipping situation is still pretty bad in the current version, as blits that are partially outside of the primary surface still fail, even if a clipper is attached. It seems that the top-level Blt() function immediately rejects any blits where the destination rect overlaps the right or bottom boundary, clipper or not. The underlying blit code in wined3d seems to be able to handle clipping to some extent, but unfortunately it lacks the ability to clip a stretchblt. It's a relatively minor issue, but it looks like the fractional stepping on the stretchblt case is also off by half a pixel.

How hard would it be to fix? I'm not sure. It's easy to be an armchair programmer, and I've never worked on Wine before. The clip and stretch problems, I'd say, shouldn't be too bad. As far as I know, the real DirectDraw only clips blits to pixel precision on both destination and source, which is easier but leads to seam artifacts. There is a path that does clip properly, but it's only used by Direct3D Present() calls. A more worrisome problem is that the old Microsoft DirectDraw Test (ddtest.exe) program doesn't work at all under Wine, as it displays garbage in its status panes and crashes out as soon as you try to create the primary surface. I suspect the reason might be that the DX3 interfaces aren't implemented properly and are expecting and returning DX7 structures, which would require a much bigger fix than just a few tweaks to the clipping and scaling routines.

So, if you're wondering why VirtualDub has drawing problems on Wine... there's your answer.

(Read more....)

§ Undoing indentation hell

Have you ever looked at a piece of code and seen something like this?

if (...) {
if (...) {
...
} else {
if (...) {
...
} else if (...) {
...
} else {
...
}
}
...

I'm going into style matters again and I know this is going to be contentious, but personally, I find that code is hard to read when it looks like a big tree view. You have to mentally match the braces or highlight them individually to have the editor show the matching, and that's hard to do when there are so many of them. It's even harder when the top-level statements don't even fit on one screen. The worst case I ever saw had something like 12 levels of indenting and was more than 17 pages long... and I use a small font size. Most of the time this happens because a routine snowballs until it grows out of control, and no one has the time/experience/constitution to refactor it. This happens to me as well, and eventually I get annoyed enough that I have to perform a nesting exorcism.

I attack such monstrosities by a series of small, incremental transformations. This increases the chances that the code will actually still work by the time I'm done with it. I should note that these are best done only if you own the code or already have to do major work on it for other reasons; doing transformations like this willy-nilly is a good way to completely scramble history in a source code control system and nuke any chances of your team members successfully merging your changes with theirs.

(Read more....)

§ VirtualDub 1.8.8 released

1.8.8/stable is now up on SourceForge. It fixes the /r command-line regression, as well as a couple of bugs in the plugin API support that affected some input drivers. I fixed a couple of Ctrl+C/Break glitches too while I was at it (more cases where WM_QUIT was being eaten).

The /r regression was caused by the change I had made to allow backoff-and-retry for the distributed job case. In doing so I had failed to update the command-line path, which expects to be able to call the run-all command in the job system as a single function call. This led to a classic problem where an event driven system couldn't be driven by a non-event-driven code path. I ended up fixing this by adding a modal loop, as rewriting the command-line logic to be event driven would have been too much work and too risky. Some had suggested that the bug was that the autostart flag in the job control window wasn't being set, but that's actually a different function -- that can't be used anyway as it doesn't suspend command-line processing and thus won't stall app exit (/x). Ultimately converting everything to use commands and a command queue is the Right Way(tm), but I'm a bit far from that.

(Read more....)