Announcement

Collapse
No announcement yet.

Kurok psp engine. Texture filter

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

  • dr_mabuse1981
    replied
    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, 01:18 PM.

    Leave a comment:


  • Dark_Duke
    replied
    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 :-)

    Leave a comment:


  • MDave
    replied
    Just finished doing a developer commentary video on Kurok, was fun to make

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

    Leave a comment:


  • MDave
    replied
    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.

    Leave a comment:


  • Grzybiarz
    replied
    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

    Leave a comment:


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

    Leave a comment:


  • Dark_Duke
    replied
    Originally posted by Grzybiarz View Post
    I tried to run both version from your previous post and from yet previous one. Both doesent work on my psp. That one compiled by crowbar doesent load because of lack of default.cfg file. That one that you compiled, appears to have corrupted eboot and i cant load this. Do you know, how to fix it?
    Oh thats interesting, I was able to play the Crow_Bar official eboot. Do you Have Quake 3? You need to copy the baseq3 to the root of the Quake3 folder.

    For the development version that MDave listed, as it turns out there are three more files I need to compile. I found them in the readme. "ui_psp.prx, qagame_psp.prx, and cgame_psp.prx". I'll compile them a bit later and upload them.

    Leave a comment:


  • Grzybiarz
    replied
    I tried to run both version from your previous post and from yet previous one. Both doesent work on my psp. That one compiled by crowbar doesent load because of lack of default.cfg file. That one that you compiled, appears to have corrupted eboot and i cant load this. Do you know, how to fix it?

    Leave a comment:


  • Dark_Duke
    replied
    Update to my last post... I actually was able to compile the Quake3 code directly from MDave's posted source. I have a working CYGWIN envirorment if anybody needs it, I've zipped up and archived for future use. Looks like Crow_bar was using the M33 SDK as well as a custom version of pspmath (which I couldn't find anywhere online, though I was able to hack together a custom library between an old version of the pspmath and the latest version I could find on github). I also had to go through Crow_Bars source and replace some kubridge related commands that pertain specifically to M33 firmware, like "kuKernelLoadModule" --> "sceKernelLoadModule" etc

    Link to the compiled version: Quake3 PSP Eboot from Mdave/Crowbar SVN
    Update 1: the compiled source doesn't seem to work right, I think MDaves right in that it has a memory leak. I can't get it to boot. The other version linked in my previous post in Update 1 does run and seems far more complete. Averages about 20fps. Damn impressive to see Quake 3 running on the psp!
    Last edited by Dark_Duke; 06-21-2016, 03:12 AM.

    Leave a comment:


  • Dark_Duke
    replied
    Originally posted by MDave View Post
    Crow_Bar did the initial groundwork on porting it, and I helped with some rendering and bug fixes. I don't have the EBOOT.PBP file handy, my PSP is somewhere in storage hah. But the SVN is here, if you can compile it and you have Quake 3 data files, should work (WiFi switch needs to be turned on PSP, or else it crashes on boot). Half the time it will crash when booting, not sure why. There is also a slight memory leak, so after playing for a long time it will eventually crash.

    Quake3PSP - Revision 3: /

    Looks like its on YouTube, but the version Crow_Bar gave me before I fixed the rendering issues

    https://youtu.be/vooU6DDXmp8?t=163
    Is this the same thing as what ended up being called Quake Arcade Arena for PSP? I came across that myself a few nights ago, below is the download Grzybiarz. Thanks for linking the Quake3 code MDave, and also for your help over email regarding the Kurok psp code :-) Here is what you helped contribute to!

    Quake Arena Arcade Download Link: https://www.dropbox.com/s/ke2qf5q1btg5ne7/QAA.rar?dl=0


    Update 1 : I found the eboot for Quake3 port by Crow_Bar... wow its a real Quake3 port. Extremely real. A bit slow load times but WOW. https://www.dropbox.com/s/jr1rlr34th...e3PSP.zip?dl=0
    Update 2: Crow_Bar used the M33 SDK pretty thoroughly to code this. Having to build a custom environment with specific versions of libraries just to compile it
    Last edited by Dark_Duke; 06-21-2016, 12:31 AM.

    Leave a comment:


  • MDave
    replied
    Crow_Bar did the initial groundwork on porting it, and I helped with some rendering and bug fixes. I don't have the EBOOT.PBP file handy, my PSP is somewhere in storage hah. But the SVN is here, if you can compile it and you have Quake 3 data files, should work (WiFi switch needs to be turned on PSP, or else it crashes on boot). Half the time it will crash when booting, not sure why. There is also a slight memory leak, so after playing for a long time it will eventually crash.

    Quake3PSP - Revision 3: /

    Looks like its on YouTube, but the version Crow_Bar gave me before I fixed the rendering issues

    https://youtu.be/vooU6DDXmp8?t=163

    Leave a comment:


  • Grzybiarz
    replied
    Can you post a Download link to that quake 3 for psp? I'm curious how does it look like.

    Leave a comment:


  • MDave
    replied
    I am not promising anything hah, but if I do, there wouldn't be any engine changes. Just pure content, wanting to finish the single player aspect. I have thought about remaking the game in Unity (so it can be easily played on so many platforms, and with modern ease of use creating content for it). Someone recreated Quake style movement for it, which is quite attractive

    I'm all about recreating old school classic game play, the engine comes second

    Leave a comment:


  • Grzybiarz
    replied
    Wow. I didnt expect you to anwser. Well thanks for that. Now i know for sure. If you are going to make a new version of kurok, i can help with testing. My psp model is 3004.

    Leave a comment:


  • xaGe
    replied
    HA! MDave is back. Wish I still had my PSP Slim if you're going to work on Kurok again.

    Leave a comment:

Working...
X