]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_mm.h
it displays the actual error now~
[16.git] / src / lib / 16_mm.h
index 6aac19b7e814a9c636229436e69ca5c8fdb89994..a665b22436c5c128bc21d7d6b38a8ae2c6f03880 100644 (file)
@@ -25,6 +25,8 @@
 #include <malloc.h>
 //#include <bios.h>
 #include "src/lib/16_head.h"
+#include "src/lib/modex16.h"
+//#include "src/lib/16_ca.h"
 //++++mh       #include "src/lib/16_in.h"
 
 #ifdef __DEBUG__               // 1 == Debug/Dev  ;  0 == Production/final
@@ -42,6 +44,7 @@
 #define MAXBLOCKS              600
 
 
+
 //--------
 
 #define        EMS_INT                 0x67
@@ -111,6 +114,7 @@ extern void         (* XMSaddr) (void);             // far pointer to XMS driver
 #define BASEATTRIBUTES 0       // unlocked, non purgable
 
 #define MAXUMBS                12
+#define MAPPAGES               mm->EMSpagesmapped
 
 typedef struct mmblockstruct
 {
@@ -118,7 +122,7 @@ typedef struct mmblockstruct
        //dword start,length;
        //word  start;
        //dword length;
-       //++++word sega;                                //how many 64kb segment blocks it takes up if there is many data!
+       //byte segm;                            //how many 64kb segment blocks it takes up if there is many data!
        unsigned        attributes;
        memptr          *useptr;        // pointer to the segment start
        struct mmblockstruct huge *next;
@@ -131,6 +135,7 @@ typedef struct
        boolean         mmstarted, bombonerror, mmerror;
        void huge       *farheap;
        void            *nearheap;
+       //byte          EMS_status;
        unsigned        totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;
        unsigned int EMSVer;
        word numUMBs,UMBbase[MAXUMBS];
@@ -158,9 +163,9 @@ typedef struct
 //==========================================================================
 
 boolean MML_CheckForEMS(void);
-unsigned MML_SetupEMS(mminfo_t *mm);
+byte MML_SetupEMS(mminfo_t *mm);
 void MML_ShutdownEMS(mminfo_t *mm);
-unsigned MM_MapEMS(mminfo_t *mm);
+byte MM_MapEMS(mminfo_t *mm);
 boolean MML_CheckForXMS(mminfo_t *mm);
 void MML_SetupXMS(mminfo_t *mm, mminfotype *mmi);
 void MML_ShutdownXMS(mminfo_t *mm);
@@ -175,10 +180,11 @@ void MM_FreePtr(memptr *baseptr, mminfo_t *mm);
 void MM_SetPurge(memptr *baseptr, int purge, mminfo_t *mm);
 void MM_SetLock(memptr *baseptr, boolean locked, mminfo_t *mm);
 void MM_SortMem(mminfo_t *mm);
-void MM_ShowMemory(mminfo_t *mm);
+void MM_ShowMemory(page_t *page, mminfo_t *mm);
+void MM_DumpData(mminfo_t *mm);
 dword MM_UnusedMemory(mminfo_t *mm);
 dword MM_TotalFree(mminfo_t *mm);
-void MM_Report(mminfo_t *mm, mminfotype *mmi);
+void MM_Report(page_t *page, mminfo_t *mm, mminfotype *mmi);
 //int MM_EMSVer(void);
 void MM_BombOnError(boolean bomb, mminfo_t *mm);
 void MM_GetNewBlock(mminfo_t *mm);