Commit graph

29 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 679980a06c [NTVDM]
- 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
2014-02-23 20:40:09 +00:00
Hermès Bélusca-Maïto b33a34bec1 [NTVDM]
- Use callbacks in BIOS/DOS (and disable int32.c)
- Move DOS bops to dem.c

svn path=/branches/ntvdm/; revision=62306
2014-02-23 16:09:35 +00:00
Hermès Bélusca-Maïto 574f922049 [NTVDM]
- 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
2014-02-17 22:20:03 +00:00
Hermès Bélusca-Maïto 105aff1c51 [NTVDM]
- 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
2014-02-01 16:32:20 +00:00
Hermès Bélusca-Maïto 0a46ec7a18 [NTVDM]
- 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
2014-01-26 21:51:27 +00:00
Hermès Bélusca-Maïto c98977184f [NTVDM]
- 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
2014-01-26 18:25:59 +00:00
Hermès Bélusca-Maïto 6ddfa7d2b8 [NTVDM]
- 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
2014-01-25 00:21:51 +00:00
Hermès Bélusca-Maïto 25105f6bec [NTVDM]: Break the BIOS into the BIOS and the video BIOS.
svn path=/branches/ntvdm/; revision=61586
2014-01-11 17:05:25 +00:00
Hermès Bélusca-Maïto 3d36bf4451 [NTVDM]: Start to organize the code...
svn path=/branches/ntvdm/; revision=61583
2014-01-11 15:27:18 +00:00
Hermès Bélusca-Maïto 81c28dca92 Oups, forgot to link against advapi32 too (for registry functions) xD
svn path=/branches/ntvdm/; revision=61371
2013-12-24 13:48:39 +00:00
Hermès Bélusca-Maïto ed874b41fc [NTVDM]
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
2013-12-17 02:19:52 +00:00
Hermès Bélusca-Maïto 4fb7f6e1d7 [NTVDM]
- 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
2013-11-26 20:20:51 +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
Aleksandar Andrejevic 36afa0ea12 [NTVDM]
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
2013-11-03 21:33:22 +00:00
Hermès Bélusca-Maïto e9f8b230a6 [NTVDM]
Start to implement a basic emulated PC speaker, using the Beep driver.

svn path=/branches/ntvdm/; revision=60853
2013-11-03 20:31:19 +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
Hermès Bélusca-Maïto 2c8e8ba5d3 [FAST486]
- 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
2013-10-27 11:42:44 +00:00
Aleksandar Andrejevic e954b0db71 [SOFTX86]
Remove softx86, as it is no longer used by anything.


svn path=/branches/ntvdm/; revision=60757
2013-10-26 20:53:33 +00:00
Hermès Bélusca-Maïto 51040fc61e Bye bye Soft386, welcome Fast486, courtesy Aleksandar Andrejevic.
[NTVDM]: Define by default NEW_EMULATOR, i.e. use Fast486 instead of softx86.

svn path=/branches/ntvdm/; revision=60703
2013-10-19 16:55:51 +00:00
Aleksandar Andrejevic 005e1f0559 [SOFT386]
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
2013-08-16 19:21:02 +00:00
Aleksandar Andrejevic 5a7a26d750 [NTVDM]
Synchronize with trunk again for SetConsolePalette.
Implement VGA palettes for graphics mode and DAC register access.


svn path=/branches/ntvdm/; revision=59713
2013-08-12 19:31:54 +00:00
Aleksandar Andrejevic 7b2978c43f Synchronize with trunk to fix spec2def issue.
[NTVDM]
Implement write modes and latch register for VGA.


svn path=/branches/ntvdm/; revision=59687
2013-08-10 17:06:04 +00:00
Aleksandar Andrejevic 022895e518 [NTVDM]
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
2013-08-09 23:52:08 +00:00
Aleksandar Andrejevic 455deb3bde [NTVDM]
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
2013-08-05 23:20:25 +00:00
Aleksandar Andrejevic 4c4c69fc37 [NTVDM]
Clean up the code and properly separate different modules into different files.


svn path=/branches/ntvdm/; revision=59344
2013-06-26 22:58:41 +00:00
Aleksandar Andrejevic 6a3d90cf53 [NTVDM]
Improve keyboard IRQ performance.
Add debug output to measure number of instructions per second.


svn path=/branches/ntvdm/; revision=59279
2013-06-22 01:41:51 +00:00
Aleksandar Andrejevic b44c5d3a6f [NTVDM]
Implement 8259 Programmable Interrupt Controller emulation.


svn path=/branches/ntvdm/; revision=59268
2013-06-20 19:00:07 +00:00
Hermès Bélusca-Maïto f1e0b70d39 [NTVDM]
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
2013-06-17 00:00:36 +00:00
Hermès Bélusca-Maïto 4f0b8d3db0 Create a branch for Aleksandar Andrejevic for his work on NTVDM. See http://jira.reactos.org/browse/CORE-7250 for more details.
svn path=/branches/ntvdm/; revision=59241
2013-06-16 22:01:41 +00:00
Renamed from reactos/subsystems/ntvdm/CMakeLists.txt (Browse further)