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

Attempt to go back to the earliest logic of finding a matching framebuffer #4399

Merged
merged 1 commit into from
Nov 4, 2013
Merged

Conversation

dbz400
Copy link
Contributor

@dbz400 dbz400 commented Nov 1, 2013

Looks like at the very beginning , we're trying to test out the new logic of matching framebuffer to fix some games .I tried to go back to the very original logic to see if it still works right now . Surprisingly , it fixes few framebuffer sizing issues in games (Wildarm XF, Midnight club 3 etc) and also good for Kingdom heart that we may concern .

All those problem games with framebuffer sizing previously also tested and worked okay .May be @solarmystic can help quick test as well .

Fixes Wilarm XF
screen00020

Fixes Midnight Club 3
screen00022

Kingdom Heart still good with shadow and map
screen00021

@unknownbrackets
Copy link
Collaborator

Won't this break shadows in Kingdom Hearts again?

-[Unknown]

@VIRGINKLM
Copy link
Contributor

^ Oh please no! XD

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 1, 2013

No, has been tested with KH already , shadow is working fine

@DerinQyu
Copy link

DerinQyu commented Nov 1, 2013

Maybe a stupid question but does this helps #2947?

@solarmystic
Copy link
Contributor

@raven02 @unknownbrackets @hrydgard

Test report for your perusal:

capture

Major Observations:

  1. Tested games are unaffected graphically by this commit. The issues mentioned in the report are unrelated to this particular commit as they're already present the current master also. (see below).
  2. FFI's graphical regression has v0.9.5-16-g1347c3b as the cause (Issue report opened here Final Fantasy I (ULES00986): Minor graphical regression present on the World Map in PPSSPP since v0.9.5-16-g1347c3b #4403)
  3. FFIII's text/font alignment issues has v0.9.1-2199-gea05c93 as the cause. (Issue report opened here Final Fantasy III (NPUH10125): Minor regression in text/font alignment in all PPSSPP revisions since v0.9.1-2199-gea05c93 #4404)
  4. Tekken 6's Linear Texture Filtering issue is still under investigation. (Updated: Responsible commit found, which happens to be v0.9.1-2041-g4567aca 4567aca . Issue report opened here PPSSPP: Linear Texture Filtering broken in Tekken 6 since v0.9.1-2045-ga3f2fcf  #4405)
  5. Most importantly, I can verify that Kingdom Hearts BBS remains fixed even after this commit is merged into the current master. I do not have the other games this commit is intended to fix however (Wild Arms XF and Midnight Club 3)

Conclusion:

This commit seems pretty safe, at least for the games on my list and it does not break KH BBS either.

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 2, 2013

@solarmystic , thanks for testing .

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 4, 2013

I have nothing to add .Feel free to merge it .

@hrydgard
Copy link
Owner

hrydgard commented Nov 4, 2013

Did you check the shadows outside the Shinra HQ in FFVII:CC ? I remember those breaking and getting fixed repeatedly...

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 4, 2013

Yes , the shadow in FFVII:CC works fine as below.
screen00024

@hrydgard
Copy link
Owner

hrydgard commented Nov 4, 2013

This original code should work because it will only recognize framebuffers as the same if they are bigger or equal to what we're drawing, otherwise it will recreate. Just not sure if the old framebuffer will go away properly but I think the framebuffer expiration cleanup mechanism will take care of it.

hrydgard added a commit that referenced this pull request Nov 4, 2013
Attempt to go back to the earliest logic of finding a matching framebuffer
@hrydgard hrydgard merged commit 9113c58 into hrydgard:master Nov 4, 2013
@unknownbrackets
Copy link
Collaborator

Seems like the size is being detected wrong now in the Tales of Phantasia X credits.

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Nov 4, 2013

Heh, I knew something would break again :/ Solarmystic, do you have TOPX so you can add it to your test rotation?

@solarmystic
Copy link
Contributor

@hrydgard

Unfortunately I do not have TOPX. :(

Also, with regards to the FFVII:CC shadows outside the Shinra building, I distinctly recall that it was getting repeatedly broken and fixed again due to the continuous changes to the "scissors" graphical code back then. It wasn't due to the size of the framebuffers, and the last time it got broken was when you fixed the transparency issues with the Persona games (1 and 2).

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 5, 2013

I own the TOPX and i will check it out the credit .

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 5, 2013

@unknownbrackets , do you mean this one ? or others

http://www.youtube.com/watch?v=abV28dTKEmA

@Kingcom
Copy link
Contributor

Kingcom commented Nov 5, 2013

That is Narikiri Dungeon X's. ToPX is part of the same package, you can get to it by selecting the bottom right icon on the title screen.
It alternates between two sizes every frame in the credits:
http://puu.sh/58ALT/834bccdbd0.jpg
http://puu.sh/58AMu/8db8b56b5f.jpg

On normal 2D maps (not the world map) the issue occurs from time to time too. The missing text on the second shot is a seperate issue, related to frameskipping.

@Kingcom
Copy link
Contributor

Kingcom commented Nov 5, 2013

A fast way to trigger the credits: Get a save outside of the first town, reset the emulator, start ToPX (but don't load anything yet), go to 0x089B43B7 in the memory viewer, and overwrite "s_t01" with "debug". Then load the save and enter town. Then talk to this guy and select the third option: http://puu.sh/59t3s/db4c98291c.jpg

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 5, 2013

Thanks.I can reproduce it . I think those are cheats code ?

screen00028

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 5, 2013

If i savestate and reload it , it is rendering fine .Hummm

@unknownbrackets
Copy link
Collaborator

If you load a savestate it will create framebuffers differently, especially because of this pull's logic changes.

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Nov 6, 2013

Humm this one seems to make all happy ... may need more testing though

// Find a matching framebuffer
VirtualFramebuffer *vfb = 0;
for (size_t i = 0; i < vfbs_.size(); ++i) {
    VirtualFramebuffer *v = vfbs_[i];
    if (MaskedEqual(v->fb_address, fb_address)) {
        if (v->format == fmt) {
            // Let's not be so picky for now. Let's say this is the one.
            vfb = v;
            vfb->fb_stride = fb_stride;
            break;
        } else {
            DestroyFramebuf(v);
            vfbs_.erase(vfbs_.begin() + i--);
            break;
        }   
    } 
}

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

Successfully merging this pull request may close these issues.

7 participants