(S)VGA paletted renderer rewrite#3839
Merged
OBattler merged 8 commits intoNov 21, 2023
Merged
Conversation
About half of it was taken from the EGA renderer. Also, the "force_old_addr" hack is kept here for now.
It appears that the S3 Trio does something weird with its 8bpp modes. Specifically, it seems to ignore some of the flags needed for dword mode. I will keep looking into that and see if I can find a good solution.
Outside of that, we're now using the remappers properly.
This gives more likely behaviour when one loads more often than the address is incremented. The behaviour matches an Intel GMA 4500MHD (2008) which is the earliest hardware I'm able to test right now.
Easy test case in QBASIC:
SCREEN 10
PSET (2,0),2
There should be a blinking pixel in the top-left.
I was going to use the existing 8bpp renderers as-is for the S3 stuff but then found out how to make it work on the new generic renderer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This replaces the generic (S)VGA 2bpp, 4bpp, and 8bpp renderers with a single renderer which supports more of what the VGA at least theoretically does.
I am aware that this almost certainly will break a lot of things. I've tried to not break things, but, well... a lot of stuff depends on the (S)VGA renderer.
Features:
I will need to go back through the EGA renderer and get a lot of this stuff backported to it as, after scratching my head throughout this, bugs and missing features have been revealed.
The main thing I've learnt from all this? Odd/Even mode is a configuration nightmare, and VGA makes it even worse.
Checklist
References
The Chips & Technologies 82C451 datasheet was the most valuable authoritative reference.
I ensured that Pinball Fantasies still worked on IBM VGA and a VLB S3 Trio64. (The virtual machine I was using, a MR BIOS SX495, does not use PCI so I was unable to compare a V+ card, but I could get something set up for that.)
I also ensured that all QBASIC graphics modes usable on a VGA in MS-DOS 6.20 still worked on both as well - that is, 1,2,7,8,9,10,11,12,13.