PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.63k stars 1.6k forks source link

[SCUS-97128] Drakan - The Ancients' Gate - Long load times #3659

Closed trostboot closed 2 years ago

trostboot commented 4 years ago

PCSX2 version: PCSX2 1.7.0-20200830215020, also tested with 1.0.0

Plugins used: defaults, GSdx SW

Description of the issue: Load times, especially initial load from memory card, are very long, and what should be a fairly smooth fade to black after initiating the load is fairly stuttery (emulated FPS stays at 60, however). In fact, load times are up to twice as long as on real hardware. I've timed it (from pressing the button to load the save to the loading bar disappearing), loading the same save every time, here are the results:

Real fat PS2, internal IDE HDD: 13.09s PCSX2, no hacks: 25.12s PCSX2, fast DVD: 17.13s PCSX2, fast DVD, EE 300%: 15.26s PCSX2 1.0.0, no hacks: 25.40s

The optical disc drive in my PS2 is pretty sketchy, so no use timing that. The 1.0.0 result is well within margin of error, but the results are clear. And just to point it out, whether the image is on spinning rust or an NVMe SSD makes no difference, host I/O clearly isn't the bottleneck here.

How to reproduce the issue: Load the game! Here is the save I used for this. For funsies, have PCSX2 and your PS2 running next to each other and press load at the same time. ;)

PC specifications: Ryzen 3900X, GTX1080, Win10 2004

MrCK1 commented 3 years ago

@trostboot can you double check on the latest dev build to see if anything has changed regarding this?

trostboot commented 3 years ago

Same as before, no changes.

MrCK1 commented 3 years ago

@trostboot can you check this again on the latest dev build? There were a number of CDVD changes made recently that may have affected this issue.

refractionpcsx2 commented 3 years ago

I'd like to know how fast your DVD drive is, that's what we're emulating timing/speed wise, not a HDD, that will obviously be faster.

You're welcome to configure a HDD in PCSX2 and set that up like your PS2 and run the game off that, then see what that speed is like.

trostboot commented 3 years ago

Okay, so, still using the same save:

Current dev build, no fast DVD: ~32s Current dev build, with fast DVD: ~28s Current dev build, running the game from a virtual HDD via OpenPS2Loader: ~8s

I would love to compare this to running it directly from disc on real hardware, but unfortunately, as I pointed out initially, the disc drive isn't in good condition, so any data coming from me wouldn't be that useful. So the even longer load times may or may not be more accurate, I can't say. Need more data.

Because of that, I can't really draw any conclusions other than the fast DVD option may be a misnomer given how much headroom there is available? The tooltip makes the mention to the typical HDLoader compatibility mode, which draws the comparison, even if that's not intended.

Definitely doesn't seem to be a core issue, at any rate, if it even is an issue to begin with.

refractionpcsx2 commented 3 years ago

Okay, well loading times may be lower now as we've reduced the read speeds in an effort to make them more accurate, however I'm not in the game of comparing apples to oranges.

so using an internal HDD on PCSX2 is faster than the real hardware with a HDD? That's good for you I guess :P Though I'd be tempted to slow that down.

As for the DVD read speeds, I have absolutely no interest in addressing your issue until we have real numbers from the console loading from disc.

trostboot commented 3 years ago

so using an internal HDD on PCSX2 is faster than the real hardware with a HDD?

It is, but that's also comparing a PCIe4 NVMe SSD vs. an old IDE drive, so, apples and oranges, as you said. ;)

If someone has the game and a non-croaky drive, I'd love to see the numbers.

refractionpcsx2 commented 3 years ago

It is, but that's also comparing a PCIe4 NVMe SSD vs. an old IDE drive, so, apples and oranges, as you said. ;)

Sure, but the type of drive is irrelevant, we're comparing HDD loading to HDD loading, if our HDD loading is quicker, then it's possible we have a timing problem, it can be too quick, but, as I'm trying to say, the HDD should be of emulated speed, not actual drive speed.

You could make the same argument for ISOs that they should load faster than the real disc because they're loading off a HDD, which is also a ridiculous argument (but in the other direction to your HDD claim). The point is we should be emulating loading times accurate tot he actual console, regardless of how you store your HDD image or ISO's or whatever for the emulator.

trostboot commented 3 years ago

I guess that depends on how you measure the consoles performance when loading from HDD. Do you wish to emulate the specs of the official HDD, or whatever the limit of the storage subsystem of the console is, since you can stick pretty much anything you want in there. Even a SATA SSD with a SATA->IDE connector should work, which would be a gigantic waste but might still net you some gains in non-sequential reads (maybe even roughly the gains we're seeing here, hard to say).

I can say that for this particular game and load event, even going down to MDMA0 makes no difference to load times on real hardware (won't boot with anything lower than UDMA0 on PCSX2), which would still be 4.2MB/s, or what, roughly 8-10x the disc drive speed depending on where you're reading from? On the other hand, simply writing to the hard drive over network will reach a bit over 5MB/s, so there is some more room there. I suppose that might be a way to see where PCSX2 is right now, but I haven't been able to connect to a server running on the emulator yet.

I also completely agree that the default behaviour should be to be accurate to the console behaviour, but "use at your own risk" options that can improve upon that are always welcome. I suppose "run it on top of OpenPS2Loader" is the option, but it's a bit cumbersome.

refractionpcsx2 commented 3 years ago

Even a SATA SSD with a SATA->IDE connector should work, which would be a gigantic waste but might still net you some gains in non-sequential reads (maybe even roughly the gains we're seeing here, hard to say).

Well all you gain there is a SATA adapter, the interface is still the same speed, any performance benefits you get on the console are due to the newer drive tech seeking faster. However we should be emulating the ATA/100 (or 133, I forget) speeds which the console has, it shouldn't be going any faster.

trostboot commented 3 years ago

Well all you gain there is a SATA adapter, the interface is still the same speed, any performance benefits you get on the console are due to the newer drive tech seeking faster.

Yep, that's what I meant by non-sequential reads.

However we should be emulating the ATA/100 (or 133, I forget) speeds which the console has, it shouldn't be going any faster.

Should be ATA/66, or UDMA4. Which would still be far faster than you realistically see even in my tests here, so I think you're good on that front. Still, I get what you're saying, there's clearly a different bottleneck somewhere on real hardware which you may not account for.

trostboot commented 2 years ago

Out of curiosity, I grabbed the disc and tested it anyway. Again, not sure how much I trust the disc drive in my PS2, but the results were at least consistent with minimal variation across multiple runs.

Sketchy PS2 ODD: ~42s

Additionally, running the game straight from a PC disc drive on PCSX2 resulted in yet again slower loads at 36s and 31s without and with fast CDVD respectively, but that appears to be mainly due emulation speed dropping below 100%, which does not happen when run from a disc image. Don't know if that's expected behaviour or not.

I'd say this is probably not an issue in the sense I was thinking of initially, if anything, the even slower disc reads after recent changes are indeed more accurate, as you mentioned.

But I do think there's value in having an option that mimics the way data is read using something like HDL/OPNPS2LD. Even at it's slowest settings using MDMA0 with Accurate Reads (aka Mode 1), it will load faster (15s) than anything you can achieve in PCSX2 currently using the CDVD path. I've played games from HDD on PS2 for over 15 years now, and a large portion of games are perfectly fine with that.

Anyway, just throwing that out there. If you think that's something worth discussing, I'll amend the initial issue, otherwise, feel free to close this. The issue as described right now doesn't seem to be relevant.

refractionpcsx2 commented 2 years ago

I don't care what OPL says, it isn't accurate :P You can't play Shadowman 2 on OPL without a patch because it reads discs too fast.

trostboot commented 2 years ago

You're missing my point. I'm not in any way advocating for that to be anything close to default behavior. Because it most definitely does break some games. But a very large portion of the library doesn't really care (as is evident both from my own experience and the extensive compatibility databases floating around), and having faster loading times is a pretty decent enhancement, for some games more so than others. I consider Suikoden V to be essentially unplayable from disc, for instance. Consider it the upscaling of the I/O world, it'll likely never work correctly for some games, but is still desirable where it works.

refractionpcsx2 commented 2 years ago

okay, so your issue isn't that the CDVD timings aren't accurate? you're just asking for a "super fast loading method hack"? because right now you're basically telling me "I don't care what the proper speed is, my games don't mind loading quickly so I'm happy with that".

I'm sorry but I'm not in the business of just adding hacks willy nilly and throwing compatibility out the window. Just because most of your games are fine, there will be many which aren't, and our goal is accuracy to the console.

If you need to speed up game loading, I suggest you press F4 to take the frame limiter off, then your game will load in mere seconds.

trostboot commented 2 years ago

Never mind, you're clearly not interested in reading what I'm writing. I already went over that.

refractionpcsx2 commented 2 years ago

I did read what you wrote, you said your library doesn't care about being loaded quickly, your initial post was complaining our disc loading speed wasn't as fast as your PS2 hard drive, nothing you have said has told me you're actually interested in accurate disc reading speed.

trostboot commented 2 years ago

That's grossly misrepresenting what I said.

The short version is, I made this issue because I noticed the stuttering during loading, which wasn't happening on real hardware. During tests I realized the substantial difference in load times, hence this what I focused on (the stuttering being a result of the fade-out being tied to however they're loading stuff).

It was then requested I re-test with various CDVD changes, which I did and noted the above results. We came to the conclusion that this is basically working as intended.

I then offered to amend the issue to switch the discussion to the feasibility of introducing a separate option that would more closely mimic the read behavior of a real hardware using homebrew software (which isn't magic and is still just using the hardware itself). Again, entirely separate from the correct, accurate, slow behavior. Emulation for many people is as much about preservation as it is about enhancement, and both can co-exist. As at least some of the team seem to agree with, or there wouldn't be optional hacks or upscaled hardware renderers at all.

That is all I was suggesting. And I even said, if you don't think that's worth discussing, just close the issue and that would've been that.

refractionpcsx2 commented 2 years ago

Okay, so if the original issue was stuttering, why did you include a bunch of timing results from various places? They are completely irrelivant and muddies the problem, which is why we've gone off on this tangent about timings through the entire thread.

As for the stuttering, that can happen when loading in PCSX2 anyway because we have to wait for the ISO/Disc read to finish before we can time it if it hasn't done it in the time it takes to read 1 block from the disc (which it rarely does), so the emulation pauses to make sure the read is complete before it continues and the rest of the timing is done internally.

Usually this is resolved by using faster drives to read the ISO from.

trostboot commented 2 years ago

No, the issue (in my mind when writing the issue) wasn't the stuttering, it was the load times. The way Drakan transitions between screens during loading seems to be hard-tied to the overall progress of the load bar. Something like advance by 1 frame for every 0.5% progress (numbers completely made up), so it will be smoother when loading is faster. That's what got my attention, because that wasn't happening on my PS2, which lead me to quantify the differences in load time, thinking that was the problem.

But as you've rightly pointed out and we have now established, this is pretty much working as intended. The original issue is therefore resolved (or rather, wasn't one to begin with), and is why I offered to amend the issue to reflect the turn the discussion had taken if there was interest in talking about that further.

Anything else I'm frankly no longer interested in addressing, you made it clear you're not interested in additions not focusing on accuracy, and we're just going in circles anyway.