CORE-11954, CORE-16216
Here only moving and adjusting existing code has been done.
In the future, this code will be expanded to support other bits-per-pixel
formats and pixel bitmasks, available in UEFI platforms, and be used to
handle bios-based PC VESA framebuffer.
CORE-16216
machpc.c:
- Surround more PC-specific routines in `#if !defined(SARCH_XBOX)`,
so that they aren't compiled for XBOX.
- In particular since commit 246f2d29db (PR #8418), the PC-specific
`DiskGetConfigType()` was compiled at the same time as the XBOX one.
This is now fixed.
machxbox.c
- Add a dummy `ChainLoadBiosBootSectorCode()` to make freeldr exports working.
xboxdisk.c
- Minimal Disk I/O error support routines.
- Add a dummy `DiskResetController()`, invoked in pchw.c
- Add a dummy `DiskStopFloppyMotor()`, needed for entry.S/linux.S
miscboot.c
- Still compile `LoadAndBootSector()` (avoids lots of changes elsewhere),
but display an error message if it's run, and directly return with an error.
pcat.cmake
- Remove unnecessary dependencies on pcdisk.c and pcvesa.c
This allows FreeLoader to know which initial video mode it has been
started with (e.g. if chainloaded from another bootloader that has
set the display to something different from 80x25 text mode), and,
either update its internal state and use the video mode if supported,
or, fall back to a known supported video mode (80x25 text).
- Remove the hack for PAGE_NOCACHE flag that was introduced in commits aa52dc7498 (r68611) and 33d53d44da (r68612) for CORE-9808. The test case for PAGE_NOCACHE, introduced in 7346aece52 (r68351), did not expose any additional problems without it anymore.
- Allow a PAGE_WRITECOMBINE flag. Fixes a regression introduced in 59ae6b3e15 (CORE-20298) that caused the OpenGL ICD in Nvidia 78.05 driver to not use GPU hardware to accelerate OpenGL anymore (reported and tested by winterhell on Discord).
- Add a test case for MmMapViewOfSection with PAGE_WRITECOMBINE. The test passes on Windows 2003 SP2 and Vista RTM.
- Fix ASSERTs in MI_MAKE_HARDWARE_PTE functions.
Don't use version.dll APIs! This code runs during DLL process attach and all it can call is ntdll and kernel32.
There is still a hack, that calls GetFileVersionInfoSizeW, which is required for some reason, otherwise comctl32_winetest tooltips starts to fail.
It has possibly something to do with the initialization order of loaded DLLs.
Cache the type when initializing the video, instead of invoking every time
`PcVideoDetectVideoCard()`. Indeed, the video card is not going to change
magically at runtime by the user :D
It contains the symbols & macros used for the embedded VGA font.
- Adjust users to use `const UCHAR*` instead of `PUCHAR` pointer;
- pc98video.c: Capture the current `FontPtr[Line]` into an `UCHAR`,
so as to safely modify it.
- `PcVideoDetectVideoCard()`: Fix the call to Int 10h AX=1A00h.
A 23-year old regression from commit 425bbb1543 (r3782), introduced
by a copy-pasta error when converting video code from ASM to C.
- `PcVideoSetMode80x50_80x43()`: Fix setting the 80x50 VGA text-mode,
which _is_ based on the 80x25 text-mode BIOS 0x03, see e.g.
https://github.com/torvalds/linux/blob/c2f2b01b74be8b40a2173372bcd770723f87e7b2/arch/x86/boot/video-vga.c
A 18-year old regression from commit 1b3e649577 (r25751), where the
correct mode 0x03 was replaced by a VGA graphics mode 0x12, whereas
the intent in this commit was to only switch to mode 0x12 only in
`PcVideoPrepareForReactOS()` -- this was because at that time, bootvid
and hal didn't support changing the video mode to what they needed.
This has been fixed since.
- Implement creation and deletion of GPT partitions.
- Adjust the active, clean, detail, inactive, list, select, setid and uniqueid
commands as needed.
- Add a 2^32 sector count limit for MBR partition tables.
This is to prevent redefinition warnings when including wine's corecrt.h
The additional !defined(malloc) prevents errors when compiling libwine, which defines malloc to libwine_malloc.
The code called winetest_setlocation, which calls strrchr, which clears the direction flag, so the test was succeeding on x86, even though strlen never changes it. On Windows it somehow depends on whether you compile the test on the command line or inside VS.
This change fixes the test by explicitly reading eflags before using winetest_ok and placing a MemoryBarrier in between.
Windows ntdll and ntoskrnl export a multibyte capable version of toupper (not tolower though!)
The internal version is kept as it is, because the multibyte version requires unicode tables to be set up and doesn't support IRQL > APC_LEVEL.
Why though would toupper (but not tolower) support raw, undecoded multibyte characters, you might ask. Well I don't know, but someone at MS must have decided that this is a good idea, and winetests show this is how it behaves.
Previously tolowerW/toupperW was defined to towlower/towupper, which was imported from ntdll. These functions don't work correctly though. Instead use wine's case mapping table.
The "unhacking" is done in k32.h, because the original hacks in wine/unicode.h are still needed in other places.
Fixes 1 LCMApString test and prevents further regression when fixing iswctype in libcntpr.
The tests fail, because this is more of a unit test, than an apitest. It's questionable, whether running it on Windows is even useful.
The tests will be marked as todo on Windows, but not on ReactOS.