- 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