English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 08 November 2016, 09:42   #261
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
Quote:
The gcc 2.95.3 suite has c++ for WarpOS.
I have all that, for some time. But end result binaries (only tried C ones) crash or don't work correctly (like being in a loop).

A simple "hello world" works, but a simple intuition window waiting to be closed gets in limbo state. I tinkered around those old macros, files, inlines, for too long but no real progress. Maybe those cc programs-libs were done with old powerpc includes & something isn't correct now. No problem for 68k.
The assembly ppc output is, compared to vbcc, pretty horrible by the way.
Cowcat is offline  
Old 19 November 2016, 19:16   #262
Wrangler
Registered User
 
Join Date: Sep 2015
Location: London, UK
Posts: 419
I'm curious: does that mean Storm C 4 produces poor Warp OS code? What version of gcc does it use?
Wrangler is offline  
Old 20 November 2016, 00:55   #263
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
Quote:
does that mean Storm C 4 produces poor Warp OS code?
Doesn't look as horrible as old gcc warpos hacked version, but it's a different philosophy.
I suspect that StormC 4 was used for some old comercial libs/programs: Disassembling some of those you see for example:

Code:
fdiv f0,f0,f1
frsp f0,f0
stfs f0,56(r31)
That's a double float division (f0/f1 -> f0), then rounded (frsp) & then stored single to r31

vbcc doesn't do that frsp: If I'm not wrong, stfs automatically rounds to single value when storing.

No idea about gcc version. So....
Cowcat is offline  
Old 17 January 2017, 13:31   #264
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
Feel like writing

Fixing water transparency:

Early incarnations of glquake allowed transparent water with command r_wateralpha (plus r_novis in absence of "vised" water - slow), but at least for me that didn't work with BlitzQuake.

On gl_surf.c there are calls to EmitWaterPolys function that is located in gl_warp.c:

Code:
void EmitWaterPolys (msurface_t *fa)
{
  	glpoly_t  *p;
  	float     *v;
  	int       i;
  	float     s, t, os, ot;

  	for (p=fa->polys ; p ; p=p->next)
  	{
		// glBegin(GL_POLYGON);
 
    		for (i=0,v=p->verts[0] ; i<p->numverts ; i++, v+=VERTEXSIZE)
    		{
      			os = v[3];
      			ot = v[4];

      			s = os + turbsin[(int)((ot*0.125+realtime) * TURBSCALE) & 255];
      			s *= (1.0/64);

      			t = ot + turbsin[(int)((os*0.125+realtime) * TURBSCALE) & 255];
      			t *= (1.0/64);

			v[5] = s;
			v[6] = t;

		// glTexCoord2f (v[5], v[6]);
		// glVertex3f (v[0], v[1], v[2]);

    		}
		// glEnd ();

		glBegin(GL_POLYGON);
		mglTV23fvLM(mini_CurrentContext, VERTEXSIZE, p);
		glEnd();
  	}

}
The problem is in the optimization made with mglTV23fvLM: If you disable it and re-enable the use of the original code ( glBegin/glEnd/glTexCoord/glVertex ), transparency works ! , but the optimization is missed (gl_surf, gl_warp, miniglext are joined by the makefile and mglTV functions are inlined with -03 option)

Looking at gl_surf.c / R_DrawWaterSurfaces function there is a call to glColor4f that uses the cvar value wateralpha and this is the clue.

Long history short, on miniglext.c we do the final fix (enabling again mgltv function on emitwaterpolys):

Code:
void mglTV23fvLM(GLcontext context, GLsizei stride, glpoly_t *p)
{
	int count;
	GLfloat *v;
	MGLVertex *vert;

	v = p->verts[0];
	count = p->numverts;

	vert = &context->VertexBuffer[0];
	context->VertexBufferPointer = count;

	do
	{
	vert->bx = (GLfloat)v[0];
	vert->by = (GLfloat)v[1];
	vert->bz = (GLfloat)v[2];

	vert->v.u = (W3D_Float)v[5];
	vert->v.v = (W3D_Float)v[6];

	vert->v.color.r = (W3D_Float)context->CurrentColor.r; // FIX
	vert->v.color.g = (W3D_Float)context->CurrentColor.g; // FIX
        vert->v.color.b = (W3D_Float)context->CurrentColor.b; // FIX
        vert->v.color.a = (W3D_Float)context->CurrentColor.a; // FIX

	v+=stride; vert++;

	} while (--count);
}
The next Blitz has a check whenever watersurfaces is used or not because as said emitwaterpolys is called by other functions that don't need colors/alpha, so two different mglTV23fvLM funtions are inlined in emitwaterpolys.

In order to properly enjoy the new effect for normal quake & their oficial mods you need to patch the pak files. I used in my linux box the latest open source vispatch program with corresponding id1.vis file (a couple of seconds & forget about "vising").

That's it & if you don't feel to code then maybe wait for a new version with big enhancements........ [ Show youtube player ]
Cowcat is offline  
Old 18 January 2017, 23:58   #265
ancalimon
Supernormal
 
ancalimon's Avatar
 
Join Date: Jul 2007
Location: Istanbul / Turkey
Age: 43
Posts: 1,416
Does anyone know how to have freelook? I always have to hold right mouse button to look around.
ancalimon is offline  
Old 19 January 2017, 01:11   #266
ExiE
Registered User
 
Join Date: Apr 2016
Location: T/C
Posts: 199
"+mlook" in console or cfg file?
ExiE is offline  
Old 21 January 2017, 16:42   #267
James
Registered User
 
Join Date: Mar 2010
Location: Beckenham/England
Posts: 797
Quote:
Originally Posted by Cowcat View Post
Fixing water transparency:


Quote:
Originally Posted by Cowcat View Post
That's it & if you don't feel to code then maybe wait for a new version with big enhancements........ [ Show youtube player ]
Sock map!
I guess Arcane Dimensions is to much to hope for though...
One of Sock`s maps that already works and looks fantastic:

https://www.quaddicted.com/reviews/kaahoo1a.html
James is offline  
Old 21 January 2017, 21:34   #268
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
Quote:
I guess Arcane Dimensions is to much to hope for though...
Yes. Just tried one of the maps and indeed worked if you don't mind to go to the realms of Amiga 500 speed. (it was map ad_e1m1). The start game is half messed till crashes. There's a lot of memory/cpu + fast hard drive speed demanding for this kind of things. Maybe it works as an experiment to push Sonnet Hardware to the max.
Cowcat is offline  
Old 29 January 2017, 23:15   #269
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
New bigger update:

Partial support for protocol 666, various bugfixes (water, mirrors).
Read the "Readme."

Last edited by Cowcat; 13 November 2017 at 13:27.
Cowcat is offline  
Old 30 January 2017, 12:54   #270
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
I can confirm that "Arcane Dimensions" mod works

Just tried some maps: "start", "ad_dm1", "ad_e1m1", not going to real start game because crashes on me (did not install the whole full files or maybe memory restrictions).

Some missing effects, eats memory like nothing, asks for a lot of CPU power. But kinda works better than I commented before.

Just add to the boot line for Blitz:

Code:
 -mem 32 -protocol 666 -game ad -nocachetris
Cowcat is offline  
Old 30 January 2017, 15:31   #271
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
To BlitzQuake work fine on AFA OS, some problems after the third or fourth run , disappear keyboard commands

Last edited by AMIGASYSTEM; 09 April 2018 at 12:53.
AMIGASYSTEM is offline  
Old 30 January 2017, 15:50   #272
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
Cool that works with Aros/Amiga. Don't know about the keyboard issue.

I forgot to add to the readme a cool feature: sv_freezenonclients
Cowcat is offline  
Old 30 January 2017, 16:17   #273
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
Quote:
Originally Posted by Cowcat View Post
Cool that works with Aros/Amiga. Don't know about the keyboard issue.

I forgot to add to the readme a cool feature: sv_freezenonclients
AFA OS it is an AMIGA with some improvement AROS but it is not different from OS 3.9
AMIGASYSTEM is offline  
Old 04 February 2017, 01:41   #274
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,958
New version running well on the Sonnet. @800x480 getting between 33-34 FPS in demos1-3. Arcane Dimensions kinda chugs and distant polygons get a sort of hall of mirrors effect. Haven't played around with that enough yet.
grelbfarlk is offline  
Old 04 February 2017, 10:25   #275
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
The next version has code that noticeable improves playability and it's a remainder: Definitely, watching timedemos don't show (sometimes) the improvements of the whole game.

Also a "fix" for Transparency surfaces: Teletransport doors shared the same texture chain as water, slime & lava at the time of rendering the alpha values, so higher transparency values (lower r_wateralpha) made the door effect dissapear Fixed for next release.

Arcane Dimensions it's very demanding: The hall mirror effect at first map ("start") showed to me when different memory options were used on old code, so the engine filled the texture (?) memory allocated, loaded from hard drive realtime and took the game to really low performance.

The way of that kind of memory is used now (brushes, models, etc ) it's dinamically allocated: That is on 6.0 version, so the "hall of mirror" effect shouldn't happen. At least for me now.

It's a catch 22 situation: If I use the old memory way, you have more memory available for the system if you get lucky with the -mem option & you don't crash the engine, but as soon needs new data as I said, the whole thing starts to creep.
Cowcat is offline  
Old 04 February 2017, 13:00   #276
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
grelbfarlk: One idea: gl_fake_multitexture 0 for Arcane.

Fake_multitexture is on by default, but oddly enough is slower with PPC (with my system) so I have that off usually. Now I see the messed polygons when is enabled. Have to take a look at this.
Cowcat is offline  
Old 07 February 2017, 23:51   #277
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,958
gl_fake_multitexture 0 fixed the distant hall of mirrors effect. Now it runs alright, around 30FPS but dropping pretty heavily when there's large areas with lots of detail. On the little bridge on the start level timefresh was 26FPS.

One thing I noticed is that it's setting 16-bit audio mode, is there any benefit to setting it to 8-bit? I don't know the console commands for Q1 for sound stuff other than the launch option -audspeed(?).
grelbfarlk is offline  
Old 08 February 2017, 10:19   #278
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
Quote:
gl_fake_multitexture
A major failure in the original code: Underwater textures lose all the blending & lightmaps.

Easy to see: Playing with gl_fake_multitexture on/off or disabling gl_texsort. Or even gl_fake_multitexture 2 (that disables the lightmaps): 1 or 2 is the same result.

The culprit is in gl_rsurf.c/R_BlendLightMaps: There's no call to DrawGLWaterPolyLightmap function when fake_multitexture is enabled & also no blending functions are used AFAIK.

Now is fixed but there's a slight framedrop: So no cry wolfs or complains about before, other versions, etc. Those functions were fucked up since 2000.

So ways to up the framerate, could be r_waterwarp 0, or r_wateralpha 1, etc. etc.

For me fake_multitexture is "slow" with PPC, but fast in 68k (???)

All of this has no special relation with "arcane dimensions" first map. The problem still exists with messed textures. Maybe the buffer allocated in minigl is not enough.

Besides that, gl_texsort "on" as the old readmes, looks to be faster than "off".

Last edited by Cowcat; 01 March 2017 at 11:28.
Cowcat is offline  
Old 08 February 2017, 10:22   #279
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
ahi with 16 bits?? Don't know: I think all code for sound in classic quake brings 8 bit sampling, so....
Cowcat is offline  
Old 28 February 2017, 20:06   #280
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 762
Here we go:

Fixed the water lightmaps with gl_fake_multitexture, Teleport & Lava textures now aren't affected from r_wateralpha, fixed gl_ztrick (yes, it was wrong for people who used it, hope it works now).

Fixes & adds to minigl -> GL_Line drawing fix in Quake (it crashed) & ColorMask added.

r_showbboxes
So now BlitzQuake has support for bounding box drawing entities (look for Wally). There's no support for "PolygonMode(...,GL_LINE)" in minigl so a full box with translucency is done as a workaround. Fix in classic glBegin(GL_LINES) allows the wiring of the "dots" displayed.

r_stereo
Untested 3D anaglyph mode.
Attached Files
File Type: lha BlitzQuake040-6_1.lha (308.2 KB, 182 views)

Last edited by Cowcat; 09 April 2019 at 19:56.
Cowcat is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
BlitzQuake - Flashing White Screen? fitzsteve support.Games 20 21 October 2010 23:49
Blitzquake (GLquake) mouse look Angus support.Games 0 11 October 2008 00:46
BlitzQuake Install Coolit support.Games 0 02 September 2005 21:33

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:03.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10745 seconds with 14 queries