Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sega Rally Revo : missing sky textures #3852

Closed
dbz400 opened this issue Sep 20, 2013 · 30 comments
Closed

Sega Rally Revo : missing sky textures #3852

dbz400 opened this issue Sep 20, 2013 · 30 comments

Comments

@dbz400
Copy link
Contributor

dbz400 commented Sep 20, 2013

Just for record .

-Buffered mode
screen00006

With some tweak to framebuffer to memory , it can render correctly (not our latest build)
screen00007

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 20, 2013

It is pretty funny here .

If i set the following in TextureCache::AttachFramebuffer() which is read from memory

  if (exactMatch) {
          if (g_Config.iRenderingMode == FB_BUFFERED_MODE)
             return;

The road texture appears okay in buffered mode .Wheneve it go into attach framebuffer , texture will disappear
somehow ....

If i do the same for non-buffered mode , for example

  if (exactMatch) {
          if (g_Config.iRenderingMode == FB_NON_BUFFERED_MODE)
             return;

The road texture appears okay in non-buffered mode as well.

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 20, 2013

Look like it is using overlapping framebuffers with different formats simialr to Silent Hill .
#1541

13:34:061 user_main I[SCEGE]: GLES\Framebuffer.cpp:605 Creating FBO for 04000000 : 480 x 272 x 1
13:34:077 user_main I[SCEGE]: GLES\Framebuffer.cpp:605 Creating FBO for 000cc000 : 480 x 272 x 0
13:34:105 user_main I[SCEGE]: GLES\Framebuffer.cpp:605 Creating FBO for 000d4000 : 480 x 272 x 3
13:34:172 user_main I[SCEGE]: GLES\Framebuffer.cpp:605 Creating FBO for 04044000 : 480 x 272 x 1

@unknownbrackets
Copy link
Collaborator

Hmm, cc and d4 are relatively far apart. Are you sure they're actually overlapping?

It seems like this is an exact match, right? So the problem may not be related to overlapping.

It's possible this is an issue of postprocessing, e.g. loading into memory and then drawing on top of it, which is not supported at all. Which of those framebuffers specifically is the road (e.g. if you check the address, which one makes it black if you attach it)?

It could also be intra-framebuffer transfer or etc.

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 21, 2013

I'm also guessing they may be somehow overlapped but mostly likely i'm wrong as they are so far apart.

Yes , it is exact match.It go into the same format one .

INFO_LOG(HLE, "Render to texture with same formats %d at %08x", entry->format, address);

29:29:811 user_main I[HLE]: GLES\TextureCache.cpp:197 Render to texture with same formats 2 at 040cc000
29:29:834 user_main I[HLE]: GLES\TextureCache.cpp:197 Render to texture with same formats 3 at 040d4000

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 21, 2013

The address with 0x040cc000 is the framebuffer render for the road itself .

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 21, 2013

I think we don't support intra-framebuffer transfer as well , right?

@unknownbrackets
Copy link
Collaborator

Not at the moment. Are there any block transfers?

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 21, 2013

No , there is no block transfer happened throughout the game .

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 23, 2013

GE Debugger .The missing road.

1

@unknownbrackets
Copy link
Collaborator

So that means it's drawing it somewhere, e.g. to another FBO. More functionality in the debugger will probably help figure this out.

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 24, 2013

@unknownbrackets , that would be great .It would be great if a one off button can be provided so we don't have to keep pressing 'Break' button until all the textures drawn :)

@unknownbrackets
Copy link
Collaborator

But what would the button do? It can't know when you want to stop.

Planning to be able to set breakpoints at list addresses but you still have to tell it when to stop.

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 24, 2013

I take the road above as an example .

I need to press around 50 times so it can draw all the textures completely .When i press 51 times , it will be white screen and redraw from 1st draw again .

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 24, 2013

So the question is , is it possible we can know when 1st texture got redrawn ?

@unknownbrackets
Copy link
Collaborator

Oh, yes, I also want a "break on texture" feature, maybe it could do texture changes as well. There are many options, although I don't want to make it too complicated.

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 24, 2013

Thanks .It is a minor thing .I should be okay to press many times to get the complete texture :)

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 24, 2013

This game shows few FBO sharing depthbuffer then i tried something here and the road texture shows up .

        } else if (MaskedEqual(z_address, vfbs_[i]->z_address) && fb_address != vfbs_[i]->fb_address) {
            WARN_LOG_REPORT(SCEGE, "FBO sharing existing depthbuffer (unsupported), %08x/%08x and %08x/%08x", fb_address, z_address, vfbs_[i]->fb_address, vfbs_[i]->z_address);
            if (useBufferedRendering_) {
                vfbs_[i]->fbo = fbo_create(vfbs_[i]->renderWidth, vfbs_[i]->renderHeight, 1, true, vfbs_[i]->colorDepth);
                if (vfbs_[i]->fbo) {
                    fbo_bind_as_render_target(vfbs_[i]->fbo);
                } else 
                    ERROR_LOG(SCEGE, "Error creating FBO! %i x %i",  vfbs_[i]->renderWidth, vfbs_[i]->renderHeight);
            } else {
                    fbo_unbind();
                    // Let's ignore rendering to targets that have not (yet) been displayed.
                    gstate_c.skipDrawReason |= SKIPDRAW_NON_DISPLAYED_FB;
            }
        }

@unknownbrackets
Copy link
Collaborator

I'm not sure I understand what you're doing there. You replaced the other fbo becaues it was sharing the depth buffer? Obviously the above will leak, right?

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Sep 25, 2013

Yes , right but only in sharing depth buffer case. I think it just accidentally worked to show up the road textures in this game.

@jbakach
Copy link

jbakach commented Nov 21, 2013

Is there any plan for a fix of this game?

@dbz400
Copy link
Contributor Author

dbz400 commented Jan 5, 2014

It is interesting .The road shows up okay now but not the sky (It is becasue of depth clear)

screen00231

@unknownbrackets
Copy link
Collaborator

Has this improved with the recent depth changes? How does it look in the software renderer?

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Feb 16, 2014

It is the same and btw , it got lots of invalid ADSR modes

43:39:812 user_main W[SCESAS]: HLE\sceSas.cpp:398 sceSasSetADSRMode(08d6c940, 12, 15, 00000005, 00000005, 00000005, 00000005): invalid modes
43:40:179 user_main W[SCESAS]: HLE\sceSas.cpp:398 sceSasSetADSRMode(08d6c940, 27, 15, 00000005, 00000005, 00000005, 00000005): invalid modes
43:41:013 user_main W[SCESAS]: HLE\sceSas.cpp:398 sceSasSetADSRMode(08d6c940, 12, 15, 00000005, 00000005, 00000005, 00000005): invalid modes
43:41:413 user_main W[SCESAS]: HLE\sceSas.cpp:398 sceSasSetADSRMode(08d6c940, 23, 15, 00000005, 00000005, 00000005, 00000005): invalid modes
43:42:748 user_main W[SCESAS]: HLE\sceSas.cpp:398 sceSasSetADSRMode(08d6c940, 12, 15, 00000005, 00000005, 00000005, 00000005): invalid modes

screen00030

@dbz400
Copy link
Contributor Author

dbz400 commented Feb 16, 2014

softgpu seems to be working fine (but the road seems to be wrong ?)

screen00031

@dbz400
Copy link
Contributor Author

dbz400 commented Feb 16, 2014

Meanwhile , there should be two videos playback but missing here

ulus10311-shot-1
ulus10311-shot-2

@unknownbrackets
Copy link
Collaborator

How is this these days with the latest git and "simulate block transfers"? At least the videos maybe?

-[Unknown]

@ppmeis
Copy link
Contributor

ppmeis commented Jul 21, 2014

Tested with latest build. Now both videos play fine at startup. Sky still missing and there are some artifacts on the road:
image

Also, car's mud is with wrong colors:
image

correct view:
01174-04

@thedax
Copy link
Collaborator

thedax commented Sep 8, 2014

According to the forum, all of these issues have been fixed.

http://forums.ppsspp.org/showthread.php?tid=2595&pid=93757#pid93757

Closing for now. Please respond if you have a different experience.

@thedax thedax closed this as completed Sep 8, 2014
@ppmeis
Copy link
Contributor

ppmeis commented Sep 28, 2014

This should be revised. The dirty cars effect is missing. I mean when you drive for a while, mud appears in the cars' body (you can see that on my comment above)

@unknownbrackets
Copy link
Collaborator

Well, that's not really related to the sky right? I think it makes sense to create a separate issue if only that affect is missing now, maybe with GE debugger information.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants