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

Marvel Ultimate Alliance 1 video does not display #9852

Closed
Trokinos opened this issue Jul 18, 2017 · 32 comments
Closed

Marvel Ultimate Alliance 1 video does not display #9852

Trokinos opened this issue Jul 18, 2017 · 32 comments
Labels
GE emulation Backend-independent GPU issues PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Milestone

Comments

@Trokinos
Copy link

Trokinos commented Jul 18, 2017

Hello,

It's been a problem that has existed forever with MUA1 and PPSSPP regardless of the render, someone reported it but the thread was closed due to no feedback
#2053

And as i can't seem to make a "re opening" , i create a new report.

Marvel Ultimate Alliance 1 is playing very well, excepted that every videos similarly to the report said, from the intro to every between-chapters ones will only play the sound and will not display the actual visuals it will stay black, fortunately they don't block the user as you can pass them and the game is fully playable to the end and various replay.

On my search i found out that there was a similar report for the sequel, Marvel Ultimate Alliance 2
#4324
That seemed to have been actually solved .

As i do not own this MUA2 game , i have no idea if the engine is exactly the same , while from screenshot it seems to be i can't confirm, but considering the report is about the same thing (no visual display of the video but sound is working), maybe MUA1 is facing the same problem with PPSSPP

On the latest PPSSPP build i loaded the game for a few seconds with the debugmode (until the video start and some sounds of it can be heard)
The ppsspplog.txt zipped (as even for a few second it's rather huge when unzipped) and uploaded to dropbox in case it can be helpful
https://www.dropbox.com/s/bwcvq5mmgcq2d43/MUA1ppsspplog.zip?dl=0

@unknownbrackets
Copy link
Collaborator

Based on the sequel, this probably means hooking some memcpy function. You'd probably need to set a breakpoint to catch it:

#4324 (comment)

I'm guessing this works properly (if extremely slowly) in the software renderer.

-[Unknown]

@Trokinos
Copy link
Author

Trokinos commented Aug 15, 2017

Hello, as i've never done that i am unsure if i did it right, i looked into the comment you linked and tried to obtain the "breakpoint" with the memory address you asked in the other thread.

Hopefully it is correct and here is the screenshot of the (as i can't seem to be able to attach the screenshot directly despite it's a jpg) breakpoint

http://i.imgur.com/9mxCNH1.jpg

@unknownbrackets
Copy link
Collaborator

That looks very promising - that's probably exactly it.

Now if you go to memstick/PSP/SYSTEM/ppsspp.ini (while PPSSPP is not running) and check for:

FuncHashMap = False

Change it to:

FuncHashMap = True

Then, start PPSSPP and get to this breakpoint just the same as before. Once you find that same spot (the sv.q etc.), right click on it and select "Rename function...". It will probably have something like "z_un_12312312", if so change it to "marvel1_memcpy". If it has a different name (like something that already has memcpy), post that name here instead.

Another thing that would help is to scroll up to the top of the yellow background (it alternates between colors), click the first line, hold shift, and scroll with the mouse wheel to the end to select the entire function. Once it's selected you can right click and select "Copy Instruction (Disasm)", and paste that here.

If it was z_un_, hit OK and then go to Emulation -> Stop (make sure not to just quit PPSSPP directly.) After emulation stops, you can quit.

Back in memstick/PSP/SYSTEM, you should see a new file - knownfuncs.ini. Search for "marvel1", you'll see something like this:

7843e73b47zd3ad1:360 = marvel1_memcpy

Copy that line and comment with it. That'll tell me what I need to know.

Sorry, I know that's a few steps, but with that we can make the video play correctly.

-[Unknown]

@Trokinos
Copy link
Author

Thank you for the detailled instructions, i hope i got it all right,

After right click on the line and renaming marvel1_memcpy ( the original was z_un_08c0deb4 )
I selected the whole yellow stuff (copy instruction (disasm) and i paste here

marvel1_memcpy:

addiu	sp,sp,-0x30
sw	s6,0x28(sp)
move	s6,a0
sw	s3,0x1C(sp)
sw	ra,0x2C(sp)
sw	s5,0x24(sp)
sw	s4,0x20(sp)
sw	s2,0x18(sp)
sw	s1,0x14(sp)
sw	s0,0x10(sp)
lw	v0,0x64(a1)
beq	v0,zero,pos_08C0DF00
move	s3,a1
lw	a1,0x5A50(gp)
move	a0,v0
jal	z_un_08b6978c
move	s2,v0
bne	v0,zero,pos_08C0DF04
nop	

pos_08C0DF00:

li	s2,0

pos_08C0DF04:

beq	s2,zero,pos_08C0E064
li	a0,0x1
lw	v1,0x8(s2)
beq	v1,a0,pos_08C0DF20
lw	v0,0x50(s3)
beql	v0,a0,pos_08C0E570
lw	v0,0x0(s6)

pos_08C0DF20:

beq	v1,zero,pos_08C0DF30
nop	
beql	v0,zero,pos_08C0E558
lw	a2,0x0(s6)

pos_08C0DF30:

bne	v0,zero,pos_08C0E064
li	s5,0
lbu	v1,0x15(s2)
beq	v1,zero,pos_08C0DF78
nop	
lbu	a0,0x16(s2)
beq	a0,zero,pos_08C0DF78
nop	
lw	t3,0x1C(s2)
lw	t4,0x20(s2)
lw	t2,0x58(t3)
lw	t1,0x60(t4)
lw	a0,0x5C(t3)
subu	v1,t1,t2
slt	a1,a0,v1
beq	a1,zero,pos_08C0E3A4
subu	t6,zero,v1
li	s5,0x1

pos_08C0DF78:

lbu	s4,0xC(s2)
bnel	s4,zero,pos_08C0DF94
lw	s0,0x3C(s2)
lbu	t8,0x34(s2)
beql	t8,zero,pos_08C0E320
lw	s1,0x30(s2)

pos_08C0DF90:

lw	s0,0x3C(s2)

pos_08C0DF94:

lw	v1,0x8(s0)
lw	t4,0x8(v1)
bne	t4,zero,pos_08C0DFAC
lw	v0,0x10(s2)
bgtz	v0,pos_08C0E1DC
nop	

pos_08C0DFAC:

addiu	a0,v0,0x1
sw	a0,0x10(s2)
lw	a0,0xC(s0)
lw	t2,0x0(a0)
lw	s1,0x7C(t2)
jalr	s1
li	a1,0x1
lw	a0,0x8(s0)
li	a1,0
lw	t1,0x10(a0)
jal	z_un_08b40024
lw	s1,0x0(t1)
lw	a0,0x10(s0)
lw	a1,0x0(a0)
lw	s0,0x74(a1)
jalr	s0
nop	
lbu	a2,0x16(s2)
sw	s1,0x30(s2)
beq	a2,zero,pos_08C0E048
sb	zero,0x34(s2)
lw	t4,0x18(s3)
li	t3,0x3
beq	t4,t3,pos_08C0E0DC
li	t5,0x7
lw	t6,0x60(s3)
beql	t6,t5,pos_08C0E0B8
lw	v1,0x20(s3)
lw	v0,0x20(s3)
lw	s4,0x24(s3)
lw	a0,0x58(s3)
move	a1,s1
mult	v0,s4
lw	t0,0x0(a0)
lw	v1,0x64(t0)
mflo	a3
sll	a2,a3,0x1

pos_08C0E040:

jalr	v1
nop	

pos_08C0E048:

lbu	v1,0xC(s2)
bnel	v1,zero,pos_08C0E09C
lw	t0,0x0(s6)
beq	s5,zero,pos_08C0E064
nop	
j	pos_08C0DF30
lw	v0,0x50(s3)

pos_08C0E064:

beq	s2,zero,pos_08C0E074
li	v0,0
lw	s5,0x50(s3)
sltiu	v0,s5,0x1

pos_08C0E074:

lw	ra,0x2C(sp)
lw	s6,0x28(sp)
lw	s5,0x24(sp)
lw	s4,0x20(sp)
lw	s3,0x1C(sp)
lw	s2,0x18(sp)
lw	s1,0x14(sp)
lw	s0,0x10(sp)
jr	ra
addiu	sp,sp,0x30

pos_08C0E09C:

move	a0,s6
move	a1,s3
lw	s2,0x68(t0)
jalr	s2
li	a2,0x2
j	pos_08C0E074
li	v0,0x1

pos_08C0E0B8:

lw	t9,0x24(s3)
lw	a0,0x58(s3)
move	a1,s1
mult	v1,t9
lw	t8,0x0(a0)
lw	v1,0x64(t8)
mflo	t7
j	pos_08C0E040
sll	a2,t7,0x2

pos_08C0E0DC:

lw	s0,0x10(s6)
beq	s0,zero,pos_08C0E100
li	a0,0
lw	a1,0x417C(gp)
jal	z_un_08b6978c
move	a0,s0
bne	v0,zero,pos_08C0E100
move	a0,s0
li	a0,0

pos_08C0E100:

jal	z_un_08bae744
li	a1,0x1

pos_08C0E108:

lw	a1,0x60(s3)
li	s0,0x7
beq	a1,s0,pos_08C0E178
lui	t5,0x4000
lw	t7,0x20(s3)
lw	t6,0x24(s3)
lw	a1,0x30(s2)
mult	t7,t6
or	v1,v0,t5
mflo	t4
sll	t3,t4,0x1
addu	v0,a1,t3
beq	a1,v0,pos_08C0E048
nop	

pos_08C0E140:

lv.q	C000,0(a1)
lv.q	C010,16(a1)
lv.q	C020,32(a1)
lv.q	C030,48(a1)
addiu	a1,a1,0x40
sv.q	C000,0(v1),wb
sv.q	C010,16(v1),wb
sv.q	C020,32(v1),wb
sv.q	C030,48(v1),wb
vflush	
bne	a1,v0,pos_08C0E140
addiu	v1,v1,0x40
j	pos_08C0E048
nop	

pos_08C0E178:

lw	a0,0x20(s3)
lw	t2,0x24(s3)
lw	a1,0x30(s2)
lui	s1,0x4000
mult	a0,t2
or	v1,v0,s1
mflo	t1
sll	a2,t1,0x2
addu	v0,a1,a2
beq	a1,v0,pos_08C0E048
nop	

pos_08C0E1A4:

lv.q	C000,0(a1)
lv.q	C010,16(a1)
lv.q	C020,32(a1)
lv.q	C030,48(a1)
addiu	a1,a1,0x40
sv.q	C000,0(v1),wb
sv.q	C010,16(v1),wb
sv.q	C020,32(v1),wb
sv.q	C030,48(v1),wb
vflush	
bne	a1,v0,pos_08C0E1A4
addiu	v1,v1,0x40
j	pos_08C0E048
nop	

pos_08C0E1DC:

lbu	s5,0xC(s2)
bnel	s5,zero,pos_08C0E304
lw	a3,0x0(s6)
jal	zz_sceKernelDelayThreadCB
li	a0,0x1F4
lw	t6,0x18(s3)
li	t5,0x3
beql	t6,t5,pos_08C0E208
lw	s0,0x10(s6)

pos_08C0E200:

j	pos_08C0E074
li	v0,0

pos_08C0E208:

beq	s0,zero,pos_08C0E228
li	a0,0
lw	a1,0x417C(gp)
jal	z_un_08b6978c
move	a0,s0
bne	v0,zero,pos_08C0E228
move	a0,s0
li	a0,0

pos_08C0E228:

jal	z_un_08bae744
li	a1,0x1
lw	t7,0x60(s3)
li	s6,0x7
beq	t7,s6,pos_08C0E2A4
move	a1,v0
lw	v0,0x20(s3)
lw	s4,0x24(s3)
lw	a2,0x30(s2)
lui	t0,0x4000
mult	v0,s4
or	v0,a1,t0
mflo	a3
sll	s1,a3,0x1
addu	a1,a2,s1
beql	a2,a1,pos_08C0E074
li	v0,0

pos_08C0E26C:

lv.q	C000,0(a2)
lv.q	C010,16(a2)
lv.q	C020,32(a2)
lv.q	C030,48(a2)
addiu	a2,a2,0x40
sv.q	C000,0(v0),wb
sv.q	C010,16(v0),wb
sv.q	C020,32(v0),wb
sv.q	C030,48(v0),wb
vflush	
bne	a2,a1,pos_08C0E26C
addiu	v0,v0,0x40
j	pos_08C0E074
li	v0,0

pos_08C0E2A4:

lw	t9,0x24(s3)
lw	s0,0x20(s3)
lw	a2,0x30(s2)
lui	t8,0x4000
mult	s0,t9
mflo	s2
sll	s3,s2,0x2
addu	a1,a2,s3
beq	a2,a1,pos_08C0E200
or	v0,v0,t8

pos_08C0E2CC:

lv.q	C000,0(a2)
lv.q	C010,16(a2)
lv.q	C020,32(a2)
lv.q	C030,48(a2)
addiu	a2,a2,0x40
sv.q	C000,0(v0),wb
sv.q	C010,16(v0),wb
sv.q	C020,32(v0),wb
sv.q	C030,48(v0),wb
vflush	
bne	a2,a1,pos_08C0E2CC
addiu	v0,v0,0x40
j	pos_08C0E074
li	v0,0

pos_08C0E304:

move	a0,s6
move	a1,s3
lw	s1,0x68(a3)
jalr	s1
li	a2,0x2
j	pos_08C0E074
li	v0,0

pos_08C0E320:

lw	s4,0x38(s2)
sw	s1,0x0(sp)
lw	a0,0x10(s4)
lw	v0,0x0(a0)
lw	s0,0x7C(v0)
jalr	s0
li	a1,0x1
lw	s0,0x8(s4)
lw	s1,0x8(s0)
lw	a2,0xC(s0)
slt	t9,s1,a2
beq	t9,zero,pos_08C0E38C
addiu	a3,s1,0x1
sw	a3,0x8(s0)
lw	t3,0x10(s0)

pos_08C0E35C:

lw	t2,0x0(sp)
sll	a0,s1,0x2
addu	t1,a0,t3
sw	t2,0x0(t1)
lw	a0,0xC(s4)
lw	a1,0x0(a0)
lw	s4,0x74(a1)
jalr	s4
nop	
li	t0,0x1
j	pos_08C0DF90
sb	t0,0x34(s2)

pos_08C0E38C:

addiu	a1,s1,0x1
move	a0,s0
jal	z_un_08b3fafc
li	a2,0x4
j	pos_08C0E35C
lw	t3,0x10(s0)

pos_08C0E3A4:

slt	t5,a0,t6
beq	t5,zero,pos_08C0DF78
nop	
lbu	t7,0x34(s2)
bne	t7,zero,pos_08C0DF78
nop	
lbu	t8,0xC(s2)
bne	t8,zero,pos_08C0E048
li	t9,0x3
lw	a3,0x18(s3)
beql	a3,t9,pos_08C0E458
lw	s0,0x10(s6)
li	t7,0x1

pos_08C0E3D8:

lw	s4,0x38(s2)
sw	t7,0x4(sp)
lw	a0,0x10(s4)
lw	t6,0x0(a0)
lw	s0,0x7C(t6)
jalr	s0
li	a1,0x1
lw	s0,0x8(s4)
lw	s1,0x8(s0)
lw	t5,0xC(s0)
slt	a1,s1,t5
beq	a1,zero,pos_08C0E440
addiu	t8,s1,0x1
sw	t8,0x8(s0)
lw	v0,0x10(s0)

pos_08C0E414:

lw	t0,0x4(sp)
sll	t1,s1,0x2
addu	a3,t1,v0
sw	t0,0x0(a3)
lw	a0,0xC(s4)
lw	t9,0x0(a0)
lw	s4,0x74(t9)
jalr	s4
nop	
j	pos_08C0E048
nop	

pos_08C0E440:

addiu	a1,s1,0x1
move	a0,s0
jal	z_un_08b3fafc
li	a2,0x4
j	pos_08C0E414
lw	v0,0x10(s0)

pos_08C0E458:

beq	s0,zero,pos_08C0E478
li	a0,0
lw	a1,0x417C(gp)
jal	z_un_08b6978c
move	a0,s0
bne	v0,zero,pos_08C0E478
move	a0,s0
li	a0,0

pos_08C0E478:

jal	z_un_08bae744
li	a1,0x1
lw	s4,0x60(s3)
li	t0,0x7
beq	s4,t0,pos_08C0E4F4
move	a2,v0
lw	t4,0x20(s3)
lw	t3,0x24(s3)
lw	a1,0x30(s2)
lui	a0,0x4000
mult	t4,t3
or	v1,v0,a0
mflo	t2
sll	a2,t2,0x1
addu	v0,a1,a2
beq	a1,v0,pos_08C0E3D8
li	t7,0x1

pos_08C0E4BC:

lv.q	C000,0(a1)
lv.q	C010,16(a1)
lv.q	C020,32(a1)
lv.q	C030,48(a1)
addiu	a1,a1,0x40
sv.q	C000,0(v1),wb
sv.q	C010,16(v1),wb
sv.q	C020,32(v1),wb
sv.q	C030,48(v1),wb
vflush	
bne	a1,v0,pos_08C0E4BC
addiu	v1,v1,0x40
j	pos_08C0E3D8
li	t7,0x1

pos_08C0E4F4:

lw	v1,0x24(s3)
lw	s1,0x20(s3)
lw	a1,0x30(s2)
lui	v0,0x4000
mult	s1,v1
or	v1,a2,v0
mflo	t1
sll	s0,t1,0x2
addu	v0,a1,s0
beq	a1,v0,pos_08C0E3D8
li	t7,0x1

pos_08C0E520:

lv.q	C000,0(a1)
lv.q	C010,16(a1)
lv.q	C020,32(a1)
lv.q	C030,48(a1)
addiu	a1,a1,0x40
sv.q	C000,0(v1),wb
sv.q	C010,16(v1),wb
sv.q	C020,32(v1),wb
sv.q	C030,48(v1),wb
vflush	
bne	a1,v0,pos_08C0E520
addiu	v1,v1,0x40
j	pos_08C0E3D8
li	t7,0x1

pos_08C0E558:

move	a0,s6
lw	s0,0x64(a2)
jalr	s0
move	a1,s3
j	pos_08C0DF30
lw	v0,0x50(s3)

pos_08C0E570:

move	a0,s6
move	a1,s3
lw	s0,0x68(v0)
jalr	s0
li	a2,0x1
j	pos_08C0DF30
lw	v0,0x50(s3)

Looking into the newly created , i found
a1c9b0a2c71235bf:1752 = marvel1_memcpy

hopefully i didn't made a misclick anywhere

unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Aug 19, 2017
Not tested - but should make videos visible in Marvel Ultimate Alliance 1.

See hrydgard#9852.
unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Aug 19, 2017
Not tested - but should make videos visible in Marvel Ultimate Alliance 1.

See hrydgard#9852.
@unknownbrackets
Copy link
Collaborator

That looks right. The latest git build - v1.4.2-365-g641c5f36f - should contain hooks for that function which may make the video work.

-[Unknown]

@Trokinos
Copy link
Author

Hello,

I downloaded and just tested on ppsspp-v1.4.2-365-g641c5f36f-windows-x86
There's a big improvement as it's not complete black screen with only sound working for all the videos anymore, there's now visuals.

But it's not yet fully working unfortunately as there's some kind of alternating for the visuals between video and black screen every half or lower of seconds, basically the video flickers between the actual video and the black screen.

I tried turning on/off nearly all the video settings without any positive/negative improvement
Until i disabled "Simulate block transfert effect"
(that is always on by default)
Doing this fixed that odd visual (as the sound always worked correctly) flicker completely, the videos can be seen in their full glory on ppsspp.
I have not yet replayed the game to see if there's some bad effect with it when "Simulate block transfert effect" is off, but will do and report it if there's a problem.

Thank you very much for your work.

@Trokinos
Copy link
Author

Trokinos commented Aug 20, 2017

Managed to get some time today to complete the whole first mission and was able to see the next video before the tony stark hub.
No problem seems to have happened despite the "Simulate block transfert effect" being disabled, as every missions are long and involve multiple loading through each stages of it , i assume with the whole 1st mission having worked with the videos too that the problem is definitively fixed thanks to your commits.

So far it looks good, i do not close this report as i'm unsure if you consider the video only working correctly with "Simulate block transfert effect" disabled being acceptable, so i'll leave it to you.

Thanks anyways.

@unknownbrackets
Copy link
Collaborator

Hmm, if you turn that off in a previous version, before that recent patch, does it help?

This could mean that we're detecting some operations which is clearing the buffer, but not properly detecting an operation that is uploading the video to it.

It might work fine, but ideally, it'd be best to make as many games as possible work on default settings.

-[Unknown]

@Trokinos
Copy link
Author

Before your fix, turning "Simulate block transfert effect" off wasn't doing anything to improve the problem with the videos in that game, at least not in the versions of PPSSPP i have regularly used, they were always black screen regardless of any setting.

It's only since your fix that turning it off fixed the video completely.

@unknownbrackets
Copy link
Collaborator

Interesting. In theory, my change should do nothing when "Simulate block transfer effects" is disabled. What I did was add more code to the block transfer effect simulation code.

So given that it did help, it may mean that it's something to do with flushing (maybe the game isn't switching render targets when drawing the video), or it's just invalidating a texture.

Can you try one more debugger? It's the GE debugger. There's a wiki about it:

https://github.com/hrydgard/ppsspp/wiki/How-to-find-a-graphic-issue-with-the-GE-debugger

What I'm interested in is: do you ever see the video on the smaller left side preview in the GE debugger, if you click "Step Prim" during the video? Or does it only ever show on the right side, or not even show on the right side?

-[Unknown]

@Trokinos
Copy link
Author

Trokinos commented Aug 23, 2017

Something odd to add, without "Simulate block transfer effects" disabled is that the flicker between the actual video and the black screen occurs really fast, less than half a second for it

But for the intro video, the flicker is slower : the correct visual is appearing for half a second, then 2 or 3 second of black screen then the visual for half of a second then 2 or 3 second of black screen etc...

i tried the GE debugger, set "Step Frame" during the intro video , it's a black screen and it looks lik e it's only on the left side here's screenshots of the result for all the GE Debugger tabs
http://imgur.com/a/wQlzH

After "Step Prim" the result is red and still only on left side, and for all the GE Debugger tabs
http://imgur.com/a/OT6l8

After that as mentionned in the link, i pressed "Step Prim" a bunch of time but the result is always red

note : all of this with "Simulate block transfer effects" enabled as it's when this video flicker between visual and black screen happens

@JoaoVitorApolinario
Copy link

Hi, I'm having the same problem in version 1.6.3 on android, just black screen and sound, anyone can help me?

@hrydgard
Copy link
Owner

@JoaoVitorApolinario In this game specifically? With default settings?

@JoaoVitorApolinario
Copy link

Yes, just in that game, with the default settings. I tried it on windows, ppsspp version 1.6.3, and the same problem happens.

@mikewpk
Copy link

mikewpk commented Jul 26, 2019

I am having this same issue on android 1.8.0 from the play store as well as v1.8.0-440-g734658b80. I tried both backends and with simulate block transfer on and off on both. I get audio for the videos but no visuals for any of them.

@mikewpk
Copy link

mikewpk commented Sep 18, 2019

I just tried v1.8.0-628-g07a5adc8e and videos still do not display normally, audio plays with a black screen. I noticed though that if you bring up the menu while a video is playing and switch between buffered rendering and skip buffer effects and then resume it will display a frame of the video and then goes black again. You can repeat this over and over and see a frame of video after each switch.

@Panderner
Copy link
Contributor

Panderner commented Apr 3, 2020

Here's a logs for screenshot:
Screenshot_2020-04-03-12-42-39-27

@mikewpk
Copy link

mikewpk commented May 31, 2020

Just tried ppsspp-v1.9.3-981-g288fe3ade on android 9 (samsung s8, sd835 version) and videos still do not display. Sound plays fine. I tried vulkun and opengl backends. If you change buffered rendering on and off while a video is playing you get a frame of picture and then back to a black screen again.

@hrydgard hrydgard added this to the v1.11.0 milestone May 31, 2020
@hrydgard hrydgard added GE emulation Backend-independent GPU issues PSMF / MPEG Issue involves scePsmf or sceMpeg video playback. labels May 31, 2020
@hrydgard hrydgard modified the milestones: v1.11.0, v1.12.0 Dec 13, 2020
@sum2012
Copy link
Collaborator

sum2012 commented Jan 30, 2021

v1.10.3-1682-gc251d69ea same isssue.
Soft gpu solve.

@hrydgard
Copy link
Owner

Ok, that's interesting, we're missing the copy to display somehow. Should be fixable. Targeting 1.12.

@unknownbrackets
Copy link
Collaborator

Maybe the signature of the func is different in other regions? Or maybe there's some issue with #9915 - it was always only based on the pasted assembly.

-[Unknown]

@mikewpk
Copy link

mikewpk commented Feb 1, 2021

From a quick look it appears there are 3 versions released. I had been using an original usa copy and it is straight black screen with audio only. I tried the other 2 versions (usa greatest hits and eur) and I get audio and video mixed with black frames so it is like a flickering video. Better than no video but hard to watch.
Recap:
USA - black screen
USA greatest hits - flickering video
EUR - flickering video

This was on v1.10.3-1718-gc1fa4958d. Win x64. D3d11 and vulkun. Buffered rendering on and off, was the same with both.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 17, 2021

In the jpcsp commit b40c65dc5596b25f1c82556d80f2dc42398afd05
this change make video black screen

@sum2012
Copy link
Collaborator

sum2012 commented Feb 20, 2021

jpcsp don't require mem upload so that that change is not usage
edit: sum2012/jpcsp-1@e2f91e1

@sum2012
Copy link
Collaborator

sum2012 commented Feb 21, 2021

I have set a breakpoint at 0x04044100 for 0x100 bytes
FuncHashMap = True

If it was z_un_, hit OK and then go to Emulation -> Stop (make sure not to just quit PPSSPP directly.) After emulation stops, you can quit.

Back in memstick/PSP/SYSTEM, you should see a new file - knownfuncs.ini. Search for "marvel1", you'll see something like this:
I don't see anything in knownfuncs.ini
Please help @hrydgard @unknownbrackets

Anyway disasm

marvel3_memcpy:

addiu	sp,sp,-0x30
sw	s6,0x28(sp)
move	s6,a0
sw	s3,0x1C(sp)
sw	ra,0x2C(sp)
sw	s5,0x24(sp)
sw	s4,0x20(sp)
sw	s2,0x18(sp)
sw	s1,0x14(sp)
sw	s0,0x10(sp)
lw	v0,0x64(a1)
beq	v0,zero,pos_08C0DD2C
move	s3,a1
lw	a1,0x5A4C(gp)
move	a0,v0
jal	z_un_08b695b8
move	s2,v0
bne	v0,zero,pos_08C0DD30
nop	

pos_08C0DD2C:

li	s2,0

pos_08C0DD30:

beq	s2,zero,pos_08C0DE90
li	a0,0x1
lw	v1,0x8(s2)
beq	v1,a0,pos_08C0DD4C
lw	v0,0x50(s3)
beql	v0,a0,pos_08C0E39C
lw	v0,0x0(s6)

pos_08C0DD4C:

beq	v1,zero,pos_08C0DD5C
nop	
beql	v0,zero,pos_08C0E384
lw	a2,0x0(s6)

pos_08C0DD5C:

bne	v0,zero,pos_08C0DE90
li	s5,0
lbu	v1,0x15(s2)
beq	v1,zero,pos_08C0DDA4
nop	
lbu	a0,0x16(s2)
beq	a0,zero,pos_08C0DDA4
nop	
lw	t3,0x1C(s2)
lw	t4,0x20(s2)
lw	t2,0x58(t3)
lw	t1,0x60(t4)
lw	a0,0x5C(t3)
subu	v1,t1,t2
slt	a1,a0,v1
beq	a1,zero,pos_08C0E1D0
subu	t6,zero,v1
li	s5,0x1

pos_08C0DDA4:

lbu	s4,0xC(s2)
bnel	s4,zero,pos_08C0DDC0
lw	s0,0x3C(s2)
lbu	t8,0x34(s2)
beql	t8,zero,pos_08C0E14C
lw	s1,0x30(s2)

pos_08C0DDBC:

lw	s0,0x3C(s2)

pos_08C0DDC0:

lw	v1,0x8(s0)
lw	t4,0x8(v1)
bne	t4,zero,pos_08C0DDD8
lw	v0,0x10(s2)
bgtz	v0,pos_08C0E008
nop	

pos_08C0DDD8:

addiu	a0,v0,0x1
sw	a0,0x10(s2)
lw	a0,0xC(s0)
lw	t2,0x0(a0)
lw	s1,0x7C(t2)
jalr	s1
li	a1,0x1
lw	a0,0x8(s0)
li	a1,0
lw	t1,0x10(a0)
jal	z_un_08b3fe50
lw	s1,0x0(t1)
lw	a0,0x10(s0)
lw	a1,0x0(a0)
lw	s0,0x74(a1)
jalr	s0
nop	
lbu	a2,0x16(s2)
sw	s1,0x30(s2)
beq	a2,zero,pos_08C0DE74
sb	zero,0x34(s2)
lw	t4,0x18(s3)
li	t3,0x3
beq	t4,t3,pos_08C0DF08
li	t5,0x7
lw	t6,0x60(s3)
beql	t6,t5,pos_08C0DEE4
lw	v1,0x20(s3)
lw	v0,0x20(s3)
lw	s4,0x24(s3)
lw	a0,0x58(s3)
move	a1,s1
mult	v0,s4
lw	t0,0x0(a0)
lw	v1,0x64(t0)
mflo	a3
sll	a2,a3,0x1

pos_08C0DE6C:

jalr	v1
nop	

pos_08C0DE74:

lbu	v1,0xC(s2)
bnel	v1,zero,pos_08C0DEC8
lw	t0,0x0(s6)
beq	s5,zero,pos_08C0DE90
nop	
j	pos_08C0DD5C
lw	v0,0x50(s3)

pos_08C0DE90:

beq	s2,zero,pos_08C0DEA0
li	v0,0
lw	s5,0x50(s3)
sltiu	v0,s5,0x1

pos_08C0DEA0:

lw	ra,0x2C(sp)
lw	s6,0x28(sp)
lw	s5,0x24(sp)
lw	s4,0x20(sp)
lw	s3,0x1C(sp)
lw	s2,0x18(sp)
lw	s1,0x14(sp)
lw	s0,0x10(sp)
jr	ra
addiu	sp,sp,0x30

pos_08C0DEC8:

move	a0,s6
move	a1,s3
lw	s2,0x68(t0)
jalr	s2
li	a2,0x2
j	pos_08C0DEA0
li	v0,0x1

pos_08C0DEE4:

lw	t9,0x24(s3)
lw	a0,0x58(s3)
move	a1,s1
mult	v1,t9
lw	t8,0x0(a0)
lw	v1,0x64(t8)
mflo	t7
j	pos_08C0DE6C
sll	a2,t7,0x2

pos_08C0DF08:

lw	s0,0x10(s6)
beq	s0,zero,pos_08C0DF2C
li	a0,0
lw	a1,0x4178(gp)
jal	z_un_08b695b8
move	a0,s0
bne	v0,zero,pos_08C0DF2C
move	a0,s0
li	a0,0

pos_08C0DF2C:

jal	z_un_08bae570
li	a1,0x1

pos_08C0DF34:

lw	a1,0x60(s3)
li	s0,0x7
beq	a1,s0,pos_08C0DFA4
lui	t5,0x4000
lw	t7,0x20(s3)
lw	t6,0x24(s3)
lw	a1,0x30(s2)
mult	t7,t6
or	v1,v0,t5
mflo	t4
sll	t3,t4,0x1
addu	v0,a1,t3
beq	a1,v0,pos_08C0DE74
nop	

pos_08C0DF6C:

lv.q	C000,0(a1)
lv.q	C010,16(a1)
lv.q	C020,32(a1)
lv.q	C030,48(a1)
addiu	a1,a1,0x40
sv.q	C000,0(v1),wb
sv.q	C010,16(v1),wb
sv.q	C020,32(v1),wb
sv.q	C030,48(v1),wb
vflush	
bne	a1,v0,pos_08C0DF6C
addiu	v1,v1,0x40
j	pos_08C0DE74
nop	

pos_08C0DFA4:

lw	a0,0x20(s3)
lw	t2,0x24(s3)
lw	a1,0x30(s2)
lui	s1,0x4000
mult	a0,t2
or	v1,v0,s1
mflo	t1
sll	a2,t1,0x2
addu	v0,a1,a2
beq	a1,v0,pos_08C0DE74
nop	

pos_08C0DFD0:

lv.q	C000,0(a1)
lv.q	C010,16(a1)
lv.q	C020,32(a1)
lv.q	C030,48(a1)
addiu	a1,a1,0x40
sv.q	C000,0(v1),wb
sv.q	C010,16(v1),wb
sv.q	C020,32(v1),wb
sv.q	C030,48(v1),wb
vflush	
bne	a1,v0,pos_08C0DFD0
addiu	v1,v1,0x40
j	pos_08C0DE74
nop	

pos_08C0E008:

lbu	t5,0xC(s2)
bnel	t5,zero,pos_08C0E130
lw	a3,0x0(s6)
bne	s5,zero,pos_08C0DEA0
li	v0,0
lw	t6,0x18(s3)
li	s5,0x3
beql	t6,s5,pos_08C0E034
lw	s0,0x10(s6)

pos_08C0E02C:

j	pos_08C0DEA0
li	v0,0

pos_08C0E034:

beq	s0,zero,pos_08C0E054
li	a0,0
lw	a1,0x4178(gp)
jal	z_un_08b695b8
move	a0,s0
bne	v0,zero,pos_08C0E054
move	a0,s0
li	a0,0

pos_08C0E054:

jal	z_un_08bae570
li	a1,0x1
lw	t7,0x60(s3)
li	s6,0x7
beq	t7,s6,pos_08C0E0D0
move	a1,v0
lw	v0,0x20(s3)
lw	s4,0x24(s3)
lw	a2,0x30(s2)
lui	t0,0x4000
mult	v0,s4
or	v0,a1,t0
mflo	a3
sll	s1,a3,0x1
addu	a1,a2,s1
beql	a2,a1,pos_08C0DEA0
li	v0,0

pos_08C0E098:

lv.q	C000,0(a2)
lv.q	C010,16(a2)
lv.q	C020,32(a2)
lv.q	C030,48(a2)
addiu	a2,a2,0x40
sv.q	C000,0(v0),wb
sv.q	C010,16(v0),wb
sv.q	C020,32(v0),wb
sv.q	C030,48(v0),wb
vflush	
bne	a2,a1,pos_08C0E098
addiu	v0,v0,0x40
j	pos_08C0DEA0
li	v0,0

pos_08C0E0D0:

lw	t9,0x24(s3)
lw	s0,0x20(s3)
lw	a2,0x30(s2)
lui	t8,0x4000
mult	s0,t9
mflo	s2
sll	s3,s2,0x2
addu	a1,a2,s3
beq	a2,a1,pos_08C0E02C
or	v0,v0,t8

pos_08C0E0F8:

lv.q	C000,0(a2)
lv.q	C010,16(a2)
lv.q	C020,32(a2)
lv.q	C030,48(a2)
addiu	a2,a2,0x40
sv.q	C000,0(v0),wb
sv.q	C010,16(v0),wb
sv.q	C020,32(v0),wb
sv.q	C030,48(v0),wb
vflush	
bne	a2,a1,pos_08C0E0F8
addiu	v0,v0,0x40
j	pos_08C0DEA0
li	v0,0

pos_08C0E130:

move	a0,s6
move	a1,s3
lw	s1,0x68(a3)
jalr	s1
li	a2,0x2
j	pos_08C0DEA0
li	v0,0

pos_08C0E14C:

lw	s4,0x38(s2)
sw	s1,0x0(sp)
lw	a0,0x10(s4)
lw	v0,0x0(a0)
lw	s0,0x7C(v0)
jalr	s0
li	a1,0x1
lw	s0,0x8(s4)
lw	s1,0x8(s0)
lw	a2,0xC(s0)
slt	t9,s1,a2
beq	t9,zero,pos_08C0E1B8
addiu	a3,s1,0x1
sw	a3,0x8(s0)
lw	t3,0x10(s0)

pos_08C0E188:

lw	t2,0x0(sp)
sll	a0,s1,0x2
addu	t1,a0,t3
sw	t2,0x0(t1)
lw	a0,0xC(s4)
lw	a1,0x0(a0)
lw	s4,0x74(a1)
jalr	s4
nop	
li	t0,0x1
j	pos_08C0DDBC
sb	t0,0x34(s2)

pos_08C0E1B8:

addiu	a1,s1,0x1
move	a0,s0
jal	z_un_08b3f928
li	a2,0x4
j	pos_08C0E188
lw	t3,0x10(s0)

pos_08C0E1D0:

slt	t5,a0,t6
beq	t5,zero,pos_08C0DDA4
nop	
lbu	t7,0x34(s2)
bne	t7,zero,pos_08C0DDA4
nop	
lbu	t8,0xC(s2)
bne	t8,zero,pos_08C0DE74
li	t9,0x3
lw	a3,0x18(s3)
beql	a3,t9,pos_08C0E284
lw	s0,0x10(s6)
li	t7,0x1

pos_08C0E204:

lw	s4,0x38(s2)
sw	t7,0x4(sp)
lw	a0,0x10(s4)
lw	t6,0x0(a0)
lw	s0,0x7C(t6)
jalr	s0
li	a1,0x1
lw	s0,0x8(s4)
lw	s1,0x8(s0)
lw	t5,0xC(s0)
slt	a1,s1,t5
beq	a1,zero,pos_08C0E26C
addiu	t8,s1,0x1
sw	t8,0x8(s0)
lw	v0,0x10(s0)

pos_08C0E240:

lw	t0,0x4(sp)
sll	t1,s1,0x2
addu	a3,t1,v0
sw	t0,0x0(a3)
lw	a0,0xC(s4)
lw	t9,0x0(a0)
lw	s4,0x74(t9)
jalr	s4
nop	
j	pos_08C0DE74
nop	

pos_08C0E26C:

addiu	a1,s1,0x1
move	a0,s0
jal	z_un_08b3f928
li	a2,0x4
j	pos_08C0E240
lw	v0,0x10(s0)

pos_08C0E284:

beq	s0,zero,pos_08C0E2A4
li	a0,0
lw	a1,0x4178(gp)
jal	z_un_08b695b8
move	a0,s0
bne	v0,zero,pos_08C0E2A4
move	a0,s0
li	a0,0

pos_08C0E2A4:

jal	z_un_08bae570
li	a1,0x1
lw	s4,0x60(s3)
li	t0,0x7
beq	s4,t0,pos_08C0E320
move	a2,v0
lw	t4,0x20(s3)
lw	t3,0x24(s3)
lw	a1,0x30(s2)
lui	a0,0x4000
mult	t4,t3
or	v1,v0,a0
mflo	t2
sll	a2,t2,0x1
addu	v0,a1,a2
beq	a1,v0,pos_08C0E204
li	t7,0x1

pos_08C0E2E8:

lv.q	C000,0(a1)
lv.q	C010,16(a1)
lv.q	C020,32(a1)
lv.q	C030,48(a1)
addiu	a1,a1,0x40
sv.q	C000,0(v1),wb
sv.q	C010,16(v1),wb
sv.q	C020,32(v1),wb
sv.q	C030,48(v1),wb
vflush	
bne	a1,v0,pos_08C0E2E8
addiu	v1,v1,0x40
j	pos_08C0E204
li	t7,0x1

pos_08C0E320:

lw	v1,0x24(s3)
lw	s1,0x20(s3)
lw	a1,0x30(s2)
lui	v0,0x4000
mult	s1,v1
or	v1,a2,v0
mflo	t1
sll	s0,t1,0x2
addu	v0,a1,s0
beq	a1,v0,pos_08C0E204
li	t7,0x1

pos_08C0E34C:

lv.q	C000,0(a1)
lv.q	C010,16(a1)
lv.q	C020,32(a1)
lv.q	C030,48(a1)
addiu	a1,a1,0x40
sv.q	C000,0(v1),wb
sv.q	C010,16(v1),wb
sv.q	C020,32(v1),wb
sv.q	C030,48(v1),wb
vflush	
bne	a1,v0,pos_08C0E34C
addiu	v1,v1,0x40
j	pos_08C0E204
li	t7,0x1

pos_08C0E384:

move	a0,s6
lw	s0,0x64(a2)
jalr	s0
move	a1,s3
j	pos_08C0DD5C
lw	v0,0x50(s3)

pos_08C0E39C:

move	a0,s6
move	a1,s3
lw	s0,0x68(v0)
jalr	s0
li	a2,0x1
j	pos_08C0DD5C
lw	v0,0x50(s3)

@sum2012
Copy link
Collaborator

sum2012 commented Feb 21, 2021

I finally figure that need video play finish before stop
9b76c7f2a41aa805:1752 = marvel3_memcpy

EDIT that is Marvel Ultimate Alliance 1 us- ULUS10167

@sum2012
Copy link
Collaborator

sum2012 commented Feb 28, 2021

What is game ID of "USA greatest hits" ?

@unknownbrackets
Copy link
Collaborator

Looks like it's just 2.00 or else no one has ever reported it with PPSSPP:
https://report.ppsspp.org/game/ULUS10167_2.00

-[Unknown]

@hrydgard hrydgard modified the milestones: v1.12.0, Future Aug 21, 2021
@sum2012
Copy link
Collaborator

sum2012 commented Aug 25, 2022

v1.13.1-522-g90c58ae9b video still black in usa version

@mikewpk
Copy link

mikewpk commented Nov 7, 2022

I just tried ppsspp-v1.13.2-1838-gc6116581b-android.apk and still same black screen in vulkan and opengl.

Videos do play fine in the software renderer. Any chance of an option to switch to software rendering just for videos similar to the option in pcsx2?

unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Nov 8, 2022
See hrydgard#9852.  Appears to be the same basic func, but something resulted in a
different hash.  Register use for from/to seems the same.
@unknownbrackets
Copy link
Collaborator

#16359 may fix this for the US version. I don't have it (or the EU version) to test, but based on the paste the func looks basically the same.

-[Unknown]

unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Nov 8, 2022
See hrydgard#9852.  Appears to be the same basic func, but something resulted in a
different hash.  Register use for from/to seems the same.
unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Nov 12, 2022
See hrydgard#9852.  Appears to be the same basic func, but something resulted in a
different hash.  Register use for from/to seems the same.
@Panderner
Copy link
Contributor

It's finally fixed now for all versions of this game including EU version thanks to #16359:
ULUS10167_00000

@sum2012 sum2012 closed this as completed Nov 12, 2022
@sum2012 sum2012 modified the milestones: Future, v1.14.0 Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Projects
None yet
Development

No branches or pull requests

7 participants