Commit graph

6 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 64091a6600 [NTVDM]: Remove unneeded WINAPI convention calls.
svn path=/branches/ntvdm/; revision=61355
2013-12-23 18:04:32 +00:00
Hermès Bélusca-Maïto 085fe5e31a [NTVDM]
- 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
2013-12-15 16:30:28 +00:00
Hermès Bélusca-Maïto dd9dafc7ff [NTVDM]
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
2013-11-09 23:01:11 +00:00
Hermès Bélusca-Maïto 6da6a5ce56 [NTVDM]
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
2013-11-09 22:15:40 +00:00
Hermès Bélusca-Maïto 5c220ef022 [FAST486]
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
2013-11-01 02:28:47 +00:00
Hermès Bélusca-Maïto 39a527a21e [FAST486][NTVDM]
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
2013-11-01 00:01:07 +00:00