]> 4ch.mooo.com Git - 16.git/commitdiff
ok
authorsparky4 <sparky4@cock.li>
Tue, 21 Jul 2015 15:06:02 +0000 (10:06 -0500)
committersparky4 <sparky4@cock.li>
Tue, 21 Jul 2015 15:06:02 +0000 (10:06 -0500)
new file:   16/ems3.zip
modified:   exmmtest.exe
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h

16/ems3.zip [new file with mode: 0644]
exmmtest.exe
src/lib/16_mm.c
src/lib/16_mm.h

diff --git a/16/ems3.zip b/16/ems3.zip
new file mode 100644 (file)
index 0000000..860896e
Binary files /dev/null and b/16/ems3.zip differ
index 45ae666753ac250f49b98dc31c5bba3caa7133eb..d13e21ed3fc608108fbc1e8d66997ae2849ba83e 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 24f78c5bd67e5499be869a796f1f7b99b59a22d0..e48ccf9f0caa5e1a7ba44b6622ae21c217c40b78 100644 (file)
@@ -140,7 +140,6 @@ byte MML_SetupEMS(mminfo_t *mm)
        char    str[80];//,str2[10];
        byte    err;
        boolean errorflag=false;
-       union REGS CPURegs;
 
        unsigned int EMSVer = 0;
        //byte  EMS_status;
@@ -250,7 +249,7 @@ void MML_ShutdownEMS(mminfo_t *mm)
                mov     errorflag,1
                ok:
        }
-       if(errorflag==true) printf("MML_ShutdownEMS: Error freeing EMS!");      //++++ add something
+       if(errorflag==true) printf("MML_ShutdownEMS: Error freeing EMS!\n");    //++++ add something
 }
 
 /*
@@ -272,10 +271,9 @@ byte MM_MapEMS(mminfo_t *mm)
        byte err;
        boolean errorflag=false;
        int     i;
-       union REGS CPURegs;
        EMShandle=mm->EMShandle;
 
-       for (i=0;i<MAPPAGES;i++)
+       for (i=0;i<4/*MAPPAGES*/;i++)
        {
                __asm
                {
@@ -332,21 +330,22 @@ byte MM_MapXEMS(mminfo_t *mm)
 //     EMS.Error = (Regs.ax AND &HFF00&) \ &H100  //Store the status code\r
 \r
 //END SUB
-/*
-char   str[80];//,str2[10];
+       char    str[80];//,str2[10];
        unsigned        EMShandle;
        byte err;
        boolean errorflag=false;
        int     i;
-       union REGS CPURegs;
        EMShandle=mm->EMShandle;
 
+       if(mm->EMSVer<0x40)
+               return 5;
+
        for (i=0;i<MAPPAGES;i++)
        {
                __asm
                {
-                       mov     ah,EMS_MAPPAGE
-                       mov     bx,[i]                  // logical page
+                       mov     ah,EMS_MAPXPAGE
+                       mov     cx,[i]                  // logical page
                        mov     al,bl                   // physical page
                        mov     dx,[EMShandle]  // handle
                        int     EMS_INT
@@ -361,7 +360,7 @@ char        str[80];//,str2[10];
                if(errorflag==true)
                {
                        //err = CPURegs.h.ah;
-                       strcpy(str,"MM_MapEMS: EMS error 0x");
+                       strcpy(str,"MM_MapXEMS: EMS error 0x");
                        //itoa(err,str2,16);
                        //strcat(str,&err);
                        //printf("%s\n",str);
@@ -371,7 +370,6 @@ char        str[80];//,str2[10];
                }
        }
        return 0;
-*/
 }
 
 //==========================================================================
index 8570016c53f05131cc809b0ef61ae6554279fdfb..974af530d5b1b3e3609dede54e1b0cba09267b36 100644 (file)
@@ -54,6 +54,7 @@
 #define        EMS_GETPAGES    0x42
 #define        EMS_ALLOCPAGES  0x43
 #define        EMS_MAPPAGE             0x44
+#define        EMS_MAPXPAGE            0x50
 #define        EMS_FREEPAGES   0x45
 #define        EMS_VERSION             0x46