PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
Other
10.64k stars 1.55k forks source link

Star Wars: Jedi Starfighter - Randomly uncompletable mission #1927

Open MageKing17 opened 7 years ago

MageKing17 commented 7 years ago

PCSX2 version: pcsx2-v1.5.0-dev-2055-g29eed18-windows-x86

PCSX2 options: Seems to occur regardless of rounding/clamping modes, or whether or not the MTVU speed hack is enabled.

Plugins used: GSdx 20170430234119 (MSVC 19.00 SSE4.1/AVX) 1.1.0 [GSdx32-SSE4] Problem probably has nothing to do with the plugins, though.

Description of the issue: In Mission 7, "Hammer and Anvil", at a certain stage of the mission a ship (the Kethor) is supposed to ram a shield generator in order for the mission to progress. Most of the time (it took about a dozen plays of the mission before it randomly worked), it flies off into empty space, instead, which makes the mission impossible to complete.

Here's an image of the Kethor flying off into empty space: http://deviance.duckish.net/pictures/gsdx_20170502085020.png And here's an image of the shield generator it's supposed to be ramming: http://deviance.duckish.net/pictures/gsdx_20170502085245.png (the target indicator is slightly misaligned due to the widescreen hack, but disabling the widescreen hack doesn't fix the issue either)

How to reproduce the issue:

  1. Play Mission 7 (Hammer and Anvil).
  2. Reach the point where the Kethor is supposed to ram the shield generator (should happen after the oribtal guns are destroyed and Jango Fett has left).
  3. Watch the Kethor fly off in a seemingly-random direction (unless it doesn't).

Last known version to work: Problem occurs at least as far back as 1.2.1, which is the oldest version I currently have downloaded.

PC specifications: CPU: AMD 9590-FX (underclocked to ~4.2 GHz/core, if that matters) GPU: R9 290 OS: Windows 10 64-bit

ghost commented 6 years ago

Any status on this?

Spessmen14 commented 4 years ago

ANY freaking update? Same exact problem.

MrCK1 commented 4 years ago

ANY freaking update? Same exact problem.

Well there are better ways to respond constructively to the issue. Maybe provide an updated test report or something similar? (Extra points if you upload a blockdump from the Debug menu...)

ghost commented 4 years ago

blockdump would be usefull, I know that game is full of bugs. If I am right, one cause the game to call PS2-exit at the end of a bonus stage (and the console return to the BIOS).

Spessmen14 commented 4 years ago

if you wanna walk me through a 'blockdump' ill give it a try...

issue described happens exactly the same. The Kethor flies off randomly into space, still.

ghost commented 4 years ago

Can you try various clamping rounding mode for the EE and VUs?

Spessmen14 commented 4 years ago

chop/zero and full on ee/iop, chop/zero and extra + preserve sign didn't work

ghost commented 4 years ago

Try other rounding such as negative, positive or nearest. Just in case, test also with the EETimingHack.

Spessmen14 commented 4 years ago

will have to later, out of time today.

MageKing17 commented 4 years ago

I'm reasonably confident I tested every combination of rounding/clamping back when I first reported this, hence why I said:

Seems to occur regardless of rounding/clamping modes, or whether or not the MTVU speed hack is enabled.

That said, I've occasionally tested this mission every few months or so and the behavior has remained unchanged (and so has #1928, FWIW, although I doubt the two issues are related beyond the same game), but I have not been re-testing all possible rounding/clamping combinations (and I don't recall screwing with EETimingHack). An exhaustive test of all emulation options could be done, but the problem with that is that the random nature of the problem means it sometimes works, so even if it succeeds the mission needs to be run multiple times to determine whether or not it was a fluke.

MageKing17 commented 3 years ago

Just FYI, the issue is still present in PCSX2 v1.7.0-dev-767-g2c7f54134.

refractionpcsx2 commented 3 years ago

Can you provide a blockdump and savestate at the point it messes up, make the savestate just before you trigger the ship to leave then let it leave and screw up before exiting the emulator.

MageKing17 commented 3 years ago

Do you want the blockdump from the same point as the savestate, after it's in the screwed-up state, or both?

refractionpcsx2 commented 3 years ago

well if you get to the point just before the event, make a savestate, then come out, enable blockdumps. run the game a fresh, let it load for a few seconds (to give me time to load the state), then load the savestate and let the ship event trigger, once it's over exit the emulator and that should be good enough. Bundle the blockdump in your pcsx2 folder and the savestate in you sstates folder in to a zip file and upload it, that should be good :)

MageKing17 commented 3 years ago

issue_1927_blockdump_and_savestate.zip That should do it. Savestate is paused, staring straight at an almost-dead orbital gun. Just a couple shots should kill it, and then the Kethor will fly off into space instead of ramming the shield generator.

refractionpcsx2 commented 3 years ago

okay I destroyed the ship infront of me, but I don't see any ships fly off?

I see 2 ships with yellow selector things on them but they aren't moving much

MageKing17 commented 3 years ago

They don't move much; they're very slow. The point is that the Kethor isn't pointed towards the Shield Generator, and no matter how long you leave the game on Turbo, the mission won't progress.

refractionpcsx2 commented 3 years ago

image I dunno what to tell you honestly. I mean yeah he moved slow, but he went straight for the shield generator then sacrificed himself

I had MTVU on (and Instant VU, the new speedhack) and VU clamping set to Extra + Preserve sign, didn't do anything else from defaults

MageKing17 commented 3 years ago

image

He's pointing nowhere near it, for me. I had MTVU off (because Instant VU says it only works without MTVU) and VU clamping set to Extra, but turning MTVU on and changing VU clamping to Extra + Preserve sign made no difference. Perhaps the amount of time between unpausing and killing the orbital gun is the difference?

refractionpcsx2 commented 3 years ago

I dunno, i mean i unpaused and then just held fire, then I flew around him for a bit as he slowly moved towards the target. I didn't bother shooting the other guys until he hit it.

MageKing17 commented 3 years ago

What other guys? There should be nothing hostile alive other than the shield generator.

refractionpcsx2 commented 3 years ago

There's 2 defensive stations or something you have to shoot to complete the mission.

MageKing17 commented 3 years ago

Right, but you can't target them until after the Kethor rams the shield generator, and that hasn't happened in the savestate.

refractionpcsx2 commented 3 years ago

well, it did for me, that's why I got mission success :P I dunno how to make it screw up, i guess I can try again and see if it works a second time

refractionpcsx2 commented 3 years ago

okay this time it screwed up, that's annoying

MageKing17 commented 3 years ago

I turned the preset to "Safest", then changed EE and VU rounding to Nearest and Clamping Mode to Full and Extra + Preserve sign (for EE and VU, respectively) and it still missed by a mile:

image

okay this time it screwed up, that's annoying

I believe I mentioned in the original report that it sometimes randomly works? :P

refractionpcsx2 commented 3 years ago

Just in case it gets lost

hmm, if I load your savestate then look at the kethor ship or whatever it's called, wait for him to turn around, then turn around and shoot that remaining orbital thing, it doesn't freak out it seems to orient itself correctly but if you shoot that orbital station thing before the ship has finished turning it just seems to give up I managed to do it 3 times in a row with that method

MageKing17 commented 3 years ago

After digging out the actual PS2 and finding the game disc (though not the savefile, but I just blitzed through the first six missions fairly quickly to test this), I can confirm that this is definitely not a problem with the game itself. I intentionally recreated the situation from the savestate, waited for the Kethor to be definitely pointed away from the shield generator, then killed the orbital gun; the Kethor very obviously turned towards the shield generator before moving forward.

FullerBot commented 3 years ago

Hello! Can confirm this issue on my set up as well. (PCSX2 1.6.0, i7 9750H, GTX 2080 Max-Q, 16 GB RAM)

Rather new to fiddling around with things in this particular environment, but if extra data is needed, I'd be happy to post debug files and such. (Though, I'll need to brush up on how prior to doing so.)

Been playing through Jedi Starfighter for old time's sake, and I'm happy to do what I can to fix this nonsense so I can finish the game!

Also- I wonder if it "randomly" works because the kethor is somehow pointing in the right direction when the orbital guns are finished off. Maybe some line of code double checking the direction the kethor is supposed to be in before allowing it to move forward is busted or otherwise ignored by PCSX2? Considering the fact end cutscenes won't work, that wouldn't surprise me much...

FullerBot commented 3 years ago

Out of curiosity I'm going to try running the mission again, but with an earlier version of the PS2 BIOS (I had been running USA 220, switching over to USA 160).

I'll respond with the results once I've tested a bit.

Edit/Update: Older BIOS, while having some noticeable differences in the loading screens, did not help with the issue, sadly. This time, the kethor decided it would enjoy a quick jaunt into the exact opposite direction of the shield generator. I've tried doing runs (on both BIOS versions) of trying to time the kethor's rotation, but it's really really hard to get the timing right.

Wish I knew more about how this emulator worked, and the underlying PS2 code in the game, so that I could be more useful.

refractionpcsx2 commented 3 years ago

Yeah I don't think the bios change will help, this is apparently an issue on the ps2 classics version also, so the game probably has some weird script going. It will require further investigation I think

SlyCooperReloadCoded commented 2 years ago

Just wanted to say that whatever is happening here also affects this game's prequel, making a side objective uncompletable. Craft goes off-course, never reaches its destination. Should I open up a new issue for this? It's the exact same issue, but a different entry in the series. I didn't know if it would be marked as a duplicate because of this. Also it still happens in the latest 1.7.0 build.

refractionpcsx2 commented 2 years ago

Probably best keeping it to the one issue if it's the same problem

SlyCooperReloadCoded commented 2 years ago

Alright then. In the first game, Star Wars Starfighter, there's an early-game mission called Eye of the Storm which has a side-mission where you escort someone on a speeder bike to their ship. If they reach their ship, they'll take off and you'll get the bonus objective and have a pretty powerful extra wingman.

However, just like this Jedi Starfighter issue, this bonus objective also has a pathing issue, as the speeder bike will just go around the base in a large circle forever, or until the mission ends or until the bike gets destroyed, failing the bonus objective. It looks like the same issue as here, just not as gamebreaking since you can still complete all the main objectives and go on to the next mission. Also this doesn't even sometimes work like the Kethor.

SlyCooperReloadCoded commented 2 years ago

Okay, bit of an update. I've actually been talking to the lead developer of these games, he and his programmer friends are a grateful bunch and a wonderful source of development-related info. Anyways, when I asked him about this issue and what he would think it might be, at first he said he had no idea, but it must've been really interesting to him because he came back with a very detailed reply, hopefully some of this might help fix this bug:

https://imgur.com/a/WVRFhrd

refractionpcsx2 commented 2 years ago

Thanks for that conversation, that's quite interesting. I wonder if it could be any of those being off, at least in Jedi Starfighter the angle at which the ship which needs to ram in to the satellite thing seems to just pick random angles, sometimes it's dead on, other times it misses it by miles, maybe depends on the position it's in when the trigger happens?

VU math: Could be off? VU floats are quite different from x86 floats, so could be rounding differently, or if the numbers are too big we have to clamp them.

VU Timing: Possible since we time the VU's based on the EE cycles that have passed and we kinda guess account for the pipeline/dual issue, but we don't compensate for any cache misses or bus contention (this is a lot of heavy calculation and opens a can of worms for timing problems), adjusting the EE Cycle Rate slider would compensate for this.

Framerate not recoding properly: I'm not sure about this, I mean the PS2 just tries to churn out the frames in time, it's down to the game to say "ok I missed a frame, so I'll wait" and how fast it runs internally, again if the emulation isn't kicking out the frames as fast as the PS2 would, the cycle rate slider would compensate for that, somewhat.

SlyCooperReloadCoded commented 1 year ago

I have made a bit of a discovery on this, which kinda explains why you couldn't reproduce it. It seems to only fly off in a random direction if the ship is in this orientation when you destroy the second planetary cannon:

https://imgur.com/a/u8GKmbq

Unrelated, but I've made a file mod that adds a workaround for this issue, making both the Kethor and the shield generator explode as soon as the sequence starts instead of waiting for it to ram the shield generator. Doesn't count as an official workaround but if that means anything, there you go.

RIPCaptainOrsai commented 1 year ago

Hi, I know this is old and the majority of you have moved long past this and probably stopped wondering, but I found a rudimentary solution to the problem of Kethor flying off into the distance.

Wait until his ship is roughly pointed at the shield generator before destroying the final orbital gun, get behind the last orbital gun when it's at a sliver of health and just wait until you can see the front of his ship before finishing it off.

I just wanted to post this to help anybody else who had the same issues and couldn't figure it out.

SlyCooperReloadCoded commented 1 year ago

Yeah, that's what I meant by specific angle. Something to note is that the PS4 re-release of the game also suffers from this issue due to software emulation - I really do think it has something to do with clamping/rounding.

Mrlinkwii commented 5 days ago

whats the status of this on nightly ?

SlyCooperReloadCoded commented 5 days ago

I can confirm it is still an issue:

Capture

I also went back and tested the other Starfighter AI pathfinding issue I mentioned earlier in the issue, where in the first game, a speederbike circles the base infinitely instead of reaching a destination, making a bonus objective impossible, which appeared to be the same kind of issue. That issue is also still present, in the screenshot he should've entered the center of the base a long time ago, which requires a sharp turn it doesn't take:

Capture

I really do think it's a rounding/clamping issue, as like I said before, Jedi Starfighter's PS4 Classics release also has this issue.