feature: VESA VBE 1.2#1978
Merged
maximilien-noal merged 2 commits intofeat/VBE_VESA_1.2from Mar 16, 2026
Merged
Conversation
Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] [WIP] Add VESA VBE 1.2 support to VGA BIOS
feature: VESA VBE 1.2
Mar 16, 2026
maximilien-noal
approved these changes
Mar 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds/refines VESA VBE 1.2 support in the VGA BIOS interrupt handler to improve Super VGA compatibility (e.g., enabling games that probe VBE capabilities), primarily by updating reported versioning and replacing magic numbers with named constants.
Changes:
- Report VBE 1.2 (
0x0102) in controller info and update related log/message text. - Extract VESA mode numbers and mode-info “magic numbers” (bpp, scanline sizing, RGB field positions) into named constants.
- Fix the “YCharSellSize” typo in XML documentation.
You can also share your feedback on Copilot code review. Take the survey.
| /// </summary> | ||
| public const byte BitsPerByte = 8; | ||
| /// <summary> | ||
| /// Bits per pixel for 4-color planar modes (EGA/VGA 16-color). |
Comment on lines
+210
to
+212
| /// VESA mode 111h: 640x480, 16-bit (RGB 5:6:5). | ||
| /// </summary> | ||
| public const ushort VesaMode640x480x16 = 0x111; |
Comment on lines
+196
to
+200
| public const ushort VesaMode320x200x15 = 0x10D; | ||
| /// <summary> | ||
| /// VESA mode 10Eh: 320x200, 16-bit (RGB 5:6:5). | ||
| /// </summary> | ||
| public const ushort VesaMode320x200x16 = 0x10E; |
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.
Implements VESA BIOS Extension (VBE) 1.2 support for the VGA BIOS, enabling Super VGA modes for games like Rules of Engagement 2. Adds three core VBE functions:
GetControllerInfo(00h),GetModeInfo(01h), andSetMode(02h), plus memory-mapped data structures for VESA information exchange.Address reviewer feedback to eliminate magic numbers and fix documentation:
0x0102(VBE 1.2) instead of0x01000x100–0x11B) extracted to named constants inVbeConstantsBitsPerPixelPlanar4Bit,BitsPerPixel8/15/16/24/32Bitadded toVbeModeInfoConstantsBitsPerByte,BytesPerPixel16/24/32Bit,PlanarModePlanesreplace magic numbers in scan line width calculationsRedFieldPositionRgb555/565/24,GreenFieldPositionRgb16/24,BlueFieldPositionmake bit layout explicit0x004F: Replaced with(ushort)VbeStatus.Successfor consistencyRationale behind Changes
Some games try to use VESA VBE (like Rules of Engagement 2). The refactoring addresses reviewer feedback to replace magic numbers with named constants for maintainability and self-documentation.
Suggested Testing Steps
Already tested with Rules of Engagement 2.
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.