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.14k stars 2.16k forks source link

(PoC) Gettings PSP Remasters running #1494

Closed B1ackDaemon closed 5 years ago

B1ackDaemon commented 11 years ago

After some experiments i managed to get some PSP remasters at least show something. :D

Dialog message from Shin Sangoku Musou - Multi Raid 2 HD [NPJB-40003] http://rghost.net/45500313/image.png

Ingame from K-ON Houkago Live HD [NPJB-40002] http://rghost.net/private/45499838/86e3a668a65543ec3a05c75cee37176c

Unfortunately due to lack of mine coding skills this method needs improvements. Ok, how it works: Core/MemMap.h

Unfortunately, just those changes isn't enoght, and i got error messages with allocating additional memory. Log - http://rghost.net/45501037

As temporary solution to avoid this i done changes below. I know, it's wrong, but at least it do the trick with few remasters. Core/MemmapFunctions.cpp else if ((address & 0x3E000000) != 0x08000000)

Thanks in advance! :)

unknownbrackets commented 10 years ago

I think that Trails in the Sky also reads into a null pointer. From initial testing, this causes a PSP to crash... so I still need to figure out what we're doing wrong. It seemed atrac related.

Edit: but that looks maybe mpeg related.

-[Unknown]

B1ackDaemon commented 10 years ago

Rechecked "Eiyuu Densetsu Sora no Kiseki FC Kai HD [NPJB-00293]" and "Eiyuu Densetsu Sora no Kiseki the 3rd Kai HD [NPJB-00360]" on latest commit 652008e422124ae5e01fb88c2703547a31315d0c - now they also working fine.

Video test: rghost.net/52106268

unknownbrackets commented 10 years ago

So the only problems left here are:

Is that right?

-[Unknown]

B1ackDaemon commented 10 years ago

@unknownbrackets, there is another one issue, of which i forgot a bit - 720p videos in avi container (USRDIR\data\movie). http://pastie.org/private/9dmbzgca5mxnq0pzbh2q

hrydgard commented 10 years ago

@B1ackDaemon, looks like ffmpeg detects the video channel of that movie just fine - but I guess the emulator isn't equipped to handle such high resolution output from ffmpeg. What happens and which game is that?

B1ackDaemon commented 10 years ago

@hrydgard, games just skipping videos. Looking into logs i noticed this:

57:50:429 user_main I[ME]: hle\scempeg.cpp:365 sceMpegInit() 57:50:429 idle0 D[KERNEL]: hle\scekernelthread.cpp:3207 Context switch: user_main -> idle0 (276->272, pc: 089f9e28->08000000, mpeg init) +0us 57:50:429 user_main D[KERNEL]: hle\scekernelthread.cpp:3207 Context switch: idle0 -> user_main (272->276, pc: 08000000->089f9e28, idle) +750us 57:50:429 user_main W[MM]: core\memmapfunctions.cpp:94 ReadFromHardware: Invalid address 00000001 57:50:429 user_main W[ME]: hle\scempeg.cpp:1505 UNIMPL sceMpegAvcResourceInit(00000001): bad mpeg handle 57:50:430 user_main D[KERNEL]: hle\scekernelsemaphore.cpp:249 sceKernelDeleteSema(335) 57:50:430 user_main W[ME]: hle\scempeg.cpp:735 sceMpegAvcDecodeStop(0a7f6af0, 00000200, 0cbfeab4, 0cbfeab0): bad mpeg handle 57:50:430 user_main I[ME]: hle\scempeg.cpp:1121 sceMpegFinish(...)

HD remasters, which affected:

Debug logs: http://rghost.ru/52118915

unknownbrackets commented 10 years ago

It looks like sceMpegAvcResourceInit isn't supposed to take a pointer, so possibly that is caused by b28f224fe25bbf8e070f93b2f0332c9591e20842.

-[Unknown]

dbz400 commented 10 years ago

I tested some other games which use sceMpegAvcResourceInit , looks like it return either 0 or 1 (may be init = 1 , not init = 0 ?) . Check mpeg there is definitely wrong.

B1ackDaemon commented 10 years ago

@unknownbrackets, ok, here is debug log from 53deef19c5022352bf87a1dbd6472eb766fd35b3 http://rghost.ru/52128010

unknownbrackets commented 10 years ago

It's using sceMp4 which we don't support yet.

-[Unknown]

unknownbrackets commented 8 years ago

So, it sounds like the videos actually do work now. And with the latest change, the games are all recognized by default.

Does anyone (ideally who has and therefore can test the remasters) want to summarize remaining issues? It sounds like they may be fully working.

-[Unknown]

daniel229 commented 8 years ago

Just the MP4 still not play.

unknownbrackets commented 5 years ago

Given that remasters do run now, and we already have #1755 for mp4, I'm going to close this. #1755 even has a trace of syscalls.

-[Unknown]