Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Legend of heroes prophecy of moonlight witch problem
11-30-2018, 01:26 AM
Post: #1
Legend of heroes prophecy of moonlight witch problem
Hi long time lurker first time poster. I recently downloaded the ppsspp for the android but I am having a problem with one of the games, legend of heroes prophecy of moonlight witch. In the game when ever I am in battle mode my character and monster sprites seem to be stuck in a picture. Like they look like unmoving pictures in rectancular box and the surrounding graphic animation just move around the sprites. When I try it on my laptop however it looks just find, so what the problem? What setting do I need to use to fic this, or can someone tell me whats happening to the sprite in the game please.
Find all posts by this user
Quote this message in a reply
11-30-2018, 02:49 PM
Post: #2
RE: Legend of heroes prophecy of moonlight witch problem
Try setting:

* Vertex cache OFF
* Retain changed textures OFF
* Lazy texture caching OFF

They can cause glitches like what you've described.

-[Unknown]
Find all posts by this user
Quote this message in a reply
04-05-2021, 05:49 PM
Post: #3
RE: Legend of heroes prophecy of moonlight witch problem
(11-30-2018 02:49 PM)[Unknown] Wrote:  Try setting:

* Vertex cache OFF
* Retain changed textures OFF
* Lazy texture caching OFF

They can cause glitches like what you've described.

-[Unknown]

Testing builds of PPSSPPSDL git master on AARCH64 linux with Panfrost (FOSS) GPU drivers.
git master commit 39198b53a521ae7d8031303173b1b12164659017 (feb 23, 2021)

API v3.0.0 ES / Shading OpenGL ES GLSL ES 3.00

Build config SDL:Linux, arm64, Driver Mali G52 (Panfrost), NDEBUG // USING_GLES2 // ARM_NEON.

The Legend of Heroes Trails + SC and Crossbel Arc and most games render fine.

Legend of Heroes: Prophecy of the Moonlight Witch and Song of The Ocean (eng) have problems.

Title Screen and videos play fine. The SoTO scripted beginning (seagull flight) renders fine.
[Image: -cjG.jpg]

Tried vertex cache, retain textures and texture caching off.

GPU Driver test reports all okay:
Problem appears under wayland/wayfire and Xorg.

MD5Sums of problem isos:

f8e86ae153bb91c21b922e5ef6337f37 Legend_of_Heroes_2_ProphecyOTMW.iso

02a36b9fbb1b94ec8e43f9bf93219647 Legend_of_Heroes_3-Song_of_TO.iso

I'm guessing it's not a GPU driver issue on my system but rather something specific to PPSSPP and these particular titles. I have tested through many combinations of rendering and cpu options.

Anyone else see similar issues?
Find all posts by this user
Quote this message in a reply
04-08-2021, 03:06 AM
Post: #4
RE: Legend of heroes prophecy of moonlight witch problem
That's bizarre, definitely looks like a driver issue. I've played through Song of the Ocean from start to finish in PPSSPP with no issues, though only on Windows (x64) and Android (aarch64) on a git commit from 2 years ago. But it still works from what I can see.

Different games render differently, and this game might be using a combination of alpha testing and depth testing that Trails in the Sky wouldn't. The driver tests haven't been very comprehensive - they're mostly ones we've reported to vendors specifically.

Are you able to try Vulkan on the same device? We've definitely seen bad Vulkan drivers too, but I think the Mali ones have been pretty decent generally. That chip should be Vulkan capable.

-[Unknown]
Find all posts by this user
Quote this message in a reply
07-13-2021, 08:11 AM (This post was last modified: 07-13-2021 08:29 AM by clort78.)
Post: #5
RE: Legend of heroes prophecy of moonlight witch problem
With 2021-07-12 panfrost drivers and 2021-07-13 ppsspp i get 'tv fuzz' in the first three 'Heroes' games, and Jeanne D'Arc.

There's something these games do differently than the rest I've tested (which render flawlessly).
Heroes...
   
   
   
   

Jeanne...
   

I tried turning off unsafe math optimizations, but that didn't solve. GPU Driver test passed.
   

Aha Brave Story also reveals the error. And i'm going to make a bet it's a glsl shader problem.
   

So the thing to do would be to get a debug out of which shaders are running during particular scenes of games, then see which one of those is broken.
Cheers! Smile
Find all posts by this user
Quote this message in a reply
07-14-2021, 12:58 AM
Post: #6
RE: Legend of heroes prophecy of moonlight witch problem
@clort78 You should be reporting issues on PPSSPP's issue tracker, not in random threads on forums, this for example isn't even main game's thread(we keep 1 per game as a rule to make it easier to find issues, but people who can't read are born each day and the world is in chaos), plus the forums have nowadays more bots than living people making it pretty bad place where your posts might be copy pasted in a few months by some bot trying to act natural.

Take note this is just a driver issue, it might or might not be worked around on PPSSPP side and can be properly resolved only by the driver manufacturer(in case of mobiles often meaning between very long to never).
Also don't be confused by PPSSPP's gpu driver tests passing, those tests are just for some known driver issues and passing them aren't guaranteeing you'll see nice graphics(blah with PSP quality nothing will guarantee that;p), your case might as well bring another test in the future where your driver fails if anyone even figures out why/how it fails.

http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders!
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.
Find all posts by this user
Quote this message in a reply
07-14-2021, 11:08 PM (This post was last modified: 07-14-2021 11:10 PM by clort78.)
Post: #7
RE: Legend of heroes prophecy of moonlight witch problem
(07-14-2021 12:58 AM)LunaMoo Wrote:  Take note this is just a driver issue, it might or might not be worked around on PPSSPP side and can be properly resolved only by the driver manufacturer(in case of mobiles often meaning between very long to never).

Thanks for the reply LunaMoo! I didn't want to spam issues with one i can't provide much info on. I found the 'Shader viewer' in developer tools. If i could toggle them off individually, i might find which one is causing problems.

I'll look at your suggested links as well. I suspect it's a shader causing problems with these (new, WIP) gl-es drivers. They are open-source drivers and anything I can do to narrow down the problem, I'll do.
Find all posts by this user
Quote this message in a reply
07-17-2021, 11:59 PM
Post: #8
RE: Legend of heroes prophecy of moonlight witch problem
You can use this to create a frame dump within PPSSPP:

http://ppsspp-debugger.unknownbrackets.org/

This will create a file you, or others, can open that will re-render the scene. No game code is included, just the instructions (and textures/vertices) used in the scene. I consider is a "3D screenshot."

If this also triggers the issue, it's probably the easiest way to debug it since it will consistently trigger the exact same drawing behavior on every frame.

The second Ocean screenshot you gave seems to be "Poorest of the poor, yourself!". This screen typically has 1125 primitives per frame, and it looks like everything went well up through 1083/1125 of those primitives. The very next draw (the background of the dialog box) seems to have static in your screenshot.

This particular draw has:
* Alpha (in shader), stencil (outside shader), and depth (outside shader) testing
* Alpha test > 0 (implemented as discard if < 0.002 or sometimes optimized into blending, very common in PSP games)
* Stencil test ALWAYS 0x01 (depth and stencil pass: REPLACE stencil, otherwise KEEP existing zero, on impossible stencil fail ZERO)
* Depth test >= (but incoming depth is max value, so this should always pass)
* Standard alpha blending (blend func separate, very common in PSP games)
* Texturing from 32x16 texture (clamp S/T, 8-bit RGBA, nearest/nearest filtering)
* Color doubling (in shader)
* No 3D transform (this means a simpler shader, typically, commonly used for UI)
* No indexing, just direct verts in a triangle fan (might be optimized to another primitive type though for combining draws.)

Nothing about this draw looks unusual, these are pretty standard things you should see in many games, except the color doubling (which is seen most often in PS2 ports.)

Drawing the dialog box is all the game does until the end of the frame.

The text is interesting. That's the 1122 primitive. The texture that's bound has alpha transparency, so it's already the letters drawn in white, but it takes specific letters from the texture as a "letter palette" to draw the sentence. It's using standard blending here as well.

In both these draws, we'd be using dual source blending (SRC1) and separate blend funcs: RGB would use SRC_ALPHA and ONE_MINUS_SRC_ALPHA, but A will be ONE + ZERO (or possibly 1 / 255 for the first depending on if dual source is enabled.)

A lot of games should trigger dual source blending, but maybe that's related.

How does Star Ocean 1 look?

-[Unknown]
Find all posts by this user
Quote this message in a reply
08-06-2021, 08:04 AM
Post: #9
RE: Legend of heroes prophecy of moonlight witch problem
(07-17-2021 11:59 PM)[Unknown] Wrote:  How does Star Ocean 1 look?

-[Unknown]


Thanks for reply. Star Ocean First Departure looks fine in beginning town.

I can take saturday and sunday evening to look into your debugging links. Thanks a lot.


Attached File(s) Thumbnail(s)
   

.txt  debugger_nowork_log.txt (Size: 3.59 KB / Downloads: 291)
Find all posts by this user
Quote this message in a reply
08-11-2021, 01:12 PM (This post was last modified: 08-11-2021 01:19 PM by clort78.)
Post: #10
RE: Legend of heroes prophecy of moonlight witch problem
Debugger was crashing the emulator whenever connect, will see if I can dig up more infomations.

I just picked up a 2015 Pixel C tablet (cortex a57 *4, same cpu/gpu as nvidia jetson nano) with lineageOS 18 + keyboard -- and PPSSPP runs like a charm on the 2560x1800 screen, 4x res, xbrz3 textures, vignette shader. Super impressive as the a57 pretty slow. Even doublespeed up to 60fps is fine.

With the magnetic keyboard it makes for a great couch/bed emulator station (for RPGs at least).

But wow ppsspp looks hyperreal. I've been into virtual machines for about 30 years now. This is such a nice emulator. So well done.
   
Find all posts by this user
Quote this message in a reply
11-03-2021, 02:24 PM
Post: #11
RE: Legend of heroes prophecy of moonlight witch problem
The panfrost bug exposed by PPSSPP appears to have been fixed Oct 29. I will need to build a new kernel to test.

17:53 <alyssa> mediump dual source blending [is broken] indeed. Ok, understood. Will fix this week.
14:31 <alyssa> AreaScout_: 13 files changed, 129 insertions(+), 161 deletions(-)
14:31 <alyssa> turns out that bug you reported was sliiightly nontrivial :-p
Find all posts by this user
Quote this message in a reply
11-04-2021, 04:37 AM
Post: #12
RE: Legend of heroes prophecy of moonlight witch problem
Ah, does that mean it was specific to mediump? Interesting.

Glad to hear the driver bug has seen improvements.

-[Unknown]
Find all posts by this user
Quote this message in a reply
11-29-2021, 12:48 AM
Post: #13
RE: Legend of heroes prophecy of moonlight witch problem
Bug turns out to not be fixed yet. Other priorities have intervened.
https://gitlab.freedesktop.org/mesa/mesa...ests/13714

The shader compiler error:
07:44:894 thread 1 E[SCEDISP]: HLE/sceDisplay.cpp:1000 80000104=sceDisplaySetFrameBuf(04000000, 480, 1, 1): invalid
stride
07:44:933 thread 1 E[SCEDISP]: HLE/sceDisplay.cpp:1000 80000104=sceDisplaySetFrameBuf(04000000, 480, 1, 1): invalid
stride
12
Uninitialized data read after NIR -> BIR
block0 {
2 = MOV.i32 #0x0
4 = LD_VAR_IMM.v4.store.f32.center fau.y, index:0
17 = V2F32_TO_V2F16 4, 4[1]
20 = V2F32_TO_V2F16 4[2], 4[3]
0 = MOV.i32 #0x1819
9.h00 = FCMP.v2f16.lt.m1 20.h11, #0x1819.h00
= DISCARD.b32 9.h00
10 = LOAD.i16.ubo.zext #0x0, #0x0
11 = MOV.i32 17
11[1] = MKVEC.v2i16 20.h00, 10.h00
1 = MOV.i32 #0x0
12 = SWZ.v2i16 #0x0.h00
12[1] = MKVEC.v2i16 #0x0.h00, 20.h11
br4 = MOV.i32 12
br5 = MOV.i32 12[1]
br6 = MOV.i32 12[2]
br7 = MOV.i32 12[3]
br60 = ATEST br60, 11[1].h11
br48 = BLEND 11, br60, blend_descriptor_0, blend_descriptor_0[1], sr_count:2
}

This bug affects all MESA on mali chipsets. If it cannot be worked around perhaps PPSSPP could be tweaked to ask for low or high precision blend?
Find all posts by this user
Quote this message in a reply
12-03-2021, 02:38 AM
Post: #14
RE: Legend of heroes prophecy of moonlight witch problem
In GPU/Common/FragmentShaderGenerator.cpp, if you change:

Code:
            // Output the output color definitions.
            if (stencilToAlpha == REPLACE_ALPHA_DUALSOURCE) {
                WRITE(p, "%s vec4 fragColor0;\n", qualifierColor0);
                WRITE(p, "out vec4 fragColor1;\n");
            } else {
                WRITE(p, "%s vec4 fragColor0;\n", qualifierColor0);
            }

To something like:

Code:
            // Output the output color definitions.
            if (stencilToAlpha == REPLACE_ALPHA_DUALSOURCE) {
                WRITE(p, "%s highp vec4 fragColor0;\n", qualifierColor0);
                WRITE(p, "out highp vec4 fragColor1;\n");
            } else {
                WRITE(p, "%s vec4 fragColor0;\n", qualifierColor0);
            }

Does the problem go away? If yes, what's specifically shown under Settings -> Tools -> System information -> Vendor and Driver Version?

I'm not sure how best to detect MESA.

-[Unknown]
Find all posts by this user
Quote this message in a reply
12-08-2021, 06:14 AM
Post: #15
RE: Legend of heroes prophecy of moonlight witch problem
panfrost dev said "this is our problem, not PPSSPP's". But it's interesting to see results.

Applied change vec4->highp as you suggested and recompiled. Song of the Ocean yields shader compiler error:
Code:
00:23:643 idle0        E[G3D]: OpenGL/GLQueueRunner.cpp:235 Could not link program:
error: linking with uncompiled/unspecialized shader
00:23:643 idle0        E[G3D]: OpenGL/GLQueueRunner.cpp:236 VS desc:
00000000:0000001a THR C Tex
00:23:643 idle0        E[G3D]: OpenGL/GLQueueRunner.cpp:237 FS desc:
00000000:02800022 Tex TexAlpha 2x StenToAlphaDual StenUniform TFuncMod  (failed)
00:23:643 idle0        E[G3D]: OpenGL/GLQueueRunner.cpp:238 VS:
#version 310 es
// Mali-G52 (Panfrost) - GLSL 310
precision highp float;
#define gl_VertexIndex gl_VertexID
#define splat3(x) vec3(x)
#define mul(x, y) ((x) * (y))
in vec4 position;
in vec2 texcoord;
in lowp vec4 color0;
uniform mat4 u_proj_through;
uniform lowp float u_rotation;
out lowp vec4 v_color0;
out mediump vec3 v_texcoord;
void main() {
  v_texcoord = vec3(texcoord, 1.0);
  v_color0 = color0;
  vec4 outPos = mul(u_proj_through, vec4(position.xyz, 1.0));
  gl_Position = outPos;
}


00:23:643 idle0        E[G3D]: OpenGL/GLQueueRunner.cpp:239 FS:
#version 310 es
#extension GL_EXT_blend_func_extended : require
#extension GL_EXT_shader_framebuffer_fetch : require
// Mali-G52 (Panfrost) - GLSL 310
#define DISCARD discard
precision lowp float;
precision highp int;
#define splat3(x) vec3(x)
#define mul(x, y) ((x) * (y))
uniform sampler2D tex;
uniform float u_stencilReplaceValue;
in lowp vec4 v_color0;
in mediump vec3 v_texcoord;
out highp fragColor0;
out highp fragColor1;
void main() {
  vec4 t = texture(tex, v_texcoord.xy);
  vec4 p = v_color0;
  vec4 v = p * t;
  v.rgb = clamp(v.rgb * 2.0, 0.0, 1.0);
  fragColor0 = vec4(v.rgb, u_stencilReplaceValue);
  fragColor1 = vec4(0.0, 0.0, 0.0, v.a);
}

Thanks for the suggestion tho Smile This points me to code to study.[/code]
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: