View previous topic :: View next topic |
Author |
Message |
ffgriever
Joined: 27 Oct 2007 Posts: 13
|
Posted: Sun Jun 20, 2010 11:06 pm Post subject: [PS2] Simple patch for gsKit |
|
|
Hi. I prepared a simple patchset for gsKit.
Nothing special. Just added three new primitives
*goraud shaded and textured triangle
*goraud shaded and textured quad
*goraud shaded line
You can get some really nice effects with these.
Also corrected a minor mistake that ragnarok did in gsInit (he conditionally adds dithe packet, but forgot to conditionally increase packet number).
*removed*
Here is the correct one:
http://www.mediafire.com/file/ryeqnyytwee/gskit.patch |
|
Back to top |
|
|
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Mon Jun 21, 2010 7:05 am Post subject: |
|
|
I applied everything except this hunk:
Code: | --- ee/gs/src/gsInit.c (revision 1682)
+++ ee/gs/src/gsInit.c (working copy)
@@ -161,6 +161,8 @@
u64 *p_data;
u64 *p_store;
int size = 18;
+
+ if((gsGlobal->Dithering == GS_SETTING_ON) && ((gsGlobal->PSM == GS_PSM_CT16) || (gsGlobal->PSM == GS_PSM_CT16S))) size = 19;
gsKit_set_buffer_attributes(gsGlobal);
|
In current svn, the initializer is "int size = 17", so this doesn't apply. |
|
Back to top |
|
|
ffgriever
Joined: 27 Oct 2007 Posts: 13
|
Posted: Mon Jun 21, 2010 5:00 pm Post subject: |
|
|
Yes, you're right of course. But now the funny part: I did the diff against the svn head, so by all means it should detect the 17 -> 18 as change and place it in the patch... Once I'll get the chance, I will do it again and make sure everything is fine ;).
It's 18 because ragnarok added dithering matrix packet, and if conditions are met, also sets "dithering enabled" register by another packet. So it should be 18 if dith is not enabled and 19 if it is. Nevermind, I'll post this simple change again when I'll get back home. |
|
Back to top |
|
|
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Wed Jul 21, 2010 1:28 am Post subject: |
|
|
ffgriever wrote: | Yes, you're right of course. But now the funny part: I did the diff against the svn head, so by all means it should detect the 17 -> 18 as change and place it in the patch... Once I'll get the chance, I will do it again and make sure everything is fine ;).
It's 18 because ragnarok added dithering matrix packet, and if conditions are met, also sets "dithering enabled" register by another packet. So it should be 18 if dith is not enabled and 19 if it is. Nevermind, I'll post this simple change again when I'll get back home. |
Please don't forget this :) New updates for PS2 dev are nowadays rare and it will be a pity if this gets missed from the official repository. |
|
Back to top |
|
|
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Wed Jul 21, 2010 2:09 am Post subject: |
|
|
I just committed this:
Code: | Index: gsInit.c
===================================================================
--- gsInit.c (revision 1664)
+++ gsInit.c (working copy)
@@ -160,8 +160,12 @@
{
u64 *p_data;
u64 *p_store;
- int size = 17;
+ int size = 18;
+ if((gsGlobal->Dithering == GS_SETTING_ON) &&
+ ((gsGlobal->PSM == GS_PSM_CT16) || (gsGlobal->PSM == GS_PSM_CT16S)))
+ size = 19;
+
gsKit_set_buffer_attributes(gsGlobal);
#ifdef DEBUG
| If that's not right, just submit a patch against current svn. |
|
Back to top |
|
|
|