-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
DVDInterface: Translate and align offsets for timing purposes #1900
DVDInterface: Translate and align offsets for timing purposes #1900
Conversation
@@ -1291,7 +1343,7 @@ u64 SimulateDiscReadTime(u64 offset, u32 length) | |||
} | |||
} | |||
|
|||
g_last_read_offset = (offset + length - 2048) & ~2047; | |||
g_last_read_offset = end_offset; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
9cd445b
to
33ef393
Compare
I've added a fix for buffered decrypted reads. Not sure how good it is. |
@dolphin-emu-bot rebuild (sorry, was doing some buildbot maintenance at the same time) |
33ef393
to
41f5401
Compare
b6b8eeb
to
2596b32
Compare
2596b32
to
fe85daf
Compare
fe85daf
to
6738d3a
Compare
Ping? |
How did you test this? How did you tell that this is more accurate? |
I don't have a good way to test this, really... :/ I guess it would be possible to compare the loading times in some Wii game, but if we want something less approximate, writing custom homebrew software would probably be needed. CleanRip won't help with this, because it doesn't decrypt and it reads everything using big, aligned requests. But while I don't know how accurate things are with this PR, I know that the old way of completely ignoring decryption can't be right. It would require the disc drive to magically read faster whenever IOS wants to decrypt data. |
733b1e6
to
03a1b55
Compare
03a1b55
to
63803b7
Compare
It's hard to say if this is more accurate or not. My guess is that overall it's not really more accurate, since the proper simulation would be having our IOS HLE simulate IOS' dvd read strategy when files are accessed (in addition to something similar to what this commit does). So, I'm not really in favor of the commit. However, if it is going to be committed, please make all the magic sizes be constant variables so that they have names. |
63803b7
to
3397ccb
Compare
The constants from VolumeWiiCrypted are now used, along with a SECTOR_SIZE constant. |
3397ccb
to
5707e50
Compare
5707e50
to
4211d49
Compare
4211d49
to
d7fed99
Compare
d7fed99
to
2e5c3d6
Compare
2e5c3d6
to
a9b1338
Compare
ec01089
to
a791d03
Compare
a791d03
to
814154d
Compare
d69f44e
to
1036f0a
Compare
1036f0a
to
5b87b21
Compare
6fd6e45
to
769c7be
Compare
A hardware test by @mmastrac showed that disc drive reads are aligned to 32 KiB, the size of an ECC block, which makes sense. Because of that, I've changed this PR from aligning to 2 KiB to aligning to 32 KiB. Also, I removed the |
This is a fairly large timing change for decrypted reads and a smaller timing change for non-decrypted reads.
It only roughly matches the last read offset. What we actually use it for is determining where the buffer got its data from.
b605eed
to
d786e88
Compare
PR #4829 makes half of this PR obsolete. The other half needs to be more or less rewritten. I'll open a new PR for that later. |
This is a fairly large timing change for decrypted reads and a smaller timing change for non-decrypted reads.