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

Auditorium regression since #8743 #9213

Open
LunaMoo opened this issue Jan 12, 2017 · 11 comments
Open

Auditorium regression since #8743 #9213

LunaMoo opened this issue Jan 12, 2017 · 11 comments
Labels
GE emulation Backend-independent GPU issues I/O Affected by I/O timing settings, or other kind of I/O issue.
Milestone

Comments

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jan 12, 2017

Black screen, runs at half fps(15/15) log get's spammed with:

E[DISP]: HLE\sceDisplay.cpp:804 80000107=sceDisplaySetFrameBuf(04000000, 512, 3, 0): must change latched framebuf first
E[DISP]: HLE\sceDisplay.cpp:804 80000107=sceDisplaySetFrameBuf(04088000, 512, 3, 0): must change latched framebuf first

Commenting out:

//return hleReportError(SCEDISPLAY, SCE_KERNEL_ERROR_INVALID_MODE, "must change latched framebuf first");

is enough to make graphics render properly again:
npuh10069_00001

@hrydgard
Copy link
Owner

hrydgard commented Jan 28, 2017

That check was added in #8743 . It must either be a little overzealous or missing some additional condition....

Eh doh, the pull request number was already in the title.

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Jan 29, 2017

One weird thing I noticed about this one ~ loading savestate from working in-game still keeps the log spammed with the error, but shows graphics fine.

While it's booting it shows a lot of unimplemented stuff none of it seems important for the game, but maybe not having it causes some timing issue that triggers the problem, the game might be just buggy by nature, could be a poor port as it's a multi platform game.

Edit: I followed my guess and found one big function which calls all those unimplemented syscalls and the problem starts when it passes through it during boot. Dumb workaround that worked for me was to skip it all which game normally would do if sceUmdActivate would return an error. Doing so not only boots into game with normal graphics, it also avoids the spammy error, so I guess it all is broken by those unimplemented syscalls;|.

Edit some time in the future:
I noticed that this game shows similar results when running on ps3, so maybe this is some weird anti-piracy measure?
I mean what's the reason for a PS Store only release to try to activate an UMD drive and then happens to work fine without a single thing missing(at least nothing I could tell) when sceUmdActivate returns an error?;] Suspicious. If it should return an error we could just do it for PBP files or another compat.ini I guess, so I'll just add new label here as I can't test it myself;c.
Would be cool to know what sceUmdActivate returns when there's no UMD(and game isn't an iso/cso backup as I guess those could be treated like umd?) or what happens on psp with some random UMD inserted while running this auditorium mini.

@LunaMoo LunaMoo added the Needs hardware testing Testing on a real device needed to determine correct behavior. label Feb 13, 2017
@unknownbrackets
Copy link
Collaborator

Without a UMD, at least with CFW to run psplink, here are some results:

[x] sceUmdActivate(1, disc0:): 00000000
[x] sceUmdActivate(1, disc0:) again: 00000000
[x] sceUmdActivate(-1, disc0:): 80010016
[x] sceUmdActivate(0, disc0:): 80010016
[x] sceUmdActivate(2, disc0:): 00000000
[x] sceUmdActivate(3, disc0:): 80010016
[x] sceUmdActivate(1, disc1:): 80010016
[x] sceUmdActivate(2, disc1:): 80010016
[x] sceUmdActivate(1, disc2:): 80010016

If it's calling it with standard parameters, it could be a different behavior with CFW...

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Maybe just implementing sceMp4 would help (#1755.)

I assume the getframebuf changes have not helped here.

-[Unknown]

@unknownbrackets unknownbrackets removed the Needs hardware testing Testing on a real device needed to determine correct behavior. label Apr 11, 2020
@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Apr 11, 2020

Sorry forgot about this.
Yeah it still has same issue, althrough not sure, but something else possibly changed, I don't remember how it was 3 years ago, but it takes pretty long time to boot now and during that long time it prints in the debug log something like:

32:38:886 user_main    D[HLE]: jitcommon\jitblockcache.cpp:166 Adding proxy root 08896594 to block at 0887ba74
32:43:430 user_main    D[HLE]: jitcommon\jitblockcache.cpp:166 Adding proxy root 08880438 to block at 0887ba74
32:52:741 user_main    D[HLE]: jitcommon\jitblockcache.cpp:166 Adding proxy root 08863c84 to block at 0887ba74

Sometimes only or or two of those show up, maybe changes depending on me using unthrottle or not.

@unknownbrackets
Copy link
Collaborator

Hm, are you possibly using ir or a debug build? Or it's that slow even in release with jit?

IR tries to precompile for more smooth speed, but there might be some downsides to this. ProxyBlocks are used when multiple sections of RAM were involved in a jit block, so invalidating any section must invalidate that jit block.

-[Unknown]

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Apr 11, 2020

Release build with JIT. It takes around 18-20s to boot from pressing the game icon until it boots and first logo shows up, it's not that drastic, but compared to 1s boot in other games it kind of is.

Oh, it's caused by Simulate UMD delays, with Fast it instantly boots. Never thought that could slow boot by soo much considering it's still much faster than real PSP in other games.

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Apr 12, 2020

Simulate UMD Delays is still very crude, which is why I keep saying I worry about proposals to make it on by default.

Simulate UMD Delays tries to simulate the seek delay of a UMD using some really awful basic heuristics. It definitely delays too much sometimes, and not enough other times. As long as two operations are close to each other on the disc, it's exactly the same as "Fast". It just adds a static penalty for operations on data that is far apart.

But distance in bytes on the ISO isn't really how the UMD drive works or what causes seek delays. It's a more complicated math formula. Add to that, the PSP-2000/3000 both have a UMD cache, which we'd probably ought to emulate even if we were correctly emulating UMD delays (since we default to PSP-2000 mode iirc. and some games detect that and do things that would be slow if it wasn't for the UMD cache that they trust is there.)

By the way, iirc from my tests - reads from the UMD cache are actually FASTER than "Fast".

But aside from all of that, this game is a mini. It wouldn't have ever had any UMD delays in the first place.

-[Unknown]

@hrydgard hrydgard added I/O Affected by I/O timing settings, or other kind of I/O issue. GE emulation Backend-independent GPU issues labels Apr 12, 2020
@hrydgard hrydgard added this to the v1.11.0 milestone Apr 12, 2020
@hrydgard hrydgard modified the milestones: v1.11.0, v1.12.0 Dec 1, 2020
@hrydgard hrydgard modified the milestones: v1.12.0, v1.13.0 Jul 12, 2021
@ghost
Copy link

ghost commented Oct 30, 2021

Software Rasterizer

Screenrecorder-2021-10-30-20-36-24-346.mp4

recording.ppdmp.zip

@playday3008
Copy link

playday3008 commented Sep 27, 2023

If you are on pc, then (You need to do it every time you starts a game):

  1. Under Debug menu enable Break on load
  2. Under Debug menu open Disassembly...
  3. Open game
  4. Go to address 0x0882E420
  5. Patch instruction under that address to j 0x0882EC70
    5.1 Right click on highlighted instruction and select Assemble opcode
    5.2 Paste new instruction and apply
  6. Click Go
  7. Disable Break on load

P.S. Also, PPSSPP authors/contributors can do something similar to LEGO Island and Windows NT, aka "Patch game before run if checksum/region+version/etc. is match" (at least until something what is unimplemented and causing problems is implemented)

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Sep 28, 2023

Nothing needs to be done manually ~ https://github.com/LunaMoo/PPSSPP_workarounds
It's just a workaround through.

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 I/O Affected by I/O timing settings, or other kind of I/O issue.
Projects
None yet
Development

No branches or pull requests

4 participants