Resource names are sorted with '_' being higher than any alphabetic characters. This means _wcsicmp cannot be used to search, because it lowercases the characters before comparison, which would make '_' lower than lowercase alphabetic characters. Implement a custom compare function instead.
See CORE-20401, CORE-20408
Addendum to commit 9e64fa837d (PR #8510)
CORE-16216, CORE-17977
pcmem.c: Surround more PC-specific routines in `!SARCH_XBOX || !SARCH_PC98`,
so that they aren't compiled for XBOX or PC98.
pcat.cmake: Inform that pcmem.c is used by pc98mem.c
CORE-16216
Addendum to commit 9e64fa837d (PR #8510)
Fixes GCC complaint when compiling for XBOX (or PC98)
```
boot/freeldr/freeldr/arch/i386/pc/machpc.c:1123:1: error: 'DetectKeyboardController' defined but not used [-Werror=unused-function]
DetectKeyboardController(PCONFIGURATION_COMPONENT_DATA BusKey)
^~~~~~~~~~~~~~~~~~~~~~~~
```
* [APPHELP] Handle PE images without an import name table
This splits the import lookup code in SeiHookImports into two helper functions - SeiPatchImportsByName and SeiPatchImportsByAddress.
Some PEs (eg. compiled with Borland toolchain or compressed with UPX) may not contain an import name table, so we use an alternative method (SeiPatchImportsByAddress) to find the imports we want to hook to by comparing the original pointers of the registered shim functions against those in IAT.
---------
Co-authored-by: Stanislav Motylkov <[email protected]>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <[email protected]>
Change both of these from "Tahoma" to "Microsoft Sans Serif" for Latin Fonts only.
It is possible that other language types would benefit, but I am unable to test these.
CORE-15675 and CORE-15678 (Both Fixed.)
CORE-16435 (Improvements only. Not totally fixed.)
Partial revert of 9decadee83.
It introduced a typo in the assembler code that broke the build.
Also, "Press any key" text fits into 512 bootsector space on both GCC/MSVC.
CORE-19882 CORE-17977
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
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.