Forum

Kurok PSP errors

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Re: Kurok PSP errors

Postby revelator » Thu Feb 16, 2012 1:53 pm

ok this explains it The MIPS family has a wide variety of implementations by a wide range of vendors. Consequently, there are many, many CPU models within it. ouch no wonder its hard to find a default assembler.
and yes rtems got one :)
and bingo http://courses.missouristate.edu/KenVollmar/MARS/ heres the assembler ;)
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Kurok PSP errors

Postby Max_Salivan » Thu Feb 16, 2012 2:12 pm

may be i miss something


http://rghost.ru/36549862
Sorry for my english :)
Max_Salivan
 
Posts: 93
Joined: Thu Dec 15, 2011 1:00 pm

Re: Kurok PSP errors

Postby Baker » Thu Feb 16, 2012 2:17 pm

Max_Salivan wrote:UPD:i am compile it
added
#define FL_MONSTERCLIP 8192 // Only solid to entities with FL_MONSTER

but doors and buttons dont work,i am pass through them


I'm glad you got it to compile. I can't help you with debugging your own code, but sv_physics.c and world.c are 2 places that might involve that kind of thing.

You might consider using WinMerge to compare the old and new files (especially sv_physics.c and world.c) to look through and try to determine what change is making that happen.

Image
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Kurok PSP errors

Postby Max_Salivan » Thu Feb 16, 2012 4:31 pm

Baker wrote:
Max_Salivan wrote:UPD:i am compile it
added
#define FL_MONSTERCLIP 8192 // Only solid to entities with FL_MONSTER

but doors and buttons dont work,i am pass through them


I'm glad you got it to compile. I can't help you with debugging your own code, but sv_physics.c and world.c are 2 places that might involve that kind of thing.

You might consider using WinMerge to compare the old and new files (especially sv_physics.c and world.c) to look through and try to determine what change is making that happen.

Image


thanks,i cant find errors
i am place sv_physics.c and world.c from kurok
but doors and buttons dont work=\
Sorry for my english :)
Max_Salivan
 
Posts: 93
Joined: Thu Dec 15, 2011 1:00 pm

Re: Kurok PSP errors

Postby Baker » Thu Feb 16, 2012 4:51 pm

There are physics changes in pr_cmds.c, sv_phys.c and world.c with stuff like this

Code: Select all
/*
==================
SV_ClipMoveToEntity

Handles selection or creation of a clipping hull, and offseting (and
eventually rotation) of the end points
==================
*/
trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
   trace_t   trace;
   vec3_t   offset, temp;
   vec3_t   start_l, end_l;
   hull_t   *hull;
   qboolean   rotated;
   matrix4x4   matrix;

// fill in a default trace
   memset (&trace, 0, sizeof(trace_t));
   trace.fraction = 1;
   trace.allsolid = true;
   VectorCopy (end, trace.endpos);

// get the clipping hull
   hull = SV_HullForEntity (ent, mins, maxs, offset);

// g-cont. get support for rotational brush-models
   if( ent != EDICT_NUM( 0 ) && ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
      rotated = true;
   else rotated = false;

   if( rotated )
   {
      Matrix4x4_CreateFromEntity( matrix, ent->v.angles, offset, 1.0f );
      Matrix4x4_VectorITransform( matrix, start, start_l );
      Matrix4x4_VectorITransform( matrix, end, end_l );
   }
   else
   {
      VectorSubtract( start, offset, start_l );
      VectorSubtract( end, offset, end_l );
   }

// trace a line through the apropriate clipping hull
   SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);

   if( trace.fraction != 1.0f )
   {
      // compute endpos (generic case)
      VectorLerp( start, trace.fraction, end, trace.endpos );

      if( rotated )
      {
         // transform plane
         VectorCopy( trace.plane.normal, temp );
         Matrix4x4_TransformPositivePlane( matrix, temp, trace.plane.dist, trace.plane.normal, &trace.plane.dist );
      }
      else
      {
         // make dist adjustments
         trace.plane.dist = DotProduct( trace.endpos, trace.plane.normal );
      }
   }

// did we clip the move?
   if (trace.fraction < 1.0f || trace.startsolid  )
      trace.ent = ent;

   return trace;
}


And this ...

Code: Select all
/*
==================
SV_ClipMoveToEntity

Handles selection or creation of a clipping hull, and offseting (and
eventually rotation) of the end points
==================
*/
trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
   trace_t   trace;
   vec3_t   offset, temp;
   vec3_t   start_l, end_l;
   hull_t   *hull;
   qboolean   rotated;
   matrix4x4   matrix;

// fill in a default trace
   memset (&trace, 0, sizeof(trace_t));
   trace.fraction = 1;
   trace.allsolid = true;
   VectorCopy (end, trace.endpos);

// get the clipping hull
   hull = SV_HullForEntity (ent, mins, maxs, offset);

// g-cont. get support for rotational brush-models
   if( ent != EDICT_NUM( 0 ) && ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
      rotated = true;
   else rotated = false;

   if( rotated )
   {
      Matrix4x4_CreateFromEntity( matrix, ent->v.angles, offset, 1.0f );
      Matrix4x4_VectorITransform( matrix, start, start_l );
      Matrix4x4_VectorITransform( matrix, end, end_l );
   }
   else
   {
      VectorSubtract( start, offset, start_l );
      VectorSubtract( end, offset, end_l );
   }

// trace a line through the apropriate clipping hull
   SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);

   if( trace.fraction != 1.0f )
   {
      // compute endpos (generic case)
      VectorLerp( start, trace.fraction, end, trace.endpos );

      if( rotated )
      {
         // transform plane
         VectorCopy( trace.plane.normal, temp );
         Matrix4x4_TransformPositivePlane( matrix, temp, trace.plane.dist, trace.plane.normal, &trace.plane.dist );
      }
      else
      {
         // make dist adjustments
         trace.plane.dist = DotProduct( trace.endpos, trace.plane.normal );
      }
   }

// did we clip the move?
   if (trace.fraction < 1.0f || trace.startsolid  )
      trace.ent = ent;

   return trace;
}


It isn't unheard of for floating point functions on the PSP to work differently, poorly, unexpectedly on a PSP. And there are physics changes and matrix transformations and so forth in all those files. You'd need to find someone dedicated to porting that and debugging that on a PSP, depending on what the issue could be it might take them a lot of time (weeks?) to identify why that is happening. Sorry. :(

I do hope you get it to work.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Kurok PSP errors

Postby Max_Salivan » Thu Feb 16, 2012 5:11 pm

Baker wrote:There are physics changes in pr_cmds.c, sv_phys.c and world.c with stuff like this

Code: Select all
/*
==================
SV_ClipMoveToEntity

Handles selection or creation of a clipping hull, and offseting (and
eventually rotation) of the end points
==================
*/
trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
   trace_t   trace;
   vec3_t   offset, temp;
   vec3_t   start_l, end_l;
   hull_t   *hull;
   qboolean   rotated;
   matrix4x4   matrix;

// fill in a default trace
   memset (&trace, 0, sizeof(trace_t));
   trace.fraction = 1;
   trace.allsolid = true;
   VectorCopy (end, trace.endpos);

// get the clipping hull
   hull = SV_HullForEntity (ent, mins, maxs, offset);

// g-cont. get support for rotational brush-models
   if( ent != EDICT_NUM( 0 ) && ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
      rotated = true;
   else rotated = false;

   if( rotated )
   {
      Matrix4x4_CreateFromEntity( matrix, ent->v.angles, offset, 1.0f );
      Matrix4x4_VectorITransform( matrix, start, start_l );
      Matrix4x4_VectorITransform( matrix, end, end_l );
   }
   else
   {
      VectorSubtract( start, offset, start_l );
      VectorSubtract( end, offset, end_l );
   }

// trace a line through the apropriate clipping hull
   SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);

   if( trace.fraction != 1.0f )
   {
      // compute endpos (generic case)
      VectorLerp( start, trace.fraction, end, trace.endpos );

      if( rotated )
      {
         // transform plane
         VectorCopy( trace.plane.normal, temp );
         Matrix4x4_TransformPositivePlane( matrix, temp, trace.plane.dist, trace.plane.normal, &trace.plane.dist );
      }
      else
      {
         // make dist adjustments
         trace.plane.dist = DotProduct( trace.endpos, trace.plane.normal );
      }
   }

// did we clip the move?
   if (trace.fraction < 1.0f || trace.startsolid  )
      trace.ent = ent;

   return trace;
}


And this ...

Code: Select all
/*
==================
SV_ClipMoveToEntity

Handles selection or creation of a clipping hull, and offseting (and
eventually rotation) of the end points
==================
*/
trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
   trace_t   trace;
   vec3_t   offset, temp;
   vec3_t   start_l, end_l;
   hull_t   *hull;
   qboolean   rotated;
   matrix4x4   matrix;

// fill in a default trace
   memset (&trace, 0, sizeof(trace_t));
   trace.fraction = 1;
   trace.allsolid = true;
   VectorCopy (end, trace.endpos);

// get the clipping hull
   hull = SV_HullForEntity (ent, mins, maxs, offset);

// g-cont. get support for rotational brush-models
   if( ent != EDICT_NUM( 0 ) && ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
      rotated = true;
   else rotated = false;

   if( rotated )
   {
      Matrix4x4_CreateFromEntity( matrix, ent->v.angles, offset, 1.0f );
      Matrix4x4_VectorITransform( matrix, start, start_l );
      Matrix4x4_VectorITransform( matrix, end, end_l );
   }
   else
   {
      VectorSubtract( start, offset, start_l );
      VectorSubtract( end, offset, end_l );
   }

// trace a line through the apropriate clipping hull
   SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);

   if( trace.fraction != 1.0f )
   {
      // compute endpos (generic case)
      VectorLerp( start, trace.fraction, end, trace.endpos );

      if( rotated )
      {
         // transform plane
         VectorCopy( trace.plane.normal, temp );
         Matrix4x4_TransformPositivePlane( matrix, temp, trace.plane.dist, trace.plane.normal, &trace.plane.dist );
      }
      else
      {
         // make dist adjustments
         trace.plane.dist = DotProduct( trace.endpos, trace.plane.normal );
      }
   }

// did we clip the move?
   if (trace.fraction < 1.0f || trace.startsolid  )
      trace.ent = ent;

   return trace;
}


It isn't unheard of for floating point functions on the PSP to work differently, poorly, unexpectedly on a PSP. And there are physics changes and matrix transformations and so forth in all those files. You'd need to find someone dedicated to porting that and debugging that on a PSP, depending on what the issue could be it might take them a lot of time (weeks?) to identify why that is happening. Sorry. :(

I do hope you get it to work.


oh thanks for help,Baker,I cant find one who will do it...
this is the end for Portal to PSP(i think)
without this physics,mod has many bugs with cubes and turrets-_-
Sorry for my english :)
Max_Salivan
 
Posts: 93
Joined: Thu Dec 15, 2011 1:00 pm

Re: Kurok PSP errors

Postby Baker » Thu Feb 16, 2012 5:32 pm

Max_Salivan wrote:oh thanks for help,Baker,I cant find one who will do it...
this is the end for Portal to PSP(i think)
without this physics,mod has many bugs with cubes and turrets-_-


That sucks :(

The PSP really hates some floating point stuff. I had to kill matrix functions once for an engine build to run. It wasn't that complex either, it mostly involved gluUnproject and a few matrix functions that requires. I think I also had to remove MH's chasecam fix for similar reasons if I recall correctly. I never achieved an understanding of why or what the issue was nor a work around, but I #ifdef'd the code out of the PSP build. The PSP and some types of floating point don't seem to mix.

And your code is using a lot of matrix functions.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Previous

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest