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

God of War Ghost Of Sparta unlimited enemies in The Vortex #8299

Closed
daniel229 opened this issue Dec 24, 2015 · 60 comments · Fixed by #15640
Closed

God of War Ghost Of Sparta unlimited enemies in The Vortex #8299

daniel229 opened this issue Dec 24, 2015 · 60 comments · Fixed by #15640
Milestone

Comments

@daniel229
Copy link
Collaborator

Lower CPU clock may help it like 222MHZ.
01

@vsub
Copy link

vsub commented Dec 25, 2015

Can you post your save(not save state...I hope it's not picky on which version of the game you have).
I cleared that game at least 3 times before

@daniel229
Copy link
Collaborator Author

rename jpg to 7z
nphg00092data25

@vsub
Copy link

vsub commented Dec 25, 2015

PPSSPP instantly crashes when I try to load the save(probably can't load different region saves)
Maybe a save state right after you load the save will allow me to load the game(from there to create a save and restart the game from the save)

@daniel229
Copy link
Collaborator Author

@vsub
Copy link

vsub commented Dec 25, 2015

Sadly that's not good enough either.
I can play for a while but once the game tries to load something new,ppsspp crashes and also creating a save game results in crash when I try to load it.

@daniel229
Copy link
Collaborator Author

Right,some games are not allowed to use savedata cross region.

@unknownbrackets
Copy link
Collaborator

So basically the enemies should eventually stop coming, but they don't? And it helps to lower the Mhz? That's a bit crazy.

I guess this means our timing is too far off somewhere. Does it change anything to disable the max 60 fps hack?

-[Unknown]

@daniel229
Copy link
Collaborator Author

disable the max 60 fps didin't help.

@unknownbrackets
Copy link
Collaborator

If you change int EstimatePerVertexCost() { in GPU/GLES/TransformPipeline.h to return a higher cost value (like 2 * cost or 5 * cost), does it also work around it? Just trying to get a sense for where the under-estimate is.

-[Unknown]

@daniel229
Copy link
Collaborator Author

I try 2 * cost and it helps

@daniel229
Copy link
Collaborator Author

Change PSP's CPU to lower clock such as 222,111(lower is better),restart the emulator,load the game and load game saves,don't load the previous savestates.

@RinMaru
Copy link

RinMaru commented Feb 17, 2016

What settings are you using to get fullspeed sorry this is off topic.

@daniel229
Copy link
Collaborator Author

For a modern desktop for example an i5 2500K and Geforce 750ti,it gets full speed on a default setting,for a mobile,may need to low down PSP's CPU clock such as 133 or even lower to get full speed,but with the lower clock,the FPS also become lower,such as 20/20 (100%),if the cpu clock is lower than 132,it occur othe bugs such as can't catch the rope,can't climb up a wall,on the other side if you want a consistent 60/60 fps in fighting or some demanding areas,you will have to adjust cpu clock to higher such as 666.

@vsub
Copy link

vsub commented Feb 17, 2016

I clear the game for the first time while still using my old pc(Pentium 4 2.8Ghz,6600GT,1GB ram)and the cpu was set to 80 and buffered rendering was disabled(disabling it will make some effects to look weird but it was definitely a nice speed boost).
I don't remember if I use frame skipping(probably set to 1 or 2 max)and the game was definitely playable.

PS.About the clock speed,the opposite can also be said...I just tried the game at 1000Mhz and Kratos stuck in one place and I couldn't move from there

@RinMaru
Copy link

RinMaru commented Feb 17, 2016

Would Intel i5 6K and 530 Skylake run this fine?

@vsub
Copy link

vsub commented Feb 17, 2016

My old pc is WAAAAY weaker than those two and as I said,I clear the game without any problems.
On my current pc(i7 4771,GTX750TI)without some fancy settings(almost everything on default)I get 180+ on a boss battle.

PPSSPP don't have really high requirements.It doesn't need the latest hardware to run games.
At 10x rendering resolution and 5x texture scaling(not that I need something above 3x RR),I get 30fps at the last boss battle while the game is running in 60fps mode and that's because of the gpu(the cpu usage is not that high)

@daniel229
Copy link
Collaborator Author

It drops frames but not not speed during fightings occasionally and some areas.1000 is too high,666 seems fine.
Default CPU clock
01

666
02

@unknownbrackets
Copy link
Collaborator

That's with the higher cost right?

Ideally, we should find a way to model the costs better. Maybe even calculate the affected pixels or something...

-[Unknown]

@daniel229
Copy link
Collaborator Author

Yes,it cost higher.

@dliedke
Copy link

dliedke commented Dec 25, 2017

I finally could pass the vortex with 222mhz in PPSSPP Android after a lot of issues. I am publishing the save state after the vortex for people with problems with endless enemies.

https://drive.google.com/file/d/1Yrx2a5kLLSYvwgviUVJMfXDx3CIHQtok/view?usp=drivesdk

@unknownbrackets
Copy link
Collaborator

I've started to think some of this timing should probably consider whether things are in VRAM or cached RAM.

For example, if I'm texturing from VRAM, that ought to be faster than texturing from RAM, especially if I use the uncached flag. Same for vertex or index data, perhaps. Maybe we need more models on the speed of drawing.

-[Unknown]

@hrydgard
Copy link
Owner

I don't think texturing cares about the upper address bit that specified cached or not - the texture unit it has its own cache. But yes I'd expect it to be faster to texture from VRAM than RAM, but that might depend on the level of memory traffic to RAM and so on, and the access pattern to the texture ... It's very hard to model performance at that kind of detail, all we can do is possibly approximate a little better.

@galehawk599
Copy link

Hi, probably I'm stuck in this bug too. How can I fix it?

@dliedke
Copy link

dliedke commented Jul 30, 2019 via email

@marosis
Copy link

marosis commented Aug 5, 2019

I do not know but on ppsspp i have finished all 2 gow relleases. They are not unlimited. It is just 10 minutes fight. It is same as on real HW(i have used my favourite 60mhz and yeah for that jump i have used 222mhz)

@unknownbrackets
Copy link
Collaborator

It'd be awesome if someone could time it on a real PSP (best most amazing would be to have 3 samples of timing to confirm.) That way we can compare to PPSSPP and be sure.

-[Unknown]

@viknesh742
Copy link

@dliedke.. your save data still loading it from ship where I face unlimited enemies, is there another save data which passed through that?

@dliedke
Copy link

dliedke commented Oct 24, 2019

I am sorry vik, that is the only one I have.

@viknesh742
Copy link

I set my cpu to 222mhz and it's worked for me.. thanks guys

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 23, 2022

That warning compat exists because there's a ton of confirmed problems caused by enforcing cpu clocks, especially low ones and people abuse that very commonly as speedhack and then report bugs caused by it. The warning makes it clear and probably stopped a bunch of useless issues being opened by less tech savvy users which is a great thing and worth keeping.

This exact issue here is controversial since many people passed this place just fine with default clocks all the way just with info that it requires 10 minutes like on the real hardware while other claim it's completely broken on default settings. Opinions of users, even those that tend to report a lot are hardly objective, it's common people are taking shortcuts while testing especially things that require an active play for 10 minutes or more like abusing savestates and as far as I remember that particular setting does nothing instantly so it's actual state often was and probably still is very confused.

Another thing to consider is that we have linked issue from open emu here where at least one person passed the bug by using fast forward. As such I suspect the issue here might be affected by different performance hack - ForceMax60FPS which was proven to not be as safe as initially everyone thought, and it IS enforced to those games since it significally helps with performance. This could also be the difference if some people passed that moment in the game only on past versions as in the past it was just a setting and some people never used it.

Preferably to play GOW games you'd want to try a fixed 30 or 60 fps mod for the game itself and standard settings, by using those hacks you'd automatically avoid ForceMax60FPS as well. You could also just remove it from ForceMax60FPS compat hack and keep everything else on default, load the game normally without using savestates and test like that.
Less hacks is always safer and personally I really distrust ForceMax60FPS seeing how weirdly it affected some games. It's possible it's not endless, but by rendering less frames than the game wants it might take much longer(even many times depending on how that timed event is programmed).

@superevr
Copy link

Yeah, I'm not sure what type of timer it's using at this vortex stage. It's very strange.
From a saved state at the vortex, with the CPU set to 266, the battle lasted 1:37 minutes. The lightning strikes get gradually more chaotic, and the boat hits a rock and Kratos falls out.
With the CPU set to 222, the battle lasted about 1:01 minutes.
I tried again with CPU set at 333, and died after 5:00 minutes of battling. Same with the CPU clock set to 0 (default). The enemies keep piling on more and more.

I made another attempt and commented out the game id under [ForceMax60FPS] in compat.ini, but that didn't seem to do anything at all to change the frame rate, which still seemed anchored to 60fps.

I then tried some of the hacks listed in this 5 year old forum thread God of War Chains of Olympus/Ghost of Sparta - Performance improvements codes. No difference with "unlimited fps" enabled (It appeared to still be tied to 60fps?). I then set it to 30 FPS fixed, and stage immediately advanced.

It's almost like the game sets it so the number of enemies on the screen gradually grows and grows, until there is a significant frame drop. On fast systems (I'm on an M1 mac), that could take a while. Just a theory anyway.

@IrfanH495
Copy link

IrfanH495 commented Jun 23, 2022

I solved it with the default setting only using the cheat 30fps/60fps[fixed]
https://drive.google.com/file/d/18UzfdFkSDXoSZEipEv7Y1mPRqrPw_WxC/view?usp=drivesdk
But if I use the Unlimited FPS [Default] cheat or not, it feels like the place won't finish the enemies will keep coming

@IrfanH495
Copy link

IrfanH495 commented Jun 24, 2022

I added god of war id to BlockTransferAllowCreateFB. the results are decent even though 1xPsp can get 60/60fps, 49-55/60Fps, 45-58/58fps.
OpenGL,default settings without cheat
Screenshot_20220624-151326
I can't try it on Vulkan the game will freeze if I open it

@Panderner
Copy link
Contributor

I can't try it on Vulkan the game will freeze if I open it

@IrfanH495 what device are you using?

@hrydgard
Copy link
Owner

Hm, that's weird. BlockTransferAllowCreateFB only helps if it can help avoiding some GPU readbacks, and I don't think God of War: GoS does a lot of those..... Maybe I'm wrong about that.

As for the 30fps thing fixing the Vortex, I'm starting to feel that we're going to have to do something to somehow detect when in the vortex and enable it programmatically there, even if it's quite distasteful accuracy-wise, heh...

@IrfanH495
Copy link

IrfanH495 commented Jun 24, 2022

I can't try it on Vulkan the game will freeze if I open it

@IrfanH495 what device are you using?

sharp sh04h
adreno 530
snapdragon 820

freeze/fc on adreno vulkan but it only happens sometimes.
sometimes it can be played sometimes it can't

@IrfanH495
Copy link

IrfanH495 commented Jun 24, 2022

@Panderner like this
2022_06_24_21_31_07

sometimes freeze
sometimes fc
maybe my device is overheating you know 820

@superevr
Copy link

I ran a few more tests playing with different settings. With the unlimited HP hack and clock speed set to 222, I dodged around the boat trying not to kill any enemies. Sure enough, the stage progressed after just a couple minutes. Progression does not appear to be tied to how many enemies are killed.

In another test, I set the clock speed to 0 (auto) and tried the same thing of not fighting the enemies. Many minutes passed without progression. I then held the fast-forward button, which sped up the game. Still no progression after several minutes.

In summary, what works to pass the vortex:

  • Setting FPS to 30 with a hack
  • Setting Clock speed to 222 or 266.

What doesn't work (by itself):

  • killing enemies
  • running fast-forward with auto clock speed
  • Changing the compat.ini hacks (for my tests, I'm assuming that changing the file in PPSSPPSDL.app/Contents/Resources/assets/compat.ini is enough to change the setting without recompiling)

@Panderner
Copy link
Contributor

@IrfanH495 send me the logs if the game freezes?

@IrfanH495
Copy link

IrfanH495 commented Jun 25, 2022

I ran a few more tests playing with different settings. With the unlimited HP hack and clock speed set to 222, I dodged around the boat trying not to kill any enemies. Sure enough, the stage progressed after just a couple minutes. Progression does not appear to be tied to how many enemies are killed.

In another test, I set the clock speed to 0 (auto) and tried the same thing of not fighting the enemies. Many minutes passed without progression. I then held the fast-forward button, which sped up the game. Still no progression after several minutes.

In summary, what works to pass the vortex:

  • Setting FPS to 30 with a hack
  • Setting Clock speed to 222 or 266.

What doesn't work (by itself):

  • killing enemies
  • running fast-forward with auto clock speed
  • Changing the compat.ini hacks (for my tests, I'm assuming that changing the file in PPSSPPSDL.app/Contents/Resources/assets/compat.ini is enough to change the setting without recompiling)

cheat 60fps fix also helps

@IrfanH495
Copy link

@IrfanH495 send me the logs if the game freezes?

sorry I don't know how to get logs, anyway I'm not sure this is an issue

@superevr
Copy link

superevr commented Jun 28, 2022

cheat 60fps fix also helps

For me, the 60fps [fixed] hack it did not help by itself. In fact, with the hack enabled I had lower framerate close to 30 most of the time, but I can get near 60fps all the time (except cutscenes) without hacks.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 28, 2022

What version of the game do you have, if it's any different than savedata provided here, could you provide your savedata from before beating that moment so more people could test it?

Your experience with 60 fps hack seems very weird as most people that used it reported huge performance improvements, maybe your experience differs because you had different hack active under it(lower cheats overwrite those ran before it) or something doesn't work with it.
Could also be the cause of running the hack too late or loading savestate. It's possible the game framerate affects something calculated on the very start and loading savestates after it already happens doesn't change anything.

@superevr
Copy link

What version of the game do you have, if it's any different than savedata provided here, could you provide your savedata from before beating that moment so more people could test it?

Your experience with 60 fps hack seems very weird as most people that used it reported huge performance improvements, maybe your experience differs because you had different hack active under it(lower cheats overwrite those ran before it) or something doesn't work with it. Could also be the cause of running the hack too late or loading savestate. It's possible the game framerate affects something calculated on the very start and loading savestates after it already happens doesn't change anything.

Here's a copy of the save, using rom UCUS98737 - God of War - Ghost of Sparta (USA) (En,Fr,Es):
https://drive.google.com/drive/folders/1YRLFhGmgP6ssgnMHCEQ-ITxo0cfA05E5?usp=sharing

I'm running an M1 mac. I have no clue why the 60fps hack fixes me to 30fps but doesn't help pass the vortex, or why the 30fps hack doesn't give a fixed 30fps and does help pass the vortex.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 30, 2022

From comments under: https://www.youtube.com/watch?v=e_rzVPlfxWc

Em Haidar
8 lat temu
mine is glitched too, my enemies never end on the boat. I tried killing them slowly as suggested somewhere to trigger the event but not happening. I keep fighting for 30min and they keep coming.
if only there's a good soul who's willing to upload the savepoint after the storm.. 

Em Haidar
8 lat temu
Solved! if you're playing it on PC/Android (PPSSPP) disable the "force max fps" option and you'll get through it. 

So it probably is caused by [ForceMax60FPS] and possibly wasn't a problem before the hack was implemented.

Edit: tested it myself, game works fine if removed from that hack(still takes somewhat long time, but that's supposed to be normal), but it will not work from savestate, needs restart and reload from in-game savedata to clear the compat hack. Probably it would be better to just remove that hack and if performance is an issue implement fixed 60fps patch as a compat, doesn't have to be cwc, I'm sure it's not doing much, going to look it up.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 30, 2022

I checked the fps hacks for this game and as I thought they're very simple.
They just add a call to sceDisplayWaitVblankStart in the same function that calls sceDisplaySetFrameBuf, does it once for 60 fps, does it twice in a row for 30 fps and restores default game code by "unlimited fps" cheat.

We could just do that for this game and remove the game breaking ForceMax60FPS hack. Definitely better than tell people to mess with emulated PSP CPU clock to pass the broken part.

@hrydgard
Copy link
Owner

@LunaMoo That's very interesting! So you verified if you run that way, the enemies indeed stop coming? That would probably be worth a new compat.ini flag indeed.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 30, 2022

Yes, it takes a few minutes, but with ForceMax60FPS properly disabled(game loaded from savedata), the game eventually continues with a cutscene.

Fixed fps hacks help on their own basically by avoiding the internal frameskip caused by ForceMax60FPS(since it never exceeds 60, it never triggers).

So probably best solution would be to do both, remove ForceMax60FPS and add our own fixed fps hack, to avoid patching every region separately could probably be done by function replacements I guess. If the function that it patches is too generic we could just patch a different one.

@hrydgard
Copy link
Owner

Well it sounds like we can just add a

[GodOfWar60Fps]
... = true

compat.ini setting, which is checked in sceDisplaySetFrameBuf and simply calls sceDisplayWaitVblankStart from there. And remove the god of war game IDs from [forcemaxfps]. Right?

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 30, 2022

I'm not sure how to syscall from within another, but if that's possible then yeah. It might need to be called after through.

@superevr
Copy link

Fixed fps hacks help on their own basically by avoiding the internal frameskip caused by ForceMax60FPS(since it never exceeds 60, it never triggers).

Is that the case? I use fastforward and will see 120/60 for the framerate.

Yes, it takes a few minutes, but with ForceMax60FPS properly disabled(game loaded from savedata), the game eventually continues with a cutscene.

Ohhh! I didn't realize I had to start from savedata (as opposed to a saved state) in order for the compat.ini changes to take effect. I tried a couple scenarios and timed them. The save point is a few minutes before the boat, so it's kind of a pain.

Scenario 1:

  • Cheats disabled
  • [Force Max60FPS]: false
  • [RequireDefaultCPUClock]: true
  • CPU Clock set to 0 (default)
  • Time to get to "Help us Poseidon": 2:27
  • Time from there to get knocked off the boat: 4:42

Scenario 2:

  • Cheats disabled
  • [ForceMax60FPS]: false
  • [RequireDefaultCPUClock]: false (Does this even do anything if I don't manually change the cpu clock?)
  • CPU clock set 0 (default)
  • Time to get to "Help us Poseidon": 2:00
  • Time from there to get knocked off the boat: 4:00

Scenario 3:

  • Cheats disabled
  • [ForceMax60FPS]: false
  • [RequireDefaultCPUClock]: false
  • CPU clock set to 600
  • Time to get to "Help us Poseidon": 2:30
  • Time from there to get knocked off the boat: 2:20
  • Running at a higher clock speed felt a lot smoother compared to scenario 1

I also tried a forth scenario to beat the vortex with default settings, but PPSSPP crashed about 5 minutes in. Will a system crash report help? I'll attach it.
PPSSPPSDL-2022-06-30-163435.txt

note:
when booting the game with ForceMax60FPS disabled, the logo screens display at a reduced fps and take a long time to pass. I noticed that at higher clock speeds, this is reduced even more! This causes PPSSPP to display a warning about slow performance and to turn on frameskip.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 30, 2022

[RequireDefaultCPUClock] is only a setting that activates a warning to inform an user he's using game breaking setting known to break particular game. Differences in timing are probably related to defeating enemies or something as the difference is pretty large between 1 and 2 which are the exact same thing.

[ForceMax60FPS] is a hack that limits max FPS game can render to 60, GOW does much more and that value increases the more you overclock emulated PSP CPU which is why when you have it disabled, the game get's much heavier to emulate by overclocking it.
This is also the reason why reducing emulated CPU clock helped, because it made the game draw less avoiding the hack and the problem it causes, it never was a proper solution.

@superevr
Copy link

superevr commented Jun 30, 2022

Interesting! Well, I did notice that the games performance suffered when [ForceMax60FPS] was disabled, except for when the CPU was adjusted. But even at 999, where the game is really smooth, I won't get more than 62-64 fps. it tried to stick around 60 (at least near the vortex levels).

Here's a copy of the SAVEDATA.
UCUS98737DATA19.zip

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jul 1, 2022

Just to note, we can't simply call sceDisplayWaitVblankStart from inside of sceDisplaySetFrameBuf since movies are actually running at fixed framerate already, so adding sceDisplayWaitVblankStart there makes videos missbehave.

I guess it could still be done like that if we checked for whenever video is playing and just avoided adding wait then.

Or nah, other places also call sceDisplaySetFrameBuf with their own sceDisplayWaitVblankStart. We need to add it only in-game.

Seems to work well as a function replace, if that's acceptable.

@ghost
Copy link

ghost commented Jul 11, 2022

Interesting! Well, I did notice that the games performance suffered when [ForceMax60FPS] was disabled, except for when the CPU was adjusted. But even at 999, where the game is really smooth, I won't get more than 62-64 fps. it tried to stick around 60 (at least near the vortex levels).

Here's a copy of the SAVEDATA. UCUS98737DATA19.zip

I cannot load your save data on my phone
Screenshot_2022-07-11-20-46-26-966_org ppsspp ppsspp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

15 participants