Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

thanoulas

Member Since 14 Sep 2010
Offline Last Active Yesterday, 09:07 AM
*****

Topics I've Started

Should I publish my SimCity (2013) port?

12 April 2013 - 01:10 PM

As the title suggest, I've recently bought SimCity (2013) on origin, and I've made a port for it. Which works relatively well.

SimCity is going to be released in June as native for mac. But the PC version is already out, and if you buy the game now, you get access to both PC and OS X flavours. I don't know about you, but I can't wait till then :)


Even if the answer is yes, I'm going to pull the port once the mac version is out. And I'm only offering to upload it because I know there is no crack available.

Winemac driver news!

06 March 2013 - 08:52 PM

Get ready. I saw the most exciting commit in wine's source today:

Quote


Commit: 3f3ee6393d08805a429c8d70e2027f8191cd2adf [3f3ee63]
Parents: f18439da51
Author: Ken Thomases <ken@codeweavers.com>
Date: 6 March 2013 10:59:07 GMT
Committer: Alexandre Julliard <julliard@winehq.org>
Commit Date: 6 March 2013 11:56:12 GMT

winemac: Implement OpenGL support.

YeEEEeeeeEeeEEEAAHHHH!
You can try it out now if you checkout the latest source from git and build a wineskin engine yourselves.
Spoiler: It's awesome.

Wine ATiFix Engine

15 October 2012 - 11:18 PM

Here's the patch for creating an ATiFix engine.
This will help balance the speed-to-glitches ratio that every modern game has when playing on an ATi/AMD GPU Mac.

A little background detail, and findings during our tests are here
http://portingteam.c...i-shader-issue/

Get a pre-built engine from here:
http://www.mediafire...qwvj8q2ded9namu

or build one yourself:
(NOTE: Avoid using 1.5.14 & 1.5.15 wine, it looks like it's crashing the O/S)

NEW PATCH, AVOIDS RESERVING 12 SHADERS FOR DRIVER USE WHEN THE TOTAL SHADERS ARE SET TO <270
WILL POSSIBLY HELP WITH CARDS WHICH HAVE 256 AVAILABLE FLOATS:

Link:
http://www.mediafire...6af01014wwguog4

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 36aafee..d432d90 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -767,13 +767,35 @@ static BOOL match_fglrx(const struct wined3d_gl_info *gl_info, const char *gl_re
	 return gl_vendor == GL_VENDOR_FGLRX;
}

+static void quirk_arb_constants(struct wined3d_gl_info *gl_info)
+{
+	/* MacOS always reports 4096 MAX_VERTEX_UNIFORM_COMPONENTS, which means
+	 * 1024 VS_FLOAT_CONSTANTS. This is fine with nVidia, but the ATi drivers
+	 * in OS X use some vertex shaders for internal calculations.
+	 * This number is never subtracted from the available ones, and OS X always
+	 * advertises 1024, so when an application tries to access these constants
+	 * they have incorrect values. This hack lets the user report a fixed number
+	 */
+	if (wined3d_settings.override_vertex_constants) {
+		FIXME("Using Constants Override\n");
+		gl_info->limits.glsl_vs_float_constants = wined3d_settings.vertex_constants_number;
+		FIXME("Constants Number is now set at %i\n", wined3d_settings.vertex_constants_number);
+	}
+}
+
static void quirk_apple_glsl_constants(struct wined3d_gl_info *gl_info)
{
+	quirk_arb_constants(gl_info);
	 /* MacOS needs uniforms for relative addressing offsets. This can accumulate to quite a few uniforms.
	  * Beyond that the general uniform isn't optimal, so reserve a number of uniforms. 12 vec4's should
	  * allow 48 different offsets or other helper immediate values. */
-	TRACE("Reserving 12 GLSL constants for compiler private use.\n");
-	gl_info->reserved_glsl_constants = max(gl_info->reserved_glsl_constants, 12);
+	
+	// Dont reserve anything if we're using the shader hack and the available shaders are less than 270
+	if (!wined3d_settings.override_vertex_constants &&
+		wined3d_settings.vertex_constants_number > 269) {
+		TRACE("Reserving 12 GLSL constants for compiler private use.\n");
+		gl_info->reserved_glsl_constants = max(gl_info->reserved_glsl_constants, 12);
+	}
}

static void quirk_amd_dx9(struct wined3d_gl_info *gl_info)
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 2247e9c..9435ee4 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -84,6 +84,8 @@ struct wined3d_settings wined3d_settings =
	 TRUE,		   /* Multisampling enabled by default. */
	 FALSE,		  /* No strict draw ordering. */
	 TRUE,		   /* Don't try to render onscreen by default. */
+	FALSE,		  /* Override vertex constants? */
+	1024,		   /* Number of vertex shaders to use */
};

/* Do not call while under the GL lock. */
@@ -323,6 +325,21 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
			 TRACE("Not always rendering backbuffers offscreen.\n");
			 wined3d_settings.always_offscreen = FALSE;
		 }
+		if (!get_config_key(hkey, appkey, "OverrideVertexShaders", buffer, size)
+				&& !strcmp(buffer,"enabled"))
+		{
+			TRACE("Override Vertex Shader Constants\n");
+			wined3d_settings.override_vertex_constants = TRUE;
+		}
+		if (!get_config_key(hkey, appkey, "VertexShaderConstants", buffer, size))
+		{
+			int TmpVertexShaderConstants = atoi(buffer);
+			if (TmpVertexShaderConstants > 0)
+			{
+				wined3d_settings.vertex_constants_number = TmpVertexShaderConstants;
+				TRACE("Use %i Vertex Shader Constants\n", TmpVertexShaderConstants);
+			}
+		}
	 }
	 if (wined3d_settings.vs_mode == VS_HW)
		 TRACE("Allow HW vertex shaders\n");
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 5ea23b4..0e79f5d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -281,6 +281,8 @@ struct wined3d_settings
	 int allow_multisampling;
	 BOOL strict_draw_ordering;
	 BOOL always_offscreen;
+	BOOL override_vertex_constants;
+	int vertex_constants_number;
};

extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;

Moving on to the patch:

Spoiler
if applying the patch fails, download it from:
http://www.mediafire...aef4vgk8drdp7nc

After you create an engine with the patch, and create a wrapper with it, you will still have to enable the hack within wine's registry.
Open regedit and go to HKEY_CURRENT_USER\Software\Wine\Direct3D

Create a new "String Value" named "OverrideVertexShaders", and set its value to "enabled"
Create another "String Value" named "VertexShaderConstants", and set the number of constants to use.
For ATi's I'd suggest values between 450 - 1000, but of course feel free to experiment.
The lower you go, the faster the framerate, but you'll get more graphical glitches
The higher you go, the less glitches, but slower framerate.

Gool luck and welcome back those ATi users!

The big ATi Shader Issue

15 October 2012 - 01:14 AM

I couldn't think of a better place to post this.

Basically, I'm looking for some guinea pigs with an ATi card who are willing to help in finding a workaround on the ATi GLSL shader issue (you know, the one that renders almost all new games unplayable in even high-end ATi / AMD cards?)

Any volunteers would need to have a specific game that has the issue (Dishonored) and some time to test some of the wrappers that I'm going to be sending your way. These will be the standard wrapper from the port database with a custom engine every time. The point in this, is to find the sweet spot of the amount of available shaders to the card and operating system. They both now report completely different numbers (due to a driver issue), and that's why there are arifacts when using the o/s reported number of shaders and slooooow performance when using the card reported number.

Hopefully this trial will help alleviate the problem and make the ATi/AMD's a bit more compatible

UPDATES:
The trial is now ongoing, and I have a really good explanation as to why ATi's don't work properly, when they could.
As it is known, the ATi drivers (wrongly) report 256 available vertex shaders, when the card can easily support anything from 512 to 4096.

Now, the driver and the operating system, both need to reserve some of these shaders for internal use, this can be anything from 1 to 16. That leaves us with a minimum of 240 available shaders, more than enough for most shader model 1, 2 and 3 games (Dx9).
The Ati driver, should work, even if it reports less shaders that it has available. But here, Apple's OpenGL implementation, does something very very wrong. It never subtracts the number of the reserved shaders from the total, leaving the apps thinking that all 256 shaders are available (instead of 240). So the app tries to access the reserved shaders, which have irrelevant values, resulting in vertices drawn in wrong coordinates (these are the glitches).

Possible workaround: We need to report less available shaders to the game. We can either hard code a smaller limit system wide, or report a wrong number just to the game. The second option would be the best, but I'll need to dig deep into wine to find where this can happen.

MOAR Updates:
Radeon 6750 seems to report 1024 shaders! That is good, this means we can report less shaders (960 mabe?) and still reserve another 74 for internal use, this should be more than enough. Let's see in Trial #3

Final Updates:
It looks like we're hitting the sweet spot! 1000 vertex constants + 24 reserved is making the game extremely playable! Now doing a final test with 500+12 values to make sure we're as smooth as we can get!
Since things improve while we're lowering the number of shader constants, I've decided to go with the solution of the registry keys. I've built an engine which lets the user create registry keys to override the number of shader constants. This way everyone can find the right mix to make the game playable. I'll post the engine and a diff patch soon

Winetricks update is broken in Wineskin

06 September 2012 - 04:44 PM

Obviously, because of the issues you have with the server.
But could you please either upload the single text file that's needed by winetricks update to your server, or update wineskin with the url for your new server, as winetricks is completely broken and unusable for non-downloaded packages at the moment?

Microsoft moved (or deleted) a lot of files from their download servers, and the new winetricks version has the proper urls, but there's no way to update winetricks in wineskin right now.

Thanks