Announcement

Collapse
No announcement yet.

Kurok psp engine. Texture filter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I didnt know it doesent work without quake 3 copy. My bad. Sorry :p

    Comment


    • #17
      Ok I got it work with quake 3 files. I got to say, it looks great for a psp port. I was able to play with bots on some maps. Audio quality is Great, bots are as stupid as always, but it is more than enough to play on not that good psp controls. The biggest disadvantage is 20 fps but it is Stable at least, and you can still enjoy the Quake 3 on your PSP. And that is a big Technology achiwmnent

      Comment


      • #18
        Yeah it's a good show of what the PSP can do, running an un-optimised PC port of Quake 3 if its given enough RAM! The bots are heavily CPU intensive, that lowers the frame rates the more you have in an arena. The frame rate can go as high as 40 or 60 on certain maps with no bots.

        It's amazing how a port of Quake 3 was managed to get onto Dreamcast, and that had even less RAM to work with then any PSP, just 16MB! But it did have 8MB VRAM compared to PSP Phat's 2MB and PSP Slim's 4MB VRAM.

        Comment


        • #19
          Just finished doing a developer commentary video on Kurok, was fun to make

          https://www.youtube.com/watch?v=hwQTWrjNNdw

          Comment


          • #20
            Originally posted by MDave View Post
            Just finished doing a developer commentary video on Kurok, was fun to make

            https://www.youtube.com/watch?v=hwQTWrjNNdw
            This is great! About to watch it now :-)

            Comment


            • #21
              To answer the question about disabling the filter:

              I added a "retro" cvar to my customized Dquake psp engine to enable / disable it:
              Its inside the video_hardware_draw.cpp file:

              EDIT: MDave, if you really want to continie on Kurok you should try to contact me or Shpuld
              via Skype, we have a few new things done for the psp engines which are really neat

              Code:
              void GL_Bind (int texture_index)
              {
              	int tex_m = (int)r_mipmaps_func.value;
              	// Binding the currently bound texture?
              	if (currenttexture == texture_index)
              	{
              		// Don't bother.
              		return;
              	}
              
              	// Remember the current texture.
              	currenttexture = texture_index;
              
              	// Which texture is it?
              	const gltexture_t& texture = gltextures[texture_index];
              
              	if(texture.format == GU_PSM_T8) //only for 8 bit textures
              	{
              		if(texture.palette_active == qtrue)
              		{
              	       // Upload the palette.
              		   sceGuClutMode(GU_PSM_8888, 0, 255, 0);
              #ifdef STATIC_PAL
              		   sceKernelDcacheWritebackRange(texture.palette, sizeof(texture.palette));
              #else
                         sceKernelDcacheWritebackRange(texture.palette, 256);
              #endif
              		   sceGuClutLoad(256 /8 , texture.palette);   
              	       reloaded_pallete = 0;
              		}
              		else
              		{
              	       if(!reloaded_pallete)
              	       {
              		      VID_SetPaletteTX(); //Restore old palette for bars and models
              		   }
              		}
              	}
              
              	// Set the texture mode.
              	sceGuTexMode(texture.format, texture.mipmaps , 0, texture.swizzle);
              	if (texture.mipmaps > 0 && r_mipmaps.value > 0)
              	{
                      float slope = 0.4f;
              		sceGuTexSlope(slope); // the near from 0 slope is the lower (=best detailed) mipmap it uses
              		sceGuTexFilter(GU_LINEAR_MIPMAP_LINEAR, GU_LINEAR_MIPMAP_LINEAR);
              		sceGuTexLevelMode(tex_m, r_mipmaps_bias.value); // manual slope setting
              	}
              	else
              // dr_mabuse1981: "retro filter" start.
              	if (r_retro.value)	
              	sceGuTexFilter(GU_NEAREST, GU_NEAREST);
              	else
              	sceGuTexFilter(texture.filter, texture.filter);
              // dr_mabuse1981: "retro filter" end.
              
              
              	// Set the texture image.
              	const void* const texture_memory = texture.vram ? texture.vram : texture.ram;
              	sceGuTexImage(0, texture.width, texture.height, texture.width, texture_memory);
              
              
              	if (texture.mipmaps > 0 && r_mipmaps.value > 0)
              	{
              		int size = (texture.width * texture.height * texture.bpp);
              		int offset = size;
              		int div = 2;
              
              		for (int i = 1; i <= texture.mipmaps; i++)
              		{
              			void* const texture_memory2 = ((byte*) texture_memory)+offset;
                          sceGuTexImage(i, texture.width/div, texture.height/div, texture.width/div, texture_memory2);
              			offset += size/(div*div);
              			div *=2;
              		}
              	}
              
              }
              Last edited by dr_mabuse1981; 09-25-2016, 02:18 PM.

              Comment

              Working...
              X