• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › General Discussion v
« Previous 1 ... 364 365 366 367 368 Next »

[fix] Fragile (and maybe others), source included
View New Posts | View Today's Posts

Pages (5): « Previous 1 2 3 4 5 Next »
Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
[fix] Fragile (and maybe others), source included
05-23-2009, 06:59 PM
#31
nosound97 Offline
Cheetahmen on the N64 D:
*******
Posts: 3,552
Threads: 107
Joined: Mar 2009
More games:

Metroid Prime 2 Echoes doesn't show intro movie at all, but still goes ingame

Mario Kart Double Dash!! became very laggy

Sonic Heroes became laggy in intro and menus

Soul Calibur 2 became laggy at starting, but in game works well

These are Gamecube games I've tested
[Image: 1147431.png]
YouTube channel | Xfire
Find
Reply
05-23-2009, 07:39 PM
#32
death-droid Offline
Member
***
Posts: 180
Threads: 0
Joined: Apr 2009
Thanks again nosound97
Orbb i don't think glReadPixels actually likes the continually changing x and y pos.
Find
Reply
05-23-2009, 07:59 PM
#33
mo27772mo
Unregistered
 
death-droid, please test before commit to svn.
Reply
05-23-2009, 08:11 PM (This post was last modified: 05-23-2009, 09:01 PM by death-droid.)
#34
death-droid Offline
Member
***
Posts: 180
Threads: 0
Joined: Apr 2009
I did....
The hack worked plus i left the unused code there for a reason.

Code:
    u32 pixel = 0;
    glReadPixels(500, 300, 1, 1, GL_RGB, GL_BYTE, &pixel);
    return pixel == 0;

Tongue
Still need a way of checking the whole window for color.
Find
Reply
05-24-2009, 04:39 AM (This post was last modified: 05-24-2009, 04:40 AM by deathtotheweird.)
#35
deathtotheweird Offline
Junior Member
**
Posts: 11
Threads: 1
Joined: Mar 2009
Your code/hack has another issue death-droid. In Fragile at some occasions (mostly occurs when you use a fireplace to save/rest) there is a large horizontal rainbow colored line, and also when you start the game-and press continue to load a save-it hangs for a second with a black screen before it shows the save games. The OP's code and Luis's do not have those issues.
Find
Reply
05-24-2009, 09:59 AM
#36
death-droid Offline
Member
***
Posts: 180
Threads: 0
Joined: Apr 2009
I'm no longer working on the hack Tongue
Find
Reply
05-24-2009, 03:02 PM
#37
deathtotheweird Offline
Junior Member
**
Posts: 11
Threads: 1
Joined: Mar 2009
no need to-to be compteley honest. Luis and Orbb's codes runs fine
Find
Reply
05-25-2009, 03:20 AM
#38
LuisR14
Unregistered
 
(05-23-2009, 05:39 AM)deathtotheweird Wrote: Back on topic-none all the games I own and are on my PC have been broken by this "fix".
obviously it won't break them, it only checks to see if the game is outputing a black screen Tongue

Quote:
(05-23-2009, 04:39 PM)orbb Wrote: // [ fix for Fragile by kamui_kun ...
bool Renderer::IsBlack()
{
char pixels [3];
int x, y;

for(x = 0; x < (int) OpenGL_GetBackbufferHeight(); x++)
{
for(y = 0; y < (int) OpenGL_GetBackbufferWidth(); y++)
{
glReadPixels(x, y, 1, 1, GL_RED, GL_BYTE, &pixels[0]);
glReadPixels(x, y, 1, 1, GL_GREEN, GL_BYTE, &pixels[1]);
glReadPixels(x, y, 1, 1, GL_BLUE, GL_BYTE, &pixels[2]);
if((pixels[0] != 0) || (pixels[1] != 0) || (pixels[2] != 0)) return false;
}
}
return true;
}

void Renderer::SwapBuffers()
{
// [ fix for Fragile by kamui_kun ...
bool pass = false;

if(Renderer::IsBlack()) pass = true;

// ...]

...

if (!pass) OpenGL_SwapBuffers();

...

(05-23-2009, 06:12 PM)orbb Wrote: glReadPixels(500, 300, 1, 1, color[c], GL_BYTE, &pixels[i]);

this check only for the pixel (500, 300)

it should be : glReadPixels(x, y, 1, 1, color[c], GL_BYTE, &pixels[i]);

for checking all the pixels in the screen ...
there is also a problem here :

for (int i = 0; i < 2;i++)
{
for (int c = 0; c < 2 ;c++)
{
glReadPixels(500, 300, 1, 1, color[c], GL_BYTE, &pixels[i]);
if(pixels[i] != 0)
return false;
else
return true;
}
}

it should be something like this :

for (int i = 0; i < 2;i++)
{
glReadPixels(x, y, 1, 1, color[i], GL_BYTE, &pixels[i]);
if(pixels[i] != 0)
return false;
else
return true;
}
*sigh* such wrong coding >_>, don't worry i'm on the job Tongue
Reply
06-02-2009, 12:56 AM
#39
LuisR14
Unregistered
 
woops hehe, forgot about this Big Grin

hmm, orbb's modifications look ok except for this code Smile
Code:
for(x = 0; x < (int) OpenGL_GetBackbufferHeight(); x++)
{
for(y = 0; y < (int) OpenGL_GetBackbufferWidth(); y++)

here it is fixed Smile
Code:
// [ fix for Fragile by kamui_kun ...
bool Renderer::IsBlack()
{
    //char pixels [3];
    int x, y;
    
    for( y = 0; y < (int)OpenGL_GetBackbufferHeight(); y++ ) {
        for( x = 0; x < (int) OpenGL_GetBackbufferWidth(); x++ ) {
            glReadPixels( x, y, 1, 1, GL_RED, GL_BYTE, &pixels[0]);
            glReadPixels( x, y, 1, 1, GL_GREEN, GL_BYTE, &pixels[1]);
            glReadPixels( x, y, 1, 1, GL_BLUE, GL_BYTE, &pixels[2]);
            if( (pixels[0] != 0 ) || (pixels[1] != 0) || (pixels[2] != 0) )
                return false;
        }
    }
    return true;
}

void Renderer::SwapBuffers()
{
    // [ fix for Fragile by kamui_kun ...
    bool pass = false;
    
    if( Renderer::IsBlack() )
        pass = true;
    
    // ...]
    
    ...
    
    if( !pass )
        OpenGL_SwapBuffers();
    
    ...
}

here's a different version that i think is quicker Smile
Code:
// [ fix for Fragile by kamui_kun ...
bool Renderer::IsBlack()
{
    //char pixels [3];
    int pixel;
    int x, y;
    
    for( y = 0; y < (int)OpenGL_GetBackbufferHeight(); y++ ) {
        for( x = 0; x < (int) OpenGL_GetBackbufferWidth(); x++ ) {
            glReadPixels( x, y, 1, 1, GL_RGB, GL_INT, &pixel );
            if( pixel != 0 )
                return false;
        }
    }
    return true;
}

void Renderer::SwapBuffers()
{
    // [ fix for Fragile by kamui_kun ...
    
    // ...]
    
    ...
    
    if( !Renderer::IsBlack() )
        OpenGL_SwapBuffers();
    
    ...
}
Reply
06-08-2009, 05:17 PM
#40
val532 Offline
A french
***
Posts: 98
Threads: 7
Joined: Mar 2009
John Peterson work on the OpenGL plug-in may be able to add this feature.
Excuse me for my bad English I'm a little French, which uses google translated most of the time.
Find
Reply
« Next Oldest | Next Newest »
Pages (5): « Previous 1 2 3 4 5 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread:



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode