hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.15k stars 2.16k forks source link

Error in sce_lbn handling in Ys 7 Intro #377

Closed realrunners closed 11 years ago

realrunners commented 11 years ago

@unknownbrackets : It turns out there must be a small error in handling lbn. When playing Ys 7 the Falcom logo plays well now, the (in-game-graphic) intro sequence is also good but playing the movie intro sequence results in an error loop. Maybe it has something to do with the movie being longer than 60 sec?

58:33:921 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:33:936 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:33:952 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:33:952 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:33:968 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:33:968 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:33:999 f:\ppsspp\ppsspp\core\hle\sceKernel.h:363 E[HLE]: Kernel: Bad object handle 334 (0000014e) 58:33:999 HLE\sceIo.cpp:861 E[HLE]: ERROR - sceIoPollAsync waiting for invalid id 334 58:33:999 HLE\sceAtrac.cpp:69 E[HLE]: UNIMPL sceAtracAddStreamData(0, 00040000) 58:33:999 HLE\sceAtrac.cpp:191 E[HLE]: sceAtracGetRemainFrame(0, 08c1aa64) 58:33:999 HLE\sceAtrac.cpp:80 E[HLE]: FAKE sceAtracDecodeData(0, 092f5e18, 09f9f484, 08c1aa44, 08c1aa64) 58:33:999 HLE\sceAtrac.cpp:227 E[HLE]: FAKE sceAtracGetStreamDataInfo(0, 08c1aa88, 08c1aa3c, 08c1aa40) 58:33:999 HLE\sceIo.cpp:311 E[HLE]: sceIoRead Reading into bad pointer 00000000 58:33:999 f:\ppsspp\ppsspp\core\hle\sceKernel.h:363 E[HLE]: Kernel: Bad object handle 334 (0000014e) 58:33:999 HLE\sceIo.cpp:861 E[HLE]: ERROR - sceIoPollAsync waiting for invalid id 334 58:33:999 HLE\sceAtrac.cpp:69 E[HLE]: UNIMPL sceAtracAddStreamData(0, 00040000) 58:33:999 HLE\sceAtrac.cpp:191 E[HLE]: sceAtracGetRemainFrame(0, 08c1aa64) 58:33:999 HLE\sceAtrac.cpp:80 E[HLE]: FAKE sceAtracDecodeData(0, 092f7e1c, 09f9f484, 08c1aa44, 08c1aa64) 58:33:999 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:33:999 HLE\sceAtrac.cpp:227 E[HLE]: FAKE sceAtracGetStreamDataInfo(0, 08c1aa88, 08c1aa3c, 08c1aa40) 58:33:999 HLE\sceIo.cpp:311 E[HLE]: sceIoRead Reading into bad pointer 00000000 58:33:999 f:\ppsspp\ppsspp\core\hle\sceKernel.h:363 E[HLE]: Kernel: Bad object handle 334 (0000014e) 58:33:999 HLE\sceIo.cpp:861 E[HLE]: ERROR - sceIoPollAsync waiting for invalid id 334 58:33:999 HLE\sceAtrac.cpp:69 E[HLE]: UNIMPL sceAtracAddStreamData(0, 00040000) 58:33:999 HLE\sceAtrac.cpp:191 E[HLE]: sceAtracGetRemainFrame(0, 08c1aa64) 58:33:999 HLE\sceAtrac.cpp:80 E[HLE]: FAKE sceAtracDecodeData(0, 092f9e20, 09f9f484, 08c1aa44, 08c1aa64) 58:33:999 HLE\sceAtrac.cpp:227 E[HLE]: FAKE sceAtracGetStreamDataInfo(0, 08c1aa88, 08c1aa3c, 08c1aa40) 58:33:999 HLE\sceIo.cpp:311 E[HLE]: sceIoRead Reading into bad pointer 00000000 58:33:999 f:\ppsspp\ppsspp\core\hle\sceKernel.h:363 E[HLE]: Kernel: Bad object handle 334 (0000014e) 58:33:999 HLE\sceIo.cpp:861 E[HLE]: ERROR - sceIoPollAsync waiting for invalid id 334 58:33:999 HLE\sceAtrac.cpp:69 E[HLE]: UNIMPL sceAtracAddStreamData(0, 00040000) 58:33:999 HLE\sceAtrac.cpp:191 E[HLE]: sceAtracGetRemainFrame(0, 08c1aa64) 58:34:015 HLE\sceAtrac.cpp:80 E[HLE]: FAKE sceAtracDecodeData(0, 092f5e24, 09f9f484, 08c1aa44, 08c1aa64) 58:34:015 HLE\sceAtrac.cpp:227 E[HLE]: FAKE sceAtracGetStreamDataInfo(0, 08c1aa88, 08c1aa3c, 08c1aa40) 58:34:015 HLE\sceIo.cpp:311 E[HLE]: sceIoRead Reading into bad pointer 00000000 58:34:015 f:\ppsspp\ppsspp\core\hle\sceKernel.h:363 E[HLE]: Kernel: Bad object handle 334 (0000014e) 58:34:015 HLE\sceIo.cpp:861 E[HLE]: ERROR - sceIoPollAsync waiting for invalid id 334 58:34:015 HLE\sceAtrac.cpp:69 E[HLE]: UNIMPL sceAtracAddStreamData(0, 00040000) 58:34:015 HLE\sceAtrac.cpp:191 E[HLE]: sceAtracGetRemainFrame(0, 08c1aa64) 58:34:015 HLE\sceAtrac.cpp:80 E[HLE]: FAKE sceAtracDecodeData(0, 092f7e28, 09f9f484, 08c1aa44, 08c1aa64) 58:34:015 HLE\sceAtrac.cpp:227 E[HLE]: FAKE sceAtracGetStreamDataInfo(0, 08c1aa88, 08c1aa3c, 08c1aa40) 58:34:015 HLE\sceIo.cpp:311 E[HLE]: sceIoRead Reading into bad pointer 00000000 58:34:015 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:015 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:030 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:030 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:046 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:061 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:061 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:077 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:077 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:093 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:108 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:108 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:124 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:124 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:140 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:155 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:155 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:171 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:171 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:186 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:202 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:202 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 58:34:218 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached

realrunners commented 11 years ago

With "playing" I mean of course it show a pink placeholder where the logo should be ...

unknownbrackets commented 11 years ago

Well, it doesn't actually play videos yet. The sceAtrac stuff is because it's not implemented yet, and the sceIoRead() into NULL is because sceAtracGetStreamDataInfo() is not correctly implemented yet.

-[Unknown]

realrunners commented 11 years ago

@unknownbrackets Sorry for the sloppy report before. I think I have not made me clear. The problem is not because I don't see the movie but the problem is the game goes not further if I let the movie play.

After further investigation I think the problem lies here: Intro: Stream size: 0x58800 = 362496 but the file on the UMD is 364544, which is 2048 27:38:968 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 27:38:984 HLE\sceMpeg.cpp:994 N[HLE]: End of video reached 27:39:000 HLE\sceKernelThread.cpp:1613 I[HLE]: sceKernelTerminateDeleteThread(331) 27:39:000 HLE\sceMpeg.cpp:732 E[HLE]: sceMpegAvcDecodeStop(0949d580, 00000200, 09fff4c4, 09fff4c0) 27:39:000 HLE\sceMpeg.cpp:1013 E[HLE]: sceMpegFinish(...)

Movie: Stream size: 0xF1E800 = 15853568 but file is really 15855616 as shown at first posting and no sceKernelTerminateDeleteThread, sceMpegAvcDecodeStop, sceMpegFinish is reached and you're stuck in the movie and can't go further

realrunners commented 11 years ago

Actually, I think the error is not caused by the sce_lbn handling. It seems it's a problem within the sceMpeg function.

Sora FC calls for the intro movie file directly and it has the same problem as Ys7 or Brandish where the file was called based on the raw sector.

hrydgard commented 11 years ago

Let's close this issue then, open an mpeg issue if you feel like it.