Fix icon selection regression caused by cascading fix. In this case, this should probably go into trunk.
CORE-8574
svn path=/branches/0.3.17/; revision=65091
- Use macro version of RtlUlonglongByteSwap in winternl.h because using the fastcall version causes stack corruption
CORE-8632 #resolve
svn path=/trunk/; revision=64749
- Invalid extended opcodes get a special handler, so that we are not anymore obliged to check for NULL before running an extended opcode.
- To quickly retrieve extended opcode numbers, add their numbers in regard to their handlers.
svn path=/trunk/; revision=64745
- Also make NtfsFindMftRecord() return the name of the record it found
- Implement support for entry enumeration (from 0 or not) in NtfsFindMftRecord()
- Experimental fix in NtfsLookupFileAt(), look for the attribute using the name of the record, and not the full path
- Implement NtfsFindFileAt() which is used to look for a file/directory using WC in a given directory
svn path=/trunk/; revision=64743
- Prepare (only prototype so far) NtfsFindMftRecord() for directory search & enumeration with WC.
- Modify CompareFileName() so that comparisons can be done with or without WC.
- Fix NtfsLookupFileAt() accordingly
svn path=/trunk/; revision=64742
- Call CpuUnsimulate in EmulatorTerminate so that we really stop the CPU, before stopping the rest of the VM.
- We can reset CpuRunning to TRUE in CpuSimulate *only* if the VM is still running AND the CpuCallLevel is strictly positive (>=1 means, CPU halted or running; ==0 means, CPU stopped).
svn path=/trunk/; revision=64741
- Use the authentication ID to determine if a token represents a child of the current process.
CORE-8631 #resolve #comment the installer now works fine, but chrome fails to start
svn path=/trunk/; revision=64735
- Rename wined3d.dll as d3dwine.dll, so that the VBox additions don't erase it.
Dedicated to Daniel: Now you can safely use the opti-hacked vbox 3d additions.
svn path=/trunk/; revision=64724
* Update TFTPD Server. Initial patch by Kudratov Olimjon with some changes by me.
CORE-8620 #resolve #comment Committed in r64714 with some changes.
svn path=/trunk/; revision=64714
- Since NTSTATUS definition is returned into bcrypt.h, then let's define PNTSTATUS too. Otherwise it makes no sense and errors out.
- Handle BCRYPT_H and __WINE_BCRYPT_H in ndk/umtypes.h. Thomas said that BCRYPT_H is not an option - but our NDK should be compatible with ReactOS PSDK too. If I am wrong, please feel free to change __WINE_BCRYPT_H to BCRYPT_H in psdk/bcrypt.h, fix related probelms and revert my change. Thanks!
svn path=/trunk/; revision=64713
- Extend GetUserObjectInformation test to include the ansi version. ... this is the lazy way and just duplicates the code, feel free to make it more concise.
CORE-8101
svn path=/trunk/; revision=64706
* Introduce support for for MSVC native run-time checks. Set RUNTIME_CHECKS to TRUE to enable it.
* Dedicated to Christoph von Wittich and all ReactOS devs that use MSVC builds ;)
CORE-8626
svn path=/trunk/; revision=64704
- Allow the thread that called LdrShutdownProcess to forcefully acquire critical sections (the loader lock in particular).
This fixes the race condition where ExitProcess might terminate a thread holding the loader lock and subsequently call LdrShutdownProcess. That would then result in a deadlock because LdrShutdownProcess cannot acquire the loader lock.
This is a pretty ugly hack... but at least Windows does it the same way.
Fixes hangs after the summary line when running mshtml tests.
CORE-8624 #resolve
svn path=/trunk/; revision=64702
- Move the stack frame indices to where they belong (this is the stack layout when an interrupt is called).
- In the bootstrap interrupt, modify the CS:IP stored in the stack instead of the current CS:IP of the CPU, so that we can clean up everything and the interrupt return correctly, instead of breaking everything... (some apps wouldn't start with the original code^^). This is an addendum/fix to revision 64521.
svn path=/trunk/; revision=64701
Store the module handles to loaded property page provider dlls in the DeviceInfoData (for class property pages) or in the DeviceInfo (for device property pages). The dlls are unloaded when the device info set is destroyed. These dlls were unloaded as soon as the property sheet data had been retrieved. These property pages could not be added to a property sheet because unloading the dll invalidated the page reources.
svn path=/trunk/; revision=64700
- Call SECUR32_initializeProviders from EnumerateSecurityPackagesW if necessary. Fixes a couple secur32 tests, and an occasional crash in rpcrt4:rpc
svn path=/trunk/; revision=64699
- Use NtReadVirtualMemory instead of dereferencing a pointer from a different process in DbgUiConvertStateChangeStructure.
CORE-8622 #resolve
svn path=/trunk/; revision=64690
- In ElfGetLogHandleEntryByHandle, actually verify the validity of the handle by traversing the log handle list. Fixes crash in advapi32_winetest:eventlog (double close).
- Minor style improvements to ElfDeleteEventLogHandle
CORE-8621 #resolve
svn path=/trunk/; revision=64689
- In order to always check for opcode handler being NULL, replace the only NULL handler by a non-NULL one that handles the invalid opcodes.
- To quickly retrieve opcode numbers, add their numbers in regard to their handlers.
svn path=/trunk/; revision=64686
Use a more performant CountLeadingZeros64 version from Timo (tested by Thomas), and disable the MSVC-specific one until you find a version that works, and is supported for any CPU.
svn path=/trunk/; revision=64680
- Implement KiRaiseSecurityCheckFailure[Handler] to handle int 0x29 (__fastfail). Based on patch by Timo Kreuzer.
(Yes, this is a Windows 8 feature. However all it does is improve the debugging experience, and we have a need for that)
CORE-8419
svn path=/trunk/; revision=64665
Rename AVL tree functions with macros when included from Mm. This is necessary since the compiler might chose to not inline these functions (and does so on MSVC debug builds) yet only generate one instance of the function, where 2 different versions are required. This caused RtlAvlTree functions to fail on MSVC builds, since they were calling the functions compiled for Mm AVL trees!
svn path=/trunk/; revision=64664
[WSHTCPIP]
- Fix swapped function parameters
[TCPIP]
- Re-enable some code which got lost because of me being unable to decipher this indentation mess.
svn path=/trunk/; revision=64629
- Add a directory entry into FCB which will be a copy of the $FILE_NAME attribute of the FILE record. Though, it won't contain the name itself (in the FCB instead), so keep first char NULL and length 0.
- Implement its support (which requires opening the FILE record 5 first) for root FCB creation.
svn path=/trunk/; revision=64617
- Remove magic value usage in NtfsDumpFileAttributes()
- Implement GetFileNameFromRecord() which returns the $FILE_NAME attribute from a FILE record
- On record lookup, also return the MFT index of the found record
- Finally implement NtfsMakeFCBFromDirEntry() which allows creating a FCB from a dir entry. It is still incomplete though, it doesn't copy any data yet from the entry
svn path=/trunk/; revision=64610
Modify MiCreatePebOrTeb to use MiInsertVadEx instead of doing everything "by hand". No, this does not "change Windows behavior". The TEB creation works exactly as before, and the only difference in the PEB creation is that if the first attempt fails, we will no longer try again from the top of the address space. But since this cannot fail in the first place, at least not due to the VA range not being free, another attempt would be pointless anyway!
svn path=/trunk/; revision=64593
- Improve the random address base code in MiCreatePebOrTeb to actually make sense and not rely on retarded hacks implicitly hardcoding the PEB size in pages into the random value generation.
svn path=/trunk/; revision=64591
- Implement NtfsDirFindFile()
- Enable again NtfsMakeFCBFromDirEntry() and fix its prototype but disable its implementation yet
svn path=/trunk/; revision=64577
- Replace the call to DevInstallW by InstallDevInst in the device properties.
- Also call InstallDevInst from the device problem wizard.
CORE-6350 #resolve
svn path=/trunk/; revision=64566
- Implement InstallDevInst.
- Display different wizard titles for the instller and update wizard.
- Add header titles to the wizard pages.
- Add new header file for private functions.
svn path=/trunk/; revision=64558
- Do not fail when setting the same primary token for a process.
- Fake equality of tokens when both of them are (not) restricted.
CORE-8554 #resolve #comment JRE-7u65 now installs fine
svn path=/trunk/; revision=64545
- Reimplement the 'list by device type' function. The old implementation did not list devices as 'unknown devices' if they had no device class GUID or an unknown class GUID.
- Use overlay images to indicate problems on a device.
svn path=/trunk/; revision=64534
- Implement MiIncrementAvailablePages and MiDecrementAvailablePages factoring out duplicated code from a number of locations
- Get rid of MiAllocatePfn. Any further comment would result in excessive use of curse words.
svn path=/trunk/; revision=64528
- Add a way to conditionally use the GCC stack protector.
Just add -DSTACK_PROTECTOR:BOOL=TRUE as argument to configure.cmd/sh
svn path=/trunk/; revision=64527
- Introduce the kerneldll module type (like kernelmodedriver, but ending with .dll) and use it in various places
- vfatx.dll whould in fact be a native DLL
svn path=/trunk/; revision=64526
- Always allocate a guard page at the bottom of the stack.
It doesn't depend on it being reserved or committed, it just has to be here.
svn path=/trunk/; revision=64525
- Move almost all the DOS command launch thread into dem.c,
- Rework the code so that now, when we want to either load our BIOS32 or a custom one, we start their execution at F000:FFF0 as it should be,
- For modularity purposes (ie. to be able one day to load real OSes in our ntvdm), implement INT 19h (bootstrap loader) so that it calls a (temporary) dos bootsector loader that writes some bootstrap code at 0000:7c00, then the INT 19h runs this code, that has as an effect to load our DOS32 (for a real OS, the MBR code goes to 0000:7c00 and is then run).
svn path=/trunk/; revision=64521
-Fix use of unitialized handle for the waiting dialog.
-Allocate the size of one event for each event, not the amount of all events.
svn path=/trunk/; revision=64520
- Move FsRtl functions to fsrtlfuncs.h
- Improve formatting of a few macros
- Add missing NTKERNELAPI
- Add a "special" kind of "ASSERT" to ListEntry64To32
svn path=/trunk/; revision=64513
Fix warnings. (Compiling source files from ntoskrnl in mkhive is as ugly as it can get, this stuff needs to go to cmlib, if it is shared!)
svn path=/trunk/; revision=64507
* Prevent the "illegal character encoding in string literal" warning from flooding the build log. This must be inspected.
CORE-8516
svn path=/trunk/; revision=64484
* Introduce an option to compile ReactOS with dwarf symbols instead of rossym. Use NO_ROSSYM to control it.
* Dedicated to V.
CORE-8594 #resolve
svn path=/trunk/; revision=64483
- DeleteCurrentPartition: A deleted partition is of type PARTITION_ENTRY_UNUSED.
- ScrollDownPartitionList / ScrollUpPartitionList: Ignore container partitions if they are not used.
CORE-8413 #resolve #comment Fixed in r64482.
svn path=/trunk/; revision=64482
- INT 21h, AH=59h (Get Extended Error Information) is unimplemented but is used by many applications. DPRINT a special message to remind that we need to implement it.
- Implement INT 21h, AH=6Ch "Extended Open/Create".
svn path=/trunk/; revision=64447
- Fix a stupid crash I introduced in RegQueryValueExA
- Reimplement RegEnumKeyExA as wrapper around RegEnumKeyExW
- Implement RegEnumKeyExW for HKCR subkeys
- Fix a few potential handle leaks
CORE-8582
svn path=/trunk/; revision=64445
- Correctly use RtlCreateUnicodeStringFromAsciiz and check for its return value in various places.
It allocates a buffer and initializes is it as empty even if the passed ASCII buffer is NULL.
svn path=/trunk/; revision=64442
The highest bit of the mode number is used to determine whether or not we need to clear the screen. Fix the existing code that was disabled in revision 61907 because it was completely wrong. Now we correctly support this feature. Also check the mode number limit and fail if it is unsupported.
svn path=/trunk/; revision=64431
- Code reorganization: Move CPU code to specific files for modularity (prepares ground for some future work).
Part 2/2 (fixes build ;) )
- Improve a DPRINT.
- Set reported DOS OEM number to 0xFF as NTDOS does.
svn path=/trunk/; revision=64430
Code reorganization: Move CPU code to specific files for modularity (prepares ground for some future work).
We reintroduce also int32.c in which all the int32 handling code is moved to.
Part 1/2
svn path=/trunk/; revision=64429
Implement DC_bIsBitmapCompatible() helper function and use it in NtGdiSelectBitmap. Will be reused later.
[SPEC2DEF]
Improve formatting
svn path=/trunk/; revision=64426
- Allow to allow wchar_t even on C++, if it is not GCC
- Remove a number of duplicate definitions
[FRAMEDYN]
- Compile with /Zc:wchar_t- on MSVC
- Get rid of now obsolete MSVC symbol aliases
- Share the spec file
- Add 2 GCC symbols in the export lib (C2 constructor, D2 destructor), which are in this case identical to C1 and D1
svn path=/trunk/; revision=64423
- Remove some tests that are broken if HKCU\software\classes\CLSID key exists.
Better tests were added later anyway.
CORE-8582
svn path=/trunk/; revision=64413
- Add tests testing behaviour of RegOpen/Create for HKEY_CLASSES_ROOT subkeys
- Clean up a bit the other tests
CORE-8582
svn path=/trunk/; revision=64402
* Update d3drm.h and d3drmdef.h.
* Import d3drmobj.h and d3drmwin.h.
* Guard against redefinition of MAKE_DDHRESULT.
[DXSDK]
* Get rid of this d3drmwin.h.
* Guard against redefinition of MAKE_DDHRESULT.
CORE-8540 CORE-8082
svn path=/trunk/; revision=64397
- Add tests for NtQueryKey(KeyNameInformation)
[ADVAPI32_APITEST]
- Don't be so generous and claim back my code.
@Thomas: If you ever find out how buggy it is, feel free to claim it back. ;-)
svn path=/trunk/; revision=64394
- Implement a first version of LsaGetLogonSessionData.
- Add a simple way to disable LsaEnumerateLogonSessions and LsaGetLogonSessionData in case they cause problems.
svn path=/trunk/; revision=64384
* Sync to Wine 1.3.29 in an attempt to get it working again.
* Dedicated to Daniel Reimer.
* Thanks to Sylvain for pinpointing this version.
svn path=/trunk/; revision=64379
Improve performance of FsRtlIsNameInExpression by using a stack buffer for backtracking of wildcard expressions. See also CR-60
svn path=/trunk/; revision=64369
- Add the possibility to dump the VM memory either in text or binary mode.
- Initialize the VM memory to 0xFF to track potential memory misuses (diagnostics purposes). Things may crash, or not!
svn path=/trunk/; revision=64367
* Partial sync with rdesktop-ce to fix Windows 2008 R2 server login.
CORE-8561 #resolve #comment Should be fixed in r64362. Please retest.
svn path=/trunk/; revision=64362
- Move __CxxFrameHandler3 to msvcrtex. Windows 2003's dll does not export this, and their msvcrt.lib doesn't have it, but we need this to support modern compilers.
svn path=/trunk/; revision=64357
* Second part of the russian translation update by Kudratov Olimjon.
CORE-8495 #resolve #comment Second part committed in r64354. Thanks!
svn path=/trunk/; revision=64354
- When writing to port 61h, reset the PIT 2 gate only when needed.
- When the PIT 2 out signal is set, notify the speaker when there is really a change.
- PC speaker: Do not replay the same sound if it is the same.
svn path=/trunk/; revision=64345
- Add a hack for the signal out so that, when the PIT gate is off, no callback is called. This should be improved so that also no Out state is set, and other things too.
- Really set the out signal when the flipflop changes, in square-wave mode. Contributes to fix the speaker (see next commit).
svn path=/trunk/; revision=64344
Implement INT 15h, AH=4Fh "Keyboard intercept", which is used by INT 9h / IRQ 1 to possibly translate scan code before any further treatment. The default implementation is a trivial one, do it à la DosBox.
svn path=/trunk/; revision=64324
Fix memory related issues in calls to LsaEnumerateLogonSessions.
- Initialize ClientBaseAddress to NULL because we do not need to allocate a fixed memory page.
- Protect Length from being overwitten by NtWriteVirtualMemory.
svn path=/trunk/; revision=64318
- Divert NtfsLookupFile() as NtfsLookupFileAt() to allow opening relatives to a current MFT record.
- Reimplement NtfsLookupFile() using NtfsLookupFileAt()
svn path=/trunk/; revision=64316
- Import structures and defines from FreeLdr NTFS driver header
- Import lot of code from FreeLdr NTFS driver to handle MFT & attributes
- Remove code that has been overtaken by FreeLdr code
- Adapt & port code from FreeLdr (allocation, status, data structures)
- Adapt old code to the new functions defined from FreeLdr code
- Open the MFT during volume mount and keep in VCB for further use
- Implement a function to lookup a file in the MFT given its full path
svn path=/trunk/; revision=64313
- Turn the user-mode PnP Manager into a dll, as it is in Windows. However, on Windows 2k/XP/2k3, the dll is managed by services.exe (the SC Manager) (and its entry point name hardcoded in it), whereas on Vista/7+ it is managed by svchost.exe . Since we do not support external dll hardcoded services management in services.exe, make it svchost-compatible instead.
- In the .spec file, we mention that a few API set is exported (in stdcall), but we use it also for RPC, and therefore one has to fix somewhere the calling conventions.
- Add/modify the registry entries accordingly.
svn path=/trunk/; revision=64292
- Get rid of the GetTickCount64 export, now in kernel32_vista.dll
- Add a few "-norelay" clauses when relay tracing is enabled
svn path=/trunk/; revision=64283
- add a way to enable "relay tracing" (à la wine) to modules.
This uses wine's TRACE routine, debug channel being "relay"
Use "WITH_RELAY" argument to cmake macro spec2def to activate.
svn path=/trunk/; revision=64281
- Move the stubs LsaEnumerateLogonSessions, LsaGetLogonSessionData, LsaRegisterPolicyChangeNotification and LsaUnregisterPolicyChangeNotification from lsalib to secur32, because these functions are exported by secur32.dll only.
- Add new LPC connection code to secur32.dll for use by non-logon related functions.
- Implement LsaEnumerateLogonSessions in secur32.dll and LsapEnumLogonSessions in lsasrv.dll.
svn path=/trunk/; revision=64266
- Improve performance of XFORMOBJ_bXformFixPoints by getting the integer values from the FLOATOBJ once instead of on every iteration
svn path=/trunk/; revision=64261
- Make sure to make a copy of DC attribute fields before checking / using them
- Avoid breaking DC flags in IntGdiSetMode on failure
- Fix some comments
svn path=/trunk/; revision=64250
- Modify REGION_CropAndOffsetRegion to return the region complexity
- Improve NtGdiIntersectClipRect to only allocate a new region, if we don't have one yet, otherwise crop it using REGION_CropAndOffsetRegion
svn path=/trunk/; revision=64249
- Improve GetClipBox (we have a RAO region, make use of that, no need to check for Clip or Meta region and combine them with the vis region) and fix coordinates (result must be in logical coordinate space!)
svn path=/trunk/; revision=64247
- Simplify and fix MmCopyVirtualMemory, where the processes where not correctly detached on failure.
Fixes a few "Process xyz.exe" is a zombie.
svn path=/trunk/; revision=64242
- Mark module entries as "load in progress" when pinning them.
CORE-7819 #comment Committed, as a lot of applications rely on this. Feel free to revert if you feel the change is not correct.
svn path=/trunk/; revision=64237
Implement INT 10h, AH=0Bh function 01 (Set Palette) (for CGA modes), and half-plement INT 10h, AH=0Bh function 00 (Set Background/border color), adapted from DosBox.
The code needs a bit of cleaning.
Needed for a certain Pacman game :)
CORE-8436 #resolve #comment Fixed ;)
svn path=/trunk/; revision=64235
CORE-8542 #comment Disable read of performance counters until it has been investigated, what the exact CPU requirements are and how we can detect them. This will only lower the amount "random" entropy data, nothing severe. Should fix bugcheck on qemu.
svn path=/trunk/; revision=64234
Also add missing defines about index size and index header for INDEX_ROOT attribute.
Implemented their support in NtfsDumpFileAttributes().
svn path=/trunk/; revision=64233
- Add some debug prints helping diagnosing which GDI objects are locked when they should not be.
- Plug a region (lock) leak
- Remove some dead code.
svn path=/trunk/; revision=64226
- Return the right index when the root subleaf is found.
- Let's pretend I was nice enough to make the cells lexically sorted when in fact I just corrected a stupid binary search.
WARNING: this breaks ntoskrnl reading hive files produced before this revision. Sorry, this is a breaking change.
CORE-8524 #comment Committed, let's see what happens in the next days.
svn path=/trunk/; revision=64222
- Introduce the base of what should become a proper user object manager, with proper refcounting, handle management, cleanup callbacks and inter-object referencing.
Approved by Jim and Giannis.
CORE-8539 #resolve
svn path=/trunk/; revision=64219
* Sync with Wine 1.7.27. A huge patch that demonstrates how much work has been done on this module.. I mean reduce diff to Wine ;p
CORE-8540
svn path=/trunk/; revision=64218
* Work around a Clang bug w.r.t. dwarf emission. Brought to you by the mighty Arty.
CORE-8516 #comment Now ReactOS can compile a bootcd with Clang, and it boots to shell. Only some PSEH bug(s) remain for it to be fully functional and ready for testman (I'm looking at you, Timo ;) )
svn path=/trunk/; revision=64203
- Do not make callouts to user-mode while holding a lock on GDI objects.
Fixes crashes in user32_winetest:win and :msg
svn path=/trunk/; revision=64189
- Enable all debug channels if DEBUGCHANNEL is set to "+all".
- Fix GDI objects exclusive locks counting, fixing a memory corruption altogether.
- Add a missing lock release on error path.
- Add a debug print.
svn path=/trunk/; revision=64187
- Implement RtlpCloseRegistryHandle helper, which closes a registry key, if RTL_REGISTRY_HANDLE was not passed as RelativeTo
- Use RtlpCloseRegistryHandle whereever required, fixing some cases, where we unconditionally closed the handle
svn path=/trunk/; revision=64186
- Add dummy INT 18h (ROM Basic) and INT 19h (Bootstrap loader) interrupts. If INT 18h will never be implemented, INT 19h can be used one day...
- Add the standard bootstrap code snippets at F000:FFF0 and F000:E05B.
- For compatibility purposes, and nice info reporting via tools like Microsoft Diagnostics, or Symantec SysInfo, or whatever else..., register nice BIOS Copyright and Version strings. Also add a version string at the end of the BIOS.
- Fix our reported BIOS model.
- Add some temporary documentation (from Bochs BIOS) about the ROM BIOS compatibility entry-points that some apps may use (instead of passing through more documented & standard interfaces).
svn path=/trunk/; revision=64185
- Slap *a bit* of sense in the way we use region objects and handles, avoiding a massive orgy of handle allocations, locks, leaks and so on.
The motto here being "if you don't need a valid user-mode handle, then chances are that you don't need one at all."
CORE-8506 #resolve #comment Stale region handles should not be passed anymore to user-mode apps now.
svn path=/trunk/; revision=64177
- Fix up values got from win32k in GetOutlineTextMetrics and do not fail if the provided buffersize is only sizeof(OUTLINETEXTMETRICW).
CORE-8507 #resolve
svn path=/trunk/; revision=64176
- Add Etw trace api stubs (moved from avdapi32)
- Add exports for Etw* functions
[ADVAPI32]
- Add forwarders of trace api functions to ntdll Etw* functions
svn path=/trunk/; revision=64172
CORE-8537 #resolve #comment Demote UNIMPLEMENTED_DBGBREAK for UNIMPLEMENTED in the non-implemented case of PopFlushVolumes. Fixes the apparent BSOD.
svn path=/trunk/; revision=64170
SampRemoveUserFromAllGroups:
- Do not treat a STATUS_MEMBER_NOT_IN_GROUP, returned by SampRemoveMemberFromGroup, as error but as success.
- Clear the Groups attribute at the end.
svn path=/trunk/; revision=64169
- Move the mouse driver to DOS since it's our 32bit version of mouse.com, in some sense,
- Temporarily disable the mouse user callbacks because currently they went called in a parallel thread than the CPU one, that caused CPU corruption,
- In the same way we currently trigger IRQ1 interrupts, we do the same for IRQ12,
- Make the console input pump more modular (and mouse presence detection code is WIP),
- Put keyboard code into a dedicated file (as done for the mouse),
- Adapt the existing PS/2 emulation code to support two PS/2 ports controlled by 1 controller. Please note that some documentations precise that the response byte (answer to a PS/2 controller command) is written directly to the PS/2 output port.
svn path=/trunk/; revision=64168
- Code formatting and precise an info in a comment,
- Remove an unneeded commented call, and
- Mention that INT 15h functions C1h and C2h need to be implemented for PS/2 support.
svn path=/trunk/; revision=64167
- As pid and tid 0 have a special meaning in GDB, use off-by-one thread and process ID when communicating with it
- Properly read registers and memory from foreign thread and processes. (This time it was tested and proved to work reliably. __writecr3 ftw!)
- Loop the list of processes and threads when trying to find them from ID, as PsLookupProessByThreadId and friends can't be used since we can be at any IRQL.
- Add a few more debug prints to help diagnosing problems.
CORE-8531
svn path=/trunk/; revision=64166
- Read MaxSize and Retention from the Registry when a new log file is created.
- Use ntdll file functions instead of their kernel32 counterparts.
svn path=/trunk/; revision=64159
- Don't use svn:eol-style = native for PCI ids but then have the code expect CRLF. Should fix all devices being "Unknown device" on Unix builds.
svn path=/trunk/; revision=64158
- Fix an embarassing works-for-me but uncommited cast.
- Add support for reading registers and memory from foreign threads. Highly experimental and nearly untested, use at your own risk.
svn path=/trunk/; revision=64156
- Addendum to r64151
Complain on IRC, then complain on ros-dev, then steal fixes from your peers, then do as if nothing happened.
svn path=/trunk/; revision=64155
- Always pass down the result of gdb_receive_packet up to KD, so that it knows when a breakin packet was received. (CTRL-C) now works!
- Generalize the use of the Send <-> ManipulateState callbacks for a better code reading.
- Get the exception context as soon as it is thrown (instead of playing with the PRCB)
- Improve the way we attach to GDB: on the first KD call, we set KdContext->ControlCPending so that KD throws an exception. That way we can first initialize our KD stuff, and then quietly attach to GDB
- Implement the 'p' (get one register) GDB request.
GDB is now much more reliable.
svn path=/trunk/; revision=64154
- Fix a typo in KsecQueryFileInformation
- Implement missing ioctls in KsecDeviceControl
- Support METHOD_OUT_DIRECT for IRP_MJ_DEVICE_CONTROL
- Add stubs for KsecEn/DecryptMemory
[ADVAPI32]
- Use ksecdd to handle SystemFunction040 (RtlEncryptMemory) and SystemFunction041 (RtlDecryptMemory) (they still do nothing, but at least they do it in kenrnel mode now ;-))
svn path=/trunk/; revision=64153
* Work around what looks like a bug in GCC's handling of #pragma redefine_extname. Its behavior regarding additional underscore prefixes depends on the order of pragma and symbol declaration with GCC, while it's consistent with Clang. Brought to you by Thomas Faber, reviewed by Timo Kreuzer.
CORE-8516
svn path=/trunk/; revision=64148
- It can happen that GDB issues something else than qsThreadInfo after qfThreadInfo
- Properly clean up the callbacks after handling a custom Send/ManipulateState loop
svn path=/trunk/; revision=64146
- For function 0Ah, we don't still support defining hardware cursor.
- Implement function 0Ch (define interrupt subroutine params), compatible MSMOUSE v1.0+
- Implement function 14h (exchange interrupt subroutines), compatible MSMOUSE v3.0+
- Implement function 18h (set alternate mouse user handler), that is the same thing as function 0Ch but for a set of maximum 3 handlers, compatible MSMOUSE v6.0+
- Implement function 19h (return user alternate interrupt vector) that returns the handler associated with a call mask, compatible MSMOUSE v6.0+
- Call all those handlers accordingly to their associated call mask, for mouse moves and mouse button presses.
svn path=/trunk/; revision=64138
- Add DPRINTs to the DumpMemory function.
- Use a VgaSetActiveScreenBuffer function to change active screen buffers: it calls the SetConsoleActiveScreenBuffer API but also recreates the VDM console menus, because on windows custom console menus are per-screen-buffer, and not per-console, so that if you set menus when one screen buffer is activated, and if you change it, then your menus become unuseful because for this new active screenbuffer, they are not set. It's completely ridiculous but we need to live with that (on ReactOS we still don't have this behaviour).
svn path=/trunk/; revision=64137
Mark lowest pages of P0BootStackData and KiDoubleFaultStackData as read-only to prevent unnoticed stack-overflow. CORE-4380 #resolve
svn path=/trunk/; revision=64130
- Use 0x00800000 as base address. This doesn't change anything (still loaded at 0x80800000) and it produces debug symbols that GDB can understand
[CMAKE]
- Get back to using DWARF2 symbols. They are a lot bigger, but at least they work
Now GDB can be used to source-level debug ntoskrnl.
svn path=/trunk/; revision=64128
- Add a callback mechanism permitting to "simulate" KD send <-> receive loop without having to actually communicate to GDB
- Use that to update the program counter when cont'ing a breakpoint
Now cont'ing an assertion failure is possible, since we actually get beyond the int 3 instruction
svn path=/trunk/; revision=64127
- introduce KDGDB, a KDCOM-like DLL, wrapping the KD protocol and the GDB remote protocol together.
It is not fully functional, but for now it permits source-level debugging in some modules. More will be added as I feel the need and find the time to work a bit more on it. (That is, unless an angel comes and resume the work)
To use it, set GDB and _WINKD_ to TRUE in your CMakeCache.txt. Using separate debug symbols is also a good idea.
svn path=/trunk/; revision=64121
* Don't set -Wno-unused-but-set-variable until http://llvm.org/bugs/show_bug.cgi?id=20906 is fixed or the warnings are fixed upstream.
CORE-8516
svn path=/trunk/; revision=64114
* Link with mingwex.
* Allow multiple definitions at link time because longjmp exists in both our msvcrt and mingwex.
CORE-8516
svn path=/trunk/; revision=64113
- Support creating new registry keys when registering new interfaces
- IoSetDeviceInterfaceState: do not try to parse symbolic link name, as symbolic link name is enough to open the right object
- IoSetDeviceInterfaceState: send the notification on the right interface when registering interfaces on devices already having an interface
svn path=/trunk/; revision=64108
Merge back condrv_restructure branch with everything up to revision 64079 (and up for maintenance), that made console kernel32 & winsrv CSR structures Win2k3 compliant.
CORE-7931 #comment Merged back to trunk in revision 64102.
CORE-7481 #comment kernel32 / winsrv console CSR structures are Win2k3-compliant in trunk since revision 64102 (and since revision 64079 in the condrv_restructure branch, see CORE-7931 for more details).
svn path=/trunk/; revision=64102
Fix language ID, that made msvc compilation fail with the error:
oleacc\lang/oleacc_Ru.rc(27) : error RC2151 : cannot reuse string constants, 0(0x0) - "unknown object" already defined. Cannot add 0(0x0) - "
(and similar for the other strings).
And as usual: "Thanks GCC for not having warned us before"...
svn path=/trunk/; revision=64099
- Remove unneeded old commented code chunks.
- ConDllInitialize can set the current console locale for new threads,...
- ... and it can do its own cleaning.
svn path=/branches/condrv_restructure/; revision=64098
- Make CONSRV_API_CONNECTINFO, CONSOLE_ALLOCCONSOLE and CONSOLE_ATTACHCONSOLE Windows 2k3-compatible, so that using either their kernel32 in ROS or our kernel32 in windows, works.
For that, complete and fix also the CONSOLE_START_INFO and CONSOLE_PROPERTIES structures.
- Rewrite Alloc/AttachConsole and the console initialization functions to match what Windows expects when connecting to the console server, and make them compatible with the fixed structures.
- Fix SrvAllocConsole and SrvAttachConsole accordingly, and few other console initialization functions in consrv.
- Fix input EXE name support and store also the current directory from which we were started.
- Use a temporarily define USE_CONSOLE_INIT_HANDLES that is not enabled yet because we do not use console initialization events (used by Windows for Alloc/AttachConsole and console initialization functions). Until this gets implemented in ReactOS, putting windows' kernel32 in ReactOS will fail when it will try to wait on those events.
- For SrvAlloc/SrvAttach/SrvFreeConsole, ConSrvConnect and ConSrvDisconnect: correctly mark the process as console app.
- Fix process initialization in ConSrvNewProcess.
- Get rid of CONSOLE_PROCESS_DATA::ParentConsoleHandle member.
- Temporarily move the link settings retrieval in console.c and hack a bit icon setting.
[CONSRV]
- Move console title setting from condrv back to consrv where it should belong in fact.
CORE-7931 #resolve #comment ConsolepAlloc and ConsolepAttach finally fixed in revision 64079.
svn path=/branches/condrv_restructure/; revision=64079
- On clang builds we need to do the return twice trick, since we don't have asm goto, which would allow us to specify labels in the code where we can branch to on an exception. So we return back to from where we called the registration function and decide how to proceed from there nasedon the return value. For this we need to save the return address in the registration record and use it in __SEH3$_InvokeEmbeddedFilterFromRegistration
svn path=/trunk/; revision=64078
Add libp11-kit-0.dll to optional components, because without it, our iexplore, sometimes FF and the Chrome installer lament about it missing.
svn path=/trunk/; revision=64073
Initialize hStdInput to the standard input handle, and hStdError to the output pipe, instead of keeping these handles NULL. See the details why this is important in the Jira report ROSTESTS-140.
ROSTESTS-140 #resolve #comment Fixed.
svn path=/trunk/; revision=64055
- Apply band-aid patch from CORE-8506. Problem still persists, how did a bad region get plugged into the DCE structure?
svn path=/trunk/; revision=64054
EmbeddedPointerBufferSize and EmbeddedPointerMarshall: Store the pointer to the current array element in the stub message. This fixes buffer size calculation for arrays that contain structs with embedded pointer. This patch will also be submitted to the WINE project.
svn path=/trunk/; revision=64053
Czech translation update by Radek Liska
+ Polish translated new string by Adam Stachowicz
+ German translated new string by ME
CORE-8499 #resolve #comment Committed, thx.
svn path=/trunk/; revision=64052
Shell32 and browseui: update Russian Translation by Akhlamov Petr
CORE-7981 #resolve #comment Committed except the IDS_STANDARD_TOOLBAR part in browseui which is not defined ANYWHERE, thx.
svn path=/trunk/; revision=64049
- Remove useless inline definition of InterlockedBitTestAnd(Re)Set, which was not used anyway.
- Update template for ntdef.h
svn path=/trunk/; revision=64046
Remove the event log handle from the list *before* destroying it.
Fixes failure in advapi32:eventlog double close test.
svn path=/trunk/; revision=64034
* Improve SHExplorerParseCmdLine tests with whole bunch of new lines, and update the EXPLORER_INFO struct to match the findings.
svn path=/trunk/; revision=64029
- Test what happens to the 'base' of memory allocated with ZwAllocateVirtualMemory
- Fix some tests according to w2k3sp2 behaviour.
Thanks Amine for testing ;-)
svn path=/trunk/; revision=64028
- Merge the "Root" and the "AuthRoot" certificate stores
This, with the now almost faaous gnutls DLLs, allows mshtml:events test to not hang
svn path=/trunk/; revision=64026
Update the PCI hardware IDs. Extracted from the pci.ids database from http://pciids.sourceforge.net/ from 2014.08.30
Maintained by Martin Mares <mj@ucw.cz> and other volunteers from the PCI ID Project at http://pci-ids.ucw.cz/.
svn path=/trunk/; revision=64024
- Synchronize correctly arm/bootdata.c with i386, as it was done previously.
- Code formatting: whitespace fixes, add braces/brackets and spaces where needed; comments styling.
- Correctly put braces for casts and around macro parameters.
- Add some IN/OUT.
- Fix parameter names of a function.
[INBV]
- Fix parameter names of two functions.
svn path=/trunk/; revision=64017
- Make the code in BuildUserInfoBuffer slightly more uniform so it can be generated.
See https://reactos.org/wiki/User:ThFabba/netuser.py for the generation script
CORE-8343
svn path=/trunk/; revision=64014
- Some code cleaning.
- Bring back the terminal bell that was added in revision 58253 and disabled in revision 58447.
svn path=/branches/condrv_restructure/; revision=64007
- Move CSR details (pre/post-processing, unicode translation) of reading/writing console inputs to consrv, where they belong.
- Add a temporary solution to screenbuffer resizing notifications, to be properly fixed later on.
svn path=/branches/condrv_restructure/; revision=64004
- Disable C4244 (implicit integer truncation) warning on MSVC builds because it causes people to add broken casts that make the situation worse.
svn path=/trunk/; revision=64003
- Add/improve some definitions in ntdef.h
- fix definition of SUBLANG_SINDHI_PAKISTAN in winnt.h
- enable ARRAYSIZE in winnt.h
- #undef ARRAYSIZE in certain wine code to avoid redefinition
- Use PCCH instead of PCCHAR in ext2lib (PCCHAR is ntdef.h only)
- remove obsolete definitions from smss.h
svn path=/trunk/; revision=64000
- Add optional GNUTLS DLLs for the curious. They can be grabbed from here: ftp://ftp.gnutls.org/gcrypt/gnutls/w32/gnutls-3.2.16-w32.zip
We will provide a MSI package soon
svn path=/trunk/; revision=63997
- In ConDrvChangeScreenBufferAttributes, change also the popup attributes.
- In some functions we need to check validity of Read/WriteCoord parameters, add fixme for now, that need to be fixed later on.
svn path=/branches/condrv_restructure/; revision=63991
- Use strsafe functions
- Don't cast malloc
- PSTR/PWSTR typedefs are for null-terminated strings, which output buffers aren't
- "dwData" implies the value is data, not the size of data. Also, cbData is specified in bytes (hence "cb")
- Avoid pointless use of HEAP_ZERO_MEMORY
svn path=/trunk/; revision=63980
Commit my work that I've done during my trip from Albi back to Paris (part 2/2):
Remove terminal-specific line discipline code from CONDRV back to CONSRV.
svn path=/branches/condrv_restructure/; revision=63979
Commit my work that I've done during my trip from Albi back to Paris (part 1/2):
- QuickEdit and InsertMode are input modes that are related to CONSRV terminal(s), therefore remove them from CONDRV that needs to be agnostic about terminal specificities.
- Separate history helper functions from the line discipline functions to different files.
svn path=/branches/condrv_restructure/; revision=63978
- Update definitions of en-US.rc for Unicode 7.0, patch by Baruch Rutman.
- Synchronize the other resource files wrt. en-US.rc. To translators and future "synchronizer" 8^) : please keep in mind that you need also to synchronize all the other language files!
svn path=/trunk/; revision=63975
Many Improvements and Many Fixes by Erdem Ersoy.
CORE-7710 #comment Version 10 of the patch committed in revision 63973, thanks!
svn path=/trunk/; revision=63973
CORE-5790 #resolve #comment Usetup polish translation committed in revision 63971, thanks! To all translators: please recheck that nothing was corrupted via encoding problems.
svn path=/trunk/; revision=63971
- Simplify EnablePrivilege().
- Add "Lock computer" option to the shutdown menu.
- Display the last error description if something failed when selecting one of the shutdown options.
Inspired by the patch of Robert Naumann (see CORE-8048).
CORE-8048 #resolve #comment I adapted some of your ideas to what I already committed in revision 63955, thanks!
svn path=/trunk/; revision=63961
- Do not try to dereference potentially invalid pointers.
The FrameRegister->ExceptionPointers pointer is only valid in the context of the filter function. Indeed, the PSEH3 exception handler allocates it on the stack, and when control gets back to the __excep { } coder, ebp and esp were already restored to their original values, so whatever can happen to those pointers.
Investigation and debugging mastered by Thomas Faber, whose efforts were shamelessly stolen by me to improve my commit statistics.
CORE-8469 #comment patch committed, you may want to commit your testcase though :-p
svn path=/trunk/; revision=63958
Use the standard C:\YourNTOSInstallDirectory\Temp temp directory as it is done on Windows, instead of C:\TEMP.
Patch by Lee Schroeder.
CORE-8390 #resolve #comment Fixed, thanks ;)
svn path=/trunk/; revision=63957
Starting implementing a shutdown menu in taskmgr (see eg. on Windows XP).
It is a synthesis of the available patches of CORE-2332 from Mario Kacmar, fixed by Timo Kreuzer and by myself.
CORE-2332 #resolve #comment Shutdown code committed in revision 63955, closing the report. Please reopen when you implement the other missing functionalities.
svn path=/trunk/; revision=63955
- Correctly delete resource in failure cases of CmpInitializeHive. Fixes pool corruption when trying to load an invalid hive file.
svn path=/trunk/; revision=63949
- Bring back PTE frame refcounting when serving a prototype PTE page fault.
- Fix a bug in MiDeletePte where the said PTE frame was not unshared.
- Improve transitional PTEs deletion (will be needed for future work).
Do not always trust the comments stating that "strange RosMm code broke everything"
svn path=/trunk/; revision=63947
- Addendum to r63933: Pass absolute value of the font width to freetype.
CORE-4657 Somehow got lost in the number of attached files.
Spotted by Thomas Faber
svn path=/trunk/; revision=63946
Implement a single-window mode for videos.
Patch by Ricardo Hanke.
TO ALL TRANSLATORS: Update the translations!
CORE-7910 #resolve #comment Committed, thanks!
svn path=/trunk/; revision=63940
- Add a "Play" menu, add keyboard accelerators and add a repeat mode.
Patch by Ricardo Henke.
- Few whitespace fixes.
- Fix french resources. TO ALL TRANSLATORS: Please update the translations!
CORE-7929 #resolve #comment Committed, thanks!
svn path=/trunk/; revision=63938
- Display formatted system messages in case of diverse failues.
- Add an error check for RegisterClassEx() and CreateWindow() in _tWinMain().
Patch by Ricardo Hanke.
CORE-7880 #resolve #comment Committed, thanks!
svn path=/trunk/; revision=63936
- Enable commented freetype call: set font face size and coordinate transformation matrix
Patch by Huw Campbell, reviewed by a gazillion of people.
CORE-4657 #resolve #comment committed in r63933, a million thanks
svn path=/trunk/; revision=63933
Marshall interface pointers during background delete by Huw Campbell
CORE-8460 #resolve #comment Committed by request of Victor. Have fun ^^
svn path=/trunk/; revision=63932
Do not hardcode event logs, but retrieve them from the registry.
Patch by Ricardo Hanke.
CORE-8458 #resolve #comment Committed, thanks!
svn path=/trunk/; revision=63930
- Make a conditional copy of reactos.inf when it is really modified, make reactos.acb depend on it.
Hopefully the last commit so that windows buildbot gets really fixed
svn path=/trunk/; revision=63924
- Improve the "infamous RLE hack" in SetDIBitsToDevice by using a mask bitmap corresponding to the valid RLE data
[GDI32]
- Improve some input checks
svn path=/trunk/; revision=63920
- Do not crash if an invalid PDO is given to IopEditDeviceList
- Always dereference device object when removing it (should be the last reference)
CORE-8294
svn path=/trunk/; revision=63917
Disable ScanNTFSStreams calls because this function exclusively calls BackupRead that is not implemented on ReactOS, and as a consequence makes lots of debug spam when browsing the start (sub-)menus.
svn path=/trunk/; revision=63914
- Remove "VACB chain" optimization for CcCopyRead that was never applied anyway since MAX_RW_LENGTH == VACB_MAPPING_GRANULARITY, so a single read could never exceed one VACB
- Consolidate CcCopyRead, CcCopyWrite and the cached case of CcZeroData into a common worker function
CORE-8410
svn path=/trunk/; revision=63903
- Reference the address file while delivering data to avoid a use after free when an address file is closed during datagram delivery
svn path=/trunk/; revision=63899
Fix a catastrophic bug in S/G DMA. There is a subtle difference between the S/G DMA APIs and the old AllocateAdapterChannel API when it comes to having multiple requests in flight. Callers of (Io)AllocateAdapterChannel CANNOT queue another request until the AdapterControlRoutine is called. S/G DMA allows multiple concurrent DMA requests, but ROS was using IoAllocateAdapterChannel in the S/G API. As a result, the wait block stored in the device object was unexpectedly reinitalized and queued again. This results in a leak of the originally queued request context, potentially performing the new DMA operation twice while dropping the old request, and use after free of the context passed to HalpScatterGatherAdapterControl.
svn path=/trunk/; revision=63898
OpenConsoleW was implemented :P
[CONSOLE.CPL][CONSRV]
Create all the fonts needed at console startup, and then just select what's needed when fonts attributes need to be changed at run-time.
[CONSOLE.CPL][CONSRV]
- HACKFIX: Temporary use FW_NORMAL instead of FW_DONTCARE as default font weight (in ReactOS, FW_DONTCARE makes fonts bold by default, instead of normal)
- Use bold fonts instead of the underlined ones for underlined fonts in the terminal.
Timo, FIX THE FONTS !!!!!!!!!! :P
CORE-8439 #comment Should be fixed in revision 63885.
svn path=/branches/condrv_restructure/; revision=63885
- Correctly manage object lifetime in CDefaultContextMenu. Members of DEFCONTEXTMENU need to be referenced or cloned in order to keep them.
CORE-8430 #resolve
svn path=/trunk/; revision=63884
- Fix list walk in NpCancelWaiter -- we cannot access the list entry after using RemoveEntryList on it
- Make the logic in NpCancelWaiter more readable
CORE-8442 #resolve
svn path=/trunk/; revision=63883
- Assert that the thread's sent message queue matches change bits in UserDbgAssertThreadInfo. Suggested by Giannis.
CORE-7013
svn path=/trunk/; revision=63880
CORE-5006 CORE-6397 CORE-8424 #comment Fixes from the condrv_restructure branch (rev.63841) merged back to trunk in revision 63877.
svn path=/trunk/; revision=63877
- Clear appropriate message bits when removing a sent message in FindRemoveAsyncMsg. Thanks to Giannis.
- Fix list walk in FindRemoveAsyncMsg
CORE-7013 #resolve
svn path=/trunk/; revision=63875
- Correctly check for in-buffer memory in PointerFree. Fixes invalid free e.g. when calling StartService without service arguments
svn path=/trunk/; revision=63871
- Remove the unuseful UseRasterFonts member in console properties structure.
- Fix my FontSize.X / FontSize.Y mixing (X is width, Y is height) that I introduced in revision 63819.
- We are now able to change the console font via the console props control panel applet (work in progress, but it works!)
svn path=/branches/condrv_restructure/; revision=63863
- Gracefully handle ConvertStringSidToSid failures in InstallBuiltinAccounts and InstallPrivileges. Fixes invalid frees in second stage.
svn path=/trunk/; revision=63861
- Don't crash when a directory is specified instead of a file list (i.e. specified_files.root.normalized_name == NULL)
svn path=/trunk/; revision=63860
- Greatly optimize file icon retrieval by reducing the times we try to access the disk.
- Store icons in a binary tree in the shell icon cache for faster retrieval.
Patch by Huw Campbell committed at the request of Giannis Adamopoulos.
svn path=/trunk/; revision=63845
For WriteConsoleOutput API only!! Diagnosed with ApiMonitor from Rohitab.
If one tries to write a too large buffer (>= 80*198 CHAR_INFO cells), the CsrAllocateCaptureBuffer API helper fails, because it uses the non-growable CSR port heap of fixed size 64kB.
Since many applications use the API with large buffers (for example, Far Manager <= 1.70, the Windows XTree app http://textmode.netne.net/Extreme.html , ...) and maybe NTVDM,
Windows (and hence ReactOS for compatibility reasons) allocates a buffer in the process' heap (and not in the CSR port heap via the CSR capture API), so that the big buffer allocation
should work. Then, to be able to access it, CSR needs to call NtReadVirtualMemory for capturing the buffer.
CORE-5006 CORE-6397 CORE-8424 #resolve
svn path=/branches/condrv_restructure/; revision=63841
- separate the custom target and the custom command generating reactos.cab, so that it isn't regenerated each time a bootcd is built
Note to make user: I tried a hack so that the sequence 'make module/fast reactos_cab/fast bootcd/fast' still works, but this is untested. Please use ninja if you really want fast dependency resolution.
svn path=/trunk/; revision=63837
- Mark object types as not having ObjectCreateInfo on creation. Otherwise ObpObjectType's TypeList gets corrupted when a handle to an object type is created (as kmtest:ObTypes does) and ObpIncrementHandleCount tries to insert the list entry a second time.
CORE-8423 #resolve
svn path=/trunk/; revision=63833
- Base data queue entry on the right struct member in NpCompleteStalledWrites. Fixes list entry corruption found in CORE-8419.
svn path=/trunk/; revision=63826
- Use ObpTypeObjectType's lock when modifying object type global properties, not the new object type's
- Correctly free string returned by RtlUnicodeStringToAnsiString
svn path=/trunk/; revision=63825
Use -Wno-error option when building with link-time optimization.
[BROWSEUI]
"Fix" multiple definition of (non-virtual thunk to) QueryInterface errors.
Binutils linker bug.
svn path=/trunk/; revision=63824
- Add inline asm dependencies to fix undefined reference errors when
building with link-time optimization.
- Improve formatting.
- No functional changes.
svn path=/trunk/; revision=63823
- Call the right delete routine for ARM3 section object
- Properly free the pages of pagefile-backed segments when those are deleted
- Put the right assert at the right place in MmUnlinkPageFromList
- Remove DPRINT from previous commit which is interesting but noisy
svn path=/trunk/; revision=63822
- Fix FreeConsole API.
- Implement undocumented GetConsoleKeyboardLayoutNameA/W API (same usage as GetKeyboardLayoutName), needed for ConEmu.
See some examples here: http://www.opensource.apple.com/source/vim/vim-44/src/os_win32.c , and there: 700bab23f2/lswitch.c
CORE-7931 #comment ConsolepFree fixed in revision 63820.
svn path=/branches/condrv_restructure/; revision=63820
CORE-8409 #resolve #comment Solution in the middle makes Spider look nice in ROS and not like a stamp AND it fits on 800x600. 640x480 won't be fixed, because having overlapped cards is NO fix, it's plain ugly.
svn path=/trunk/; revision=63817
Optimize borders and space to the window frame even more. Hopefully fixes spider being too big for 800x600 problem.
CORE-8409 #comment Committed a "fix", please retest.
svn path=/trunk/; revision=63816
(for database) Many Improvements and Many Fixes by Erdem Ersoy
+ USETUP translation from Bug 7861.
CORE-7710 #resolve #comment Committed, thx.
svn path=/trunk/; revision=63814
Turkish Translation Update by Erdem Ersoy
CORE-7861 #resolve #comment You are crazy fast in translating... Commited, thx ^^
svn path=/trunk/; revision=63813
- some consrv/condrv code refactoring for a better code separation,
- make kernel32 / winsrv console CSR structures Win2k3-compliant (see CORE-7931); only Alloc/Attach/FreeConsole APIs are still not Win2k3-compliant.
- fixes for CsrCaptureMessageString and implementation of CsrCaptureMessageMultiUnicodeStringsInPlace .
CORE-7931 #comment Partial merge of the condrv_restructure branch in revision 63810.
svn path=/trunk/; revision=63810
Add a bunch of missing _SEH_YIELD in 'return' clues in _SEH_TRY clauses.
[KERNEL32][CONSRV]
Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleOutput functions.
The last missing ones are Alloc/Attach/FreeConsole APIs!!
Part 9/10
CORE-7931
svn path=/branches/condrv_restructure/; revision=63803
Fix memory section protection flag, that made console settings application fail since some recent work on virtual memory...
svn path=/branches/condrv_restructure/; revision=63801
Added the first results of my odyssey finding out where the original french cards are from + the known facts regarding the bavarian ones.
Bavarian:
Add the ReactOS Logo into the Bavarian Layout, too.
Remove ugly scanned background 11 and put the former Nr 1 there.
Added a frame around background 12.
French:
Added a frame around background 6.
svn path=/trunk/; revision=63800
Add borders to the new cards to make some card games look better than ours does. P.S. License stuff is not forgotten, I just have my problems to reach the authors.
CORE-8401 #comment Please retest now again.
svn path=/trunk/; revision=63797
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsole functions.
An attentive code reader will see that there are structure members in CONSOLE_WRITECONSOLE that are
indeed unused by kernel32 that can be used in ReactOS for undocumented extensions of WriteConsole...
(for instance, adding a parameter for ANSI codes support, who knows!... :P)
- Fix a bit the support for the CONSOLE_READCONSOLE_CONTROL parameter in ReadConsole (for unicode only).
- Use the actual exe name for command history management, given via a hackish way by ReadConsole:
the exe name is passed via the 80-byte-length limited static buffer, and is of course retrieved before
actually using the static buffer (if needed).
[CONSRV]
- Fix writing input events in the console, but first preprocessing them for pausing commands (we treat them separately and remove them),
then, in case we write many single events, we merge them in case they are mouse moves or repeated key down presses. This helps in not
overflowing too quickly the input buffer, and that fixes all the remaining kernel32:console winetests!! (see CORE-8256)
- Use the actual exe name for command history management, given via a hackish way by ReadConsole (blame MS!)
Part 8/X
CORE-7931
CORE-8256 #resolve #comment Fixed in the condrv_restructure branch in revision .
svn path=/branches/condrv_restructure/; revision=63793
- Start a better fix for the mouse event problem described in r62739.
- Add a hack for the problem described in CORE-8394, that fixes some Far Manager mouse issues.
CORE-8394
svn path=/branches/condrv_restructure/; revision=63792
Replace the old ugly 16 color cards with better looking ones. (From: http://www.united3dartists.com/forum/viewtopic.php?f=31&t=954)
Remove 10 of 12 backgrounds and add some CARD backgrounds, no ugly bubble images and stuff. 8 of 10 from my own card decks. 2 others are from deviantart image search.
Modify the ReactOS card background to look way better.
Now both, Bavarian and French cards look nicely and make our Solitaire and Spider look way more modern.
svn path=/trunk/; revision=63785
I was asked why we do that resize at all in the background selection. It looks sorta ugly. So... Now it's full size. Dialogues modified accordingly.
svn path=/trunk/; revision=63783
My bad, I forgot to move the whole cards drawn centralized a bit higher to have the missing frame below, but not additional space above making the frame waaay bigger.
svn path=/trunk/; revision=63782
Add some borders in Spider and Solitaire around the location the cards will be drawn in. Now cards don't touch the frame anymore.
Increase the size of the card background previews. Now you will even see some details of them. Increase the selection dialog size accordingly.
svn path=/trunk/; revision=63781
- Use correct buffer size in KspStartBusDevice. Spotted by Víctor Martínez
- Avoid wcscpy in kernel mode while we're at it
svn path=/trunk/; revision=63778
- Return a valid security descriptor for keys, even though it's hacked. Based on code removed in r26704.
CORE-8382 #resolve #comment Fixed, now we fail with E_FAIL instead. Hurray.
svn path=/trunk/; revision=63777
- It is supposed that user buffers are valid, and if not, access to them is protected with SEH. This fixes almost all of the kernel32_winetest:console tests.
- Add parameter annotations.
svn path=/branches/condrv_restructure/; revision=63772
rapps: (for database) Many Improvements and Many Fixes by Erdem Ersoy
CORE-7710 #resolve #comment Committed and hopefully worked around all conflicts I generated today, thx.
svn path=/trunk/; revision=63767
- Use a CODE_ELEMENT structure in order to simplify the code.
- Do not do an on-place ansi to unicode conversion.
svn path=/branches/condrv_restructure/; revision=63766
Add diagnostics ASSERTs for MultiByteToWideChar & its companion (the source and target pointers must not be the same, otherwise it doesn't work).
svn path=/branches/condrv_restructure/; revision=63764
Due to popular demand, add MikTEX, Ghostscript and GSview to RAPPS.
CORE-8315 #resolve #comment As you wish, added.
CORE-8316 #resolve #comment As you wish, added.
svn path=/trunk/; revision=63762
Database update:
Update to most recent Versions.
Change 7-zip to the MSI Installer.
Remove all those "(FIXME)" added by Erdem.
svn path=/trunk/; revision=63761
system: German translation fixes + new translation of SUBST by zehnvor
Subst translation added to application by me.
CORE-8268 #resolve #comment Committed, thx.
svn path=/trunk/; revision=63760
- Fix use-after-free on critical sections, which caused test hangs. Also fix some memory leaks. More fixes coming with the next Wine-sync, but this should be enough to get tests working.
ROSTESTS-116
svn path=/trunk/; revision=63757
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleCharacter/Attribute and FillConsoleOutputCharacter/Attribute functions.
The underlying CONSOLE_READOUTPUTCODE and CONSOLE_WRITEOUTPUTCODE structures are the same.
It should be noticed, as for the Read/WriteConsoleInput functions of r63754 and the other Read/WriteConsole*** functions, that for performance purposes Windows uses a local buffer for "small" sizes;
we should do the same too because both the client and the server use the number of elements to actually read/write in order to determine which buffer one should use (local or some shared buffer).
- Some memcpy --> RtlCopyMemory.
Part 7/X
CORE-7931
svn path=/branches/condrv_restructure/; revision=63755
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleInput functions.
- Really fix some ASSERTS from r63108.
Part 6/X
CORE-7931
svn path=/branches/condrv_restructure/; revision=63754
- No need to use another NTSTATUS variable, since all of the information is already contained in ApiMessage.Status.
- Do not hardcode the type of the request variables in the sizeofs used in the CsrClientCallServer calls.
svn path=/branches/condrv_restructure/; revision=63753
Make kernel32 / winsrv console CSR structures Win2k3-compliant.
- Fix UNICODE and ANSI versions of the Alias and History APIs. Tested with unicode and ansi version of our doskey.exe
- Implement GetNumberOfConsoleMouseButtons.
Part 5/X
CORE-7931
svn path=/branches/condrv_restructure/; revision=63751
- Properly send WOC_RGN_CLIENT to the GDI driver when window client region changes
- Increment CLIPOBJ::iUniq so that drivers know that something changed
- Some improvements in win32k side of opengl pixel format selection
- Hack around atom collision between the kernel atom table and the win32k one
Now vmware ICD does something decent, even if you can use it only once per ReactOS session (!)
svn path=/trunk/; revision=63749
- Improve the WNDOBJ/CLIPOBJ hack by using the same internal structure for both object.
This way a driver can enumerate WNDOBJ::coClient safely.
Also take this as an opportunity to get rid of DC::ros_dc.
svn path=/trunk/; revision=63739
- First implementation of NtProtectVirtualMemory with Transition PTE
- Release PTE frame page after erasing the PTE to avoid useless page fault
svn path=/trunk/; revision=63736
- Correctly use the Clip, Meta, Rao, API and Vis Regions in DCs
- Update the DC clipping object on demand each time a blt is performed
- Reduce the number of region allocated with handles when it's not needed
This commit fixes numerous bugs regarding clipping, most notably SetDIBitsToDevice overlapping foreground windows
CORE-8353 #resolve #comment There are still a few quirks in winetests which will get fixed in a next commit
CORE-7628 #comment should be fixed in rev 63731, please confirm.
svn path=/trunk/; revision=63731
- Use asynchronous I/O to correctly catch timeouts -- we have a reliable NPFS now.
This makes the timeout test in advapi32_winetest:service succeed, however I'm leaving it disabled because it takes two minutes to run (due to... timeouts).
ROSTESTS-56
svn path=/trunk/; revision=63719
Create additional install directories.
Patch by Lee Schroeder. Thank you for updating the directory list!
CORE-8365 #resolve
svn path=/trunk/; revision=63717
Create additional install directories. Patch by Lee Schroeder. Thanks a lot!
CORE-7987 #resolve #comment Fixed in r63716.
svn path=/trunk/; revision=63716
Reimplement SetupCreateDirectory in such a way, that a full directory path will be created, if needed. This enables us to install ReactOS in a sub-directory like for example '\OS\Test\Alpha\ReactOS'.
svn path=/trunk/; revision=63715
- Partial revert of r63700 on Alex's request
- This cancels the "Use ZwSetValueKey" instead of NtSetValueKey" part
Oddly enough, it doesn't cause a problem anymore. I must have messed up in my initial testings
svn path=/trunk/; revision=63705
- Use ZwSetValueKey instead of NtSetValueKey
- Properly probe and copy parameters when NtSetValueKey is called from UMode
CORE-7738 #resolve #comment fixed in r63700
svn path=/trunk/; revision=63700
Remove that deprecated NtW32Call function that doesn't exist on windows since NT 4.0 SP3.
Alex, do you want to keep its prototype in the NDK too?
svn path=/trunk/; revision=63690
- Fix a type-limits warning
- Remove unnecessary casts and asserts
- Use NULL for pointer comparison
- Fix IN vs OUT annotation
svn path=/trunk/; revision=63687
- Initialize the new queue head before inserting it into the asynchronous schedule list, and add a memory barrier to ensure this order. The list can be read by the host controller at any time, so the new item must be valid when inserted. See EHCI spec section 4.8.1.
svn path=/trunk/; revision=63686
- Do not shutdown the computer if winlogon cannot register itself to user32 (eg. the user double-clicks on winlogon.exe when ReactOS is already launched :P ).
- Add a note about a possible improvement of the error dialog if msgina cannot be loaded correctly.
- Fix french translation.
svn path=/trunk/; revision=63680
Add a suitable icon, from the "Farm-Fresh Icon Set" pack of "FatCow Web Hosting" (http://www.fatcow.com/), under a Creative Commons Attribution 3.0 License. See the COPYING file for more details.
svn path=/trunk/; revision=63679
- Add PsGetThreadProcess prototype.
- Remove Win32DataCollectionProcedure member in WIN32_CALLOUTS_FPNS structure that doesn't exist in Win2k3 SP1 and SP2.
svn path=/trunk/; revision=63673
- Do not include an export's ordinal in the .def file for the import lib unless import by ordinal is intended (via -noname or -ordinal). MSVC will always import by ordinal if it finds one in the def file, which would break apps on different versions of Windows if applied to the wrong functions.
svn path=/trunk/; revision=63664
* Remove some exports that do not exist in native.
* Fix some existing exports.
* Reorder some exports.
* Comment out some stubs.
* Add some missing exports.
CORE-8174
svn path=/trunk/; revision=63663
* Remove some exports that do not exist in native.
* Reorder some exports.
* Comment out some stubs.
* Add some missing exports.
CORE-8174
svn path=/trunk/; revision=63662
* Remove some exports that do not exist in native.
* Reorder some exports.
* Comment out some stubs.
* Add some missing exports.
CORE-8174
CORE-8264
svn path=/trunk/; revision=63661
- Do not fail on non-existing GUIDs in SetupDiGetClassDevsExW
WinCDemu portable now goes a bit further and permits to load CD images, but no new drive letters are affected.
svn path=/trunk/; revision=63643
- Actually use DPFLTR_LDR_ID in debug prints instead of a magic value and a comment
- Use RtlInitEmptyUnicodeString where appropriate
svn path=/trunk/; revision=63635
- Do not use the upper byte of RtlRandom's result in RtlGenRandom, since the function only generates 31 bits. Should fix UuidCreate test in rpcrt4:rpc.
svn path=/trunk/; revision=63633
The control panel automatically runs this applet without clicking on it, fix this wrong behaviour.
Patch by Lee Schröder
CORE-8323 #resolve #comment Thanks :)
svn path=/trunk/; revision=63625
- Do not mark VAD as private memory when creating a MEMORY_AREA, as this is never the case (only used for sections)
- Add a few DPRINTS.
CORE-8140 #resolve fixed with r63618
svn path=/trunk/; revision=63618
The winstation spinlock is a leftover of some old code. It can be removed.
<+smiley1_> hbelusca: yeah the spinlock should be removed
<@hbelusca> smiley1_ - was it from old code?
<+smiley1_> hbelusca: go on
svn path=/trunk/; revision=63612
There is a bug in win32k (who would have thought that?) that consists in holding a winstation spinlock while running PAGED_CODE MmCopyToCaller function, when building the list of desktops of a given window station (the bug is easily triggerable when calling EnumDesktopsW). Since this lock is never used in anyplace but in this function, which, by the way, is just a reader function that fills user buffer, I consider that it is safe to remove this lock. However I want approval from win32k specialists. Hence I just disable the code with a define USE_WINSTA_LOCK. If this lock is really needed, please rewrite the BuildDesktopNameList function !! Otherwise remove this lock and the associated code !!
This is a blocker for the shutdown code.
svn path=/trunk/; revision=63610
- Free parameters allocated by application before anything else.
See CORE-8200 #comment committed in r63605, waiting for wine to accept it before closing.
svn path=/trunk/; revision=63605
The SCM also sets a shutdown level, lower than the default value for programs (this was cross-checked with Windows 2k3, the value chosen is for compatibility purposes).
svn path=/trunk/; revision=63604
[TASKMGR]
Set a proper shutdown level (with SetProcessShutdownParameters) so that explorer and taskmgr are terminated the very last when one shutdowns ReactOS.
See Windows Internals 4th page 286 (section "Shutdown") which gives the values (that I've cross-checked on Windows 2k3 too).
svn path=/trunk/; revision=63601
- Cleanup CSRSRV from the very last remnants of CsrEnumProcesses i.e. the old & buggy way of shutdowning process (lots of work must be done in winsrv side).
- Fixup FindProcessForShutdown (reenable commented code in it, and set a proper status error code if CsrImpersonateClient call fails).
svn path=/trunk/; revision=63600
- Disable -Oif flags for generating client/server stubs with widl, except for advapi32 which needs it
See CORE-8200 for details
svn path=/trunk/; revision=63588
MmUnmapViewOfCacheSegment expects DeleteInProgress to be FALSE and the address space to be unlocked.
Allow unmapping memory areas which belong to the cache.
svn path=/trunk/; revision=63580
- Add defines for internal flags for BasepCopyFileExW().
- Add prototype for BasepCopyFileExW().
Based on documentation by Alex.
svn path=/trunk/; revision=63578
* Consider current WorldTransform in ExtTextOutW.
* Brought to you by Manuel "Tarnyko" Bachmann. Fix improved by Timo Kreuzer and me.
CORE-8306 #resolve #comment Fixed in r63576. Thanks!
svn path=/trunk/; revision=63576
* Reorder some exports, remove some commented out ones, add some missing ones and remove the ones that do not exist in native.
CORE-8174
svn path=/trunk/; revision=63569
* Do not rely on RegDeleteTreeW which is no longer exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63568
* Reorder some exports, remove some commented out ones, add some missing ones and remove the ones that do not exist in native.
CORE-8174
svn path=/trunk/; revision=63567
* Do not rely on RegDeleteTreeW which shouldn't be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63566
* Unfortunately widl seems to generate declarations for functions even when they're wrapped with version related cpp quotes, so hand this block to SVN for now.
CORE-8174
svn path=/trunk/; revision=63565
* Introduce vista.c to copy RegLoadMUIString related functions. If you think you're having a deja-vu, you are (r58809).
* Use SHCopyKeyW instead of RegCopyTreeW and mark that it doesn't copy the security attributes of the keys.
CORE-8174
svn path=/trunk/; revision=63561
Have you ever dreamt of doing per-line text selection in a windows-like console, instead of only being able to select rectangular blocks of text? Even if it is still not possible on Windows (unless you use one of those hackish hooking libraries on the Internet to do that), it now becomes possible on ReactOS!! Just press Ctrl while you're selecting text, and enjoy! Also, you need to keep Ctrl key pressed while you release the mouse (if you select text via the mouse), to be (afterwards) able to copy the text in line-mode, otherwise it will switch back to block-mode selection.
Enjoy!
svn path=/trunk/; revision=63559
* {Set,Query}SecurityAccessMask should not be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63556
* Do not rely on RegDeleteTreeW which shouldn't be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63555
* Do not rely on RegDeleteTreeW which shouldn't be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63554
* Do not rely on RegDeleteTreeW which shouldn't be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63553
* Do not rely on RegDeleteTree{A,W} which shouldn't be exported.
* Move shlwapi.h inclusion to the PCH.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63552
* Do not rely on RegDeleteTreeW which shouldn't be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63550
* Do not rely on RegDeleteTreeW which shouldn't be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
svn path=/trunk/; revision=63549
* Fix a nasty stack corruption that was caused by a mismatching prototype.
* Brought to you by MSVC Run-Time Error Checks (/RTC1)
* Fixed by Christoph von Wittich.
svn path=/trunk/; revision=63543
- add support for VK_OEM_102 and Shift+AltGr combinations in kbdcz1
- fix left arrow in kbdcz
- reduce diff between the layouts
- misc cleanup
- Patch by Radek Liska
CORE-8283
svn path=/trunk/; revision=63532
- Move definition of va_list to crtdefs.h
- Remove useless definitions from vadefs.h
- Cleanup the mess in stdarg.h
- Add memmove prototype to intrin_x86.h, since it's used there
- basetyps.h: guard STDMETHODCALLTYPE & friends from redefinition
- guiddef.h: define FAR, include string.h
- ntdef.h: don't include stdarg.h and string anymore, enable STRICT, remove FAR, add STDMETHODCALLTYPE & friends
svn path=/trunk/; revision=63530
- Database update and some missed sourceforge mirror fixes by me and myself.
- rapps: (for database) Many Improvements and Many Fixes by Erdem Ersoy
CORE-7710 #resolve #comment Committed, thx for your help.
svn path=/trunk/; revision=63527
* when displaying message boxes, set the parent to the main window/details dialog instead of using NULL.
*add a function for showing the last Win32 error and replace two message boxes with a call to it.
*add the ability to save event logs to a file.
*add the ability to clear event logs.
*In QueryEventMessages(), assign lpSourceLogName and lpComputerName after the call to OpenEventLog, not before.
Patch by Ricardo Hanke
CORE-7863 #comment Comitted in r63525, thanks
svn path=/trunk/; revision=63525
Skip the optional leading backslashes in server names for the ncacn_np protocol.
This will fix at least one failure in the advapi32 registry winetest.
svn path=/trunk/; revision=63523
Add annotation to HRESULT typedef, add a number of missing typedefs and defines, make RTL_CONSTANT_STRING and RTL_NUMBER_OF_V2 more secure by adding compiler checks for common errors, make use of intrinsics for some 64 bit shift macros.
svn path=/trunk/; revision=63522
[CMAKE] Get rid of -Wtype-limits, it's noisy, it doesn't provide any reasonable benefit and it's almost impossible to "fix" these warnings without huge haxxory.
svn path=/trunk/; revision=63520
[MESA] Silence warnings about unused but set variables and type limits
[GENINC] Remove obsolete file
[OBJ2BIN] Fix a typo
svn path=/trunk/; revision=63517
* Introduce a faster and smaller build without dependency on exports that do not exist in native.
[MSVCRT]
* Get rid of some exports that do not exist in native.
CORE-8174
svn path=/trunk/; revision=63511
- Fix an off-by-one bug in the ACCOUNTS command.
- Improve input validation for the ACCOUNTS command.
- Add the /help option to the CONTINUE command.
- Add version resource and start to move texts into resources.
svn path=/trunk/; revision=63509
- Add a DPRINT1 in CmCheckRegistry because it is unimplemented, and give the CheckFlags value to CmCheckRegistry, when it is called in CmpInitializeHive.
- Give the CheckFlags value to CmpInitializeHive, when it is called in CmpInitHiveFromFile.
- Really mention that the CmCreateRootNode call is a HACK for ROS.
svn path=/trunk/; revision=63505
- Fix geninc and spec2def to support the MS ARM assembler
- Add an MSVC compatible version of kxarm.h
- autogenerate ksarm.h with geninc.c
- Move some ARM definitions to NDK
svn path=/trunk/; revision=63501
- ntdef.h: Add #pragma once, include guiddef.h and kernelspecs.h, slightly cleanup the nameless struct/union stuff, fix PVOID64 definition, fix definition of UNALIGNED on ARM, stop checking for too outdated MSVC versions (< 1300), start using ULONG32 instead of ULONG at some places (this is to be able to share the code with winnt.h later), add missing PROBE_ALIGNMENT32, DECLSPEC_NOTHROW, DECLSPEC_UUID, DECLSPEC_NOVTABLE, DECLSPEC_DEPRECATED, DECLSPEC_DEPRECATED_DDK, simpify HANDLE definition.
svn path=/trunk/; revision=63500
- rewrite msvctarget.h to define all native MSVC architecture macros and do not define x86 sub-architecture numbers, they are deprecated
- basetsd.h: Fix header guard, include msvctarget.h instead of adding some custom defines, add missing FIRMWARE_PTR definition, fix POINTER_64 definition
svn path=/trunk/; revision=63499
- Remove two unuseful imports.
- Rewrite StrToColorref to not use shell functions, and increase a bit the size of the szColor buffer in SetUserSysColors to match the capabilities of windows.
svn path=/trunk/; revision=63498
- Just run again the loop if LsarOpenAccount call failed (that also avoids a call to LsarClose on a NULL handle, that is trapped by the kdbg if one enabled "set condition * first always").
- Free the memory and the opened handles before returning in case of failure of LsapAddPrivilegeToTokenPrivileges. Maybe this cleaning step can be done more elegantly.
Eric, can you please review that? It should be good I think.
svn path=/trunk/; revision=63496
Several fixes in fast486 and ntvdm:
DosCopyEnvironmentBlock - prepend the program name tag (0x0001) to the program name.
Fast486OpcodePushByteImm, Fast486OpcodePushImm - sign-extend instead of zero-extending.
Fast486InterruptInternal - The parameter is supposed to be the type of the gate, not a boolean.
GET_SEGMENT_RPL will not work on real-mode selectors, use a special field for the RPL.
Loading a data segment with the NULL selector should never generate an exception.
Mask out the highest-order byte of the physical address when loading a descriptor table in 16-bit mode.
Fast486InterruptInternal - The interrupt gate type determines the size.
CORE-8257 #resolve #comment Fixed in revision r63482.
svn path=/trunk/; revision=63482
- More tweaks for MDI drawing. Tested our explorer, winefile and Vide2 from http://vgui.sourceforge.net/. Help is needed to fix MDI icon system menu loading, updating and moving.
svn path=/trunk/; revision=63477
* Zap some exports that do not exist in native.
* Reorder some exports.
* Add the missing ones. They are commented out and will be added on-demand.
CORE-8174
svn path=/trunk/; revision=63476
* Zap some exports that do not exist in native.
* Group the ones that we're forced to keep (only temporarily right now) for Gecko.
CORE-8174
svn path=/trunk/; revision=63460
- Make minimizing windows in MDI application usable, more fixing is needed. ReactOS suffers from wine poisoning. Need more Vodka! See wine Bug 1719.
svn path=/trunk/; revision=63457
disable some tests on x64, since they don't build. Disable some exports from dllexport_test on non-x86 build, since decorations are x86 specific.
svn path=/trunk/; revision=63453
* Partial update of scanf routines. Focus was on the case of reading a float.
* Don't inline float processing, introduce _internal_handle_float() and co to take care of this. Brought to you by Timo.
* Msvcrt scanf tests are now green.
CORE-7005 #resolve #comment Should be fixed in r63443. Thanks Dmitry ;)
CORE-8080
svn path=/trunk/; revision=63443
Make sure to check for invalid NULL handles before passing them to GDIOBJ_bLockMultipleObjects, which skips NULL handles. This is a design limitation, since otherwise we either need to pass a bitfield of valid handles, or duplicate code in certain functions, where different combinations of dest, source and mask dc are allowed.
svn path=/trunk/; revision=63442
Add SEH to LpcpCreatePort and NtAcceptConnectPort. Based on patches by Aleksander Andrejevic ([TheFlash])
CORE-7156 #resolve
CORE-7371 #comment SEH still missing in NtSecureConnectPort, NtReplyPort, NtReplyWaitReceivePortEx, NtRequestPort
svn path=/trunk/; revision=63436
Update display even when mouse does not move. Patch by Andrea Faulds.
CORE-4739 #comment Committed in r63429, thanks. #resolve
svn path=/trunk/; revision=63429
- ScanForUnpartitionedDiskSpace: Scan the list of logical partitions for unpartitioned space too.
- Fix a little typo.
svn path=/trunk/; revision=63421
When a user mode debugger has single stepping enabled and steps over a sysenter instruction, you are obviously not supposed to enter the kernel debugger on the syscall entry handler. But exactly this happened on reactos. This was because the sysenter instruction doesn't disable single stepping, so we need to handle this special case manually in the single stepping handler (which we didn't). We now check if the single step comes from KiFastCallEntry and when it does, disable single stepping in the current (nested) trap frame and return back to a secondary fast call entry. The 2nd entrypoint will make sure to re-enable the single step flag in EFLAGS before returning to usermode.
To make this actually work, the asm entry stub itself needs to handle saving of eflags, so some trap frame modification from KiFastCallEntryHandler was moved into the asm stub. Since the amount of asm instructions is rather small (10 instructions, pretty straight forward) I moved everything from KiSystemServiceHandler to the asm stub and killed KiFastCallEntryHandler entirely, calling KiSystemServiceHandler instead.
Now stepping over a sysenter instruction works with OllyDbg without breaking into the kernel debugger. CORE-8057 #resolve
svn path=/trunk/; revision=63420
- Fix a failed partition type assignment, when unpartitioned disk space is converted to an extended partition.
- Rename the extended partition list to logical partition list.
- Add a pointer to an extended partition to the disk entries. And keep it up-to-date when the primary partition list is built or modified.
- Add the 'Unpartitioned space' partiton entry to the logical partition list when an extended partition has been created.
- Remove all logical partition entries when the coresponding extended partition will be deleted.
svn path=/trunk/; revision=63411
Don't access the object header of a kernel object from win32k. Instead get the desktop name from the desktop info structure. CORE-6818 #resolve
svn path=/trunk/; revision=63409
Pass process id to DbgUnLoadImageSymbols instead of ZwCurrentProcess() or a PEPROCESS.
Patch by Jérôme Gardou <jerome.gardou at reactos dot org>
CORE-8253 #resolve
svn path=/trunk/; revision=63406
- Do not align the size of a memory area to the allocation granularity, but to PAGE_SIZE. Fixes OllyDbg regression from r61108. CORE-8168 #resolve
- Clarify the size calculation in MmCreateMemoryArea
- Silence a few DPRINTs
svn path=/trunk/; revision=63405
- Fix a bit the translation of yesterday;
- Use TEXT_PADDING_BIG instead of hardcoding 3 spaces in the status messages.
svn path=/trunk/; revision=63398
Do not ASSERT, when an unimplemented, yet legal flag (MEM_RESERVE) is passed to NtMapViewOfSection. Instead fail gracefully.
svn path=/trunk/; revision=63395
Also, for reference: r23894 contained working implemnentations in fpu.c. In r23895 ion "moved" it to cpu.c, killing the MSVC implementation in the process. In 23972, ion added new MSVC code for it, but this new version had the bug. It has remained undiscovered until very recently.
svn path=/trunk/; revision=63391
Fix ending address calculation for the commit path in NtAllocateVirtualMemory like done for the reserve path in r63356. Add a comment about a Windows kernel bug, which we will keep for now, until the implications are better determined.
svn path=/trunk/; revision=63388
Use a separate palette for text mode. Previously the text mode palette was equal to the
first 16 entries of the graphical palette, which is wrong since the AC registers can be
used to select arbitrary colors from the DAC.
svn path=/trunk/; revision=63385
- Fix load menu callback. Use it for loading system menus.
- Sync in more wine code, fix sub-menu arrow drawing. See WinMerge.
- Miscellaneous code changes.
svn path=/trunk/; revision=63380
Properly repeat the GetNextVDMCommand request. Using "continue" there will not work
if the application has been started by a double click, since in that case AcceptCommands
is FALSE.
svn path=/trunk/; revision=63379
Russian Translation by Akhlamov Petr
CORE-7981 #resolve #comment Committed after some build fixes, thx.
P.S. Former commit was made by Alex Gorgurov
svn path=/trunk/; revision=63374
- rewrite the wined3d config cpl to make it work with the current version of wined3d
- add a "default" option so it's easier to revert changes done to the configuration
- I apologize for the "lost" translations but there were too many changes
svn path=/trunk/; revision=63368
- Initialize the BIOS Configuration Table, see http://www.ctyme.com/intr/rb-1594.htm for more information.
- Implement INT 15h, AH=C0h "GET CONFIGURATION".
svn path=/trunk/; revision=63367
Since the BIOS registers the whole range of possible interrupts, we register their stubs in an array-form so that the BIOS always registers INT n at the same place. We save 561 bytes of memory.
svn path=/trunk/; revision=63366
Usually the command line is made of the application name and its parameters. When launching a DOS program, BaseCheckVDM builds suitable ApplicationName and CommandLine strings "DOS-compatible". ApplicationName is left-trimmed for whitespace and then converted to short-path format, and CommandLine sees the application name part (its first token) removed. We didn't do it before, we do it now. Care is taken when quotes are present in ApplicationName. Finally DOS command lines usually receive a newline character, so we also add it there. This is how behave Windows: just put our ntvdm in Windows, and observe what it receives...
svn path=/trunk/; revision=63361
- Fail device initialization if a filter fails to load so the PnP manager can try again later
- Fix some handle leaks
- Reset device node flags after a remove IRP is sent
[I8042PRT|MOUCLASS|KBDCLASS]
- Implement proper support for PnP remove IRPs
See issue #8238 for more details.
svn path=/trunk/; revision=63360
- Fix a bug in MiQueryAddressState that prevented it from returning a valid protection
- Add support for PAE and x64 to MiQueryAddressState
- Acquire the working set lock in MiQueryMemoryBasicInformation before MiQueryAddressState
- Fix RegionSize calculation in MiQueryMemoryBasicInformation
- Handle ZeroBits and Process->VmTopDown in NtAllocateVirtualMemory
- Fix a bug in calculating the ending address of a virtual allocation
- Gracefully handle Vad allocation failure
- Free Vad allocation on failure
- Write values back to usermode only in case of success
svn path=/trunk/; revision=63356
First part of the partition management code rewrite. This part fixes the handling of primary partitions. Extended partitions and logical drives are not handled yet. Safety checks and warnings are still missing! Partitions created by the new code are accepted by gparted and Windows.
svn path=/trunk/; revision=63355
- Do not ASSERT that a page fault im MmArmAccessFault happens on an invalid page. Instead handle write-on-readonly-PTE faults (Copy-on-write still unhandled). This ASSERT was not triggered so far, since ARM3 mapped all pages as read/write regardless of protection! So all (page file backed) sections mapped into user space were writable and could be happily modified from user mode!
- Fix MI_MAKE_HARDWARE_PTE_USER, so that it respects the actual protection.
svn path=/trunk/; revision=63354
* Define _ALLOW_KEYWORD_MACROS to get the news MSVC toolchain to allow us to redefine inline (it became a keyword). Reported by David Quintana.
svn path=/trunk/; revision=63353
- Restore the pending NDIS request before calling the completion routine
- Fixes crash with Broadcom 57xx drivers (link detection still not working)
svn path=/trunk/; revision=63348
- Start reporting compatible IDs for ACPI-enumerated devices other than processors
- Not sure how this was overlooked for so long...
svn path=/trunk/; revision=63345
- Fix a buffer overrun that caused a BSOD with ACPI enabled on Hyper-V
- Dynamically allocate the hardware ID buffer to prevent another HID overrun
- Switched sprintf to snprintf to prevent this from happening to another ID
svn path=/trunk/; revision=63344
Fix sizeof(WCHAR) vs sizeof(CHAR) problem. Patch by Victor Martinez.
CORE-8166 #resolve #comment Committed in r63341, thanks.
svn path=/trunk/; revision=63341
Improve order of check against NULL and assignement. Patch by Victor Martinez.
CORE-8121 #resolve #comment Committed in r63340, thanks
svn path=/trunk/; revision=63340
Modify BaseSrvFillCommandInfo to always return the correct lengths of the parameters.
In BaseSrvGetNextVDMCommand, check if BaseSrvFillCommandInfo failed.
In CommandThreadProc, expand the size of the environment if necessary.
Add a useful DPRINT1 in BiosKbdBufferPush.
Finish implementing BaseCreateVDMEnvironment.
In GetNextVDMCommand, return the correct lengths of parameters if BaseSrvGetNextVDMCommand
failed.
svn path=/trunk/; revision=63337
Modify the VAD node code to return a TABLE_SEARCH_RESULT instead of an NTSTATUS, this allows us to avoid a 2nd tree iteration when inserting VADs. Fix several bugs in MiFindEmptyAddressRangeDownBasedTree. This code now contains a compatibility hack, that emulates a bug in the Windows 2003 kernel. Note that this bug is also present in MiFindEmptyAddressRangeDownTree on Windows 2003, but will not be exposed to the user, since it only affects the region above the top-most VAD, which will always be occupied by the PEB or TEB. Implement MEM_TOPDOWN in NtAllocateVirtualMemory. See CORE-6392
svn path=/trunk/; revision=63336
* Some list entries fixes.
* Mention that Turkish translations were done by Erdem Ersoy.
CORE-7710 #resolve #comment Committed in r63324.
svn path=/trunk/; revision=63324
- Move Alt-Escape, Space and Tab to ConWndProc, disable GuiProcessKeyCallback.
- Alt-Space was not getting launched out of GuiProcessKeyCallback. The key needed translated.
- Reduce code for system menus.
svn path=/trunk/; revision=63319
- Fully strip the Atl-F4 from the Pop Up System Menu.
- Fix menu.c:1418: Test failed: InsertMenuItem should have failed. Both A/W...
- Fix menu key by Item when cloning menus.
svn path=/trunk/; revision=63317
- Add some diagnostic DPRINTs (they are off by default), and fix few of them.
- Fix/complete few comments.
- Implement INT 21h, AH=56h (rename file), 5Ah (create temporary file), 5Bh (create new file), 68h and 6Ah ("commit" aka. flush file; they are the same function).
- Stubplement INT 21h, AH=60h (canonicalize file name or path) and 6Ch (extended open or create file). For this latest one I will merge DosCreateFile and DosOpenFile into the same function (in fact a wrapper around CreateFileA, that is used both for creating and opening files).
svn path=/trunk/; revision=63309
Fix NtReleaseMutant, which was expecting MUTANT_QUERY_STATE right on the mutant handle, which is not required, probably a copypasta. Fixes a test.
svn path=/trunk/; revision=63300
- Fix some newlines,
- Fireball == Aleksey, not Aleasky :P (ahh, GreatLord, we miss you ^^),
- Fix rosddt (ROS Device Detection Tool) readme file (convert into UTF-8 without BOM).
svn path=/trunk/; revision=63280
Applications: some corrections and improvements to German translations by zehnvor
CORE-8130 #resolve #comment Committed, thx.
usetup: German translation revamp by zehnvor
CORE-8179 #resolve #comment Committed, thx.
DLL: Many improvements to German translations by zehnvor (without the dll patch yet, Wine syncs need no ROS only tranlation IMO)
CORE-8216 #comment Committed without the dll patch yet, Wine syncs need no ROS only tranlation IMO
svn path=/trunk/; revision=63275
Revert the DDK compatibility hack and apply a real fix. I kept the hack for NDK exports, we should consider changing them as well for consistency reasons.
svn path=/trunk/; revision=63268
- Fix socket leak. Spotted by Samuel & cppcheck
Note: Wine has this in iphlpapi these days. Should probably sync.
CORE-8208 #resolve
svn path=/trunk/; revision=63250
Fix incompatible definition of a number of NTOSKRNL data imports. These imports are declared in MS DDK in a way that is usually not how you would declare data imports. The proper way of doing it is using _DECLSPEC_INTRIN_TYPE(dllimport) or in this case NTKERNELAPI, which will cause the compiler to directly dereference the __imp__FooBar symbol. MS has declared some of these variables directly as pointers without using dllimport. This works with MS DDK, since it's import libraries contain aliases (like _FooBar) to the import symbols (__imp__FooBar). Neither MS LINK nor DLLTOOL create these aliases in the import libs, which is good, since hacks like these are dangerous. To make the original declarations work without using macros (which can conflict with other things, like for example the KdDebuggerEnabled member in KUSER_SHARED_DATA) these aliases have to be generated differently. Luckily both MSVC and GCC support a pragma that does exactly this. Fix the incompatible use in our drivers and the broen(!) use of KdDebuggerEnabled in kdcom (which was writing a PBOOLEAN value (FALSE == 0 == NULL, so no warning) into the location that is really a BOOLEAN, possibly overwriting other data. Finally get rid of a number of hacks in ntoskrnl, where prefixed versions were used to not conflict with the DDK definitions.
svn path=/trunk/; revision=63247
- czech translation update by Radek Liska (with some minor modifications by me)
CORE-8092 #resolve #comment Committed in r63241. Thanks!
svn path=/trunk/; revision=63241
- Continue to work on VGA attach/detach from console;
- Stick more #if(n)def STANDALONE to portions of code that are useful (or not) in standalone (i.e. not in OS-integrated) mode;
- Isolate the Dos***File functions in a new source file;
- Get rid of STACK_COUNTER, STACK_VAR_A and STACK_VAR_B since we now use 32-->16 bit callbacks (and therefore adjust the callback/INT32 trampoline stubs accordingly).
svn path=/trunk/; revision=63238
- attempt to resolve an widechar/multibyte mismatch in the applet name
- fixes opening the mouse applet if the translated name contains a non ASCII character
svn path=/trunk/; revision=63237
- Turkish translation by Erdem Ersoy;
- Italian translation by Marco Maria Emanuele Bartucci;
- Polish translation by wojo664.
CORE-7493 #close #comment Committed in revision 63235, thanks! Please create a new report for translation updates.
svn path=/trunk/; revision=63235
* Italian translation update by Marco Maria Emanuele Bartucci.
* A small Polish translation update from wojo664.
CORE-8086 #resolve #Committed in r63228. Thanks!
svn path=/trunk/; revision=63228
* Update MSVCRT_CHECK_PMT and co.
* Update the use of MSVCRT_INVALID_PMT throughout our code.
* Fix the return of _ltoa_s() in some case. Fixes a couple msvcrt:string tests.
CORE-8080
svn path=/trunk/; revision=63223
Add a temp hack that allows to compile kmtest_drv with either the current incompatible object type data imports or with the fixed ones
svn path=/trunk/; revision=63222
[WMILIB] Don't put it in a cab file, so we can use it in first stage
[DDK/VDDSVC.H] use the 16 bit interface only on MIPS
[WINE/PORT.H] WIN32 -> _WIN32
[NTOSKRNL] KfAcquire/ReleaseSpinLock -> KeAcquire/ReleaseSpinLock
[NTOSKRNL] Make sure KeUpdateSystemTime returns properly on non-x86 builds
svn path=/trunk/; revision=63220
Add support for adding aliases when exporting data by specifying the -withalias switch. This will cause MS LINK to generate _FooVar as an alias alias for _imp__FooVar. While this looks wrong and is not the way you usually handle data imports, this is what we have in the DDK for a number of data exports like KdDebuggerNotPresent, IoFileObjectType, ..., which we currently define in an incompatible way. Remove stdcall decorations on non-x86 builds
svn path=/trunk/; revision=63217
- Patch by Huw Campbell : Fixes maximizing Explorer window, the horizontal scroll bar is not painted correctly. See CORE-6249.
svn path=/trunk/; revision=63215
[RTL] Implement RtlGetTickCount (currently a copy of GetTickCount from kernel32)
[NTDLL] Export RtlGetTickCount as NtGetTickCount and ZwGetTickCount
svn path=/trunk/; revision=63211
Factor the shift of the interlaced high bit out of the for(...) loop (since the interlaced high bit is not modified anymore after), and add extra parentheses.
svn path=/trunk/; revision=63209
In any case, we are returning the (!= success) status in case we failed to perform the file copy, so just test for != success just one time.
Patch by Victor Martinez.
CORE-8189 #resolve
svn path=/trunk/; revision=63206
Detect whether we are connecting to a pipe on the local machine and use the \\.\ prefix instead of the full machine name.
This patch modifies ReactOS-specific code (that was introduced by Eric in revision 53630) (Wine still supports only local pipes), so I also update our rpcrt4_ros.diff file accordingly, r63201 with respect to the latest Wine 1.7.17 rpcrt4 code.
CORE-6561 #resolve
CORE-6562 #resolve
CORE-7562 #comment Partly solved in revision 63202. Please retest.
svn path=/trunk/; revision=63202
No need to precalculate the string lengths before calling the helper functions. They can do it instead.
svn path=/branches/condrv_restructure/; revision=63198
Make kernel32 / winsrv console CSR structures Win2k3-compliant.
The aim is to be able to put our kernel32.dll or winsrv.dll on win2k3, and vice-versa.
- Fix almost all the alias APIs and the history APIs. Unicode versions is OK, ANSI ones need correct fixes in server-side (see CORE-7931 for more details).
- Half-plement SetConsoleCommandHistoryMode (client-side OK, server-side unimplemented).
Part 4/X
CORE-7931
svn path=/branches/condrv_restructure/; revision=63194
* Sync ActCtx related code with Wine 1.7.17.
* I'll let you find out how many tests that fixes ;)
* Dedicated to Christoph von Wittich.
CORE-8080
svn path=/trunk/; revision=63192
- Fix potential bug in CsrCaptureMessageString, in case StringLength > MaximumLength, and also do not copy too much data into the captured buffer. Then always NULL-terminate the captured strings if possible.
- Implement CsrCaptureMessageMultiUnicodeStringsInPlace, used by Win2k3 kernel32.dll in CreateProcess and for SxS thingies.
svn path=/branches/condrv_restructure/; revision=63184
- Utilize the new menu structures and use item array instead of the list method. Make sure your applications Appends are in order (reference Mdi.c). Sync ported more wine code too.
- See CORE-5605, CORE-7447, CORE-7967 (Main Bug), CORE-8098 and CORE-8107
svn path=/trunk/; revision=63179
Merge the NTVDM branch back to trunk. New/changed components are: ntvdm, fast486, basesrv,
ntdll, kernel32 and csrsrv.
svn path=/trunk/; revision=63177
- Patch by Andrew Eikum : Allow setting horizontal extent even without WS_HSCROLL. Only update listbox horizontal scroll info if WS_HSCROLL is set.
svn path=/trunk/; revision=63172
Actually, in previous patch, wrong diagnostic context was being saved (and thus, restored).
Properly save and restore it now.
The drawback of this is that we have to let it run over finally and except blocks to have proper builds with -Wdeclaration-after-statement.
Spotted by Thomas.
CORE-8172
svn path=/trunk/; revision=63166
* Improve some param types.
* Remove some redundant commented out exports.
* Do not export GdiGetBitmapBitsSize().
* Fix the order of some exports.
CORE-8174
svn path=/trunk/; revision=63164
- Move aliases & history management structures & initialization into the console server part.
- Maintain two different console lists, the first one for all the consoles (that are managed by the console driver) and the other for the consoles that are also owned by the console server.
- Simplify few function prototypes.
svn path=/branches/condrv_restructure/; revision=63141
Do not hide file extensions by default.
A side effect is that it will make zz_word_viewer_2003:2.copy_text test going further.
svn path=/trunk/; revision=63140
- Import recent fixes and new stubs from Wine
- Note that Wine is using Samba's libnetapi to implement many functions these days (not included here), so it may be worth having a look at porting that work to ROS.
CORE-8160 #resolve
svn path=/trunk/; revision=63128
- Do not prematurely complete IRP_MN_FILTER_RESOURCE_REQUIREMENTS or IRP_MN_QUERY_PNP_DEVICE_STATE
- Do not handle IRP_MN_QUERY_DEVICE_RELATIONS.BusRelations. We're not the bus driver!
- Correctly stub the (mandatory!) dispatch functions for IRP_MJ_POWER and IRP_MJ_SYSTEM_CONTROL
CORE-8142 #resolve
svn path=/trunk/; revision=63127
In BaseCheckVDM, return a task ID of 0 if there is a console.
In CommandThreadProc, make sure the loop executes at least once.
Also, if a session ID is given, there is no parent console, so there is no need to wait
for further commands.
svn path=/branches/ntvdm/; revision=63124
Terminals are for consoles, and frontends for a given win32 terminal.
Start to clarify this situation in the code. Work in progress.
svn path=/branches/condrv_restructure/; revision=63123
Send the specified task ID to CSRSS in GetNextVDMCommand.
In ntvdm, parse the command line parameters to find the session ID, and pass it in
every call to GetNextVDMCommand.
svn path=/branches/ntvdm/; revision=63121
In BaseSrvGetConsoleRecord and GetConsoleRecordBySessionId, check if the console record was not found instead
of returning the last one in the list.
In BaseSrvCheckVDM, return the session ID to the caller.
svn path=/branches/ntvdm/; revision=63120
Restore the console to normal size while no DOS task is running and keep track
of the cursor position.
Adapted from a patch by Hermès Bélusca-Maïto.
svn path=/branches/ntvdm/; revision=63119
- Move some functions where they belong.
- Start to differentiate frontends for consrv terminal, and terminals.
svn path=/branches/condrv_restructure/; revision=63117
Use VdmRunning to keep the state of the whole VDM, not a VDM task.
Add an event whose signaled state determines the state of the VDM task.
Use FILE_SHARE_READ when opening executables.
svn path=/branches/ntvdm/; revision=63116
Start refactoring:
- remove FASTCALL
- Add WINSRV_CONSOLE for keeping what makes sense only in Win32 consoles and not in consoles in general (keep in mind that the condrv part of this should go into kernel mode later on...)
therefore: move the wait queues into it, the pause flags (that are frontend-specific).
- Move process control from condrv.
svn path=/branches/condrv_restructure/; revision=63112
- Resize the logon graphics logo to windows standard size: 413x72.
- Use this very same logo for ShellAbout. Adapted from a proposition by Lee Schroeder. The real fix for this would be to do like Windows, that means, since (you can double-check) shell32 takes the picture from msgina.dll .
CORE-7940 #resolve #comment Fixed, thanks ;)
svn path=/trunk/; revision=63101
Make our BaseSrvGetNextVDMCommand and GetNextVDMCommand a bit more Windows-compatible,
and modify NTVDM accordingly.
svn path=/branches/ntvdm/; revision=63098
When we use the dummy PSEH, use an if (ExternalVariable) around the except block. This is to make Coverity check the except handler as well and take into account that it could be executed.
svn path=/trunk/; revision=63092
When no clip object is passed to EngGradientFill, use the global trivial one instead of creating a new one. Fixes memory leak. CID 716615
svn path=/trunk/; revision=63091
Fix the most stupid bug ever in ReactOS history (at least!).
Dear Pierre, you pretend you're modifying the FileObject->FileName field, but, as you were told in the early when you learnt C, you're at that point in your code dealing with a local copy of the unicode string. So, if modifying the Buffer field is fine, because it's a pointer to memory zone, containing the wchar string, modifying the Length field is totally pointless because it won't magically modify the unicode string in the file object, and will just be forgotten as long the function will be unstacked.
So REALLY modify the file object. VfatSetRenameInformation receives less garbage information now...
svn path=/trunk/; revision=63049
Implement BaseSrvDisconnect and BaseSrvCleanupVdmRecords, which will remove VDM console and DOS records
which have been left behind by a terminated ntvdm process.
Implement the "VDM voodoo" in BaseSrvCreateProcess. It's supposed to store the process ID of the VDM
in the VDM console record.
Fix minor bugs.
Add function declarations to the header file.
svn path=/branches/ntvdm/; revision=63042
When the CsrProcessCreateNewGroup (~= CREATE_NEW_PROCESS_GROUP) flag is set, it means that we are creating a new process group leader, and not the reverse :P
svn path=/branches/ntvdm/; revision=63041
GetConsoleAliasesLength returns a DWORD (and the len variable *is* a DWORD). Do not check for negative values.
Patch by André Guibert de Bruet.
CORE-7964 #resolve #comment Fixed in revision 63037, cheers!
svn path=/trunk/; revision=63037
Use the proper Highlight pen to highlight the cards (for any cards game using the cardlib library).
Patch by Victor Martinez Calvo.
CORE-8118 #resolve #comment Committed in revision 63036, thanks!
svn path=/trunk/; revision=63036
- Fix dereferencing potential NULL pointers in ConDrvReadConsole() and ConDrvChangeScreenBufferAttributes();
- Fix a wcsncat in ConSrvOpenUserSettings()
Patches by Victor Martinez Calvo
CORE-8122 CORE-8123 #resolve #comment Fixed in revision 63035, cheers ;)
svn path=/trunk/; revision=63035
Implement part 2/3 (first part was in ntoskrnl, remember ;-)) of renaming support in ReactOS.
Here, we implement support for SL_OPEN_TARGET_DIRECTORY for IRP_MJ_CREATE in fastfat. The code is not the best ever, but we can't do miracles with fastfat.
This fixes a few tests in KmTests:IoCreateFile and also shows failures I still don't get and that will require deeper attention.
Last part will be to effectively bring support of FileRenameInformation in IRP_MJ_SET_INFORMATION. But this is yet another story.
svn path=/trunk/; revision=63034
- Use correct parent key instead of an uninitialized handle in INetCfgComponentControl_fnApplyRegistryChanges
CORE-8115 #resolve
svn path=/trunk/; revision=63032
- Moved to new menu structures, synced in wine code and started first phase to server side. Resulting that more tests are running and failing less. Unplugged ntuser bad functions.
- See CORE-5605, CORE-7447, CORE-7967, CORE-8098 and CORE-8107
svn path=/trunk/; revision=63027
Don't define STANDALONE by default.
Don't quit ntvdm after it becomes the last process on the console if a DOS app is still running.
svn path=/branches/ntvdm/; revision=63024
Implement IopOpenLinkOrRenameTarget(), IopGetBasicInformationFile(), IopGetFileInformation().
This implements renaming support in kernel via Nt/ZwSetInformationFile, FileRenameInformation class.
This is only the first part to get renaming properly work in ReactOS.
As exposed by IopOpenLinkOrRenameTarget(), as second step, it's mandatory to implement support for parent directory open in FSDs (FastFAT at first). See tests for IoCreateFile in kmtests. I've some kind of patch for that purpose.
Finally, as third step, it's required to implement support for FileRenameInformation in the FSDs. That part is likely to require way much more work (thanks fastfat <3).
Regarding commented out code, I invite you to read as reference: http://fsfilters.blogspot.fr/2012/07/flags-of-fileobjects-part-v.html
R. Nagar's book is still a good reference regarding since (if we forget bugs in code examples and stuff that got renamed).
svn path=/trunk/; revision=63011
Rewrite DosCreateProcess, separating the loading code into DosLoadExecutable.
Implement INT 21h function AH = 0x4B (Create Process).
svn path=/branches/ntvdm/; revision=62972
- Correctly treat nLengthNeeded as optional in NtUserGetObjectInformation, and access it only within SEH. Fixes crash in user32_winetest:winstation
CORE-8094
svn path=/trunk/; revision=62963
Complete a bit more IoCreateFile tests, taking into account relatives.
A side note (related to first commit - actually to these test as a whole):
It's pretty unfortunate that they work (on my Windows 2K3). They just expose
a totally different behavior than expected reading R. Nagar (pp 478 - 479).
The experimental behavior also being different from behavior expected from IFS
samples provided by MS.
Perhaps some magic in the callpath between IopParseDevice return and IoCreateFile return?
svn path=/trunk/; revision=62960
- Introduce a helper function to query the console leader process (instead of using duplicated code).
- Fix the algorithm of the last close notification, as demonstrated by the tests I did on windows 2003 (test app is provided in CORE-7250):
a console app that registered for the last close notification, closes only if the process that was the console leader process at the time the app registered for the notification, is killed.
In this case, we notify the app, and we clear some flags. On the contrary, if we close the app that registered for the notification, we just clear the flags without doing extra operations.
svn path=/trunk/; revision=62861
- formatting
- remove BOM from the Russian resource
- update the Czech translation
- add myself to the credits because vanity~
svn path=/trunk/; revision=62857
Do not ignore failure when calling DrvEnablePDEV and properly handle a failure in PDEVOBJ_bEnablePDEV instead of ASSERTing. Properly cleanup the PDEV after failure, check if the PDEV was enabled before calling DrvDisablePDEV. Fixes some crashes with VBox driver.
svn path=/trunk/; revision=62855
- Add a debug output to the default console dispatcher for the CTRL_LAST_CLOSE_EVENT code;
- hardcoded_value--;
Addendum to revision 62847.
svn path=/trunk/; revision=62848
Implement (undocumented) SetLastConsoleEventActive API.
Patch by Alexander Andrejevic, with a minor modification by me concerning the addition of a NotifiedLastCloseProcess member to the CONSOLE structure and a check that makes sure that only the app that asked for the notification, receives it (and so that we don't call the console control dispatcher for nothing).
This API is used by ntvdm to be sure that it gets killed when all other console apps attached to the ntvdm's console are away.
CORE-7250
svn path=/trunk/; revision=62847
Make kernel32 / winsrv console CSR structures Win2k3-compliant for CreateConsoleScreenBuffer.
The aim is to be able to put our kernel32.dll or winsrv.dll on win2k3, and vice-versa.
Because of that, we need to introduce and use the redundant hMutex and lpBitMap in the CONSOLE_CREATESCREENBUFFER structure, instead of the ones that are already present in its CONSOLE_GRAPHICS_BUFFER_INFO member ...
Isn't MS dumb sometimes?
I also homogeneize some variable names wrt. equivalent ones that I use elsewhere, and I fix a broken return value in the case the API fails.
Part 3/X
CORE-7931
svn path=/trunk/; revision=62846
Implement console part of Get/SetHandleInformation, needed by msvcrt / cmd.exe (at least the windows version) and other console apps...
svn path=/trunk/; revision=62843
Make kernel32 / winsrv console CSR structures Win2k3-compliant.
The aim is to be able to put our kernel32.dll or winsrv.dll on win2k3, and vice-versa.
Part 2/X
CORE-7931
svn path=/trunk/; revision=62833
Polish translation of solitaire, rapps and msgina
Patch by Wojciech Kozłowski and Adam Stachowicz. Thanks a lot!
CORE-8068 #resolve #comment Second patch committed in revision 62823, thanks ;)
svn path=/trunk/; revision=62823
Rapps entries were integrated into the previous update. SF mirrors were kept as they were instead of using the freesoft.ru ones of the patch.
CORE-7882 #resolve #comment Committed. Thx for helping.
svn path=/trunk/; revision=62805
* Italian translation update. By Marco Maria Emanuele Bartucci.
CORE-8085 #resolve #comment Committed in r62797. Thanks!
svn path=/trunk/; revision=62797
Polish translation of msgina, sysdm and usrmgr.
Patch by Wojciech Kozłowski and Adam Stachowicz. Thanks a lot!
CORE-8068 #resolve
svn path=/trunk/; revision=62794
- Allways add the computer name to the domain list.
- Notify the user about required password changes and repeat the logon using the new password.
svn path=/trunk/; revision=62793
* Update to 2.9.1
* Make use of our iconvc and zlib libs.
[LIBXSLT][MSXML3]
* Make use of our iconvc and zlib libs.
CORE-8079 #resolve
svn path=/trunk/; revision=62773
In the same vein as in revision 62766:
CORE-1697 CORE-7915 #comment Disable Multiprocessor choices at installation because it *DOESN'T correctly WORK* and cause problems to newcomers. Please reenable it *ONLY WHEN* you know it *REALLY* works !!! (revision 62768).
svn path=/trunk/; revision=62768
Bugfix: Enable the user to set a system managed paging file size if no paging file was set before. The user does not need to set a custom paging file size before setting the system managed paging file size.
svn path=/trunk/; revision=62767
Disable EXT2 formatting because it *DOESN'T WORK* and cause problems to newcomers. Please reenable it *ONLY WHEN* you know it *REALLY* works !!!!!!!!!!
CORE-3091 CORE-3073 CORE-4003 #comment EXT2 formatting disabled in USETUP in revision 62766. Please reenable ONLY when you know it works.
svn path=/trunk/; revision=62766
Fix few DPRINTs. The DOS program starting code (common for STANDALONE and OS-integrated modes) can be moved into a helper function later on.
svn path=/branches/ntvdm/; revision=62688
Fix BaseSrvCheckVDM - DOS records should be initialized with a state of VDM_NOT_LOADED.
Fix BaseSrvFillCommandInfo - Check the size of the buffers.
Start implementing BaseSrvGetNextVDMCommand.
svn path=/branches/ntvdm/; revision=62683
Implement BaseSrvFillCommandInfo, a function that fills a BASE_GET_NEXT_VDM_COMMAND
structure with command information.
svn path=/branches/ntvdm/; revision=62602
- Move more constants to the global header.
- Implement GetConsoleRecordBySessionId.
- Implement BaseSrvUpdateVDMEntry.
- Improve and fix bugs in the cleanup code.
svn path=/branches/ntvdm/; revision=62451
Use a helper function for stopping the VDM (in case we add other steps for that), instead of just setting the flag to TRUE.
svn path=/branches/ntvdm/; revision=62378
Move the GET_NEXT_VDM_COMMAND_DATA structure to a global header, and
rename it to VDM_COMMAND_INFO.
Implement BaseSrvCopyCommand, which moves the BASE_CHECK_VDM structure data
into a new VDM_COMMAND_INFO structure.
Implement BaseSrvFreeVDMInfo which frees a VDM_COMMAND_INFO structure and
everything in it.
svn path=/branches/ntvdm/; revision=62374
- Finally get rid of console output handles in the BIOS.
- Move console text buffer copy from BIOS back into VGA memory (~= revert part of r61542), but do it ONLY when attaching the VGA emulation to the console.
- Fix cursor positioning in BIOS & VGA (work in progress).
- Initialize PS/2 after having setting basic console modes.
- Showing/hiding mouse cursor (see the option in the console menu) is done in while() loops to be sure the cursor is really shown/hidden (based on the return value of ShowConsoleCursor).
svn path=/branches/ntvdm/; revision=62373
The RegisterConsoleVDM API (undocumented) allows NTVDM to get a VGA-like text framebuffer hold by the console server. This text framebuffer is unique, per-console (so that changing the active text screen buffer doesn't change the text framebuffer) and exists even if you use a graphics screen buffer.
NTVDM can write in this framebuffer, and when a call to InvalidateConsoleDIBits is done, it is painted on the screen.
Since RegisterConsoleVDM is unimplemented on ReactOS, I start an implementation of this API *inside* NTVDM (that will then be moved to kernel32/winsrv when it will work correctly).
I adapt the code of the VGA emulation to support RegisterConsoleVDM.
svn path=/branches/ntvdm/; revision=62371
Implement a function that creates a pair of event handles - BaseSrvCreatePairWaitHandles.
As already explained in the comments of BaseCheckForVDM (in kernel32), the hParent parameter
is actually an event handle (or more precisely, the client event handle), not a process handle.
svn path=/branches/ntvdm/; revision=62367
Get rid of ConsoleInput handles in the BIOS; setting input console modes should be done in the emulator.c module itself (when setting user interface modes), and if a mouse is present, handle it in the ps2.c module.
Next step will be to get rid of ConsoleOutput handle in the BIOS.
svn path=/branches/ntvdm/; revision=62359
All of the FPU opcodes fetch another byte which is the function number.
This is done by the CPU and it occurs even if there is no FPU attached.
svn path=/branches/ntvdm/; revision=62344
Be able to load an external DOS BIOS file (at 70:0000) and, in case it is the DOS BIOS file of the NT VDM, load the DOS kernel file ntdos.sys when the ntio.sys calls BOP DOS function 0x11 (and put the kernel at DI:0000).
Work in progress...
svn path=/branches/ntvdm/; revision=62343
- Add BOP 0x12 "BiosGetMemorySize" (same number as the corresponding INTerrupt). Needed by ntio.sys when initializing (see next commit).
- Use ASCII names for bios image and dos kernel files names.
- Use the file helper functions committed before for implementing ROM image file loading.
svn path=/branches/ntvdm/; revision=62342
- BIOS32: As a demonstration, load a BIOS expansion ROM (the one I've tested is the "OS in PCI expansion ROM" from: https://sites.google.com/site/pinczakko/building-a-kernel-in-pci-expansion-rom ; we don't support PCI thingies at all, but the bootstrap code works correctly).
- Initialize the BIOS32 stack for the callbacks.
- In the common BIOS functions, if we try to load the Windows NTVDM (SoftPC) BIOS (file: bios4.rom), we immediately hit a BOP 0x00 followed by INT 0x19 (bootstrap to run an OS). The BOP 0x00 is the function used by the BIOS to ask NTVDM to initialize the hardware, the IVT with data and so on. Also we finish to load the low part of the NTVDM BIOS in it (file: bios1.rom).
It's work-in-progress, nothing is done, there are lots of debugging code...
Have fun!
(to load a custom bios you need to put its filename as the first parameter of the BiosInitialize call, in the main() function in ntvdm.c).
svn path=/branches/ntvdm/; revision=62333
- Add utility functions for loading ROM images from files, and running them.
- Add a missing PVOID in the MEM_ALIGN_DOWN macro.
svn path=/branches/ntvdm/; revision=62332
- Reduce the size of the trampoline needed to perform 32 ---> 16 bit callbacks.
- Fix some comments, improve DPRINTs.
svn path=/branches/ntvdm/; revision=62331
- Move an "enable interrupts" command to where it belongs (i.e. in the BIOS32 initialization code; we do it at the very end). Otherwise some problems appears when trying to load 16-bit bios images.
- Use the new macro REAL_TO_PHYS to convert "real-mode" pointers (valid inside the VM only) into "physical" ones (valid in ROS/Windows/whatever).
- Add BIG HACKs (thanks Aleksander ;) ) in EmulatorRead/WriteMemory for wrapping up high memory addresses to low ones, so that we can load bios images (when you start running code at F000:FFF0).
To test 16-bit bios images: in ntvdm.c, put a valid bios file name in the BiosInitialize(...) call, and disable all DOS calls that happen before EmulatorSimulate().
svn path=/branches/ntvdm/; revision=62314
- Fix return values of Fast486OpcodeSahf and Fast486OpcodeLahf handlers.
- [TheFlash], can you please see what we should return after calling Fast486ExceptionWithErrorCode in Fast486OpcodePopFlags ?
svn path=/branches/ntvdm/; revision=62313
- BIOS location must be aligned on 32bit boundaries (or 16, I have to check). This fixes BIOS images loading when they miss a (null) byte to make them (e.g.) 8192 bytes long (example: the BIOS image of windows ntvdm).
- Add useful alignment (and others) macros.
svn path=/branches/ntvdm/; revision=62312
** WARNING! WARNING! WORK IN PROGRESS!! **
** MEGA HUGE IRC SPAM IN SIGHT!! **
Commit a starting point implementation for 16-bit callbacks from 32-bit code that work together with the EmulatorSimulate / EmulatorUnsimulate functions.
That needs HUUUGE reviewing (go to the END to skip details and going to the current drawbacks of the implementation) <-- [TheFlash], Vampyre, others...
How it is intended to work:
1- Add callback.c to the CMakeLists.txt file, and remove int32.c from it.
2- In some 32-bit module that will get called by 16-bit code sooner or later (e.g. bios32 or dos32), include callback.h instead of int23.h.
3- Add a CALLBACK16 MyContext; // definition
4- In some initialization code for this module, call: InitializeContext(&MyContext, custom_segment, custom_offset);
This allows you to define a zone of memory custom_segment:custom_offset that will be used as a trampoline zone. FIXME/TODO: we can return from this call the size of this zone (not implemented at the moment), so that we can know the zone that will be reserved for calls (it will be used in the following steps).
5- Now you can register e.g. 32-bit interrupt handlers with calls like:
MyContext.NextOffset += RegisterInt32(MAKELONG(MyContext.NextOffset,
MyContext.Segment),
IntNumber, Int32Handler, NULL);
Now comes the tricky part: since we want to be able to give precise memory addresses to where to put interrupt stubs (whose addresses will be stored in the IVT) (it's because it happens that some programs expect some few code interrupts to be placed at given places in memory; or one can argue that it is "for IBM bios compatibility"....), we pass a far pointer instead of the context structure as the first parameter. Then, currently the function returns the size of the written code (and it returns too via its last optional parameter).
6- You can do almost the same with RegisterInt16, where now instead of giving a 32-bit interrupt handler, you give the code of a 16-bit interrupt. What changes here is that in the 32-bit case, the 16-bit interrupt code was generated (to call back the 32-bit handler) whereas here you control it fully. For 16-bit interrupt code you need to use IRETs operands.
7- There is a RegisterCallback16 function, which registers at a given place in memory a chunk of 16-bit code. This code is expected to return with RETs. Its accompanying function RunCallback16 is untested at the moment.
8- Now the magic: Calling this code: an example is given in the following (from DosFastConOut fucntion of Dos32):
<code_snip>
/* Save AX and BX */
USHORT AX = getAX();
USHORT BX = getBX();
setBL(DOS_CHAR_ATTRIBUTE);
setBH(Bda->VideoPage);
setAH(0x0E);
Int32Call(&DosContext, 0x10);
/* Restore AX and BX */
setAX(AX);
setBX(BX);
</code_snip>
Here (after saving some registers and setting some parameters for the INT 10h being called), we call interrupt 10h with Int32Call(&DosContext, 0x10); // where DosContext is a CALLBACK16 context.
The call is done "synchronously", i.e. we restart here CPU simulation. The simulation then stops because the generated trampoline code has a suitable BOP_UNSIMULATE instruction.
CURRENT DRAWBACKS:
==================
1- The module which is going to use those callbacks need to know where in memory the code will be placed. Nothing is done "automatically". Otherwise we would have to:
* maintain a (gobal, and finite) table of callbacks (in some way or another), and/or
* be able to place the code in some "shadowed" memory zone of the emulator that gets hidden for all the programs emulated BUT the emulator.
2- Linked to the previous second point comes the problem of trampoline code. It is needed because we need to put a BOP_UNSIMULATE operand after the code to stop the 16-bit code simulation and go back to 32-bit. We need also to call e.g. INT 0x10 from 16-bit to be able to run the interrupt that could be hooked by some program. Some may argue that one can first call EmulatorInterrupt(0x10); but then we would have to find a means of stopping the simulation as soon as the interrupt exits...
3- For calling "regular" 16-bit code (with RunCallback16) we need a suitable callback: "call far_pointer; BOP_UNSIMULATE" .
4- Currently we build the trampolines on-the-fly when calling either RunCallback16 or Int32Call, at the memory location given when initializing CALLBACK16 context. If a given 32-bit module calls some 16-bit code that calls in turn a 32-bit function from the SAME module which calls also a 16-bit callback, then the trampoline will be overwritten. In RunCallback16 (and Int32Call) we save it, push a new one and then call the 16-bit code, and then restore the old one after the call. It seems to work fine currently, but I've found a problem, I think, which is the following:
* Suppose that a 16-bit program calls some VDD function,
* this VDD function creates a thread,
* the two running VDD functions then call back the 16-bit program, or trigger an interrupt from whatever nature which both call 32-bit functions from a given 32-bit module (bios, dos). In this situation many problems arise:
a. Our current implementation of the emulator doesn't support that since you are going to play concurrently with the unique CONTEXT of the emulated CPU... (i.e. flags / registers corruption in sight)
b. If the 32-bit functions (called concurrently, and which are from the same 32-bit module) call some 16-bit code / interrupt, then they are going to use the same memory zone for the trampoline stub and there are very high risks of corruption. A solution for that would be to generate the trampolines once and for all for each registered 16-bit interrupt stub / 16-bit generic callback, retrieve their addresses and store them in some place (that also get shared amongst all of the 32-bit modules of the NTVDM emulator), so that each (possible concurrent) call go to the trampoline and just make the CPU point at it...
Voilà !
svn path=/branches/ntvdm/; revision=62283
Start to implement EmulatorSimulate / EmulatorUnsimulate (used by VDDSimulate16 and VDDUnsimualte16). This piece of code can be better written, but it works for what I'm going to commit next.
svn path=/branches/ntvdm/; revision=62282
- When pushing 16-bit value, check only low word of ESP (i.e. SP).
- Don't forget to clear high word of EIP, for the Jump instruction of group 4 (0xFF).
svn path=/branches/ntvdm/; revision=62258
- Remove an unneeded assignment (cmos.c)
- Reorganize BIOS code: put our 32-bit bios in a dedicated directory; start to introduce a way to load other bioses (WIP).
svn path=/branches/ntvdm/; revision=62235
Move the VDM states and binary types to a public header file.
Implement GetNextDosSesId.
Continue implementing BaseSrvCheckVDM.
svn path=/branches/ntvdm/; revision=62200
Implement BaseSrvGetVDMCurDirs.
The current directory information is stored in the console record,
and it applies to all DOS records within it.
svn path=/branches/ntvdm/; revision=62086
Add an (incomplete) definition for VDM console records and VDM DOS records.
Implement BaseSrvIsFirstVDM.
Start implementing BaseSrvCheckVDM.
svn path=/branches/ntvdm/; revision=62078
- Sorry !!!!!! The previous translation (Polish, revision 61916 ) was by Wojtek Kozlowski aka. wojo664!! Sorry for having mistaken you with Radek Liska!
- Czesh translation by Radek Liska :D, thanks!
CORE-7250
svn path=/branches/ntvdm/; revision=61917
- Define and export VDDSimulate16 and host_simulate.
- Move the big emulation loop from ntvdm.c to clock.c, and the console input pump thread from ps2.c to ntvdm.c.
Indeed:
* Moving the emulation loop out of the main initialization function will be helpful if one wants to modify how emulation is done,
* The console input pump thread deals also with console UI bits that have nothing to do with keyboard/mouse/ps-2. Instead, the pump thread will dispatch keyboard and mouse events to the ps/2 controller.
- Implement a custom menu in the console's system menu to be able to parametrize ROS VDM (work-in-progress); at the moment only a menu item to show/hide mouse pointer, and another one allowing us to quit properly the VDM are implemented. The menu code was taken from the GUI frontend in winsrv.dll. Only english and french translations available at the moment.
svn path=/branches/ntvdm/; revision=61902
- Enable experimental sound support (only PC speaker for the moment, aka. uses beep.sys).
- Introduce a #define WORKING_TIMER which aim is to disable the currently problematic approximate performance counter value calculation done in order not to call QueryPerformanceCounter each time.
The problem is that we then compute a number of clock ticks for the PIT, which becomes negative, and therefore everything starts to hang.
Disabling this code and calling each time QueryPerformanceCounter, fixes everything; we gain in precision but we loose in performance...
A definitive fix must be found, [TheFlash] !!
This fixes sound (and hangs) in Advanced NetWars, Dangerous Dave, ElitePlus and Rescue Rover (the games that I've tested so far).
svn path=/branches/ntvdm/; revision=61875
Part 2 of PIT + sound fix.
- Move port 61h management from speaker.c to the emulator.c module;
- Add PIT OUT callbacks support;
- Add (unimplemented) PitSetGate function (will be used later on).
Still WIP.
svn path=/branches/ntvdm/; revision=61866
- Break the DOS source file into the "DOS BIOS" (also known in other places as ibmbio or io or...), which is in fact some kind of hardware abstraction layer, and the "DOS BDOS" kernel (also known in other places as ibmdos.com or msdos.sys or...).
- Add in DEM the possibility of loading the DOS from another files (WIP).
svn path=/branches/ntvdm/; revision=61846
- Start to refactor the DOS sources:
Introduce the DEM (DOS Emulation) support library that is used by our built-in DOS, and that is used (via BOPs) by windows NT DOS (files: ntio.sys and ntdos.sys).
- Export some of DEM functions; stub most of them and implement the remaining ones (with existing code that we had in dos.c before).
svn path=/branches/ntvdm/; revision=61838
- Shut up some DPRINTs in io.c and ntvdm.c
- I forgot to update the call to PitClock in the previous revision...
svn path=/branches/ntvdm/; revision=61816
Welcome sound in Advanced NetWars!
However it won't work totally due to problems in the PIT or in the sound emulation (and as a result, the emulator will "hang").
svn path=/branches/ntvdm/; revision=61809
Add two general-purpose variables to the interrupt handler stub stack.
Fix INT 29h so that it works correctly when the INT 10h, AH = 0Eh call is hooked.
svn path=/branches/ntvdm/; revision=61797
- Move all the hardware initialization to EmulatorInitialize (since emulator.c can be viewed as support functions for emulating a PC motherboard) --> PS2 and VGA go there.
- Break bios.c into bios.c and kbdbios.c (the keyboard bios module) (according to the IBM documentation as well as other emulator sources or SeaBIOS or...).
- Move Exception handling from int32.c to emulator.c, because it's something tight to the emulator, not to the interrupt system by itself (yet it happens that INT 00h to 07h are commonly set to some exception handlers). In the bios.c, initialize those vectors with the default exception handler.
- Handling IRQs is done fully in bios.c now: introduce PicSetIRQMask and EnableHwIRQ helper functions (adapted from their equivalents from SeaBIOS) that allows the bios to set (and activate in the PIC) a given IRQ with its corresponding handler. Also introduce PicIRQComplete that serves as a PIC IRQ completer (i.e. sends the EOI to the right PIC(s)).
- Continuing on that, at the moment I set dumb default PIC IRQ handlers for IRQ 08h - 0Fh and IRQ 70h - 77h).
- By default I disable all the IRQs; there are then set on-demand with EnableHwIRQ.
- Rework the POST (aka. BiosInitialize function):
* the memory size is now get from the CMOS (as well as the extended memory size via INT 12h, AH=88h),
* then we initialize the interrupts,
* then platform hardware (ie. the chips) are initialized,
* and finally the keyboard and video bioses.
- As said before, move memory sizes into the CMOS.
- Simplify video bios initialization.
svn path=/branches/ntvdm/; revision=61796
- Do not export (for the PIC/PIT/Speaker) the port functions but use instead the common port interface.
- In bios.c : IOWriteB(PIC_MASTER_DATA, PIC_ICW4_8086 /* | PIC_ICW4_AEOI */); (line 377) : in NXVM they add PIC_ICW4_AEOI; [TheFlash], can you have a look at this and see whether it is required for the master PIC only, otherwise remove this comment.
svn path=/branches/ntvdm/; revision=61590
Declare some VDM memory services.
[NTVDM]
- Almost all of the XXXInitialize functions just return TRUE always, so VOIDify them instead (since they always succeed).
- Move almost all of the hardware initialization inside EmulatorInitialize.
- Move pure console initialization/mode-saving/cleanup code into ConsoleInit/Cleanup functions in ntvdm.c instead of in bios.c.
svn path=/branches/ntvdm/; revision=61588
- Export and use IORead/WriteXX (instead of PicRead/WriteXX or VgaRead/WritePort)
- static'ify some functions.
svn path=/branches/ntvdm/; revision=61580
- Move console text buffer copy into VGA memory, to the BIOS (function BiosCopyTextConsoleToVgaMemory), and do it just after the BIOS sets its default display mode.
- Try to resize "correctly" the console to its original size when cleaning BIOS (Part 2/2, see revision 61538). Still WIP.
- Code cleaning in vga.c
svn path=/branches/ntvdm/; revision=61542
Fix changing console size when entering a given text-mode. Inspired from our telnet console tconsole.cpp!SetWindowSize function.
Part 1/2
svn path=/branches/ntvdm/; revision=61538
Rework the resource files, and add a nice old-ish IBM PC AT icon (C) myself :) (only 32x32 256 colors for now).
svn path=/branches/ntvdm/; revision=61462
Shut up few DPRINT1s, and demote some DPRINT1s to DPRINTs but disable NDEBUG for now (enable it and you'll shut up the DPRINTs).
svn path=/branches/ntvdm/; revision=61451
Make colors appearing in CGA mode 4, but still buggy concerning the computation of the resolution (either the X-dimension is twice big or the Y-dimension is twice small), and the position of the pixels...
However the VGA registers are (almost) similar to http://www.brokenthorn.com/Resources/OSDevVid2.html and putting them equal to the settings given there don't change anything new...
svn path=/branches/ntvdm/; revision=61435
- Fix palette setting for EGA modes, fixes Rescue-Rover menu colors amongst others.
Some of the palettes were adapted (read: translated from DAC registers settings) from DOSBox;
and I've also used http://www.brokenthorn.com/Resources/OSDevVid2.html for some settings.
This should be reviewed to fix / remove redundancies or errors.
- Attempt to implement basic palette enablig/disabling flag (via AC palette regs).
- I've introduced (commented) DbgPrint's for testing AC regs setting. I will remove them when everything is ok.
svn path=/branches/ntvdm/; revision=61419
- BIOS: Fix setting video page parameters when setting mode, and effectively fix setting of video page (fix the involved CRTC registers !!).
Now Advanced NetWars works without flickering.
- VGA: Fix code presentation.
svn path=/branches/ntvdm/; revision=61390
Implement and export (and define in vddsvc.h) call_ica_hw_interrupt and VDDSimulateInterrupt macro.
ICA = Interrupt Controller Adapter (in windows terminology)
svn path=/branches/ntvdm/; revision=61372
Load VDDs registered in HKLM\SYSTEM\CurrentControlSet\Control\VirtualDeviceDrivers key, value "VDD" (of type REG_MULTI_SZ).
I still don't call FreeLibrary to unload them at the end of NTVDM's lifetime (otherwise we would have to store their handles in an array).
svn path=/branches/ntvdm/; revision=61370
- Implement and export VDDInstallIOHook and VDDDeInstallIOHook; rework EmulatorRead/WriteIo to take into account for different port handlers' sizes (byte, word, dword). Still WIP and may be subject to renamings... RegisterIoPort needs to be converted.
- Stubplement and export getIntelRegistersPointer.
- Export c_get/setXX functions which are aliases to get/setXX functions, for MIPS NTVDM compatibility.
svn path=/branches/ntvdm/; revision=61358
- Simplify EmulatorReadMemory (first MMIO-mapped devices copy their memory image back to the VM' memory area, then data is read via RtlCopyMemory), and EmulatorWriteMemory (simplify VgaBuffer computation and rename this variable accordingly, for readability purposes).
- Fix Sim32pGetVDMPointer and MGetVdmPointer prototypes.
svn path=/branches/ntvdm/; revision=61356
Introduce DDK headers needed for Virtual Device Drivers development. nt_vdd.h and vddsvc.h will get populated with functions as soon as they will be implemented in NTVDM.
isvbop.h/.inc is fully implemented. isvbop.inc defines 3rd-party VDD bops and "function"-calls for 16-bit apps (in assembler), and isvbop.h defines the same in C-language.
They are both MSVC and GCC-compatible.
svn path=/branches/ntvdm/; revision=61352
Hackplement BOP_CMD function 0x08: "Launch external command". Still WIP.
Explanation: Launching a command from command.com starts (under certain conditions not implemented there) "cmd.exe /c <the_command>"
See https://groups.google.com/forum/#!topic/microsoft.public.win2000.cmdprompt.admin/n5KbegKJuE0
and http://technet.microsoft.com/en-us/library/cc723564.aspx#XSLTsection123121120120
subsection "CMD.EXE and COMMAND.COM":
"Be aware that a command shell is not an MS-DOS command prompt, even though it shares the same icon.
The Windows NT command shell is a full 32-bit Windows NT console application that resides in the CMD.EXE executable file.
The MS-DOS command prompt is a 16-bit DOS application that resides in the COMMAND.COM executable file.
Because COMMAND.COM is a 16-bit DOS executable, Windows NT executes this shell within a Windows NT virtual DOS machine (VDM).
COMMAND.COM is supplied primarily for compatibility with MS-DOS.
[...]
This behavior reveals a quite subtle feature of Windows NT that is very important. The 16-bit MS-DOS shell (COMMAND.COM)
that ships with Windows NT is specially designed for Windows NT. When a command is entered for execution by this shell,
it does not actually execute it. Instead, it packages the command text and sends it to a 32-bit CMD.EXE command shell for
execution. Because all commands are actually executed by CMD.EXE (the Windows NT command shell), the 16-bit shell inherits
all the features and facilities of the full Windows NT shell."
svn path=/branches/ntvdm/; revision=61290
- Halfplement and export VdmMapFlat
- Make mention of the existence of VdmFlushCache and VdmUnmapFlat, which are not exported in x86 builds (macros are therefore defined to just return TRUE) but are exported in MIPS... builds...
See VDDSVC.H and NT_VDD.H in the DDK
(those headers don't exist in ROS; we'll have to create them later on).
svn path=/branches/ntvdm/; revision=61288
Studying the "vddtest" example mentioned in revision 61283 allowed me to see that valid VDD DLL "handles" start at 1 and cannot be equal to zero.
Add helper macros to convert from indices to handles. Fixes "vddtest" example.
Have fun at running it :)
svn path=/branches/ntvdm/; revision=61287
- Thanks Thomas for having pointed me towards the fact that the NTVDM exports were really STDCALL and not CDECL (as I've thought first, because originally I was checking whether the getXX() functions were stdcall or not, and distinguishing VOID stdcall or cdecl functions without the symbols was hopeless).
- Halfplement and export Sim32pGetVDMPointer and MGetVdmPointer, needed to run correctly the RageStorm "galaxy" sample mentioned yesterday (see revision 61283). Now it loads and the dispatch call works \o/
- VDD_INIT_PROC and VDD_DISPATCH_PROC have the same signature --> rename them to VDD_PROC.
Have fun at testing!
svn path=/branches/ntvdm/; revision=61286
Implement basic VDD support:
implement the (un)register & dispatch call BOP (called BOP_3RDPARTY): see "Undocumented DOS" by Schulman et al. page 267 (as always ;) ), as well as:
http://www.ragestorm.net/tutorial?id=27 - "Tutorial - Calling Win32 from DOS"
http://www.airborn.com.au/layout/vddtest.html - "DOS to 32 bit DLL under XP - an example" (almost the same explanations as the previous article)
http://sta.c64.org/blog/dosvddaccess.html - "Accessing Windows device drivers from DOS programs"
and...
... your lovely Win2k / Win2k3 DDK section: "Device Technologies/Other Devices/Devices Requiring VDDs" !!
Ready to test? :D
svn path=/branches/ntvdm/; revision=61283
- As already done for interrupts and I/O ports, add a registering system for BOPs.
- INT32: Move ControlBop to the 32-bit interrupts module where it is used only.
- DOS: Add (un)documented BOP_DOS (0x50) and BOP_CMD(0x54) used respectively by NTIO.SYS/NTDOS.SYS and by COMMAND.COM.
It appears that they take an extra parameter (so, skip 1 byte-instruction after the BOP instruction as we do for the Control BOP 0xFF).
See "Undocumented DOS 2nd edition" by Schulman et al., page 267.
svn path=/branches/ntvdm/; revision=61278
- Add/fix few comments;
- Don't forget to redisable access to AC registers after modifying them in int 10h. Usurp, please retest Rescue Rover 2 :)
- Make EmulatorGet/Set/ClearFlag internal functions only and use set/get<FLAG> instead.
svn path=/branches/ntvdm/; revision=61263
Fix the file reading subfunction (AH = 3Fh) of INT 21h.
When reading from the console, it always stops on a carriage return.
svn path=/branches/ntvdm/; revision=61256
Rewrite the VGA emulation.
Nah, it's a joke!
- Store VGA registers setup in VGA_REGISTERS structure.
- Improve BiosSetVideoMode and introduce a VgaSetRegisters function for setting VGA regs.
- Initialize Bda->CrtBasePort: it is used to determine the address of some I/O ports which depend on whether we are in color or monochrome mode.
- Add UnregisterIoPort in io.c (and fix some DPRINTs) (needed for VGA).
- When setting the misc. VGA register, check whether we're going to monochrome emulation, and reset some port addresses in that case.
svn path=/branches/ntvdm/; revision=61246
- Last race condition fix (see revision 61230).
- Add a comment why we do twice the same emptiness check (one before holding the mutex and one just after).
svn path=/branches/ntvdm/; revision=61239
The current "fast" method used in MOVS gives incorrect results. It has been temporarily
replaced with a slow method that works correctly.
The string functions do nothing when CX is 0 on entry, fix CMPS and SCAS.
svn path=/branches/ntvdm/; revision=61203
Revert r61158, and fix the prefix issue correctly, but resetting the flags
again after the call to Fast486InterruptInternal.
svn path=/branches/ntvdm/; revision=61160
Move the prefix reset below the interrupt check, because Fast486InterruptInternal
might set OPSIZE in some circumstances.
svn path=/branches/ntvdm/; revision=61158
- Remove some DPRINTs.
- Fix a bug in VgaEnterGraphicsMode (erroneous change of the real saved resolution when going into DoubleVision(TM) mode).
- Do not update the text cursor when being in graphics mode (otherwise I've already hit some ScanlineSize==0 problems) <-- [TheFlash], can you recheck that, please?
- Little optimisation: do not do anything in VgaRefreshDisplay if nothing has to be done.
svn path=/branches/ntvdm/; revision=61157
FPU instructions never generate #UD. If CR0.EM is set, they generate #NM.
If there is no FPU and CR0.EM is cleared, they do nothing.
Add a helper macro FPU_ST for accessing FPU registers.
Add a compile-time option to disable the FPU.
svn path=/branches/ntvdm/; revision=61150
- Move some PS/2 initialization from bios.c to ps2.c
- NULLify interrupt entries which are in fact pointers to data tables.
- Add a framework for adding I/O port handlers.
svn path=/branches/ntvdm/; revision=61107
Handle the case when the last page is also the first page in Fast486ReadLinearMemory ( when paging is enabled).
svn path=/branches/ntvdm/; revision=61104
The 486 doesn't have AC, VIF, VIP or ID.
Fix and simplify POPF.
[NTVDM]
Fix the count in the XMS copy function (INT 15h, AH = 87h).
svn path=/branches/ntvdm/; revision=61082
DAA, DAS: Update the flags.
AAA, AAS: Subtract from AX instead of AL. The specification says AL, but
so far in all known CPUs and emulators, AX is subtracted.
AAD: Clear AH.
svn path=/branches/ntvdm/; revision=61069
Make the parameters to Fast486ReadModrm*Operands optional, so that
unnecessary extra reads aren't performed. This also eliminates the
need for dummy variables.
svn path=/branches/ntvdm/; revision=61055
- Get rid of EmulatorGetRegister and EmulatorSetRegister and replace their calls with the proper definitions.
- Get rid of the enums EMULATOR_REG_* and use the FAST486_REG_* definitions instead.
svn path=/branches/ntvdm/; revision=61034
- Implement and export getEFLAGS and setEFLAGS.
- Do some code reorganization (move all registers-related functions into "registers.c").
svn path=/branches/ntvdm/; revision=61033
- When accessing memory using ESP, make the SS segment default.
- The INT instructions always pushes 16-bit values in real mode, regardless
of the operand/address size attributes.
svn path=/branches/ntvdm/; revision=61000
- Fix the privilege checks.
- Store the CPL in a special field, so that it doesn't get mixed up
with the lowest 2 bits of real mode selectors while switching
into protected mode.
- Reset the exception count after a successful ISR call.
- In Fast486OpcodeGroup0F01, check for prefix overrides after parsing
the Mod-Reg-R/M, which might add a SS: prefix override in some cases.
svn path=/branches/ntvdm/; revision=60995
XADD: Fix the order of operations.
POP <modrm>: The value must be popped from the stack before parsing the
Mod-Reg-R/M, because of the "POP DWORD [ESP]" case.
svn path=/branches/ntvdm/; revision=60984
Fix the Mod-Reg-R/M parser. EBP cannot be used as a SIB byte base,
instead it's used to mark that the base is an immediate operand.
svn path=/branches/ntvdm/; revision=60944
Give the virtual machine 16 MB of memory, for DOS extenders,
protected mode programs, etc...
EMS is still not implemented.
svn path=/branches/ntvdm/; revision=60937
To make debugging easier, put the interrupt handlers at offset 0x1000,
and reserve 16 bytes for each. Also, move the common stub to offset
0x2000. That way the entry point of, for example, INT 0x21 is at
F000:1210.
svn path=/branches/ntvdm/; revision=60933
We don't support in-circuit emulation opcodes such as USERMOV.
The 486 does not have the JMPE or POPCNT instructions.
svn path=/branches/ntvdm/; revision=60932
Modularize linear memory access by adding two new functions:
Fast486ReadLinearMemory and Fast486WriteLinearMemory.
Implement Fast486GetPageTableEntry.
svn path=/branches/ntvdm/; revision=60923
Instead of reassembling each time the very same common stub code for each interrupt, do it once, and then assemble just a little part for each interrupt and jump to the common stub.
Now the 4DOS Ctrl-C exception bug changes, but I have an idea what's happening in there...
svn path=/branches/ntvdm/; revision=60917
- BIOS: Reorganize a bit the header, and close the input thread before closing the input handle (and not after).
- INT32: Fix a comment.
- CMOS: Put CMOS data into a structure called CMOS_MEMORY, introduce READ/WRITE_CMOS_DATA macros for simplifying code. Save CMOS memory into a file (à la Windows' NTVDM), which is loaded at startup.
svn path=/branches/ntvdm/; revision=60913
The number of bit places in a shift operation is ANDed by the width of the type
when it is in a register, so (1 << c), when c is 32, is actually 1, and not 0.
Fix the calculation of MaxValue by using SignFlag | (SignFlag - 1) instead.
svn path=/branches/ntvdm/; revision=60912
Don't enable interrupts unless it's necessary in the interrupt handler.
[FAST486]
When handling interrupt signals, make sure at least one instruction is executed,
to prevent the CPU from being completely blocked by interrupt signals.
svn path=/branches/ntvdm/; revision=60910
Finish my Interruption revamp.
- Move interrupt-related code from bop.c to int32.c
- Introduce InitializeInt32 helper so that one can initialize all the needed 16-bit stubs for the 32-bit interrupts.
- Remove unneeded defines in emulator.h and an exported variable in ntvdm.h.
svn path=/branches/ntvdm/; revision=60908
Start my work on modularizing registration of "32-bit" interrupts, i.e.
interrupts that are implemented in 32-bit mode, but are stubbed with 16-bit
code (so that 16-bit apps can call them).
The 16-bit stub code uses a BOP call to our Control BOP function (BOP 0xFF) which
can handle in theory many sub-functions (as the BOP 0x58 documented here: http://www.ragestorm.net/tutorial?id=27)
specified as an additional BYTE in the call:
0xC4 0xC4 bop_code <optional_bop_subfunction>
Here, for calling 32-bit interrupts we use our BOP 0xFF, subfunction 0xFF.
The final aim would be to generate the 16-bit stub code when one calls the RegisterInt32 helper function
(contrary to what's happening now, that is, the 16-bit stub code is generated for all of the interrupts
at BIOS initialization time, and we use it for BIOS and DOS interrupts).
svn path=/branches/ntvdm/; revision=60907
- Make usage of MAKEWORD;
- Introduce BiosGetCursorPosition and use it in BiosPrintCharacter;
- Use EmulatorWriteMemory instead of VgaWriteMemory somewhere in BiosPrintCharacter;
- Add support for tabs in BiosPrintCharacter (taken from DosBox).
svn path=/branches/ntvdm/; revision=60906
Make the emulator callbacks non-static.
In BiosPrintCallback, use EmulatorWriteMemory instead of VgaWriteMemory, because
VgaWriteMemory does not do any input validation.
Improve EmulatorWriteMemory input validation and bound checking.
svn path=/branches/ntvdm/; revision=60903
The behavior of the I/O port bus depends on the data width. In the case
of 16-bit/32-bit access, two/four adjacent ports will be accessed.
svn path=/branches/ntvdm/; revision=60891
- BIOS: Implement INT 12h (BiosGetMemorySize)
- BOP/DOS: Add some DPRINTs for INT 25h, 2Fh and for unimplemented functions of INT 21h. It's for helping in testing 4DOS.COM
svn path=/branches/ntvdm/; revision=60889
Implement the use of palettes for text mode. Adapted from a patch by Hermes Belusca-Maito.
Reset the palette during every BIOS video mode switch.
svn path=/branches/ntvdm/; revision=60886
- Add a missing "goto Cleanup;"
- Add DPRINT1s at the beginning and the end of ntvdm, so that one can easily localize in debug logs where one started it. Suggested by Vampyre ;)
svn path=/branches/ntvdm/; revision=60860
Implement the CMOS and Real Time Clock (RTC).
Improve the performance of the PIT and RTC (correctly this time).
svn path=/branches/ntvdm/; revision=60854
Fix segment initialization. The cached descriptors must have valid values
during the switch to protected mode.
For some odd reason, GCC makes the FAST486_GDT_ENTRY structure 12 bytes
instead of 8 if there is a bit field with more than 16 bits, so split
the Base field into Base and BaseMid.
Add size checks below important structure declarations.
svn path=/branches/ntvdm/; revision=60825
Implement opcode group 0x0F, 0x01 (SGDT, SIDT, LGDT, LIDT, SMSW and LMSW).
Only INVLPG is not implemented yet.
svn path=/branches/ntvdm/; revision=60824
Fix the type of a variable.
[NTVDM]
Introduce a BOP handler table for the 256 possible BOP functions and use it.
svn path=/branches/ntvdm/; revision=60818
Revert a previous incorrect fix for the PIT.
Modify the PitDecrementCount function to take a parameter instead
of it being called multiple times (which is slower).
svn path=/branches/ntvdm/; revision=60816
- Introduce a Fast486Initialize which is used to set up the CPU callbacks (and use default ones if some of the given callbacks are NULL), and to reset it the first time. Now Fast486Reset is meant to be used for only resetting the CPU to a safe state.
- Hence we are now sure that State->WhateverCallback is never NULL (and is theoretically valid), so don't do NULL-checks when calling them, but call them directly. The default cases for those checks become the default calls for the default callbacks.
- Remove the now-unneeded EmulatorIdle function.
svn path=/branches/ntvdm/; revision=60814
In real mode, the value in the IVT is a far pointer, not an IDT entry.
Fix the case when MemReadCallback is NULL.
svn path=/branches/ntvdm/; revision=60813
BOP numbers are 1 byte and map to a function (over 255). But one can pass additional "parameters" to those functions by adding extra bytes, however such functions must advance "by hand" the instruction pointer.
[NTVDM]
- Take into account our previous remark for the BIOS interrupt stubs, and comment them.
- Rework EmulatorBiosOperation (move almost all of its existing code into subfunctions in bop.c) so that one can call many other BOP functions in the future (WIP). The BOP number (still called) EMULATOR_INT_BOP (of value 0xFF) is used for internal 16 --> 32 bit switching for our 32bit bios.
- It appears that the IoRead/WriteCallback and IdleCallback must not be NULL for using fast486. I'm committing a temporary fix that I will definitely fix in a subsequent commit.
svn path=/branches/ntvdm/; revision=60812
- The DosErrorLevel is stored as a WORD: its LOWORD is the return code and the HIWORD is the termination code.
- When copying CurrentDirectories[...], be sure that we copy maximum DOS_DIR_LENGTH chars.
- Implement (or stubplement) bunch of INT 21h functions: 0x03, 0x04, 0x05, 0x0C, 0x0D, 0x26, 0x37, 0x47, 0x4D and 0x50. Functions 0x18, 0x1D, 0x1E and 0x20 are NULL functions present in DOS for CP/M compatibility only.
- Fix DOS version querying.
- Use set/getAX() instead of EmulatorSet/GetRegister, and use setCF instead of EmulatorSetFlag.
svn path=/branches/ntvdm/; revision=60790
Improve performance by computing the resolution required by the PIT,
and then using the standard tick count instead of performance counters
when that resolution is low.
svn path=/branches/ntvdm/; revision=60783
- DOS: the DOS file attributes are one byte.
- BIOS: don't use hardcoded values; use the SEG_OFF_TO_PTR macro introduced earlier; use get/setAX instead of EmulatorGet/SetRegister.
svn path=/branches/ntvdm/; revision=60781
The PS/2 should latch the last value that was read in the case of multiple reads.
Modify the BIOS keyboard IRQ handler to support hooks.
svn path=/branches/ntvdm/; revision=60773
Implement all the missing INT 16h functions but 03h. Also, for simplification purposes (should be fixed later on) act exactly the same for INT 00h and 10h, and for INT 01h and 11h.
Finally, one has to implement setting the BIOS KeybdShiftFlags flag.
svn path=/branches/ntvdm/; revision=60770
- Remove an unneeded inclusion to the CRT header: limits.h (and use instead NDK definitions for max/min long values).
- Remove unneeded comments...
[NTVDM]
Remove an unneeded add_dependencies(...) command.
svn path=/branches/ntvdm/; revision=60767
Separate external interrupts from interrupt signals (which are
interrupts whose number is not known until they can be serviced,
just like hardware interrupts on a real CPU).
[NTVDM]
Improve the PIC emulation code (IRQ priorities, etc...).
Instead of checking for interrupts in the main loop, move the
PS/2 input parsing to a different thread.
Improve BIOS keyboard IRQ handling.
svn path=/branches/ntvdm/; revision=60761
Implement the MOV instruction for control and debug registers.
Remove definitions for non-existant registers CR1, CR4, CR5, CR6 and CR7.
The standard 80486 doesn't have a CR4 register (although some implementations
of the 80486 had large page support and CR4, it was not reliable).
As for the debug registers, DR4 is the same as DR6, and DR5 is the same as DR7.
svn path=/branches/ntvdm/; revision=60747
Remove the code that performs waiting in 32-bit mode since that blocks the emulator
and prevents interrupts from working.
Implement a 16-bit waiting system in the interrupt handlers.
Fix the PS/2 interrupt code.
svn path=/branches/ntvdm/; revision=60739
Implement the hardware interrupt system.
Modify Soft386Interrupt to assume hardware interrupts, because
software interrupts from outside the emulator may cause race conditions.
svn path=/branches/ntvdm/; revision=60696
Implement the REP prefix for MOVS.
Fix the REP prefix in INS, OUTS and STOS to simulate the DI
wrap-around even if DF is set.
svn path=/branches/ntvdm/; revision=60645
- Fix calculation of the AF flag in opcode groups 0xFE and 0xFF (INC/DEC).
- Fix a bug in the REP prefix by simulating the wrap-around of DI which
can occur when the current address size is 16-bit.
- Exception error codes are only pushed on the stack in protected mode.
svn path=/branches/ntvdm/; revision=60625
Fix a bug in Soft386ExceptionWithErrorCode. The instruction pointer exceptions can
return to should point to the instruction that caused the exception.
svn path=/branches/ntvdm/; revision=60603
Set the opcode handler for the INS and OUTS instructions to be
Soft386OpcodeIns and Soft386OpcodeOuts, respectively.
svn path=/branches/ntvdm/; revision=60543
Change the license of Soft386 to GPLv2. The previous license was also
GPLv2, but it had a runtime linking exception. The new license is the
original GPLv2 with no exceptions.
svn path=/branches/ntvdm/; revision=60485
Move the code for ADD/OR/ADC/SBB/AND/SUB/XOR/CMP to Soft386ArithmeticOperation,
and use that function to implement groups 0x80, 0x81, 0x82 and 0x83.
svn path=/branches/ntvdm/; revision=60461
Implement opcode groups 0xC0 and 0xC1, also using Soft386RotateOperation.
Remove two unnecessary blank lines.
svn path=/branches/ntvdm/; revision=60459
Move the ROL/ROR/RCL/RCR/SHL/SHR/SAL/SAR handling code to Soft386RotateOperation,
then use that to implement opcode groups 0xD0, 0xD1, 0xD2 and 0xD3.
svn path=/branches/ntvdm/; revision=60458
Change the instruction in the interrupt handlers to "INC SP" twice
instead of one "ADD SP, 2". It's shorter and supported by soft386 already.
svn path=/branches/ntvdm/; revision=60397
Implement the LES and LDS instructions.
Add optional support for BOPs (NTVDM-specific).
Fix prefix handling in some functions.
[NTVDM]
Enable BOPs for Soft386 (when NEW_EMULATOR is defined).
Fix the calling convention issue (softx86 uses cdecl, soft386 uses stdcall).
svn path=/branches/ntvdm/; revision=60395
Use SOFT386_EXCEPTIONS instead of INT for the ExceptionCode parameter in Soft386ExceptionWithErrorCode and Soft386Exception.
svn path=/branches/ntvdm/; revision=60196
- Put inlined functions in a .inl file, which gets included by the corresponding header file (i.e. fix MSVC builds).
- Use enums types instead of "only" INTs...
svn path=/branches/ntvdm/; revision=60193
Implement Soft386OpcodeTestAl and Soft386OpcodeTestEax.
These functions were declared and referenced, but never defined.
Why the compiler allowed that without even a warning remains a mystery.
svn path=/branches/ntvdm/; revision=60183
Fix a typo.
Use a macro (SOFT386_OPCODE_HANDLER) for function definitions of opcode handlers.
Implement the rest of the ADD opcodes.
svn path=/branches/ntvdm/; revision=59990
Implement helper functions for reading/writing operands of instructions that use
the MOD-REG-R/M byte.
Implement the MOD-REG-R/M ADD instruction for bytes.
svn path=/branches/ntvdm/; revision=59981
- In the interface header soft386.h, do not include other particular headers (windows.h and debug.h). Those must be included by the different applications which also will include soft386.h.
- LPVOID --> PVOID (do it general, not just à-la Win32).
- The .c files include the headers, and each .c files must have its "#define NDEBUG\n#include <debug.h>" lines, to activate (or deactivate here in the example) debugging output.
- In the .c files, include the header windef.h for having the basic types, and temporarily comment out the needed #defines which will be needed if one needs to include other win***.h files. Those will be deleted if they aren't needed at the end.
svn path=/branches/ntvdm/; revision=59766
Start implementing a new emulator library to provide 386/486 emulation support to NTVDM
and perhaps other components aswell.
svn path=/branches/ntvdm/; revision=59752
Do not rely on the internal format for console handles. Instead, use a more reliable way, by checking for success when calling a simple console function acting on in/out console handles.
svn path=/branches/ntvdm/; revision=59746
Make the BIOS Data Area accessible to other parts of ntvdm.
Properly redirect read/write access to the console to the keyboard and VGA systems, respectively.
svn path=/branches/ntvdm/; revision=59741
Synchronize with trunk again for SetConsolePalette.
Implement VGA palettes for graphics mode and DAC register access.
svn path=/branches/ntvdm/; revision=59713
Keep a list of current directories for all drives.
Implement functions that change the default drive and current directory.
svn path=/branches/ntvdm/; revision=59700
Use DOS_CMDLINE_LENGTH instead of MAX_PATH.
Fix bug in DosInitializePsp which allowed writing past the end of the Program Segment Prefix (PSP).
svn path=/branches/ntvdm/; revision=59693
- Use up to 256 parameters for programs (as suggested by the parsing while loop), but don't hardcode this values in many other places.
- The passed command line to ntvdm should be as long as MAX_PATH.
svn path=/branches/ntvdm/; revision=59691
Synchronize with trunk again to fix important bugs in the build system.
Implement register control functions which should be exported (Adapted from a patch by Hermes Belusca-Maito).
The actual export is temporarily disabled because a bug in the build system compiles ntvdm as a DLL instead of an EXE.
svn path=/branches/ntvdm/; revision=59684
- Enable TESTING by default until the correct way to load ntvdm is found.
- Calculate the character height instead of hardcoding in the BDA.
svn path=/branches/ntvdm/; revision=59678
- Fix usage of the console framebuffer mutex (used only with graphics screen buffers).
- Do not check for text/graphics mode when updating each scan line, in VgaUpdateFramebuffer.
svn path=/branches/ntvdm/; revision=59673
- Check return value of VgaEnterGraphicsMode (because CreateConsoleScreenBuffer can fail), and create VgaEnterTextMode and VgaLeaveTextMode helpers.
- Don't declare variables inside loops.
svn path=/branches/ntvdm/; revision=59668
- Don't leak console input/output handles when opening them in BiosInitialize.
- Deinitialize the emulator in the reverse order it was initialized.
- Simplify VgaGetVideoBaseAddress and VgaGetVideoLimitAddress and use the former one in VgaTranslate[Read-Write]Address.
- Use only unicode Win32 APIs where it's needed.
svn path=/branches/ntvdm/; revision=59659
Implement Video Graphics Array (VGA) support.
Replace the old BIOS video code with new code that uses the VGA.
svn path=/branches/ntvdm/; revision=59648
Modify the flags on the stack instead of the flags register directly.
The flags register is restored during IRET so changing it directly does nothing.
svn path=/branches/ntvdm/; revision=59566
Remove the old "INT 0xFF" hack and instead use an invalid opcode sequence for emulator operations.
Fix the flags register update bug.
svn path=/branches/ntvdm/; revision=59565
Add a compile-time option (not default) to run ntvdm manually with the target executable as a parameter.
Fix screen clearing bug.
Rewrite several INT 10h functions to work for all video pages.
svn path=/branches/ntvdm/; revision=59497
Implement the IOCTL command in VDM DOS.
Rewrite the BIOS video pages support to use only one console buffer (not yet complete).
Fix the BIOS video mode table and several bugs in video functions.
svn path=/branches/ntvdm/; revision=59460
Fix jump conditions.
[NTVDM]
Implement BIOS teletype output command.
Start implementation of a new CPU emulator to replace softx86.
svn path=/branches/ntvdm/; revision=59450
Fix bugs in video memory access emulation.
Implement several missing INT 10h functions.
Resize the console screen buffer on startup.
svn path=/branches/ntvdm/; revision=59421
Fix several bugs:
The file was not entirely read due to an integer overflow.
The second WORD of the Program Segment Prefix (PSP) is not the number of allocated
paragraphs, but the segment of the last paragraph.
Fix the order of registers (SI and DI were mixed up with SP and BP).
Implement interrupt 0x11.
Implement redirection for reading/writing characters.
svn path=/branches/ntvdm/; revision=59409
Use 286 mode in softx86.
Implement "Get / Set Disk Transfer Area".
Start implementation of PS/2 controller.
Improve hardware interrupts. Fix CLI / STI / HLT instruction support.
svn path=/branches/ntvdm/; revision=59343
Fix the VDM DOS memory manager to use the segment of the data portion of the block, rather than the MCB itself.
svn path=/branches/ntvdm/; revision=59338
Never EVER process instructions INSIDE a debug macro (e.g. ASSERT) because when compiling in Release Mode, the code isn't executed at all.
Fix that. See revision r59310 for more details.
svn path=/branches/ntvdm/; revision=59314
Implement BasepCheckDosApp.
Enable NTVDM in CreateProcessInternalW.
[NTVDM]
Remove the old command line parser code. The entire command line is for the DOS application now.
svn path=/branches/ntvdm/; revision=59310
Use local time instead of system time for the clock.
Implement the "set system date" and "set system time" DOS functions.
svn path=/branches/ntvdm/; revision=59277
Change the PIT code to use only one thread, to avoid race conditions.
Implement PIT counter reading and latch command.
svn path=/branches/ntvdm/; revision=59273
Start of an implementation of a software DOS emulator.
Brought to you by Aleksandar Andrejevic. Good luck ;)
Remove the old language files. They will be recreated when the time comes.
svn path=/branches/ntvdm/; revision=59249
Fix some bugs of softx86, see CORE-7250 for more information.
All diffs from the original softx86 code should also be put in softx86_ros.diff.
svn path=/branches/ntvdm/; revision=59248
IDS_STRING_LICENSE "Hesap Makinesi, GNU GPL ruhsatıyla yayımlanan bir özgür yazılımdır.\r\n\r\nGNU GPL ruhsatının bir kopyasınıburadan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nBir de GNU GPL ruhsatının bir çevirisini buradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/translations.html"
IDS_STRING_LICENSE "Hesap Makinesi, GNU GPL ruhsatıyla yayımlanan bir özgür yazılımdır.\r\n\r\nGNU GPL ruhsatının bir kopyasınışuradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nBir de GNU GPL ruhsatının bir çevirisini şuradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/translations.html"
IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu izlence özgür yazılımdır; bunu, Özgür Yazılım Vakfı'nın yayımladığı GNU Umûmî Kamu Ruhsatı'nın, 2. sürümünün ya da daha sonraki herhangi bir sürümünün (Orası size bağlı.) koşulları altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu izlence, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bu izlencenin HİÇBİR GÜVENCESİ YOKTUR, SATILABİLİRLİĞİN ve BELİRLİ BİR AMACA UYGUNLUĞUN demek istenilen güvencesi bile. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu izlenceyle birlikte GNU Umûmî Kamu Ruhsatı'nın bir kopyasını almış olmalısınız, eğer yoksa Özgür Yazılım Vakfı AŞ'ye (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu izlence özgür yazılımdır; bunu, Özgür Yazılım Vakfı'nın yayımladığı GNU Umûmî Kamu Ruhsatı'nın, 2. sürümünün ya da daha sonraki bir sürümünün (Orası size bağlı.) koşulları altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu izlence, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bu izlencenin HİÇBİR GÜVENCESİ YOKTUR, SATILABİLİRLİĞİN ve BELİRLİ BİR AMACA UYGUNLUĞUN demek istenilen güvencesi bile. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu izlenceyle birlikte GNU Umûmî Kamu Ruhsatı'nın bir kopyasını almış olmalısınız, eğer yoksa Özgür Yazılım Vakfı AŞ'ye (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_DDTEST_DESCRIPTION "Будет произведена проверка DirecDraw на этом устройстве. Продолжить?"
IDS_DDPRIMARY_DESCRIPTION "This test will use DirectDraw to draw on primary surface. Black and white rectangles should be drawn. Продолжить?"
IDS_DDPRIMARY_DESCRIPTION "В этом тесте будет проверена возможность рисования DirectDraw на основной поверхности экрана. Должны быть видны черные и белые прямоугольники. Продолжить?"
IDS_DDPRIMARY_RESULT "Вы видели черные и белые прямоугольники?"
IDS_DDOFFSCREEN_DESCRIPTION "This test will use DirectDraw to draw in an offscreen buffer. Moving white rectangle should be drawn. Продолжить?"
IDS_DDOFFSCREEN_RESULT "Вы видели перемещающийся белый прямоугольник?"
IDS_DDFULLSCREEN_DESCRIPTION "This test will use DirectDraw to draw in a fullscreen mode. Moving white rectangle should be drawn. Продолжить?"
IDS_DDFULLSCREEN_RESULT "Вы видели белый перемешающийся прямоугольник в полноэкранном режиме?"
IDS_DDOFFSCREEN_DESCRIPTION "В этом тесте будет проверена возможность рисования DirectDraw на закадровой поверхности экрана. Должен быть виден двигающийся белый квадратик. Продолжить?"
IDS_DDOFFSCREEN_RESULT "Вы видели двигающийся белый квадратик?"
IDS_DDFULLSCREEN_DESCRIPTION "В этом тесте будет проверена возможность рисования DirectDraw в полноэкранном режиме. Должен быть виден двигающийся белый квадратик. Продолжить?"
IDS_DDFULLSCREEN_RESULT "Вы видели белый двигающийся квадратик в полноэкранном режиме?"
IDS_FORMAT_ADAPTER_MEM "%u Мб"
IDS_FORMAT_ADAPTER_MODE "%04u x %04u (%u бит)(%uГц)"
IDS_OPTION_NO "Нет"
IDS_D3DTEST_DESCRIPTION "This will start Direct3D interface test. Continue?"
IDS_D3DTEST_D3Dx "This test will use hardware-accelerated Direct3D %u interface."
IDS_D3DTEST_DESCRIPTION "Будет произведена проверка Direct3D на этом устройстве. Продолжить?"
IDS_D3DTEST_D3Dx "Этот тест будет использовать интерфейс Direct3D %u с аппаратным ускорением."
LTEXT "Bu araç, dizgenizdeki yüklü ReactX bileşenleri ve sürücüleri üzerine ayrıntılı bilgi raporlar.", -1, 10, 10, 443, 17
LTEXT "Soruna neden olan bölümü biliyorsanız yukarıdaki uygun sekmeyi tıklayınız. Yoksa sırayla her bir bölüme gitmek için aşağıdaki ""Sonraki Bölüm"" düğmesini kullanabilirsiniz.", -1, 10, 30, 443, 25
LTEXT "Soruna neden olan bölümü biliyorsanız yukarıdaki uygun sekmeyi tıklayınız. Yoksa diziyle tüm bölümlere gitmek için aşağıdaki ""Sonraki Bölüm"" düğmesini kullanabilirsiniz.", -1, 10, 30, 443, 25
CONTROL "", IDC_CARDBACK1, "Static", SS_NOTIFY, 4, 7, 26, 32
CONTROL "", IDC_CARDBACK2, "Static", SS_NOTIFY, 34, 7, 26, 32
CONTROL "", IDC_CARDBACK3, "Static", SS_NOTIFY, 64, 7, 26, 32
CONTROL "", IDC_CARDBACK4, "Static", SS_NOTIFY, 94, 7, 26, 32
CONTROL "", IDC_CARDBACK5, "Static", SS_NOTIFY, 124, 7, 26, 32
CONTROL "", IDC_CARDBACK6, "Static", SS_NOTIFY, 154, 7, 26, 32
CONTROL "", IDC_CARDBACK7, "Static", SS_NOTIFY, 4, 46, 26, 32
CONTROL "", IDC_CARDBACK8, "Static", SS_NOTIFY, 34, 46, 26, 32
CONTROL "", IDC_CARDBACK9, "Static", SS_NOTIFY, 64, 46, 26, 32
CONTROL "", IDC_CARDBACK10, "Static", SS_NOTIFY, 94, 46, 26, 32
CONTROL "", IDC_CARDBACK11, "Static", SS_NOTIFY, 124, 46, 26, 32
CONTROL "", IDC_CARDBACK12, "Static", SS_NOTIFY, 154, 46, 26, 32
DEFPUSHBUTTON "OK", IDOK, 66, 84, 54, 13
PUSHBUTTON "Cancel", IDCANCEL, 126, 84, 54, 13
CONTROL "", IDC_CARDBACK1, "Static", SS_NOTIFY, 4, 7, 50, 71
CONTROL "", IDC_CARDBACK2, "Static", SS_NOTIFY, 61, 7, 50, 71
CONTROL "", IDC_CARDBACK3, "Static", SS_NOTIFY, 118, 7, 50, 71
CONTROL "", IDC_CARDBACK4, "Static", SS_NOTIFY, 175, 7, 50, 71
CONTROL "", IDC_CARDBACK5, "Static", SS_NOTIFY, 232, 7, 50, 71
CONTROL "", IDC_CARDBACK6, "Static", SS_NOTIFY, 289, 7, 50, 71
CONTROL "", IDC_CARDBACK7, "Static", SS_NOTIFY, 4, 89, 50, 71
CONTROL "", IDC_CARDBACK8, "Static", SS_NOTIFY, 61, 89, 50, 71
CONTROL "", IDC_CARDBACK9, "Static", SS_NOTIFY, 118, 89, 50, 71
CONTROL "", IDC_CARDBACK10, "Static", SS_NOTIFY, 175, 89, 50, 71
CONTROL "", IDC_CARDBACK11, "Static", SS_NOTIFY, 232, 89, 50, 71
CONTROL "", IDC_CARDBACK12, "Static", SS_NOTIFY, 289, 89, 50, 71
DEFPUSHBUTTON "OK", IDOK, 114, 165, 54, 14
PUSHBUTTON "Cancel", IDCANCEL, 176, 165, 54, 14
END
/* Strings */
@@ -54,6 +59,8 @@ BEGIN
IDS_SOL_QUIT "Quit the current game?"
IDS_SOL_WIN "Congratulations, you win!"
IDS_SOL_DEAL "Deal again?"
IDS_SOL_SCORE "Score: %d"
IDS_SOL_TIME "Time: %d"
END
/* Menus */
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.