Its purpose is to offer an out-of-the-box generic framebuffer video
(a video miniport driver for win32k will be introduced in a future PR)
to ease ReactOS porting to other possibly non-PC-compatible systems,
where no VGA-compatible video is present and only linear framebuffers
are available; for example: XBOX, UEFI with GOP only, AppleTV, etc.
Of course, once ReactOS is ported, one can then (and should) write,
or use existing video drivers tailored to the system of interest.
Together with our FreeLoader, this driver could also be employed for
of porting/modding Windows 2000/XP/2003 attempts to other platforms,
as this has been done by external contributors.
Current limitations:
- Only supports 32 bits-per-pixel ARGB format. This limitation will be
removed in subsequent PR(s).
- May be slow during rendering (region color filling and scrolling);
I will try to improve this as time goes.
This driver's code is loosely based upon preliminary code by Justin Miller
and on the existing XBOX bootvid implementation.
Tested by Justin Miller (@TheDarkFire) for UEFI, and by Sylas Hollander
(@DistroHopper39B) with his AppleTV port.
It has also been tested with VESA linear modes on PC by myself.
Use `PCSTR` for the type of the (Hal,Inbv,Vid)DisplayString() routines'
`String` parameter, instead of `PCHAR` or `PUCHAR`, since it points to a
NUL-terminated string. (The buffer isn't a counted string.)
And improve SAL annotations along the way.
This makes the code more readable than using e.g. `VidpScrollRegion[0]`,
`VidpScrollRegion[1]` etc. instead of `VidpScrollRegion.Left`,
`VidpScrollRegion.Top` respectively.
Based on a suggestion by Dmitry Borisov.
In addition:
- move back common function prototypes to precomp.h;
- const-ify `VidpFontData` and adjust its usages;
- improve SAL annotations for `InitPaletteWithTable()`;
- rename the (Vid)ResetDisplay() parameter to "SetMode".
Fix two similar warnings, that were treated as errors:
- warning C4146: unary minus operator applied to unsigned type, result still unsigned
Addendum to fa1ec0a2ed. CORE-16216 CORE-16219
- Move functions from header to main source, keeping their definitions
- Fix typo DefaultPalette -> VidpDefaultPalette
- Add missing PrepareForSetPixel() function
Addendum to 5f2ca473dc and cd91271796. CORE-17617 CORE-17604
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
to dead links.
- Use MS Learn links rather
than MSDN ones.
- Some dead links revived by
Web Archive.
- Don't change Wine Tests
and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
- Add boot video color constants
- Refactor palette initialization
- Move some common stuff in right place
- Get rid of some magic constants and hardcoded values
- Get rid of TopDelta variable (calculated at compile time)
- Update SAL annotations
Addendum to 5f2ca473. CORE-16216 CORE-16219
Addendum fixes to ca370b49 (r52239) and a965ca6b (r52409).
- Fix the comments to explain what is really happening.
- Fix the boundary calculations in VidDisplayString() so that we can
correctly display a character in the very last column before going
to the next line, and fix similarly the vertical boundary calculation.
- Port the fixes to the ARM code.
- Import cmdcnst.h and vga.h headers from the 'vga_new' VGA Miniport Driver,
that contain definitions related to VGA registers as well as command-stream
functionality.
- Replace a bunch of hardcoded values by their corresponding defintions.
- Replace "Captain-Obvious" comments in VgaIsPresent() with actual
explanations from the corresponding function in 'vga_new'.
- Simplify the VgaInterpretCmdStream() function, based on the
corresponding one from 'vga_new'.
- Use concise comments in the 'AT_Initialization' command stream definition.
- Import the 'VGA_640x480' initialization command stream from 'vga_new'
and use it as the full VGA initialization stream whenever the HAL
does not handle the VGA display (HalResetDisplay() returning FALSE).
Otherwise we just use the 'AT_Initialization' command stream that
performs minimal initialization.
- Remove unused AT_Initialization and other declarations from ARM build.
- VgaIsPresent(): Re-select the memory mode register before playing
around with the sequencer flag. Otherwise the VGA may not be detected
correctly from time to time.
- VidInitialize(): Simplify the initialization loop, reset AddressSpace
to its "default" value of 1 when calling HalFindBusAddressTranslation()
on 'NullAddress'.
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.
On my system, this reduces the configure-time by a factor of two.