From 3d36bf445140d5ccbeee9bb73bcf7fb1019e842f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 11 Jan 2014 15:27:18 +0000 Subject: [PATCH] [NTVDM]: Start to organize the code... svn path=/branches/ntvdm/; revision=61583 --- subsystems/ntvdm/CMakeLists.txt | 20 +++++++++++--------- subsystems/ntvdm/{ => bios}/bios.c | 8 ++++---- subsystems/ntvdm/{ => bios}/bios.h | 0 subsystems/ntvdm/{ => dos}/dos.c | 2 +- subsystems/ntvdm/{ => dos}/dos.h | 0 subsystems/ntvdm/emulator.c | 6 +++--- subsystems/ntvdm/{ => hardware}/cmos.c | 2 +- subsystems/ntvdm/{ => hardware}/cmos.h | 0 subsystems/ntvdm/{ => hardware}/pic.c | 0 subsystems/ntvdm/{ => hardware}/pic.h | 0 subsystems/ntvdm/{ => hardware}/ps2.c | 0 subsystems/ntvdm/{ => hardware}/ps2.h | 0 subsystems/ntvdm/{ => hardware}/speaker.c | 0 subsystems/ntvdm/{ => hardware}/speaker.h | 0 subsystems/ntvdm/{ => hardware}/timer.c | 0 subsystems/ntvdm/{ => hardware}/timer.h | 0 subsystems/ntvdm/{ => hardware}/vga.c | 2 +- subsystems/ntvdm/{ => hardware}/vga.h | 0 subsystems/ntvdm/int32.c | 2 +- subsystems/ntvdm/ntvdm.c | 23 +++++++++++++++-------- 20 files changed, 37 insertions(+), 28 deletions(-) rename subsystems/ntvdm/{ => bios}/bios.c (99%) rename subsystems/ntvdm/{ => bios}/bios.h (100%) rename subsystems/ntvdm/{ => dos}/dos.c (99%) rename subsystems/ntvdm/{ => dos}/dos.h (100%) rename subsystems/ntvdm/{ => hardware}/cmos.c (99%) rename subsystems/ntvdm/{ => hardware}/cmos.h (100%) rename subsystems/ntvdm/{ => hardware}/pic.c (100%) rename subsystems/ntvdm/{ => hardware}/pic.h (100%) rename subsystems/ntvdm/{ => hardware}/ps2.c (100%) rename subsystems/ntvdm/{ => hardware}/ps2.h (100%) rename subsystems/ntvdm/{ => hardware}/speaker.c (100%) rename subsystems/ntvdm/{ => hardware}/speaker.h (100%) rename subsystems/ntvdm/{ => hardware}/timer.c (100%) rename subsystems/ntvdm/{ => hardware}/timer.h (100%) rename subsystems/ntvdm/{ => hardware}/vga.c (99%) rename subsystems/ntvdm/{ => hardware}/vga.h (100%) diff --git a/subsystems/ntvdm/CMakeLists.txt b/subsystems/ntvdm/CMakeLists.txt index 43969dc50cd..07e9902de43 100644 --- a/subsystems/ntvdm/CMakeLists.txt +++ b/subsystems/ntvdm/CMakeLists.txt @@ -1,23 +1,25 @@ -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/fast486) +include_directories( + ${REACTOS_SOURCE_DIR}/include/reactos/libs/fast486 + ntvdm) spec2def(ntvdm.exe ntvdm.spec) list(APPEND SOURCE - bios.c + bios/bios.c + hardware/cmos.c + hardware/pic.c + hardware/ps2.c + hardware/speaker.c + hardware/timer.c + hardware/vga.c + dos/dos.c bop.c - cmos.c - dos.c emulator.c int32.c io.c - pic.c - ps2.c registers.c - speaker.c - timer.c vddsup.c - vga.c ntvdm.c ntvdm.rc ${CMAKE_CURRENT_BINARY_DIR}/ntvdm.def) diff --git a/subsystems/ntvdm/bios.c b/subsystems/ntvdm/bios/bios.c similarity index 99% rename from subsystems/ntvdm/bios.c rename to subsystems/ntvdm/bios/bios.c index 0282498641c..3bc6c6abcc8 100644 --- a/subsystems/ntvdm/bios.c +++ b/subsystems/ntvdm/bios/bios.c @@ -14,10 +14,10 @@ #include "bios.h" #include "io.h" -#include "vga.h" -#include "pic.h" -#include "ps2.h" -#include "timer.h" +#include "hardware/vga.h" +#include "hardware/pic.h" +#include "hardware/ps2.h" +#include "hardware/timer.h" #include "int32.h" #include "registers.h" diff --git a/subsystems/ntvdm/bios.h b/subsystems/ntvdm/bios/bios.h similarity index 100% rename from subsystems/ntvdm/bios.h rename to subsystems/ntvdm/bios/bios.h diff --git a/subsystems/ntvdm/dos.c b/subsystems/ntvdm/dos/dos.c similarity index 99% rename from subsystems/ntvdm/dos.c rename to subsystems/ntvdm/dos/dos.c index affddeda0db..16366d2c1fb 100644 --- a/subsystems/ntvdm/dos.c +++ b/subsystems/ntvdm/dos/dos.c @@ -13,7 +13,7 @@ #include "emulator.h" #include "dos.h" -#include "bios.h" +#include "bios/bios.h" #include "bop.h" #include "int32.h" #include "registers.h" diff --git a/subsystems/ntvdm/dos.h b/subsystems/ntvdm/dos/dos.h similarity index 100% rename from subsystems/ntvdm/dos.h rename to subsystems/ntvdm/dos/dos.h diff --git a/subsystems/ntvdm/emulator.c b/subsystems/ntvdm/emulator.c index 49a52fb908b..2caed1c1795 100644 --- a/subsystems/ntvdm/emulator.c +++ b/subsystems/ntvdm/emulator.c @@ -11,13 +11,13 @@ #define NDEBUG #include "emulator.h" -#include "bios.h" +#include "bios/bios.h" #include "bop.h" #include "vddsup.h" #include "io.h" #include "registers.h" -#include "vga.h" -#include "pic.h" +#include "hardware/vga.h" +#include "hardware/pic.h" // HACK typedef INT VDM_MODE; diff --git a/subsystems/ntvdm/cmos.c b/subsystems/ntvdm/hardware/cmos.c similarity index 99% rename from subsystems/ntvdm/cmos.c rename to subsystems/ntvdm/hardware/cmos.c index a49a57bc8b6..d6e56f65483 100644 --- a/subsystems/ntvdm/cmos.c +++ b/subsystems/ntvdm/hardware/cmos.c @@ -13,7 +13,7 @@ #include "emulator.h" #include "cmos.h" #include "io.h" -#include "bios.h" +#include "bios/bios.h" #include "pic.h" /* PRIVATE VARIABLES **********************************************************/ diff --git a/subsystems/ntvdm/cmos.h b/subsystems/ntvdm/hardware/cmos.h similarity index 100% rename from subsystems/ntvdm/cmos.h rename to subsystems/ntvdm/hardware/cmos.h diff --git a/subsystems/ntvdm/pic.c b/subsystems/ntvdm/hardware/pic.c similarity index 100% rename from subsystems/ntvdm/pic.c rename to subsystems/ntvdm/hardware/pic.c diff --git a/subsystems/ntvdm/pic.h b/subsystems/ntvdm/hardware/pic.h similarity index 100% rename from subsystems/ntvdm/pic.h rename to subsystems/ntvdm/hardware/pic.h diff --git a/subsystems/ntvdm/ps2.c b/subsystems/ntvdm/hardware/ps2.c similarity index 100% rename from subsystems/ntvdm/ps2.c rename to subsystems/ntvdm/hardware/ps2.c diff --git a/subsystems/ntvdm/ps2.h b/subsystems/ntvdm/hardware/ps2.h similarity index 100% rename from subsystems/ntvdm/ps2.h rename to subsystems/ntvdm/hardware/ps2.h diff --git a/subsystems/ntvdm/speaker.c b/subsystems/ntvdm/hardware/speaker.c similarity index 100% rename from subsystems/ntvdm/speaker.c rename to subsystems/ntvdm/hardware/speaker.c diff --git a/subsystems/ntvdm/speaker.h b/subsystems/ntvdm/hardware/speaker.h similarity index 100% rename from subsystems/ntvdm/speaker.h rename to subsystems/ntvdm/hardware/speaker.h diff --git a/subsystems/ntvdm/timer.c b/subsystems/ntvdm/hardware/timer.c similarity index 100% rename from subsystems/ntvdm/timer.c rename to subsystems/ntvdm/hardware/timer.c diff --git a/subsystems/ntvdm/timer.h b/subsystems/ntvdm/hardware/timer.h similarity index 100% rename from subsystems/ntvdm/timer.h rename to subsystems/ntvdm/hardware/timer.h diff --git a/subsystems/ntvdm/vga.c b/subsystems/ntvdm/hardware/vga.c similarity index 99% rename from subsystems/ntvdm/vga.c rename to subsystems/ntvdm/hardware/vga.c index 56bdee362b0..52e833346b7 100644 --- a/subsystems/ntvdm/vga.c +++ b/subsystems/ntvdm/hardware/vga.c @@ -14,7 +14,7 @@ #include "vga.h" #include "io.h" -#include "bios.h" +#include "bios/bios.h" /* PRIVATE VARIABLES **********************************************************/ diff --git a/subsystems/ntvdm/vga.h b/subsystems/ntvdm/hardware/vga.h similarity index 100% rename from subsystems/ntvdm/vga.h rename to subsystems/ntvdm/hardware/vga.h diff --git a/subsystems/ntvdm/int32.c b/subsystems/ntvdm/int32.c index beb2bdd5d4a..6e2dfcdab31 100644 --- a/subsystems/ntvdm/int32.c +++ b/subsystems/ntvdm/int32.c @@ -15,7 +15,7 @@ #include "int32.h" #include "bop.h" -#include "bios.h" +#include "bios/bios.h" #include "registers.h" /* PRIVATE VARIABLES **********************************************************/ diff --git a/subsystems/ntvdm/ntvdm.c b/subsystems/ntvdm/ntvdm.c index 4c0df1485e1..e3c12ae80b7 100644 --- a/subsystems/ntvdm/ntvdm.c +++ b/subsystems/ntvdm/ntvdm.c @@ -12,14 +12,15 @@ #include "ntvdm.h" #include "emulator.h" -#include "cmos.h" -#include "bios.h" -#include "speaker.h" -#include "vga.h" -#include "dos.h" -#include "timer.h" -#include "pic.h" -#include "ps2.h" + +#include "bios/bios.h" +#include "hardware/cmos.h" +#include "hardware/pic.h" +#include "hardware/ps2.h" +#include "hardware/speaker.h" +#include "hardware/timer.h" +#include "hardware/vga.h" +#include "dos/dos.h" /* * Activate this line if you want to be able to test NTVDM with: @@ -142,6 +143,12 @@ INT wmain(INT argc, WCHAR *argv[]) /* Initialize the PC Speaker */ SpeakerInitialize(); + + + + + + /* Initialize the system BIOS */ if (!BiosInitialize()) {