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