From fa43e4b2036a7344c5da4ff8dc50057c165599f4 Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Sat, 18 Jan 2014 16:56:36 -0800 Subject: [PATCH] move fixed global constants defining segments into dos.cpp and make them variables. We're going to allow for dynamic mapping later. --- include/dos_inc.h | 16 ++++++++++++++++ src/dos/dos.cpp | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/include/dos_inc.h b/include/dos_inc.h index 2050a1d85..57c2b98d2 100644 --- a/include/dos_inc.h +++ b/include/dos_inc.h @@ -108,6 +108,7 @@ extern Bitu DOS_FILES; #define DOS_DEVICES 10 +#if 0 /* ORIGINAL DEFINES FOR REFERENCE */ // dos swappable area is 0x320 bytes beyond the sysvars table // device driver chain is inside sysvars #define DOS_INFOBLOCK_SEG 0x80 // sysvars (list of lists) @@ -122,6 +123,21 @@ extern Bitu DOS_FILES; #define DOS_PRIVATE_SEGMENT 0xc800 #define DOS_PRIVATE_SEGMENT_END 0xd000 +#endif + +// dos swappable area is 0x320 bytes beyond the sysvars table +// device driver chain is inside sysvars +extern Bit16u DOS_INFOBLOCK_SEG;// 0x80 // sysvars (list of lists) +extern Bit16u DOS_CONDRV_SEG;// 0xa0 +extern Bit16u DOS_CONSTRING_SEG;// 0xa8 +extern Bit16u DOS_SDA_SEG;// 0xb2 // dos swappable area +extern Bit16u DOS_SDA_OFS;// 0 +extern Bit16u DOS_CDS_SEG;// 0x108 +extern Bit16u DOS_FIRST_SHELL;// 0x118 +extern Bit16u DOS_MEM_START;// 0x158 // regression to r3437 fixes nascar 2 colors + +extern Bit16u DOS_PRIVATE_SEGMENT;// 0xc800 +extern Bit16u DOS_PRIVATE_SEGMENT_END;// 0xd000 /* internal Dos Tables */ diff --git a/src/dos/dos.cpp b/src/dos/dos.cpp index 453ee917c..72eb159b7 100644 --- a/src/dos/dos.cpp +++ b/src/dos/dos.cpp @@ -32,6 +32,18 @@ #include "serialport.h" #include "dos_network.h" +Bit16u DOS_INFOBLOCK_SEG=0x80; // sysvars (list of lists) +Bit16u DOS_CONDRV_SEG=0xa0; +Bit16u DOS_CONSTRING_SEG=0xa8; +Bit16u DOS_SDA_SEG=0xb2; // dos swappable area +Bit16u DOS_SDA_OFS=0; +Bit16u DOS_CDS_SEG=0x108; +Bit16u DOS_FIRST_SHELL=0x118; +Bit16u DOS_MEM_START=0x158; // regression to r3437 fixes nascar 2 colors + +Bit16u DOS_PRIVATE_SEGMENT=0xc800; +Bit16u DOS_PRIVATE_SEGMENT_END=0xd000; + DOS_Block dos; DOS_InfoBlock dos_infoblock;