Use linear 128 KB video memory pages for VESA modes #3767
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #3762
(The PVS-Studio warnings are fixed here #3758; I somehow introduced those to main today...)
This gets rid of the odd horizontal black line in the following Synthetic Dimensions games, and maybe other games and demos.
This seems like a very safe change to me as most normal programs won't attempt to write past the 64K VESA page boundary. Then these outliers that do will simply just work without the black line glitch.
Where I could see regressions theoretically are some weird demos that intentionally exploit some wraparound behaviour of 64K VESA pages, if such a thing even exists... But frankly, I would not care about those; just go watch a hardware capture on Demozoo or YouTube π
I also refuse to call this a "bug"... well, it's not really that. Let's call it a video-related enhancement that improves compatibility with shoddy coding practices π
Thanks @interloper98 for pointing me into the right direction regarding the fix π
Manual testing
Synthetic Dimensions games don't have the black line anymore:
Games that use the 640x480 / 256-colour or higher VESA modes continue to work fine:
Checklist
Please tick the items as you have addressed them. Don't remove items; leave the ones that are not applicable unchecked.
I have: