Re: ddraw: Added support for WINED3DFMT_X8L8V8U8, WINED3DFMT_R8G8B8A8_SNORM and WINED3DFMT_R16G16_SNORM to PixelFormat_WineD3DtoDD

2009-09-09 Thread Stephan Rose
On Mon, 2009-09-07 at 13:16 +0200, joerg-cyril.hoe...@t-systems.com
wrote:
> Stephan,
> 
> All the patches proposed to bug #16559 forget one thing:
> 
> it cannot be right to patch only PixelFormat_WineD3DtoDD without patching its 
> converse function in the same file, PixelFormat_DD2WineD3D.

Good point, didn't think of that. =)

Thanks,

Stephan






Re: gdiplus: Add support for horizontal string alignment to GdipDrawString

2009-06-07 Thread Stephan Rose
On Sun, 2009-06-07 at 19:53 -0500, Vincent Povirk wrote:
> This looks wrong to me. You're only adjusting the left coordinate, but
> in case of a rotation in the world transform, you'll need to adjust
> the top as well.
> 
> Also, I think you may still be able to use DT_CENTER and DT_RIGHT
> rather than measuring the string beforehand. Creating a rectangle
> something like the original is difficult, but DrawText probably only
> needs to know the top-center or top-right point to do these other
> alignments. So it should be able to align things properly if you give
> it a rectangle where all corners are the point where it anchors the
> text.

Well it'd have to be top left and top right. Given those two, top center
will be determined by DrawText on it's own when given DT_CENTER
alignment. 

Ok I think that I'm really going to have to do is make a rotated test
app to see what happens. Only 'issue' here is that I am not even
remotely setup here at home for writing / compiling any kind of native
windows software. While I have a windows installation, use it like maybe
once every couple weeks for some occasional gaming.

Is there any easy way for me to do this under linux? MingW I suppose?

Thanks,

Stephan






Re: gdiplus: add support for string alignment to GdipDrawString (try 2)

2009-06-02 Thread Stephan Rose
>(reply didn't go to list as I expected, grr..)
>
>> Naw, it should still work normally. I've done aligned & rotated text under 
>windows before with DrawTextW, you still pass the rect like you would if it 
>wasn't rotated and set the alignment flags. The world transform should take 
>care of getting it all rotated to where it is supposed to be with the 
>alignments in the right place.
>
>Maybe, but builtin gdiplus has its own world transform and doesn't use
>the gdi32 one. That's what transform_and_round_points is for.

True but you're still using the GDI32 DrawText to actually render the text. 
transform_and_round_points is only doing what it says, transforming the 
coordinates. If you rotate the text by 90 degrees, DrawText is still going to 
have to be aware that the text is to be rotated 90 degrees to draw it correctly 
or else you'll get your text at the right position, but the text direction will 
be wrong. Unless I'm overlooking something?

>
>> Ok question then, how do I separate this into two patches? Never done 
>anything with patches like this before so this is a first for me.
>
>Just make two commits in Git, and format-patch will create two patch files.
>

That makes sense but, one question there. Does this mean I'm going to have to 
restore the file to it's original state, then add the one change, commit, add 
the other change, then commit again? With a change of this size, that isn't 
that big a deal. But on larger changes I could see that being a bit 
problematic. But maybe I'm just not used to it. =)

Thanks,

Stephan




Re: gdiplus: add support for string alignment to GdipDrawString (try 2)

2009-06-02 Thread Stephan Rose
>Without doing any actual testing:
>
>The vertical alignment stuff looks right to me.
>
>Horizontal alignment is suspicious. If the world transform rotates the
>text 90 degrees, DrawTextW can't be getting enough information to
>center the text. Then again, I'm not sure if rotation works properly
>with GdipDrawString in general. I'd write a test program for rotated
>text.

Naw, it should still work normally. I've done aligned & rotated text under 
windows before with DrawTextW, you still pass the rect like you would if it 
wasn't rotated and set the alignment flags. The world transform should take 
care of getting it all rotated to where it is supposed to be with the 
alignments in the right place.

But I agree with you though, a test with rotated text is needed. If necessary 
though it isn't a big deal for me to change things to align without using 
DT_CENTER and DT_RIGHT. I'd want to test with the alignment flags first though 
as it keeps the code simpler if I can stick with those.

>
>I would probably send this as a series of 2 patches with vertical
>alignment first.

Ok question then, how do I separate this into two patches? Never done anything 
with patches like this before so this is a first for me.

>
>In spite Paul Vriens' comments, don't change the formatting of code
>you're not changing. I guess the existing if's are already
>inconsistent enough that you can get away with either style (and that
>might actually be my fault).

Without looking at it, I think it was only two if statements that weren't mine 
that I modified formatting on. Figured my changes to the function were major 
enough to where getting those two consistent with everything else wouldn't 
matter much. Up to you all if you want me to just leave those untouched or get 
their formatting in line with everything else. Either way's fine by me. =)

Stephan




Re: gdiplus: GdipDrawString

2009-06-01 Thread Stephan Rose
On Mon, 2009-06-01 at 13:03 -0400, Stephan Rose wrote:
> >I don't know why gdiplus does its own linebreaks. I haven't really
> >done any work in that area.
> >
> >If I had to guess, I'd say it's because StringFormatFlagsNoWrap has no
> >equivalent flag for DrawText. That probably means you can't pass it
> >off to DrawText.
> >
> >Since they'll probably have to be done differently, it's best to
> >implement one direction at a time. When you're happy with horizontal
> >alignment, you can send a patch for that regardless of the status of
> >vertical alignment.
> >
> >You should be able to use GdipMeasureString to get the size of the
> >text. In fact, the alignments will need to be implemented there too,
> >and it may be better to start there.
> 
> Hmm the only way I can see alignments having any influence on MeasureString 
> would be if the boundingBox of the text is to be aligned to the layoutRect 
> based on the alignment flags. Should just be able to then take the calculated 
> bounding rect and align that to the layout based on the flags.
> 
> And you're right, if I use MeasureString I solve my issue where I don't know 
> the height of the text ahead of time. Perfect.]


My initial implementation for the string alignment stuff seems to be
working. Haven't done anything inside MeasureString yet (that'll be next
though).

Here's a screenshot comparing the windows version from the bug report
against my implementation.

http://www.somrek.net/stringformat.png

Now how do I go about creating the patch and trying to get this
committed? =)

Thanks,

Stephan






Re: gdiplus: GdipDrawString

2009-06-01 Thread Stephan Rose
>I don't know why gdiplus does its own linebreaks. I haven't really
>done any work in that area.
>
>If I had to guess, I'd say it's because StringFormatFlagsNoWrap has no
>equivalent flag for DrawText. That probably means you can't pass it
>off to DrawText.
>
>Since they'll probably have to be done differently, it's best to
>implement one direction at a time. When you're happy with horizontal
>alignment, you can send a patch for that regardless of the status of
>vertical alignment.
>
>You should be able to use GdipMeasureString to get the size of the
>text. In fact, the alignments will need to be implemented there too,
>and it may be better to start there.

Hmm the only way I can see alignments having any influence on MeasureString 
would be if the boundingBox of the text is to be aligned to the layoutRect 
based on the alignment flags. Should just be able to then take the calculated 
bounding rect and align that to the layout based on the flags.

And you're right, if I use MeasureString I solve my issue where I don't know 
the height of the text ahead of time. Perfect.

Thanks,

Stephan




gdiplus: GdipDrawString

2009-06-01 Thread Stephan Rose
Ok was playing a bit with DrawString on sunday trying to get string alignments 
to work. I've got horizontal alignments working by simply setting 
drawcoord.right which currently is left uninitialized and then passing 
DT_CENTER and DT_RIGHT as needed to DrawTextW.

So far, that worked.

However, I can't do that for vertical alignments because the code manually does 
the line breaking and therefore draws each line individually.

So my question is, why? Why aren't we letting DrawTextW do the line breaking 
and just letting it draw with the appropriate rect? Is the linebreaking 
different? Or does DrawTextW not have the proper support for rotations?

As it stands right now, if necessary, I can easily enough calculate the offsets 
myself for doing horizontal alignments instead of using DT_CENTER and DT_RIGHT.

But for vertical, this is a bit problematic. I don't know how many lines of 
text there are going to be until the text has already been drawn. Kind of a 
prerequisite for vertical alignment however.

That means that if I just want to brute force it, I'd have to duplicate the 
drawing loop and once only have it measure the string / count lines. That then 
allows me to calculate the proper offset and I could then just rerun the thing 
again with the new position and it'd work. A bit more better solution would be 
to store the line break info in a small array (indices into the string should 
do that tell me where each line ends) to simply the drawing loop. That would 
require a dynamic array though which brings me to another question, what should 
I use? is stuff like std::vector ok or should I use something else?

If of course there's a way we can just have DrawTextW handle the line breaking, 
I don't even need to care about any of the above. Can then just calculate the 
proper bounding rect and hand all the issues off to DrawTextW.

Thoughts?

Thanks,

Stephan




Re: DIB engine

2009-05-31 Thread Stephan Rose
On Sun, 2009-05-31 at 12:23 -0700, Dan Kegel wrote:
> On Sun, May 31, 2009 at 12:45 AM, Stephan Rose  wrote:
> >> If you're looking for something better specified, try finishing off
> >> gdiplus.
> > ... I'll check into gdiplus missing bits sometime next week. :)
> >
> > My name's Andrew Eikum, I'm an undergraduate Computer
> > Science student at the University of Minnesota.
> > I contacted a Wine dev a few weeks ago asking for a small
> > project to use to get familiar with Wine.  I was pointed
> > towards the gdiplus section and told to begin stubbing
> > out the missing functions, to facilitate debugging.
> > After familiarizing myself with how Wine's DLLs are built,
> > and with Git, I'm now making quick progress.  I expect to
> > have a (huge) patchset ready in the next week or two with
> > most of the gdiplus functions stubbed.
> 
> Excellent!  (And Stephan, there's more than enough work
> to go around, don't worry that Andrew's going to do it all :-)

Hahaha, not worried.

Btw, I seem to have a handle on the stringformat alignment bug. By the
looks of it I may have a patch for that sometime over the next couple
days. Don't know if I will make it today as I have a roughly 5'6"
brunette incentive to do something other than write code tonight. :)

Stephan






re: DIB engine

2009-05-31 Thread Stephan Rose
On Sat, 2009-05-30 at 14:14 -0700, Dan Kegel wrote:
> Stephan Rose wrote:
> > My ears perked up when the two words DIB and spec were put
> > together in the same sentence. One frustration I encountered
> > when wanting to contribute to wine a little over two years ago
> > was that nobody seemed to be able to say "Hey, this is what
> > we are missing/need, here are the specs, go implement".
> >...
> > So if anyone can drop a full spec into my lap which outlines
> > everything I need to write and where (given I adhere to things
> > as I should of course) I won't have any issues getting that accepted later 
> > on...
> 
> I don't think such manna is likely to fall from heaven any time soon.
> If it was that easy to spec, we would have been done by now.
> 
> If you're looking for something better specified, try finishing off
> gdiplus.   That's a somewhat well defined graphics package,
> and Wine's implementation has a few missing bits yet, last
> I checked.

Ok, then judging from the last few posts i'll leave DIB be for now
seeing how there still seems to be some figuring out to do and I'll
check into gdiplus missing bits sometime next week. :)

Thanks,

Stephan






Re: DIB engine

2009-05-29 Thread Stephan Rose
>>As was said in the other thread, just designing it alone would take a
>>few months work. AJ is really busy with other things, and a few months
>>work is both a lot of money and a lot of wasted productivity. No one
>>is stepping up to sponsor the work, so it's a bit hard for him to take
>>that on.
>
>Who is asking AJ to do all of the work.  Huw Davies and Max have worked out 
>what is needed to get this into Wine.  All we need is guidance on what is 
>acceptable and how we should proceed.  This seems to be a serious shortcoming 
>on AJs part.  Without this, any further work would be futile and could end up 
>being very frustrating.  I've seen this from Huw and it is starting to come 
>from Max.  AJ needs to get some time together and write up what is and is not 
>acceptable as far as code style, fashion and what he expects out of the 
>development efforts for the DIB engine.  Making a statement
>after months of work is IHMO very unacceptable.
>
>Also, I don't see this as circular, but the 'snake' of getting AJ to accept 
>code into the codebase is.

This is where I figured I'd wake up and chime in a bit. None of you all know me 
I suppose but I've been primarily just listening in on this list for the better 
part of two years now. :)

My ears perked up when the two words DIB and spec were put together in the same 
sentence. One frustration I encountered when wanting to contribute to wine a 
little over two years ago was that nobody seemed to be able to say "Hey, this 
is what we are missing/need, here are the specs, go implement". Essentially, 
that's how I work and how I work well. Trying to fix random bugs in random 
applications in a codebase completely unfamiliar to me seemed to be rather 
futile so at that point in time I abandoned those efforts and just stuck to 
using wine. =P

So that said, I've got a decent amount of experiences dealing with graphics, 
including full 24/32-bit color on embedded devices. Considering the 
environment, performance has always been a priority as well. Plus, I also 
really like working with graphics related code. So from where I'm standing 
right now, this seems to be right in my neighbourhood. 

So if anyone can drop a full spec into my lap which outlines everything I need 
to write and where (given I adhere to things as I should of course) I won't 
have any issues getting that accepted later on, I'd be more than willing to 
take on something like this. 

Thanks,

Stephan




Re: ReplaceFileW (was: Phoronix: Ubuntu 7.10 + WINE vs. Windows XP)

2007-10-21 Thread Stephan Rose

On Sun, 2007-10-21 at 19:33 +0900, Dmitry Timoshkov wrote:
> "Reece Dunn" <[EMAIL PROTECTED]> wrote:
> 
> > On 20/10/2007, Dan Kegel <[EMAIL PROTECTED]> wrote:
> >> Reece Dunn wrote:
> >> > The patch was rejected by Alexandre because the patch was
> >> > implementing that command using Windows API calls,
> >> > when it should be implemented natively as POSIX/GNU calls.
> >>
> >> Really?  Where did he say that?  It'd be nice to link to that from
> >> http://bugs.winehq.org/show_bug.cgi?id=7544
> >> - Dan
> > 
> > I asked him about it at WineConf and that is a summary of what he said.
> 
> I can't believe this, probably you misunderstood or misinterpreted something.
> ReplaceFile API needs to abide sharing and access rights rules which are known
> only to wineserver, and not known/available on the libc/kernel level.
> 

Ok so what's the right way to implement this now? If I'm going to do
this, and I most certainly wouldn't mind doing that, I'd like to be able
to do it the right way the first time around.

Thanks,

Stephan





Re: Phoronix: Ubuntu 7.10 + WINE vs. Windows XP

2007-10-20 Thread Stephan Rose

On Sat, 2007-10-20 at 09:51 +, L. Rahyen wrote:
> On Saturday October 20 2007 09:28, Stephan Rose wrote:
> > On Sat, 2007-10-20 at 09:21 +, L. Rahyen wrote:
> > > But I think there is some people with dual boot configuration and modern
> > > PC who has some games to test and enough free time to compare the results
> > > between Windows and Linux.
> >
> > I can go ahead and try to install Supreme Commander and see if I can get
> > it updated to the latest version. The auto-updater uses the .Net
> > Framework so that makes it a little difficult.
> 
>   For .net support in WINE you can run "winetricks mono12" (you can get 
> winetricks at http://kegel.com/wine/winetricks ). Anyway, testing the latest 
> version of the game isn't very important, only important thing is to test 
> same version of the game on Windows and WINE.
> 
> > But, it has a performance test / benchmark mode I could run to do some
> > comparisons.
> >
> > Stephan
> 
>   It would be great. Don't forget to provide information about hardware 
> configuration used for testing, version of WINE and video drivers along with 
> FPS on Linux and Windows.

Hardware:

Intel Core 2 Duo 2.4 GHz
4gb 800MHz DDR2 4-4-4-12
Wine Version: 0.9.47
Video: nVidia 8800 GTX
nVidia Driver Version Linux: 100.14.19
nVidia Driver Version XP: 162.18

Windows XP SP2 32-Bit Score: 16901
Ubuntu 7.10 64-Bit Score: 15996

Both performance tests were done with equal graphics settings at
1024x768.

On that note, I noticed that ReplaceFileW still isn't implemented as
it's not possible to safe a profile under Supreme Commander. Wasn't
there a patch for this? I distinctly remember that because I was going
to implement that function until I saw someone else had already
submitted a patch with an implementation. What happened with that?

Stephan






Solidworks 2007 Test with 0.9.47

2007-10-20 Thread Stephan Rose
Major improvement with Solidworks 2007 on the latest version.

Visually, everything actually looks perfect now. OpenGL windows are
where they are supposed to be. Font is right. So from that end,
everything appears to work very well.

What's still broken:

- Performance is extremely bad. Even on my Dual Core with 4 gigs of RAM.

- Memory usage is extremely high still at around 2 gigs.

- Extrude function, first thing I test as it's the most fundamental,
still won't work. CPU will just go to full load on that core and just
sit there forever. Infinite loop maybe?

Definite improvement though, thanks everyone. =)

Stephan





Re: Phoronix: Ubuntu 7.10 + WINE vs. Windows XP

2007-10-20 Thread Stephan Rose

On Sat, 2007-10-20 at 09:21 +, L. Rahyen wrote:
> On Saturday October 20 2007 08:40, Scott Ritchie wrote:
> > speedator wrote:
> > > Hello everybody,
> > > new benchmark-test at phoronix.com:
> > > http://www.phoronix.com/scan.php?page=article&item=882&num=1
> >
> > Wait, they tested 3D Mark 2001 and 3D Mark 2003...
> >
> > Weren't those the exact same benchmarks NVidia was found to be cheating
> > with by including hacks into their drivers on Windows?  No wonder they
> > found Windows to be faster in the graphics tests!
> >
> > Can anyone find a real (ie, not rigged on Windows) benchmark to use?
> >
> > Thanks,
> > Scott Ritchie
> 
>   I think that best real benchmarks is real-world applications. For 
> example 
> Unreal Tournament can show performance difference between OpenGL and DirectX 
> in Linux and this can be compared with results on Windows. Of course there is 
> a lot of other good games which can be used as benchmarks.
>   It would be great if someone who have both Linux and Windows on same 
> computer 
> will run few games (preferably both old and new ones in order to test 
> performance of DirectX 7, 8 and 9) at same conditions so we can see what is 
> the real difference in FPS between Linux (WINE) and Windows.
>   Unfortunately personally I havn't Windows installed (only in VMWare for 
> running Autodesk applications) because dual-boot is unacceptable option for 
> me and actually I havn't need in Windows at all, it just isn't technically 
> suitable for my daily tasks.
>   But I think there is some people with dual boot configuration and 
> modern PC 
> who has some games to test and enough free time to compare the results 
> between Windows and Linux.

I can go ahead and try to install Supreme Commander and see if I can get
it updated to the latest version. The auto-updater uses the .Net
Framework so that makes it a little difficult.

But, it has a performance test / benchmark mode I could run to do some
comparisons.

Stephan





Re: .NET going open source(sort of)

2007-10-05 Thread Stephan Rose

On Thu, 2007-10-04 at 13:38 -0500, James Hawkins wrote:
> On 10/4/07, Brian Vincent <[EMAIL PROTECTED]> wrote:
> > On 10/4/07, Stephan Rose <[EMAIL PROTECTED]> wrote:
> > > But just because code, that implements the same functionality looks
> > > similar?? Well of COURSE it looks similar...it is trying to do the same
> > > thing!
> > >
> > > I mean seriously, how does any of this stuff have legal ground? Is the
> > > US system seriously that screwed up?
> >
> > I shouldn't bother responding.. however..
> >
> > Let's say you're a huge pharmaceutical company and you manage to
> > develop an AIDS vaccine.  At the end of the day you've probably spent
> > billions and billions of dollars and all you really end up with is a
> > chemical formula.  That chemical formula then takes several more
> > billions of dollars in order to be tested and certified for use.
> > Should some other company be allowed to just come along and copy that
> > chemical formula after the other company has invested so much time and
> > energy?  Most people generally agree that wouldn't be fair.
> >
> > Now, regarding software design, I think there needs to be strict
> > limits on what qualifies as software patents, etc.  I would think if
> > Google wanted to show everyone their code it would unfair if someone
> > came along and started their own search engine based on it.
> > Fortunately I'm too dumb to have a solution so I don't have to worry
> > about such things.
> >
> 
> In defense of Stephan, I'm pretty sure he was referring to the case
> where two companies independently arrive at the same solution to a
> problem.  In the case of pharmaceutical companies, that means both
> companies each invested billions of dollars in strikingly similar or
> exact vaccines.  Concerning MS and, say, Mono, the implementation of
> the .NET interface may be strikingly similar, enough to cause patent
> concerns, yet they hopefully arrived at the implementations
> independently.  The biggest difference is timing.  Who patented first,
> etc?  I believe this is the problem with the US patent system referred
> to by Stephan.

Yup that's pretty much what I meant. 

Stephan






Re: .NET going open source(sort of)

2007-10-04 Thread Stephan Rose

On Thu, 2007-10-04 at 12:00 +0100, Chris Spencer wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> This article [ http://www.eweek.com/article2/0,1895,2191754,00.asp ]
> sums up pretty well why this is a bad thing. As you can imagine if MS
> ever releases Windows source code under their stupid non-open open
> source licence, the consequences could potentially be disastrous for
> Wine and similar projects (ReactOS).

I have to say I find the legal situation with this stuff to just be
beyond ridiculous.

I mean if you put 2 programmers, of roughly equals skill level and
knowledge, that have never seen each other and don't know of each other
into separate rooms and give them the same problem to solve...chances
are, the code is going to look alike.

So I don't understand why these "Your code looks like my code" arguments
hold up legally. I mean this is pretty much the equivalent of Ford suing
GM over making cars with wheels because Ford also has wheels and they
look alike.

I mean sure, if it's a blatant copy & paste that is one thing...

But just because code, that implements the same functionality looks
similar?? Well of COURSE it looks similar...it is trying to do the same
thing!

I mean seriously, how does any of this stuff have legal ground? Is the
US system seriously that screwed up?

Stephan





Solidworks Update

2007-09-29 Thread Stephan Rose
I tested Solidworks with 0.9.46 today and fonts seem to be ok now. No
more screwed up texts like in the previous versions. So that's a
definite improvement. =)

Everything else seems to have remained unchanged though.

Stephan





Re: The Spouse Test

2007-09-24 Thread Stephan Rose

On Sun, 2007-09-23 at 00:44 -0700, Dan Kegel wrote:
> When will Wine be good enough for the average person to use?
> One test is, "Is it good enough to let your spouse migrate to Linux
> from Windows?".
> My wife's must-have app list is roughly
> 
> Microsoft Office '97
> Adobe Photoshop Elements 1
> Ulead PhotoImpact
> Macromedia Dreamweaver 8
> Musicmatch Jukebox 8
> FamilyTreeMaker 2006
> 
> And you know what?  All of those basically work
> except for Photoshop Elements.  They need some
> cosmetic work, and a native DLL or two, and probably a few
> obscure bugfixes, but I think that's it.
> (I didn't test Office '97, since I expect she'll be using Crossover
> for that, as Codeweavers tests that app pretty well.)
> 
> It's possible that by this time next year Wine will pass this test for me.
> - Dan

That reminds me, one of the things I personally would love to see Wine
support is Solidworks. It's about the only thing at work I still need to
boot into Windows for occasionally.

Solidworks actually installs now, it didn't earlier this year. And
actually, the most recent version of wine even allows it to run about 5
seconds longer than the previous version, which is a definite
improvement. =)

Stephan






re: nhelp, Vector NTI, molecular biologists

2007-09-06 Thread Stephan Rose
On Thu, 2007-09-06 at 06:17 -0700, Dan Kegel wrote:
> Misha wrote:
> > and even my version of Windows 98 is bundled with mfc42.dll, so wine really 
> > should
> > provide it too...  [our own version, not Microsoft's.]
> 
> Well, sure.  Same goes for a lot of things.  But
> since mfc42.dll is a Visual C++ runtime file that
> has very liberal redistribution terms and is in fact
> bundled with many apps, we can get away without
> it for a long time.   And it's not currently a showstopper
> as far as I can tell; I'm more interested in the bugs that
> keep e.g. Photoshop from running flawlessly.
> 
> So one of these days it might become a priority.
> Until then, it's merely important but not urgent.
> - Dan

I feel for the poor soul that will implement MFC. Using MFC is horrible
enough...but actually *implementing* that?? Good luck! =)

Stephan






Re: Can we please have at least a minimal coding style ?

2007-08-06 Thread Stephan Rose
On Mon, 2007-08-06 at 10:37 +0200, Roderick Colenbrander wrote:
> > Or even worse (I've seen this in winex11.drv, and it took me quite a
> > long time until I understood it - it was part of a larger block with a
> > lot these constructs):
> >
> > if (cond) do_sth();
> >  do_sth_else();
> >
> 
> I think you are speaking about the opengl code there. There are quite a 
> number 
> of pieces like that left. They are remnants of the old opengl code. During 
> the move to winex11.drv I fixed the indentation in those functions a bit as 
> before it was a lot worse. You had (and still have) perhaps 10 layers of 
> indentation in some functions but at that time the indentation wasn't there.

Easy solution to that. I'm in absolute heaven with this feature...

Eclipse 3.3 with CDT has an automatic code formatting feature, Ctrl
+Shift+F, my favorite keyboard shortcut now. =)

May want to load some files into that and run that over the file to
instantly clean up stuff like that. You can tweak the code style to your
liking too.

Stephan





EVE Regression?

2007-08-01 Thread Stephan Rose
Starting with wine 0.9.42 I continuously get the following error trying
to start EVE:

fixme:d3d_draw:drawPrimitive Using software emulation because not all
material properties could be tracked

And I just get a black screen for the login screen and it'll just sit
there forever like that.

The error keeps being reported over and over until I close the window.

Everything worked very well with 0.9.41

Any thoughts? Anything I can do?

Thanks,

Stephan






Re: Wine SoC idea: get your favorite IDE working

2007-03-24 Thread Stephan Rose
On Sat, 2007-03-24 at 06:17 -0700, Dan Kegel wrote:
> As the CEO of a famous operating system company once said,
> "I have four words for you: developers, Developers, DEVELOPERS, DEVELOPERS!"
> ( http://www.youtube.com/watch?v=KMU0tzLwhbE )
> 
> Attracting more developers (not of wine, but of their own apps) to Linux
> by getting their IDEs running on Wine would be great for wine,
> as developers are more likely than the average user to file bug reports
> or (dare we hope) fix bugs.  So it would be good to get popular IDEs
> working on Wine.
> 
> Newer Microsoft IDEs like Visual Studio 2005 are a challenge,
> Visual Studio 2005 express requires BITS (which is a SoC project in itself,
> http://bugs.winehq.org/show_bug.cgi?id=5054)
> 
> Some IDEs run fairly well if you install DCOM98, in which case you
> would write conformance tests exposing the problems in our COM
> implementation so Rob can fix them :-)
> Older IDEs like Visual C++ 6 and Visual Basic 6 are in this category.  cf.
> http://bugs.winehq.org/show_bug.cgi?id=4931
> http://bugs.winehq.org/show_bug.cgi?id=5321
> 
> And then there's Eclipse, Delphi, Turbo C++, IntelliJ, Powerbuilder, Access,
> Visual Fox Pro, and many others.  There are also specialized IDEs like
> AVRStudio (an IDE for embedded developers) which people want to run in Wine
> (see http://bugs.winehq.org/show_bug.cgi?id=5312).
> 
> Picking one or two of these and focusing on getting its problems
> solved might be very useful.
> - Dan
> 

Another IDE I can throw out there is MPLAB. It is a major showstopper
for anything doing PIC Development.

It is freely down-loadable here:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002

Stephan





Accessing File > 4gb problem (was: Debugging Supreme Commander)

2007-03-21 Thread Stephan Rose
Allright, I've got the bug nailed to the wall with all of its 6 legs.

What I don't know though is what to do about it. Still trying to find
the right sledgehammer to squash it with

Problem boils down to this:

Supreme Commander has a .cab file that is just under 6 gigs in size.

0x178d42fce bytes to be exact

Now here are the last 5 file seek positions in order from first to last:

0x0ff697fb4
0x0ff69800b
0x0ffebc19a
0x0ffebc1f0

All those succeed fine. But #5 ...
0x1007bc160 results in NTSTATUS c00d, Invalid Parameter.

That address is well within the range of the file though. 

The status occurs when lseek is called in this part of NtSetInformation,
don't mind my added debug fixme's =)

case FilePositionInformation:
if (len >= sizeof(FILE_POSITION_INFORMATION))
{
const FILE_POSITION_INFORMATION *info = ptr;
unsigned int* iptr = (unsigned
int*)&info->CurrentByteOffset.QuadPart;

FIXME( "%i, 0x%08x%08x\n", fd, *(iptr+1), *iptr);

if (lseek( fd, info->CurrentByteOffset.QuadPart, SEEK_SET ) ==
(off_t)-1)
{
FIXME("Bad result from lseek");
// Above fixme triggered past 4gb
io->u.Status = FILE_GetNtStatus();
}
}
else io->u.Status = STATUS_INVALID_PARAMETER_3;
break;

I checked sizeof(off_t) and it correctly reports as 8-bytes, so I am not
sure what the problem is and why this is happening.

Any ideas?

On a bright note...I almost have my Supreme Commander CD Key memorized
now...how many people can say that!!! ;)

Thanks,

Stephan






Re: Debugging Supreme Commander Installer

2007-03-20 Thread Stephan Rose
On Mon, 2007-03-19 at 09:40 +0100, Stefan Dösinger wrote:
> Am Montag 19 März 2007 01:49 schrieb Stephan Rose:
> > I've been playing around with the supreme commander install most of
> > today trying to figure out why it does not want to install. Running with
> > +file,+msgbox and noticed the following error for virtually all files:
> 
> > So it seems that it freaks out because somehow the file appears in the
> > directory tree late.
> Sounds like a race :-) . I don't know anything about wine's msi and dcom 
> implementation(which installshield uses heavilly). DCOM is about the most 
> complex thing in Windows :-/
> 
> One think you can try if that game works with windows 98 too is to use native 
> msi 2.0 and / or native dcom98 . If that fails in the same way it is a bug 
> somewhere else(ntdll / kernel), otherwise most likely msi or dcom. Dan's 
> Winetricks may help with installing that. You need winver = win98 for native 
> msi and dcom.
> 

No luck there...but I am one step closer to tracking down the source of
the problem.

I found that kernel32 is calling RaiseException when the file that is
failing comes up.

So I went to check it out with +seh, this is the exception that comes
up:

trace:seh:raise_exception code=e06d7363 flags=1 addr=0x7ee4ca80
trace:seh:raise_exception  info[0]=19930520
trace:seh:raise_exception  info[1]=00334aec
trace:seh:raise_exception  info[2]=100f7058
trace:seh:raise_exception  eax=7ee37d89 ebx=7eeb8880 ecx=
edx=100f18d8 esi=100f18d8 edi=00334ad0
trace:seh:raise_exception  ebp=00334a90 esp=00334a2c cs=0073 ds=007b
es=007b fs=0033 gs=003b flags=00200216

Anyone have any idea on what the exception is?

I've come as far so far as that it seems to be some MS Specific C++
exception. I've still got to find out what function this exception is
originating in. Going to try and figure that one out next.


Stephan





Re: Supreme Commander Up and running!

2007-03-20 Thread Stephan Rose
On Wed, 2007-03-21 at 00:11 +0100, Stefan Dösinger wrote:
> Am Dienstag 20 März 2007 21:54 schrieb Markus:
> > On Tuesday 20 March 2007 21:00, Stefan Dösinger wrote:
> > > Which font patch?
> >
> > http://bugs.winehq.org/show_bug.cgi?id=7507
> >
> > > Does the game actually run? How is it from the d3d point of view?
> >
> > Yes, but it is only somewhat playable from a graphics point of view if you
> > turn off GLSL. Otherwise all buildings and items will be invisible.
> Sounds to me like it starts using Shader Model 2.0 and above when glsl is 
> enabled and thus hit some bugs in wined3d or the driver.

According to the system requirements the highest it uses is 2.0.

I am also wondering if some of the other bugs, such as geometry being in
the wrong place may be resulting from the d3dx9_31.dll not being our
own. Maybe seeing some interoperability issues there between the native
version of that and our own version of the remaining d3d dlls?

Stephan





Re: Supreme Commander Up and running!

2007-03-20 Thread Stephan Rose
On Tue, 2007-03-20 at 23:44 +0100, H. Verbeet wrote:
> On 20/03/07, Markus <[EMAIL PROTECTED]> wrote:
> > On Tuesday 20 March 2007 21:00, Stefan Dösinger wrote:
> > > Which font patch?
> > http://bugs.winehq.org/show_bug.cgi?id=7507
> >
> > > Does the game actually run? How is it from the d3d point of view?
> > Yes, but it is only somewhat playable from a graphics point of view if you
> > turn off GLSL. Otherwise all buildings and items will be invisible.
> >
> It would be useful if someone would look into that.

I'll look around a bit and see if I can come up with anything. 

I'll hold off on the "ReplaceFileW" thing for the time being to see if
that other patch gets committed.

I also saw that this is missing:

err:d3d9:IDirect3DDevice9Impl_StretchRect Texture filters not supported
yet

So if nobody is doing anything there I might look into that.

Btw, I also noticed that it seems to use a few DLLs we don't appear to
have. Namely:

d3dx9_31.dll
faultrep.dll
winsta.dll
x3daudio1_1.dll

I am guessing that missing audio-dll is largely why I am not seeing any
sound in SC?

An implementation for that d3dx9_31.dll is also something I might be
interested in looking into. 

Stephan





Supreme Commander Up and running!

2007-03-20 Thread Stephan Rose
I've got SC up and running, had to apply that font patch (that moving
into the source anytime soon btw? It does work nicely).

So looking at my debug output at stuff that's got errors or fixme's, I
came across this little line:

fixme:file:ReplaceFileW

Figure, that'd be as good as a start as any as something for me to
implement. Easy to test toojust before I dive into it, anyone
potentially already working on it (or is there a good way to check)? 

Figured I'd ask first before 2 people work on the same thing.

Stephan





RE: Accessing File > 4gb problem (was: Debugging Supreme Commander)

2007-03-20 Thread Stephan Rose
Well I checked errno and it is 22 (EINVAL)

So I then had a suspicion...

I wrote a short native test case that would open the file on the cdrom, and
just lseek to various offsets. Even running natively lseek fails past 4gb.

So then, I copied the file to the hard drive. Tried it again...
lseek succeeds past 4gb.

So apparently the issue comes down the lseek failing with > 4 gig files only
on cd-rom drives and ends up not being a wine bug after all as far as I can
tell. I will try to install it from the hard drive in a little bit and see
if it succeeds then. I didn't have enough time during lunch to actually let
the install run from the HD.

If that does work, I will at least make a note in the AppDB for supreme
commander on that particular problem and see if I can submit a bug report to
ubuntu for the lseek problem.

Unless someone has an idea how this might be fixable via wine? If so, I'd be
happy to give it a try. =)

Thanks all,

Stephan

-Original Message-
From: Hans Leidekker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 20, 2007 11:11
To: Stephan Rose
Cc: wine-devel@winehq.org
Subject: Re: Accessing File > 4gb problem (was: Debugging Supreme Commander)

On Tuesday 20 March 2007, Stephan Rose wrote:

> I checked sizeof(off_t) and it correctly reports as 8-bytes, so I am not
> sure what the problem is and why this is happening. I know my system can
> handle files > 4 gigswine dumped 9 gigs of relay output onto my hard
> drive the first time I played with that debug channel =P

What is your system? What is the value of errno after the lseek call?
Does calling lseek64 instead make any difference?

 -Hans





RE: Accessing File > 4gb problem (was: Debugging Supreme Commander)

2007-03-20 Thread Stephan Rose

The system is a 2.4GHz Core Duo.

lseek64 makes no difference, that was among the first things I tried.
I didn't think to check errno yet though but I will do so when I get home
from the office. 

Stephan



-Original Message-
From: Hans Leidekker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 20, 2007 11:11
To: Stephan Rose
Cc: wine-devel@winehq.org
Subject: Re: Accessing File > 4gb problem (was: Debugging Supreme Commander)

On Tuesday 20 March 2007, Stephan Rose wrote:

> I checked sizeof(off_t) and it correctly reports as 8-bytes, so I am not
> sure what the problem is and why this is happening. I know my system can
> handle files > 4 gigswine dumped 9 gigs of relay output onto my hard
> drive the first time I played with that debug channel =P

What is your system? What is the value of errno after the lseek call?
Does calling lseek64 instead make any difference?

 -Hans





Accessing File > 4gb problem (was: Debugging Supreme Commander)

2007-03-20 Thread Stephan Rose
I apologize in advance if this ends up on the mailing list twice
but..it's been over 12 hours now and my e-mail, as my previous (but now
unimportant one) still didn't make it so I am going to try to resend
this. =)

Allright, I've got the bug nailed to the wall with all of its 6 legs.

What I don't know though is what to do about it. Still trying to find
the right sledgehammer to squash it with

Problem boils down to this:

Supreme Commander has a .cab file that is just under 6 gigs in size.

0x178d42fce bytes to be exact

Now here are the last 5 file seek positions in order from first to last:

0x0ff697fb4
0x0ff69800b
0x0ffebc19a
0x0ffebc1f0

All those succeed fine. But #5 ...
0x1007bc160 results in NTSTATUS c00d, Invalid Parameter.

That address is well within the range of the file though. 

The status occurs when lseek is called in this part of NtSetInformation,
don't mind my added debug fixme's =)

case FilePositionInformation:
if (len >= sizeof(FILE_POSITION_INFORMATION))
{
const FILE_POSITION_INFORMATION *info = ptr;
unsigned int* iptr = (unsigned
int*)&info->CurrentByteOffset.QuadPart;

FIXME( "%i, 0x%08x%08x\n", fd, *(iptr+1), *iptr);

if (lseek( fd, info->CurrentByteOffset.QuadPart, SEEK_SET ) ==
(off_t)-1)
{
FIXME("Bad result from lseek");
// Above fixme triggered past 4gb
io->u.Status = FILE_GetNtStatus();
}
}
else io->u.Status = STATUS_INVALID_PARAMETER_3;
break;

I checked sizeof(off_t) and it correctly reports as 8-bytes, so I am not
sure what the problem is and why this is happening. I know my system can
handle files > 4 gigswine dumped 9 gigs of relay output onto my hard
drive the first time I played with that debug channel =P

Any ideas?

On a bright note...I almost have my Supreme Commander CD Key memorized
now...how many people can say that!!! ;)

Thanks,

Stephan





Debugging Supreme Commander Installer

2007-03-18 Thread Stephan Rose
I've been playing around with the supreme commander install most of
today trying to figure out why it does not want to install. Running with
+file,+msgbox and noticed the following error for virtually all files:

warn:file:wine_nt_to_unix_file_name L"TUB500.xsb" not found
in /home/stephan/.wine/dosdevices/c:/Program Files/THQ/Gas Powered
Games/Supreme Commander/sounds/Voice/fr/Tutorials

This is the file being copied when I get the "Error 87" message from
Install shield.

Also, pretty much every file, if not every file, gives the same trace in
the debug log. It's weird that install shield will copy hundreds of
files with that warning in their trace and not complain until it is 80%
through.

So then I wondered, is that really the cause or not? I think yes.
Install shield appears to be kind enough to not re-copy the files if
they already exist, so I killed the process to keep all files already
copied and added the one missing file above from my windows install and
then ran install shield again.

This time around, the file was processed correctly and no error. Instead
it gives the error now on the next file, which is TUB500.xwb.

Some more trace below:

trace:file:GetFileAttributesW L"c:\\Program Files\\THQ\\Gas Powered
Games\\Supreme Commander\\sounds\\Voice\\fr\\Tutorials\\TUB500.xwb"
trace:file:RtlDosPathNameToNtPathName_U (L"c:\\Program Files\\THQ\\Gas
Powered Games\\Supreme Commander\\sounds\\Voice\\fr\\Tutorials\
\TUB500.xwb",0x334b84,(nil),(nil))
trace:file:RtlGetFullPathName_U (L"c:\\Program Files\\THQ\\Gas Powered
Games\\Supreme Commander\\sounds\\Voice\\fr\\Tutorials\\TUB500.xwb" 520
0x3348f8 (nil))
warn:file:wine_nt_to_unix_file_name L"TUB500.xwb" not found
in /home/stephan/.wine/dosdevices/c:/Program Files/THQ/Gas Powered
Games/Supreme Commander/sounds/Voice/fr/Tutorials
trace:file:MoveFileWithProgressW (L"",(null),(nil),(nil),0004)
trace:file:RtlDosPathNameToNtPathName_U (L"",0x3348b8,(nil),(nil))
trace:file:GetFileAttributesW L"c:\\Program Files\\THQ\\Gas Powered
Games\\Supreme Commander\\sounds\\Voice\\fr\\Tutorials\\TUB500.xwb"
trace:file:RtlDosPathNameToNtPathName_U (L"c:\\Program Files\\THQ\\Gas
Powered Games\\Supreme Commander\\sounds\\Voice\\fr\\Tutorials\
\TUB500.xwb",0x334800,(nil),(nil))
trace:file:RtlGetFullPathName_U (L"c:\\Program Files\\THQ\\Gas Powered
Games\\Supreme Commander\\sounds\\Voice\\fr\\Tutorials\\TUB500.xwb" 520
0x334574 (nil))
warn:file:wine_nt_to_unix_file_name L"TUB500.xwb" not found
in /home/stephan/.wine/dosdevices/c:/Program Files/THQ/Gas Powered
Games/Supreme Commander/sounds/Voice/fr/Tutorials

Followed by this resulting in the error message box:

trace:file:RtlDosPathNameToNtPathName_U (L"C:\\windows\\temp\
\{62CDECF0-D5B2-11DB-C687-0018F32E4A94}\
\ISSetup.dll",0x341404,(nil),(nil))
trace:file:RtlGetFullPathName_U (L"C:\\windows\\temp\
\{62CDECF0-D5B2-11DB-C687-0018F32E4A94}\\ISSetup.dll" 520 0x3411c4
(nil))
trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\windows\\temp\
\{62CDECF0-D5B2-11DB-C687-0018F32E4A94}\\ISSetup.dll" ->
"/home/stephan/.wine/dosdevices/c:/windows/temp/{62CDECF0-D5B2-11DB-C687-0018F32E4A94}/ISSetup.dll"
trace:file:RtlGetFullPathName_U (L"C:\\windows\\temp\
\{62CDECF0-D5B2-11DB-C687-0018F32E4A94}\\ISSetup.dll" 522 0x34149e
(nil))
trace:msgbox:MSGBOX_OnInit L"Error:\t87"

So it seems that it freaks out because somehow the file appears in the
directory tree late. 

I'm still trying to think of a way of reproducing this with a test
case...but that won't be all that easy without knowing precisely what
Install Shield is actually doing in their code!

Any thoughts?

Stephan Rose





Thanks everyone!

2007-03-18 Thread Stephan Rose
Thank you very much for your e-mails and suggestions everyone, I highly
appreciate it. =)

I am actually playing with debugging Supreme Commander right now a
little bit and one thing popped into my eyes instantly.

The problem that is occurring at the moment is that the installer won't
even fully go through. So I am not even at the point of trying to
install it yet.

It'll go very far but near the end it will die with an error 87 from
Install Shield.

The very first thing that popped into my eyes though when running the
installer was this:

fixme:process:IsWow64Process (0x 0x34d90c) stub!

That gets called literally hundreds of times. That makes seeing other
error messages difficult for one as it just drowns them out and also
slows the installer to a crawl.

What I am wondering though is this, is running under Wow64 something
that is ever actually going to happen within wine? Because if it's not,
then the function actually already does everything it will ever need to
do as far as I can tell by reading the documentation for it on MSDN.com

For the time being, I commented the fixme line out in the code so that I
can actually see other messages more easily and get to the failure point
of the installer much quicker.

Stephan





Hey all!!

2007-03-17 Thread Stephan Rose
Ok guys, something's gotta change. I gotta stop logging into MS Sloth to
play Supreme Commander ;)

So that said, what can I do, where can I help? =)

To give a little info on my background, I've been programming for
roughly 10 years now...everything ranging from embedded &
microcontroller stuff (PIC / ARM) to high end MS Sloth Applications.

Familiar with DirectX, OpenGL, C/C++, C#, x86/ARM/PIC Assembly...

I am of course unfamiliar with the whole wine source code. I did look
over the rather daunting to-do list and wouldn't even know where to
start. =)

So I figured I'd send an e-mail out and see if anyone has any good
suggestions. =)

I'd really love to help with this. I for one think it's a great project
and XP has really got to stop taking up one of my precious hard
drives...

Thanks =)

Stephan Rose