]> 4ch.mooo.com Git - 16.git/commitdiff
wwww debugging EMS on 386+
authorsparky4 <sparky4@cock.li>
Tue, 28 Feb 2017 22:58:00 +0000 (16:58 -0600)
committersparky4 <sparky4@cock.li>
Tue, 28 Feb 2017 22:58:00 +0000 (16:58 -0600)
MEMINFO.16W [deleted file]
db.exe
l4get.bat [new file with mode: 0755]
src/exmmtest.c
src/lib/16_dbg.h
src/lib/16_pm.c
wcpu.exe

diff --git a/MEMINFO.16W b/MEMINFO.16W
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/db.exe b/db.exe
index af80cac81c36b2b54df02442584b23793f3cadcb..457a9fa192d31529e39312c63fcfc8b50357625a 100755 (executable)
Binary files a/db.exe and b/db.exe differ
diff --git a/l4get.bat b/l4get.bat
new file mode 100755 (executable)
index 0000000..7861781
--- /dev/null
+++ b/l4get.bat
@@ -0,0 +1,60 @@
+@echo off\r
+iff exist %* then\r
+       del %*\r
+endiff\r
+setlocal\r
+set url="138.47.241.23"\r
+rem for %@eval[%#+1] in (%*) do (\r
+rem for %# in (1,1,%*) do (\r
+:loop\r
+       set /a o=0\r
+:oooo\r
+       set /a q=%@EVAL[%@LEN[%1] - 4]\r
+       set w=%@INSTR[0,%q,%1]\r
+       iff NOT "%w" == "" then\r
+       set /a o=%o+1\r
+       set y=%w.z%o\r
+rem     echo y=%y\r
+       if %o lt 100 (\r
+               if %o lt 10 (\r
+                       set z=00%o\r
+               ) else (\r
+                       set z=0%o\r
+               ) endif\r
+       ) else if %o gt 99 (\r
+               set z=%o\r
+       ) endif\r
+\r
+       htget http://%url/%1.zip.%z > %y\r
+rem    pause\r
+       iff NOT "%@FILESIZE[%y,b]" == "0" then\r
+               type %y >> %w.zip\r
+               iff "%@FILESIZE[%y,b]" == "65536" then\r
+rem                            echo o=%o\r
+                       goto oooo\r
+               endiff\r
+               iff NOT "%#" == "0" then\r
+                       shift /1\r
+                       iff exist %w.zip then\r
+                               unzip %w.zip\r
+                               del %w.z*\r
+                       endiff\r
+                       goto loop\r
+               else\r
+                       del %#\r
+               endiff\r
+       else\r
+               del %y\r
+               echo Error null zip file wwww\r
+       endiff\r
+       else\r
+               rem del %y.z*\r
+               rem need to add a cleaner wwww\r
+               echo done~ wwww\r
+       endiff\r
+rem  echo y="%y"\r
+rem  echo q=%q\r
+rem  echo o=%o\r
+rem  echo w=%w\r
+rem  echo %%1=%1\r
+endlocal\r
index 881a1356454e69fae62ddcf738fe891da6dcb6d1..6834df663661f615deb3b6bab2d885eda92fe59f 100755 (executable)
@@ -294,7 +294,7 @@ PRINTBB; printf("\n\npress any key to continue!\n"); getch();
        printf("debugmm: %u\t", dbg_debugmm);\r
 #endif\r
 #ifdef __DEBUG_PM__\r
-       printf("debugpm: %u", dbg_ddebugpm);\r
+       printf("debugpm: %u", dbg_debugpm);\r
 #endif\r
        printf("\n");\r
 #endif\r
index 3d7ef4afe9690e4912e3f18cf8d7af65d1a44c59..61bbff8b40ddda0e741121a3976dd9558bd276db 100755 (executable)
@@ -10,7 +10,7 @@
 #define __DEBUG_InputMgr__\r
 #define __DEBUG_MAP__\r
 //#define __DEBUG_CA__\r
-//#define __DEBUG_PM__\r
+#define __DEBUG_PM__\r
 //#define __DEBUG_MM__\r
 \r
 \r
index 53eb86036314b5696f84feaaf348008283ebe9dd..03df02377c4c8e6c20d801e6b12ccfcefc5f811d 100755 (executable)
@@ -158,13 +158,16 @@ boolean
 PML_StartupEMS(global_game_variables_t *gvar)\r
 {\r
        int             i;\r
-       long    size;\r
+       //long  size;\r
        byte    err=0, str[64];\r
 \r
        boolean errorflag=false;\r
        static char     emmname[] = "EMMXXXX0"; //fix by andrius4669\r
        unsigned int EMSVer = 0;\r
        unsigned        totalEMSpages,freeEMSpages,EMSPageFrame,EMSHandle=0,EMSAvail=0;\r
+#ifdef __DEBUG_PM__\r
+       word e=0;\r
+#endif\r
        totalEMSpages = freeEMSpages = EMSPageFrame = 0;\r
        gvar->pm.emm.EMSPresent = false;                        // Assume that we'll fail\r
        gvar->pm.emm.EMSAvail = 0;\r
@@ -175,27 +178,37 @@ PML_StartupEMS(global_game_variables_t *gvar)
                mov     ax,0x3d00\r
                int     EMM_INT         // try to open EMMXXXX0 device\r
                jc      error1\r
-\r
+#ifdef __DEBUG_PM__\r
+               add     e,1\r
+#endif\r
                mov     bx,ax\r
                mov     ax,0x4400\r
 \r
                int     EMM_INT         // get device info\r
                jc      error1\r
-\r
+#ifdef __DEBUG_PM__\r
+               add     e,1\r
+#endif\r
                and     dx,0x80\r
                jz      error1\r
-\r
+#ifdef __DEBUG_PM__\r
+               add     e,1\r
+#endif\r
                mov     ax,0x4407\r
 \r
                int     EMM_INT         // get status\r
                jc      error1\r
                or      al,al\r
                jz      error1\r
-\r
+#ifdef __DEBUG_PM__\r
+               add     e,1\r
+#endif\r
                mov     ah,0x3e\r
                int     EMM_INT         // close handle\r
                jc      error1\r
-\r
+#ifdef __DEBUG_PM__\r
+               add     e,1\r
+#endif\r
                mov     ah,EMS_STATUS\r
                int     EMS_INT\r
                jc      error1                  // make sure EMS hardware is present\r
@@ -232,6 +245,9 @@ PML_StartupEMS(global_game_variables_t *gvar)
        error1:\r
 #ifdef __BORLANDC__\r
        __asm {\r
+#endif\r
+#ifdef __DEBUG_PM__\r
+               mov     e,1\r
 #endif\r
                mov     err,ah\r
                mov     errorflag,1\r
@@ -244,7 +260,7 @@ End1:
 #ifdef __WATCOMC__\r
        }\r
 #endif\r
-//*\r
+/*\r
        if(errorflag==false)\r
        {\r
                // Don't hog all available EMS\r
@@ -255,7 +271,7 @@ End1:
                        gvar->pm.emm.EMSAvail = size / EMSPageSize;\r
                }\r
        }\r
-//*/\r
+*/\r
        __asm {\r
                mov     ah,EMS_ALLOCPAGES\r
                mov     bx,[EMSAvail];\r
@@ -270,6 +286,9 @@ End1:
        error2:\r
 #ifdef __BORLANDC__\r
        __asm {\r
+#endif\r
+#ifdef __DEBUG_PM__\r
+               mov     e,1\r
 #endif\r
                mov     err,ah\r
                mov     errorflag,1\r
@@ -296,6 +315,10 @@ End2:
                strcpy(str,"PML_StartupEMS: EMS error ");\r
                MM_EMSerr(str, err);\r
                printf("%s\n",str);\r
+#ifdef __DEBUG_PM__\r
+               printf("e=%u\n", e);\r
+               getch();\r
+#endif\r
                return(gvar->pm.emm.EMSPresent);\r
        }\r
 \r
index dc69eb74367539890f767ce8868d1d928b5bfdc5..6a5fae4e3fd918f9bbf60ed7c83cc5b9a7215290 100755 (executable)
Binary files a/wcpu.exe and b/wcpu.exe differ