ppsspp icon indicating copy to clipboard operation
ppsspp copied to clipboard

Evangelion Jo : Missing menu text

Open dbz400 opened this issue 11 years ago • 42 comments

Just for record. Looks like it is sceFont issue .

screen00027

HLE\sceFont.cpp:877 sceFontGetCharGlyphImage_Clip(09f094dc, 65326, 09ffe710, 0, 0, 254, 30) HLE\sceFont.cpp:877 sceFontGetCharGlyphImage_Clip(09f094dc, 65332, 09ffe710, 0, 0, 254, 30) HLE\sceFont.cpp:877 sceFontGetCharGlyphImage_Clip(09f094dc, 65321, 09ffe710, 0, 0, 254, 30) HLE\sceFont.cpp:877 sceFontGetCharGlyphImage_Clip(09f094dc, 65326, 09ffe710, 0, 0, 254, 30) HLE\sceFont.cpp:877 sceFontGetCharGlyphImage_Clip(09f094dc, 65333, 09ffe710, 0, 0, 254, 30) HLE\sceFont.cpp:877 sceFontGetCharGlyphImage_Clip(09f094dc, 65317, 09ffe710, 0, 0, 254, 30)

dbz400 avatar Sep 24 '13 12:09 dbz400

This is from real PSP .Looks like JPCSP also cannot render this text completely.

1

dbz400 avatar Sep 24 '13 13:09 dbz400

Has this improved at all? There were some improvements to sceFont.

I wonder if it's similar to the Fieldrunners issue.

-[Unknown]

unknownbrackets avatar Nov 27 '13 08:11 unknownbrackets

Not yet improved unfornaturely.

dbz400 avatar Nov 27 '13 09:11 dbz400

1

dbz400 avatar Dec 15 '13 09:12 dbz400

Softgpu bit better but still some garbages

screen00150

dbz400 avatar Dec 15 '13 09:12 dbz400

The fact that you're getting some white garbage there probably means that sceFont is actually drawing text somewhere but we're not texture mapping it correctly. Maybe it's a vertical texture with a very small stride that we're mishandling somehow? Don't really have any better ideas...

hrydgard avatar Dec 15 '13 09:12 hrydgard

How does the softgpu look these days?

-[Unknown]

unknownbrackets avatar Jan 19 '14 09:01 unknownbrackets

I tested using 0.9.6-474 , it renders all correct in softgpu

screen00138

dbz400 avatar Jan 19 '14 09:01 dbz400

Please ignore my previous post .Softgpu renders those text all correct now.

dbz400 avatar Jan 19 '14 09:01 dbz400

Interesting. So I guess it's rendering the text from a temporary buffer or something?

-[Unknown]

unknownbrackets avatar Jan 19 '14 17:01 unknownbrackets

Okay, if it's correct in softgpu it's definitely not an sceFont bug at least...

hrydgard avatar Jan 19 '14 18:01 hrydgard

Does this look any better in the latest git build with simulate block transfers?

-[Unknown]

unknownbrackets avatar Jun 09 '14 01:06 unknownbrackets

It is the same as previously.

dbz400 avatar Jun 09 '14 02:06 dbz400

Does it ever render the text into a temporary buffer? Maybe it's offset beyond max subarea...

Which FBOs are in the log under "Creating FBO"?

-[Unknown]

unknownbrackets avatar Jun 09 '14 02:06 unknownbrackets

Tested with latest build. Fonts are still missing: image

If I load a savestate with softgpu fonts are gone too, but If I load the game in softgpu from the beginning, fonts appears but in wrong way (same word in all parts): image

Other than that game looks fine ingame: image image image

ppmeis avatar Jul 15 '14 11:07 ppmeis

I notice in Frame Buffer to CPU/GPU looks like softgpu: image

ppmeis avatar Jul 15 '14 11:07 ppmeis

Interesting. So that means we are probably missing some sort of render-to-texture effect here.

-[Unknown]

unknownbrackets avatar Jul 15 '14 14:07 unknownbrackets

Still missing text 1

39:29:591 user_main    I[SCEGE]: Common\FramebufferCommon.cpp:412 Creating FBO for 001fe7c0 : 156 x 12 x 0
39:29:593 user_main    I[SCEGE]: Common\FramebufferCommon.cpp:412 Creating FBO for 001fcf00 : 156 x 12 x 0
39:29:594 user_main    I[SCEGE]: Common\FramebufferCommon.cpp:412 Creating FBO for 001fb640 : 156 x 12 x 0
39:29:607 idle0        I[SCEGE]: GLES\Framebuffer.cpp:1896 Decimating FBO for 001fe7c0 (156 x 12 x 0), age 6
39:29:608 idle0        I[SCEGE]: GLES\Framebuffer.cpp:1896 Decimating FBO for 001fcf00 (156 x 12 x 0), age 6
39:29:609 idle0        I[SCEGE]: GLES\Framebuffer.cpp:1896 Decimating FBO for 001fb640 (156 x 12 x 0), age 6

if I comment out these,it shows up,still not correct.

        /*if (vfb != displayFramebuf_ && vfb != prevDisplayFramebuf_ && vfb != prevPrevDisplayFramebuf_) {
            if (age > FBO_OLD_AGE) {
                INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age);
                DestroyFramebuf(vfb);
                vfbs_.erase(vfbs_.begin() + i--);
            }
        }*/

2

GE debugger 3 https://gist.github.com/daniel229/58998ba723dc08834dac

daniel229 avatar Jan 28 '16 02:01 daniel229

Break on 0x041FE7C0,got this function. https://cloud.githubusercontent.com/assets/3481559/12633684/920ae3b0-c5ae-11e5-8080-fa87a225b250.png

daniel229 avatar Jan 28 '16 03:01 daniel229

Interesting, this uses memcpy and memset. Do the changes in #8359 help?

-[Unknown]

unknownbrackets avatar Jan 28 '16 04:01 unknownbrackets

No,it deosn't.

daniel229 avatar Jan 28 '16 05:01 daniel229

Loading savestate from softgpu,look good. 5

daniel229 avatar Jan 28 '16 07:01 daniel229

v1.2.2-288-g9a11cfb still missing text

sum2012 avatar Apr 10 '16 20:04 sum2012

v1.2.2-288-g9a11cfb log: https://gist.github.com/sum2012/42bfe40c7e65645bdf715521fd751d04

Maybe we need imp SysMemUserForUser_D8DE5C1E() ?

sum2012 avatar Apr 10 '16 21:04 sum2012

Perhaps. It seems that our implementation was from Jpcsp, and they both just return 0. It still doesn't work in Jpcsp, right?

Given it's in sysmem, maybe SysMemUserForUser_D8DE5C1E is an allocation function. Can you change:

ERROR_LOG(SCEKERNEL,"UNIMPL SysMemUserForUser_D8DE5C1E()");

To:

ERROR_LOG(SCEKERNEL,"UNIMPL SysMemUserForUser_D8DE5C1E(%08x, %08x, %08x, %08x, %08x, %08x)", PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));

Wondering what params it uses.

According to Google, some people claim this function is sceKernelSafetyCheck0. If so, maybe it's unlikely it would impact functionality... not sure what it does or is meant to do.

Is it possible to log that func via JpcspTrace?

-[Unknown]

unknownbrackets avatar Apr 10 '16 21:04 unknownbrackets

Modify ppsspp log: https://gist.github.com/sum2012/01991fc9a5a79d6e654af86f58034401

edit: update JPCSPTrace log: https://gist.github.com/sum2012/207d04e4271a7a2bfff74801d9852445

JPCSP render wrong font 1

sum2012 avatar Apr 10 '16 21:04 sum2012

Oh, sorry, just read the history again - this is definitely render-to-texture related somehow, and probably also impacted by expiring FBOs too early. Hmm.

-[Unknown]

unknownbrackets avatar Apr 10 '16 21:04 unknownbrackets

Apparently the JPCSP issue is a flushing issue (which we probably also would share, if we were even rendering properly.)

It renders the labels to a temporary texture, and sets a stall address. It then updates the source texture it's using to render the labels, and switches to the next render target for the next label.

The problem is, when drawing is deferred until state change, the game changing texture RAM doesn't cause flushing. So it draws the next text (with confused UVs) to the target. That's why "OPTION" and "OPTION" twice above, and "CONTINUE" looks funky (since it wants to write "NEW GAME".)

-[Unknown]

unknownbrackets avatar May 14 '17 23:05 unknownbrackets

Ugh, that's such a terrible misuse of hardware :) Ruins parallelism between the CPU and GPU.

So to fix this, we simply need to flush our collected vertices on every stall. Pretty sure that will slow down some games (especially games with large textures, causing more hashing work), though the really high-demanding games usually are smarter than stalling that often so hopefully wouldn't be affected too badly.

Maybe a compat bool....

hrydgard avatar May 15 '17 06:05 hrydgard

Tested that a bit and unfortunately flushing in UpdateStall didn't helped much since nothing shows unless Read framebuffers to memory is used or another frame download hack get's added(with different address per each menu option and some menus have lots more options, largest menu I saw had like 10 positions with fb_address starting from 0x001F3A80, up to 0x001FE7C0).

Using just a new frame download hack it would look alike jpcsp: evangelionjo0 with addition of flush on UpdateStall, while better, it's still messed up: evangelionjo1

The messup is also slightly different for different menu's like here seen right after loading game: evangelionjo2 which should look like: evangelionjo3

Last field as can be seen always ends up outdated ~ taken from previous menu / or empty in case it's first menu. Leaving and re-entering makes that field show correctly since previous menu is then same as current.

Evil game.:]

LunaMoo avatar May 15 '17 17:05 LunaMoo