ppsspp icon indicating copy to clipboard operation
ppsspp copied to clipboard

Unavoidable freeze in Machi

Open genos1213 opened this issue 4 years ago • 22 comments

Game or games this happens in

ULJM05111 - Machi: Unmei no Kousaten

What area of the game / PPSSPP

The game freezes with a black screen when starting the third day with the writer character, 市川.

I tried with Vulkan and OpenGL, and with the interpreter, and on PC. Still freezes.

Here's my save.

ULJM05111DATA01.zip

What should happen

Shouldn't freeze.

Logs

ppsspp.log

Platform

Android

Mobile phone model or graphics card

Xiaomi mi 9t pro

PPSSPP version affected

v1.12.3-383-g0afddcc38

Last working version

No response

Graphics backend (3D API)

OpenGL / GLES

Checklist

  • [X] Test in the latest git build in case it's already fixed.
  • [X] Search for other reports of the same issue.
  • [X] Try resetting settings or older versions and include if the issue is related.
  • [X] Try without any cheats and without loading any save states.
  • [X] Include logs or screenshots of issue.

genos1213 avatar Dec 05 '21 22:12 genos1213

Is this happened recently? or it's been like that for a long time?

If it happened recently, and you can find out which version was the last working version, it would be helpful, as the devs might be able to figured out what's wrong with it and able to fix it sooner, because the devs might not have all the games out there to test it them self.

anr2me avatar Dec 06 '21 03:12 anr2me

I've tried old builds from 2020 and 2016 and it still freezes, so I can only assume it always froze.

genos1213 avatar Dec 06 '21 08:12 genos1213

Btw there was an issue of hang on this game in the past, and it was due to a bad dump https://forums.ppsspp.org/showthread.php?tid=14851 Have you checked the CRC of your dump? You can compare it with the CRC on this site http://redump.org/disc/54493/

Or may be @sum2012 can test your savedata

anr2me avatar Dec 06 '21 12:12 anr2me

My freeze is a lot further in game, and I checked the CRC and it's the same as on that site.

genos1213 avatar Dec 06 '21 12:12 genos1213

This is the last message:

[ME] 80615001=scePsmfGetAudioInfo(09614024, 09614070[00000002]): invalid stream selected

Since I don't see any other log messages, it seems like this would mean the default stream 0 wasn't even valid. Maybe something about that video file is being parsed wrong.

-[Unknown]

unknownbrackets avatar Feb 06 '22 23:02 unknownbrackets

My Good CRC is E5D9E7A7 Anyway , I don't know the instruction to reproduce. Hope can upload in youtube

sum2012 avatar Aug 15 '22 13:08 sum2012

If you look for the ISO file of this game, you will find the game data in the following directory.

\PSP_GAME\USRDIR\SN3\DATA

The file with “pmf” extension is the movie data.

The data of “the third day with the writer character, Ichikawa. is in the file “i3.pmf”.

Other pmf files in this directory can be played by media player classic home cinema on windows, but only “i3.pmf” cannot be played.

I assume that there is a slight defect in the pmf format in “i3.pmf” and that is why it can be played on PSP hardware but not on PPSSPP.

ttxxuser avatar Feb 28 '25 10:02 ttxxuser

@sum2012 @unknownbrackets @anr2me

I have confirmed that the reported issue is reproducible on the latest Windows build. Would a YouTube video be helpful for investigation?

ttxxuser avatar Mar 05 '25 04:03 ttxxuser

Yes, I do not know how to reproduce

在 2025年3月5日週三 下午12:15,ttxxuser @.***> 寫道:

@sum2012 https://github.com/sum2012 @unknownbrackets https://github.com/unknownbrackets @anr2me https://github.com/anr2me

I have confirmed that the reported issue is reproducible on the latest Windows build. Would a YouTube video be helpful for investigation?

— Reply to this email directly, view it on GitHub https://github.com/hrydgard/ppsspp/issues/15203#issuecomment-2699763803, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQTT7BJOFNMZ3VJJLPSBGL2SZ24VAVCNFSM6AAAAABYCAFPHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJZG43DGOBQGM . You are receiving this because you were mentioned.Message ID: @.***> [image: ttxxuser]ttxxuser left a comment (hrydgard/ppsspp#15203) https://github.com/hrydgard/ppsspp/issues/15203#issuecomment-2699763803

@sum2012 https://github.com/sum2012 @unknownbrackets https://github.com/unknownbrackets @anr2me https://github.com/anr2me

I have confirmed that the reported issue is reproducible on the latest Windows build. Would a YouTube video be helpful for investigation?

— Reply to this email directly, view it on GitHub https://github.com/hrydgard/ppsspp/issues/15203#issuecomment-2699763803, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQTT7BJOFNMZ3VJJLPSBGL2SZ24VAVCNFSM6AAAAABYCAFPHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJZG43DGOBQGM . You are receiving this because you were mentioned.Message ID: @.***>

sum2012 avatar Mar 05 '25 04:03 sum2012

@sum2012 This is a video that reproduces the issue using the attached save data.

https://youtu.be/NhyfpTcl0mQ

ttxxuser avatar Mar 05 '25 07:03 ttxxuser

I mark the game as Sound Novel Portable Machi - Unmei no Kosaten Tokubetsu Hen (Japan) (v1.01). The game first have this error 45:53:248 movieThread I[ME]: HW\MediaEngine.cpp:89 FF: decode_slice_header error. Last it keep to output in this log in black screen 45:53:264 movieThread D[ME]: HLE\sceMpeg.cpp:1585 -2141093887=sceMpegGetAvcAu(09614054, 00000001, 096140cc, 09fbca50) Error in earlier in ppsspp 45:53:246 sakiyomi_Thr W[ME]: HLE\scePsmf.cpp:832 0=scePsmfSpecifyStreamWithStreamType(09614024, 1, 0): no stream found 45:53:246 sakiyomi_Thr E[ME]: HLE\scePsmf.cpp:886 -2141106175=scePsmfGetAudioInfo(09614024, 09614070[00000002]): invalid stream selected No problem in JPCSP emulator Attach full log of PPSSPP and JPCSP emulator

Jpcsplog.zip ppsspplogv1.18.1-1284-g9703a57c94.zip

sum2012 avatar Mar 06 '25 13:03 sum2012

https://bbs.a9vg.com/thread-8827464-1-1.html

Machi's Chinese fan translaion patch release page mentioned this issue, it said that it will only appear on PPSSPP and not on real PSP. They created a patch (a valid pan.baidu.com link at the bottom of the post) to fix this issue. However, I am not sure if this patch is valid for all the versions. But perhaps you can find a solution from it.

daaiyinhujun avatar Mar 31 '25 15:03 daaiyinhujun

https://bbs.a9vg.com/thread-8827464-1-1.html

Machi's Chinese fan translaion patch release page mentioned this issue, it said that it will only appear on PPSSPP and not on real PSP. They created a patch (a valid pan.baidu.com link at the bottom of the post) to fix this issue. However, I am not sure if this patch is valid for all the versions. But perhaps you can find a solution from it.

I tried replacing the "i3.pmf" file in my redump-matching iso with the one from that patch, and it seems that the game doesn't freeze on black screen anymore and continues normally. Changing just that file won't affect language, but the rest of the files in that archive are likely related to the Chinese translation and are probably not necessary for this issue. For those who also want to try this workaround, here's a PPF patch that you can apply to the "\USRDIR\SN3\DATA\i3.pmf" file (with UMDGen, for example): i3_patch.zip

redunka-zver avatar Mar 31 '25 21:03 redunka-zver

Please try this: #20200

hrydgard avatar Apr 02 '25 16:04 hrydgard

Do not fixed

sum2012 avatar Apr 02 '25 22:04 sum2012

Yeah, turning HLE off for scePsmf & scePsmfPlayer didn't affect anything, but disabling it for sceMpeg allows the game (aside from breaking all of its audio) to continue farther without freezing at that specific point, even though there will be no proper background images that are supposed to be loaded from that i3.pmf file.

redunka-zver avatar Apr 05 '25 23:04 redunka-zver

ppsspp version 1.2.2 from 2016, if you activate disable alpha test, you can continue for a while until a part where it gets stuck on a word image on the character's forehead. After what you said, it worked and you just need to get past that part and go back to version 1.2.2 and it gets stuck on another part where the character hits the computer with a hammer. In short, the whole day he has to alternate between these 2 versions of the emulator; the next day it seems to not be giving any errors yet. Maybe the Complete Chinese Patch will fix the images with problems. ppsspp version 1.2.2 from 2016, if you activate disable alpha test, you can continue for a while until a part where it gets stuck on a word image on the character's forehead.

After what you said, it worked and you just have to get past that part and go back to version 1.2.2 and it gets stuck on another part where the character is hammering the computer.

In short, the whole day he has to alternate between these 2 versions of the emulator; the next day it seems to not be giving any errors yet.

Maybe the Complete Chinese Patch will fix the images with problems

save The next day

ULJM05111.zip

I completed the game, it was just this part with a problem

Yusukessj avatar Apr 06 '25 14:04 Yusukessj

This i3-patch is a great temporary workaround. My deepest gratitude to @redunka-zver -san and the Chinese fans.

https://bbs.a9vg.com/thread-8827464-1-1.html Machi's Chinese fan translaion patch release page mentioned this issue, it said that it will only appear on PPSSPP and not on real PSP. They created a patch (a valid pan.baidu.com link at the bottom of the post) to fix this issue. However, I am not sure if this patch is valid for all the versions. But perhaps you can find a solution from it.

I tried replacing the "i3.pmf" file in my redump-matching iso with the one from that patch, and it seems that the game doesn't freeze on black screen anymore and continues normally. Changing just that file won't affect language, but the rest of the files in that archive are likely related to the Chinese translation and are probably not necessary for this issue. For those who also want to try this workaround, here's a PPF patch that you can apply to the "\USRDIR\SN3\DATA\i3.pmf" file (with UMDGen, for example): i3_patch.zip

Image Image Image

This is my view based on limited knowledge of PSP hardware and the pmf format video file. When playing the i3.pmf file on VLC media player, it seems to be image series binary file like GIF. It's possible that the PSP hardware reads the i3.pmf without verifying the pmf format, so in specific scenario scenes, it might be extracting the corresponding image frames from i3.pmf.

Cartman0 avatar Nov 15 '25 05:11 Cartman0

@Cartman0 jpcsp emulator work this game. We are still have chance to get correct fix.

sum2012 avatar Nov 15 '25 11:11 sum2012

Primary Difference - Magic Number:

Good file: PSMF0012 (bytes: 50 53 4d 46 30 30 31 32) Bad file: PSMF0014 (bytes: 50 53 4d 46 30 30 31 34)

Use this Magic Number to special handle

line 310 replace with INFO_LOG(Log::ME, "PSMF MPEG data found: magic=%08x ('%c%c%c%c'), full_header=%02x%02x%02x%02x%02x%02x%02x%02x ('%c%c%c%c%c%c%c%c'), id=%02x, privid=%02x, epmoff=%08x, epmnum=%08x, width=%i, height=%i", psmf->magic, (char)((psmf->magic >> 24) & 0xFF), (char)((psmf->magic >> 16) & 0xFF), (char)((psmf->magic >> 8) & 0xFF), (char)(psmf->magic & 0xFF), data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], streamId, privateStreamId, psmf->EPMapOffset, psmf->EPMapEntriesNum, psmf->videoWidth, psmf->videoHeight); } 45:45:009 sakiyomi_Thr I[ME]: HLE\scePsmf.cpp:315 PSMF MPEG data found: magic=464d5350 ('FMSP'), full_header=50534d4630303134 ('PSMF0014'), id=e0, privid=00, epmoff=00000092, epmnum=0000000d, width=0, height=0

Excellent! Now I understand the root cause of the problem. The data at offset 2048 shows: 008800 00 00 01 ba 44 00 05 86 d5 c3 01 86 a3 f8 00 00 The pattern 00 00 01 ba is the MPEG-2 transport stream sync marker! This means the video data after the 2048-byte PSMF header is in MPEG-TS format.

sum2012 avatar Nov 15 '25 21:11 sum2012

Finally AI did it in 16 test with hle psmf . I test remove hle psmf also success

sceMpeg.zip

scePsmf.zip

MediaEngine.zip

sum2012 avatar Nov 16 '25 13:11 sum2012

@Cartman0 here is preview fix .You can also test other games if my change has problem previewfix-PPSSPPWindows64.zip

sum2012 avatar Nov 16 '25 15:11 sum2012