- Enable relocation debug prints again. While it's not a critical error anymore when they happen it's still critical for debugging issues.
svn path=/trunk/; revision=68626
-include the testdata in all targets
-load it from the correct path even when the application is using a different working directory
svn path=/trunk/; revision=68623
VfatWrite (but not VfatRead) is supposed to return STATUS_INVALID_USER_BUFFER
if an error occurred while locking the buffer.
[KERNEL32]
Reading 0 bytes using ReadFile doesn't always succeed on Windows.
svn path=/trunk/; revision=68620
In CcCopyData, Buffer can be NULL during read/write operations.
[FASTFAT]
Use SEH to catch exceptions thrown by MmProbeAndLockPages.
Lock the user buffer before changing the file allocation size.
svn path=/trunk/; revision=68619
- Load sfc_os.dll because applications have a tendency to create remote threads in winlogon with sfc_os function pointers, assuming that it is loaded. See https://bitsum.com/aboutwfp.asp
CORE-9598 #resolve
svn path=/trunk/; revision=68615
PS2:
- By default all the PS/2 ports are disabled. They become enabled by the BIOS at the POST step.
- Similarly it is the BIOS POST that sets up the PS/2 controller configuration byte.
- Synchronize the value of bit 2 "System flag" and bit 4 "Keyboard enable flag" in the status register, according to what is set in the controller configuration register. What is the "keyboard enable flag" ? See http://www.os2museum.com/wp/the-dos-4-0-shell-mouse-mystery/ for more details...
HW MOUSE:
- Resetting the mouse sends also an ACKnowledge byte too...
BIOS32:
- Fix the reported number of bytes in the BIOS configuration table.
- Enable the PS/2 ports in the POST.
- Implement the "Pointing Device BIOS Interface" INT 15h, AH=C2h, AL=00h...09h based on VBox OSE & SeaBIOS; we should make our PS/2 mouse driver use it.
The real call to INT 15h, AH=C2h function is still disabled because our mouse driver doesn't react well with it, when we run some applications like MS Diagnostics.
PS2 MOUSE DRV:
- Update copyright notice;
- Remove 2 useless functions;
- I've put in comments in the code the places where calls to the BIOS ps/2 mouse interface are needed.
svn path=/trunk/; revision=68613
Irp->UserBuffer being NULL doesn't indicate any error. It could be that the
caller really wants the result stored at address NULL (which can be valid,
and is valid by default for programs like NTVDM).
svn path=/trunk/; revision=68607
- Copy-paste error fix in the initialization of the collating table.
- Fix DosCombineFreeBlocks so that it doesn't say "DOS memory arena corrupted" because while combining blocks, the current block became the last one and we tried to merge it with a next block which, by definition, cannot exist (see comment in the code).
- Remove a spurious call to DosCombineFreeBlocks in DosResizeMemory which was forgotten in r68596.
- Check the validity of the encountered MCBs during the loop for linking or unlinking the UMB chain to the main arena chain.
- Fix the size of the created UMB blocks.
svn path=/trunk/; revision=68606
- Use a static buffer for read or writes of "few" bytes (and allocate one for larger operations).
- Writes of zero length, in DOS, truncates or extends the file to the current position of the file pointer. This fixes some "corruption" in some files (so far, only .INI files) in Windows 3.11 installation.
svn path=/trunk/; revision=68604
- Implement OEM bitmaps sizes for server information. If more is need, it will be added. This will be plugged in later.
svn path=/trunk/; revision=68603
- Implement function 4Dh "Get All Handles Number of Pages", 54h "Get Handle Directory / Search for Named Handle / Get Total Number of Handles"
- Fix the return error of few functions.
- Start handling the "system handle" (special handle 0; see the specs for more details); WIP.
svn path=/trunk/; revision=68601
- Increase the maximum number of EMS handles to the maximum permitted by the specification (ie. 255 handles)
- Zero out EMS handles names.
- EMS status are always returned in the AH register!
- Implement functions 4Bh "Get Number of Opened Handles" and 4Ch "Get Handle Number of Pages"
- Remove an hardcoded value.
- Cosmetic change: rename EMS_STATUS_OK to EMS_STATUS_SUCCESS to comply with the name convention used also in XMS, etc...
svn path=/trunk/; revision=68600
- Add some level of "Advanced debugging" (see ntvdm.h) which one can adjust to enable/disable debugging features inside NTVDM (this can be useful as long as NTVDM is under heavy bugfixing. When it will be more perfect, this stuff will be removed).
- Add the possibility to load option ROMs at a given segment. Currently their list should be specified from inside ntvdm.c (in the BiosInitialize call), but I plan to make it available from a registry option (or via command-line for NTVDM-standalone mode).
- Start to separate the initialization of "static" BIOS data (stuff that lives in ROM space) and initialization of "dynamic" BIOS data (eg. initializing the interrupt vector table, the BIOS data area at segment 40h, ...) so that we may be able to reuse part of our code to be able to more-or-less run external (16-bit) BIOSes, or the Windows NTVDM BIOS that uses BOPs to run some of its stuff in ntvdm in 32-bit (as we do for our 32-bit BIOS, except that *all* of our bios is 32-bit, not just some parts). Also, some file reorganization will be in order there soon...
- Add video BIOS version information in memory so that tools such as Microsoft Diagnostics can correctly recognize our video BIOS (btw, we try to emulate the functionality of Cirrus' CL-GD5434).
- Correctly put video BIOS ROM header (+ checksum) in memory so that it is recognized as such by diagnostics tools.
- During BIOS POST, scan for ROMs starting segment 0xC000 (where video ROMs reside).
- Store statically the BIOS configuration table.
- Fix INT 16h, AH=12h "Get extended shift states" so that it correctly returns the state of right Ctrl and Alt keys.
- Fix bit-setting state; report that our keyboard is 101/102 enhanced keyboard.
- Correctly set the error return values (AH=86h and CF set) when a function of INT 15h is unsupported.
- Implement INT 15h, AH=C9h "Get CPU Type and Mask Revision"; INT 1Ah, AH=02h "Get Real-Time Clock Time" and Ah=04h "Get Real-Time Clock Date" by reading the CMOS.
- Implement CMOS century register support.
svn path=/trunk/; revision=68598
Remove broken check. Broken cases are already handled by upper if case.
This fixes the regression that leaded some valid ISOs not to be read anymore by ReactOS
CORE-9254
svn path=/trunk/; revision=68595
- Don't accept 64 bit PE files on x86 (will cause use of uninitialized variable ImageBase). CORE-9955
- Remove a pointless check in MmMapViewOfSection
svn path=/trunk/; revision=68593
Fix build on MSVC by rewriting the code in *STANDARD* C++ !! (and not into some strange idiom called "GCC-C++"). I suggest also to write a proper class for dynamically-allocated (resource) strings instead of either having the static arrays of hardcoded sizes, or being tempted to use non-standard constructs as the one I just saw.
(and btw, instead of defining a new "SIZEOF()" macro, there is one which already exists in the PSDK called "ARRAYSIZE()" which just does the correct job).
svn path=/trunk/; revision=68587
EMS:
- Introduce (and use) helpers for checking validity of EMS handles.
- Do not hardcode the EMS page frame segment, but instead allow it to be changed (for now, it is still set to a default value; in the future, via some configuration file or via the registry). This is done by acquiring a UMB block (see after).
XMS:
- Implement functions 0x01 "Request HMA" and 0x02 "Release HMA".
- Fix the return value of functions 0x04 "Global disable A20" and 0x08 "Query free Extended Memory"; simplify code of function 0x0B "Move EMB".
- Halfplement function 0x0F "Reallocate Extended Memory Block" in the simple case of size reduction (size expansion is left to the programmer as an exercise :PP )
- Rewrite the UMB provider support (functions 0x10, 0x11, 0x12) by calling the Upper Memory Area manager helpers (see after) (this is closer to reality: UMBs are either provided by XMS driver itself, or by an EMS driver which hooks into the XMS driver chain -- as it is done with MS' himem+EMM386; sometimes all that stuff is contained inside one driver only --) instead of calling back into DOS. This is the DOS which calls XMS for getting the UMB blocks and initializing them! (and not the other way around as it was done in r68001!).
NTVDM:
- Introduce an "Upper Memory Area manager" which maintains a list of areas of upper memory (>= A000:0000 and <= FFFF:000F) that can be used as RAM blocks. It is intended to work closely with the NTVDM memory manager and be used by XMS for getting possible free UMBs, and by VDDs for implementing the VDDInclude/ExcludeMem APIs (which adds/remove blocks in/from the UMB pool; those are unaccessible to DOS if those APIs are called after NTVDM have been started, but are accessible by XMS).
DOS:
- Add a helper function for detecting early DOS arena corruptions (for debugging purposes only).
- Make the DOS memory manager really UMB-compatible. This means:
* not hardcoding the start of the UMB chain;
* getting all the available UMB blocks from XMS and initializing them, marking the reserved blocks as read-only (with a correct header; reserved blocks are eg. VGA memory area, ROM blocks...).
There is room for improvements obviously (see the FIXMEs in the code). Used documentation is mentioned in comments in the code.
This commit should fix quite some apps, as well as it fixes corruptions of loaded ROMs in upper memory: that's how I came into working on fixing the UMB support. In other words, during those two last weeks, I was like in: http://i.imgur.com/zoWpqEB.gifv
CORE-9969 #resolve
svn path=/trunk/; revision=68586
- Remove some hardcoded values.
- Reshuffle again DOS initialization to better reflect how it is done in the real world (see "Advanced MS-DOS Programming" by Ray Duncan, Chapter 2 "MS-DOS in Operation"): split DOS data stuff into DOS BIOS data, and DOS kernel data areas.
In preparation for an upcoming commit.
svn path=/trunk/; revision=68585