1
0
Fork 0

adding support for upper memory

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2262
This commit is contained in:
Sebastian Strohhäcker 2005-08-08 13:33:46 +00:00
parent bc49a1ce91
commit caff0f7a8b
9 changed files with 304 additions and 48 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_inc.h,v 1.54 2005-08-01 09:30:44 c2woody Exp $ */
/* $Id: dos_inc.h,v 1.55 2005-08-08 13:33:43 c2woody Exp $ */
#ifndef DOSBOX_DOS_INC_H
#define DOSBOX_DOS_INC_H
@ -76,13 +76,13 @@ enum { RETURN_EXIT=0,RETURN_CTRLC=1,RETURN_ABORT=2,RETURN_TSR=3};
#define DOS_DRIVES 26
#define DOS_DEVICES 10
#define DOS_INFOBLOCK_SEG 0x50
#define DOS_SDA_SEG 0x5a
#define DOS_INFOBLOCK_SEG 0x80
#define DOS_CDS_SEG 0x90
#define DOS_CONSTRING_SEG 0xa0
#define DOS_CONDRV_SEG 0xa4
#define DOS_SDA_SEG 0xb0
#define DOS_SDA_OFS 0
#define DOS_CONSTRING_SEG 0x5d
#define DOS_CONDRV_SEG 0x60
#define DOS_SFT_SEG 0x62
#define DOS_CDS_SEG 0x64
#define DOS_MEM_START 0x102 //First Segment that DOS can use
/* internal Dos Tables */
@ -158,6 +158,8 @@ void DOS_FreeProcessMemory(Bit16u pspseg);
Bit16u DOS_GetMemory(Bit16u pages);
void DOS_SetMemAllocStrategy(Bit16u strat);
Bit16u DOS_GetMemAllocStrategy(void);
void DOS_BuildUMBChain(const char* use_umbs,bool ems_active);
bool DOS_LinkUMBsToMemChain(Bit16u linkstate);
/* FCB stuff */
bool DOS_FCBOpen(Bit16u seg,Bit16u offset);
@ -354,18 +356,24 @@ public:
DOS_InfoBlock () {};
void SetLocation(Bit16u seg);
void SetFirstMCB(Bit16u _first_mcb);
void SetfirstFileTable(RealPt _first_table);
void SetBuffers(Bit16u x,Bit16u y);
void SetCurDirStruct(Bit32u _curdirstruct);
void SetFCBTable(Bit32u _fcbtable);
void SetDeviceChainStart(Bit32u _devchain);
void SetDiskBufferHeadPt(Bit32u _dbheadpt);
RealPt GetPointer (void);
void SetStartOfUMBChain(Bit16u _umbstartseg);
void SetUMBChainState(Bit8u _umbchaining);
Bit16u GetStartOfUMBChain(void);
Bit8u GetUMBChainState(void);
RealPt GetPointer(void);
#ifdef _MSC_VER
#pragma pack(1)
#endif
struct sDIB {
Bit8u unknown1[4];
Bit16u magicWord; // -0x22 needs to be 1
Bit8u unknown2[8];
Bit16u regCXfrom5e; // -0x18 CX from last int21/ah=5e
Bit16u countLRUcache; // -0x16 LRU counter for FCB caching
Bit16u countLRUopens; // -0x14 LRU counter for FCB openings
@ -406,7 +414,7 @@ public:
Bit16u lookaheadBufNumber; // 0x51 number of lookahead buffers
Bit8u bufferLocation; // 0x53 workspace buffer location
Bit32u workspaceBuffer; // 0x54 pointer to workspace buffer
Bit8u unknown2[11]; // 0x58
Bit8u unknown3[11]; // 0x58
Bit8u chainingUMB; // 0x63 bit0: UMB chain linked to MCB chain
Bit16u minMemForExec; // 0x64 minimum paragraphs needed for current program
Bit16u startOfUMBChain; // 0x66 segment of first UMB-MCB