- 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
Fix console palette setting. For that, we create a console framebuffer on which we draw the different active screen buffers (be they text or graphics), we can change the palette associated to this framebuffer and then we draw the framebuffer on screen.
Console palettes now work !!!!!! @ [TheFlash]
Part 2/2
svn path=/trunk/; revision=60734
- Remove no longer needed special casing for __MINGW32__. Patch by Ivan Rodionov.
CORE-7335 #resolve #comment Thanks! Committed in r60733.
svn path=/trunk/; revision=60733
- SampSetupCreateUserAccount, SamrCreateUserInDomain and SamrCreateUser2InDomain: Set the PrivateData attribute.
- SamrGetAliasMembership: Remove a superfluous call to SampRegCloseKey.
- SampQueryUserAll and SampSetUserAll: Disable access to the SecDesc attribute as long as it is not set upon user account creation.
svn path=/trunk/; revision=60728
- sam.idl: Rename GROUP_ATTRIBUTE_INFORMATION to SAMPR_GROUP_ATTRIBUTE_INFORMATION in order to avoid confilcts with new types in ntsam.h.
- ntsam.h: Add missing group specific structures.
svn path=/trunk/; revision=60727
- Fix console palette setting; introduce the ConsoleMakePalettePublic control code for NtUserConsoleControl API which
is called by the SetConsolePalette to make the given palette handle public (indeed, the caller to SetConsoleHandle
gives to this API a GDI palette handle which is aimed at being used by another process, i.e. by CSRSS.EXE; in normal
operation this is impossible unless saying to GDI that the handle is meant to be public; that's what it's done there).
Thanks to Aleksander and David (who provided tests) and Timo (see revision 60725) for having helped me in understanding
what happened exactly there.
- Remove now-unneeded DPRINT1s and the hacked palette that was introduced in revision 60629/60641.
Part 1/2
svn path=/trunk/; revision=60726
Add GreSetObjectOwnerEx, allowing to set the owner of not-owned objects by passing GDIOBJFLAG_IGNOREPID as 3rd parameter. Use with care :) Dedicated to Alexander and Hermès.
svn path=/trunk/; revision=60725
- Correctly compute addresses of MI_VAD_BITMAP and MI_WORKING_SET_LIST. In trunk's MM it went unnoticed because nothing really cares about these two structs.
svn path=/trunk/; revision=60721
- The (ATI) patch CORE-6551. Please oh please use this jira core issue for all bug reports and regressions.
- Major rewrite to input message queue. It is now attachable between threads. After all the hubbub the only thing we pass are all the SetActive/Foreground/Parent/Window wine msg and win tests. But not the message sequence tests.
- Pass all but one foreground API User32 ATI test when the message patch is installed. But w/o it, pass all but 8'ish.
- Tested XP osk (On-Screen Keyboard) with CMD, it works but is quirky. Need to look into set to top window issues.
- AHK issues work long as ATI is used and when it is not the some AHK tests fail. That was why all the hot key changes had been committed before. Still looking into this.
- Please test everything and post to the appropriate jira issue reports. I do not have a lot of time anymore to focus hard on many issues, it will take months to do so with just one.
svn path=/trunk/; revision=60718