2011-05-16 13:12:07 +00:00
|
|
|
|
2014-11-18 02:18:18 +00:00
|
|
|
PROJECT(NTVDM)
|
|
|
|
|
[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
|
|
|
#####################################
|
|
|
|
# Generate the integrated COMMAND.COM
|
|
|
|
#
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/command_com.c ${CMAKE_CURRENT_BINARY_DIR}/command_com.h
|
2018-03-30 11:03:40 +00:00
|
|
|
COMMAND native-bin2c $<TARGET_PROPERTY:command,BINARY_PATH> ${CMAKE_CURRENT_BINARY_DIR}/command_com.c ${CMAKE_CURRENT_BINARY_DIR}/command_com.h BIN CommandCom
|
|
|
|
DEPENDS native-bin2c command)
|
[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
|
|
|
#####################################
|
|
|
|
|
2016-04-20 12:36:25 +00:00
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/fast486)
|
2014-11-18 02:18:18 +00:00
|
|
|
|
2015-03-19 21:03:58 +00:00
|
|
|
spec2def(ntvdm.exe ntvdm.spec ADD_IMPORTLIB)
|
2013-08-09 23:52:08 +00:00
|
|
|
|
2013-06-17 00:00:36 +00:00
|
|
|
list(APPEND SOURCE
|
2014-02-17 22:20:03 +00:00
|
|
|
bios/bios32/bios32.c
|
2015-09-26 17:35:31 +00:00
|
|
|
bios/bios32/dskbios32.c
|
2014-02-17 22:20:03 +00:00
|
|
|
bios/bios32/kbdbios32.c
|
2015-09-26 17:35:31 +00:00
|
|
|
bios/bios32/moubios32.c
|
2015-07-21 00:49:11 +00:00
|
|
|
bios/bios32/vbe.c
|
2014-02-17 22:20:03 +00:00
|
|
|
bios/bios32/vidbios32.c
|
2014-01-11 15:27:18 +00:00
|
|
|
bios/bios.c
|
2014-03-02 22:50:31 +00:00
|
|
|
bios/kbdbios.c
|
2014-02-26 01:07:09 +00:00
|
|
|
bios/rom.c
|
[NTVDM]
EMS:
- Introduce (and use) helpers for checking validity of EMS handles.
- Do not hardcode the EMS page frame segment, but instead allow it to be changed (for now, it is still set to a default value; in the future, via some configuration file or via the registry). This is done by acquiring a UMB block (see after).
XMS:
- Implement functions 0x01 "Request HMA" and 0x02 "Release HMA".
- Fix the return value of functions 0x04 "Global disable A20" and 0x08 "Query free Extended Memory"; simplify code of function 0x0B "Move EMB".
- Halfplement function 0x0F "Reallocate Extended Memory Block" in the simple case of size reduction (size expansion is left to the programmer as an exercise :PP )
- Rewrite the UMB provider support (functions 0x10, 0x11, 0x12) by calling the Upper Memory Area manager helpers (see after) (this is closer to reality: UMBs are either provided by XMS driver itself, or by an EMS driver which hooks into the XMS driver chain -- as it is done with MS' himem+EMM386; sometimes all that stuff is contained inside one driver only --) instead of calling back into DOS. This is the DOS which calls XMS for getting the UMB blocks and initializing them! (and not the other way around as it was done in r68001!).
NTVDM:
- Introduce an "Upper Memory Area manager" which maintains a list of areas of upper memory (>= A000:0000 and <= FFFF:000F) that can be used as RAM blocks. It is intended to work closely with the NTVDM memory manager and be used by XMS for getting possible free UMBs, and by VDDs for implementing the VDDInclude/ExcludeMem APIs (which adds/remove blocks in/from the UMB pool; those are unaccessible to DOS if those APIs are called after NTVDM have been started, but are accessible by XMS).
DOS:
- Add a helper function for detecting early DOS arena corruptions (for debugging purposes only).
- Make the DOS memory manager really UMB-compatible. This means:
* not hardcoding the start of the UMB chain;
* getting all the available UMB blocks from XMS and initializing them, marking the reserved blocks as read-only (with a correct header; reserved blocks are eg. VGA memory area, ROM blocks...).
There is room for improvements obviously (see the FIXMEs in the code). Used documentation is mentioned in comments in the code.
This commit should fix quite some apps, as well as it fixes corruptions of loaded ROMs in upper memory: that's how I came into working on fixing the UMB support. In other words, during those two last weeks, I was like in: http://i.imgur.com/zoWpqEB.gifv
CORE-9969 #resolve
svn path=/trunk/; revision=68586
2015-08-01 17:07:07 +00:00
|
|
|
bios/umamgr.c
|
2014-03-02 22:50:31 +00:00
|
|
|
bios/vidbios.c
|
2014-09-30 23:47:23 +00:00
|
|
|
cpu/bop.c
|
|
|
|
cpu/callback.c
|
|
|
|
cpu/cpu.c
|
2014-10-04 15:41:29 +00:00
|
|
|
cpu/registers.c
|
2014-01-11 15:27:18 +00:00
|
|
|
hardware/cmos.c
|
2015-09-26 17:35:31 +00:00
|
|
|
hardware/disk.c
|
2014-11-21 00:22:48 +00:00
|
|
|
hardware/dma.c
|
2014-09-16 00:51:15 +00:00
|
|
|
hardware/keyboard.c
|
|
|
|
hardware/mouse.c
|
2014-01-11 15:27:18 +00:00
|
|
|
hardware/pic.c
|
2014-11-18 02:18:18 +00:00
|
|
|
hardware/pit.c
|
2015-05-14 21:13:07 +00:00
|
|
|
hardware/ppi.c
|
2014-01-11 15:27:18 +00:00
|
|
|
hardware/ps2.c
|
2014-11-18 02:18:18 +00:00
|
|
|
hardware/sound/speaker.c
|
2015-06-21 02:36:20 +00:00
|
|
|
hardware/video/svga.c
|
2014-01-26 21:51:27 +00:00
|
|
|
dos/dos32krnl/bios.c
|
2015-03-26 00:21:25 +00:00
|
|
|
dos/dos32krnl/condrv.c
|
2015-07-07 00:33:53 +00:00
|
|
|
dos/dos32krnl/country.c
|
2015-03-26 00:21:25 +00:00
|
|
|
dos/dos32krnl/device.c
|
2014-01-26 21:51:27 +00:00
|
|
|
dos/dos32krnl/dos.c
|
2014-05-11 19:25:09 +00:00
|
|
|
dos/dos32krnl/dosfiles.c
|
2015-03-26 00:21:25 +00:00
|
|
|
dos/dos32krnl/emsdrv.c
|
2015-04-26 18:09:57 +00:00
|
|
|
dos/dos32krnl/handle.c
|
2015-04-21 22:48:28 +00:00
|
|
|
dos/dos32krnl/himem.c
|
2015-03-26 00:21:25 +00:00
|
|
|
dos/dos32krnl/memory.c
|
2015-05-01 15:42:54 +00:00
|
|
|
dos/dos32krnl/process.c
|
2014-01-26 18:25:59 +00:00
|
|
|
dos/dem.c
|
[NTVDM]
EMS:
- Introduce (and use) helpers for checking validity of EMS handles.
- Do not hardcode the EMS page frame segment, but instead allow it to be changed (for now, it is still set to a default value; in the future, via some configuration file or via the registry). This is done by acquiring a UMB block (see after).
XMS:
- Implement functions 0x01 "Request HMA" and 0x02 "Release HMA".
- Fix the return value of functions 0x04 "Global disable A20" and 0x08 "Query free Extended Memory"; simplify code of function 0x0B "Move EMB".
- Halfplement function 0x0F "Reallocate Extended Memory Block" in the simple case of size reduction (size expansion is left to the programmer as an exercise :PP )
- Rewrite the UMB provider support (functions 0x10, 0x11, 0x12) by calling the Upper Memory Area manager helpers (see after) (this is closer to reality: UMBs are either provided by XMS driver itself, or by an EMS driver which hooks into the XMS driver chain -- as it is done with MS' himem+EMM386; sometimes all that stuff is contained inside one driver only --) instead of calling back into DOS. This is the DOS which calls XMS for getting the UMB blocks and initializing them! (and not the other way around as it was done in r68001!).
NTVDM:
- Introduce an "Upper Memory Area manager" which maintains a list of areas of upper memory (>= A000:0000 and <= FFFF:000F) that can be used as RAM blocks. It is intended to work closely with the NTVDM memory manager and be used by XMS for getting possible free UMBs, and by VDDs for implementing the VDDInclude/ExcludeMem APIs (which adds/remove blocks in/from the UMB pool; those are unaccessible to DOS if those APIs are called after NTVDM have been started, but are accessible by XMS).
DOS:
- Add a helper function for detecting early DOS arena corruptions (for debugging purposes only).
- Make the DOS memory manager really UMB-compatible. This means:
* not hardcoding the start of the UMB chain;
* getting all the available UMB blocks from XMS and initializing them, marking the reserved blocks as read-only (with a correct header; reserved blocks are eg. VGA memory area, ROM blocks...).
There is room for improvements obviously (see the FIXMEs in the code). Used documentation is mentioned in comments in the code.
This commit should fix quite some apps, as well as it fixes corruptions of loaded ROMs in upper memory: that's how I came into working on fixing the UMB support. In other words, during those two last weeks, I was like in: http://i.imgur.com/zoWpqEB.gifv
CORE-9969 #resolve
svn path=/trunk/; revision=68586
2015-08-01 17:07:07 +00:00
|
|
|
dos/mouse32.c
|
[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/command_com.c
|
2014-02-01 16:32:20 +00:00
|
|
|
clock.c
|
2013-06-17 00:00:36 +00:00
|
|
|
emulator.c
|
2014-09-30 23:47:23 +00:00
|
|
|
int32.c
|
2013-11-26 20:20:51 +00:00
|
|
|
io.c
|
2015-03-13 17:57:51 +00:00
|
|
|
memory.c
|
2014-02-27 03:02:11 +00:00
|
|
|
utils.c
|
2013-12-17 02:19:52 +00:00
|
|
|
vddsup.c
|
2011-05-16 13:12:07 +00:00
|
|
|
ntvdm.c
|
2017-12-23 23:04:15 +00:00
|
|
|
ntvdm.h)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2016-10-30 20:27:05 +00:00
|
|
|
file(GLOB ntvdm_rc_deps res/*.*)
|
|
|
|
add_rc_deps(ntvdm.rc ${ntvdm_rc_deps})
|
2017-12-23 23:04:15 +00:00
|
|
|
|
|
|
|
add_executable(ntvdm
|
|
|
|
${SOURCE}
|
|
|
|
ntvdm.rc
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ntvdm.def)
|
|
|
|
|
2021-12-04 00:08:20 +00:00
|
|
|
set_target_properties(ntvdm
|
|
|
|
PROPERTIES
|
|
|
|
ENABLE_EXPORTS TRUE
|
|
|
|
DEFINE_SYMBOL "")
|
|
|
|
|
2015-10-03 18:57:06 +00:00
|
|
|
add_pch(ntvdm ntvdm.h SOURCE)
|
2014-10-17 23:28:29 +00:00
|
|
|
set_module_type(ntvdm win32cui UNICODE IMAGEBASE 0x0F000000)
|
2015-03-13 17:57:51 +00:00
|
|
|
target_link_libraries(ntvdm fast486 ${PSEH_LIB})
|
2015-09-27 15:24:26 +00:00
|
|
|
add_importlibs(ntvdm user32 gdi32 advapi32 comdlg32 msvcrt kernel32 ntdll)
|
2011-05-23 18:27:16 +00:00
|
|
|
add_cd_file(TARGET ntvdm DESTINATION reactos/system32 FOR all)
|