ZZogl -- Zero GS KOSMOS fork
I thinks there are some issues in the function FlushMadeNewTarget
1/ g_bSaveTex is check twice in a row (so there are some dead code). My opinion the 2nd is probably another variable.
2/ I do not get why g_MemTargs.GetMemoryTarget(curvb.tex0, 0) is called !

---------------------------------------------------------------------------------

Some ideas for the target cache implementation.
1/ In function CMemoryTargetMngr::CompareTarget before the comparaison of the clut. It maybe worth to check that it-> csa == tex0.csa. If the condition is false, data are likely to be different.

2/ Cache management (maybe someone already test). When SearchExistTarget found a target, move it in the beginning of the list. To avoid too big list, just cut last element. The current VALIDATE_THRESH method is not really fair, it tend to trash more the begin (and less last elements). Moreover it keeps a little more the comparison time in the cache under control because there is a maximum of a element. However it would be a little more complex to keep the different level of CompareTarget. Another solution could be to add a coefficient of usefulness, bigger for clut, bigger when texture is large, bigger when the texture is use a lot.

-------------------------------------------------------------------------------
If I'm correct the listClearedTargets mechanism is to save some malloc call. Is it malloc really so slow ?
Reply

Sponsored links

There is another thing that I do not understand in SetAlphaVariables function.
The context is "destination alpha blending with 24bits textures". The alpha value must be one (bDestAlphaColor=2). Seem logical because there is no alpha info on 24bits. However the code sets alpha value form src instead.
Code:
#define one_minus_alpha  (bDestAlphaColor == 2) ? GL_ONE_MINUS_SRC_ALPHA : blendinvalpha[usec]
#define alpha        (bDestAlphaColor == 2) ? GL_SRC_ALPHA : blendalpha[usec]
Will not be better to replace it with GL_ONE and GL_ZERO ? Or is it equivalent ?
Code:
#define one_minus_alpha  (bDestAlphaColor == 2) ? GL_ZERO : blendinvalpha[usec]
#define alpha        (bDestAlphaColor == 2) ? GL_ONE : blendalpha[usec]
Reply
Src alpha and dest alpha are different values. If I remember correctly, this is part of BLENDING, destination and source are blended together, so even when destination is nontransparent, source scaling faction should be in touch.
Reply
Hum, the blend formula are:
Output color = (A-B)* Alpha +D
Output alpha = Soure Alpha (well there is maybe a FBA impact too, not important)
A,B,D are either source color, destination color or null
Alpha is either alpha of the source, alpha of the destination or a register value.

Let takes the following basic register configuration: A = Cs, B=D=0, Alpha = Ad so
output = Cs*Ad <=> output = Cs * GL_DST_ALPHA
Now in 24 bits (no alpha info => GL_DST_ALPHA is 1 as far as I understand), however the code is tranform to output = Cs* GL_SRC_ALPHA which seems illogical for me.
Reply
Strange...
Reply
hey i need to ask, im both a programing and a linux newb, and i tried to compile the zzogl plugin and to no avail. is there any step by step guide on compiling the plugin? if this has already been covered can i be pointed to the right direction? any help would be greatly appreciated
Reply
(01-03-2011, 05:16 PM)skyhighclaw Wrote: ... is there any step by step guide on compiling the plugin? ...

Hello! I just started looking at this emulator. If I'm not mistaken this plugin is now in the main pcsx2 svn repository. So follow a general guide at http://code.google.com/p/pcsx2/w/list if the version in the beta is too old for you.

This information would be nice to have this information in the first post, so to reduce confusion for newcomers. (and/or maybe start on a new thread? 140+ pages Blink)
Reply
Using Linux, I run into a problem with this plugin using r4049 and later. Revisions before this generally work well.

The problem occurs as soon I try to start emulation (boot). Then immediately I get a runtime error with the following information.

trunk/common/src/Utilities/Linux/LnxHostSys.cpp(57) : assertion failed:
Function: void SysPageFaultSignalFilter(int, siginfo_t*, void*)
Thread: MTGS
Condition: false
Message: Unhandled page fault @ 0x00000000

Stacktrace: (this is empty even with debug build)


(Console output)
$ ./pcsx2
Interface is initializing. Entering Pcsx2App:OhmynInit!
Command line parsing...
Command line parsed!
ZZogl-PG: Calling GSinit.
ZZogl-PG: GSinit finished.
ZZogl-PG: Calling GSopen.
ZZogl-PG: Using ZZ Ogl PG (Debug) :0.3.0.
ZZogl-PG: Creating ZZOgl window.
ZZogl-PG: Got Doublebuffered Visual!
ZZogl-PG: glX-Version 1.4
ZZogl-PG: You have Direct Rendering!
ZZogl-PG: Resolution 800x600. Depth 24 bpp. Position (41,23)
Trace/breakpoint trap

Does this happen for all on Linux? Any ideas on what might cause it?
(Graphics card used was Intel G45)
Reply
It's a regression (older revisions are working, later no -- it's a regression) in pcsx2 code, not in plugin, as I see. You need to fill a bug.
Reply
If r4048 is good and not 4049 then it is an issue with my code. If you have some free time, I will be glad if you can do the following test:
1/ pcsx2 below 4048 and latest zz plugin
2/ latest pcsx2 and pcsx2 below 4048

Create a bug report here (for me Tongue2) here: http://code.google.com/p/pcsx2/issues/list
Reply




Users browsing this thread: 1 Guest(s)