Skip to content

Conversation

@TC1995
Copy link
Contributor

@TC1995 TC1995 commented Dec 27, 2023

Summary

See above.

Checklist

References

Provide links to datasheets or other documentation that helped you implement this pull request.

svga->hdisp_old = svga->hdisp;

if ((svga->bpp <= 8) || ((svga->gdcreg[5] & 0x60) == 0x00)) {
if ((svga->bpp <= 8) || ((svga->gdcreg[5] & 0x60) <= 0x20)) {
Copy link
Contributor

@iamgreaser iamgreaser Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a critique of this commit, but a critique of how stuff unfolded in order to support [INSERT SPECIFIC SVGA ADAPTER HERE]. All things considered, this pull request does fix the issue.
What's happening here will need to be tidied up at some point, because so far it seems that this was written to fix a specific adapter, but... well, I can tell you right now that the second condition in the OR will break on an S3 Trio when someone decides to get a bit funky (SVGA modes override VGA modes on S3 Trio, though the extent hasn't been fully worked out yet) and actually, maybe someone won't even need to get funky for this to break.
However, fixing this will also require working out which cards this workaround was required for. From what I can tell, this was for the Matrox MGA cards.

Anyway, this PR should fix the problem, at least for now. But we really do need to track all the differences for the SVGA chipsets we emulate.

@OBattler OBattler merged commit acdc2c7 into master Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VGA and SVGA backwards compatibility with CGA is broken

4 participants