summaryrefslogtreecommitdiff
path: root/Source/Core/Common/GekkoDisassembler.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-03-31 21:39:04 +1000
committerStenzek <stenzek@gmail.com>2019-03-31 22:05:53 +1000
commit378b605669641ec9675e137d04f4037bc621cd46 (patch)
tree51913652f1fc9fe43a1c7aaa8758acf77e27984d /Source/Core/Common/GekkoDisassembler.cpp
parent3e544f963754509cfa5c5ef2f8c933cf1ddfc343 (diff)
BPStructs: Gracefully handle out-of-range EFB copies
Since the copy X and Y coordinates/sizes are 10-bit, the game can configure a copy region up to 1024x1024. Hardware tests have found that the number of bytes written does not depend on the configured stride, instead it is based on the size registers, writing beyond the length of a single row. The data written for the pixels which lie outside the EFB bounds does not wrap around instead returning different colors based on the pixel format of the EFB. This suggests it's not based on coordinates, but instead on memory addresses. The effect of a within-bounds size but out-of-bounds offset (e.g. offset 320,0, size 640,480) are the same. As it would be difficult to emulate the exact behavior of out-of-bounds reads, instead of writing the junk data, we don't write anything to RAM at all for over-sized copies, and clamp to the EFB borders for over-offset copies.
Diffstat (limited to 'Source/Core/Common/GekkoDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions