]> 4ch.mooo.com Git - 16.git/commitdiff
added debug variable
authorsparky4 <sparky4@cock.li>
Fri, 23 Sep 2016 18:26:30 +0000 (13:26 -0500)
committersparky4 <sparky4@cock.li>
Fri, 23 Sep 2016 18:26:30 +0000 (13:26 -0500)
src/exmmtest.c
src/lib/16_pm.c
src/lib/16_pm.h

index a1e0391f0848bd6ba8f485bdda9504f021d903c9..f958283223b07ceac26763fded533a298c70ad0c 100755 (executable)
@@ -86,6 +86,7 @@ main(int argc, char *argv[])
        //file name //\r
 \r
        gvar.mm.mmstarted=0;\r
+       pmdebug=0;\r
 \r
        //PRINTBB\r
        if(argv[1]){ bakapee1 = argv[1];\r
@@ -97,11 +98,12 @@ main(int argc, char *argv[])
        }\r
        //printf("main()=%Fp    start MM\n", *argv[0]);\r
        MM_Startup(&gvar);\r
-#ifdef __DEBUG_PM__\r
-       PM_Startup(&gvar);\r
-       //PM_CheckMainMem(&gvar);\r
-       PM_UnlockMainMem(&gvar);\r
-#endif\r
+       if(pmdebug>0)\r
+       {\r
+               PM_Startup(&gvar);\r
+               PM_CheckMainMem(&gvar);\r
+               PM_UnlockMainMem(&gvar);\r
+       }\r
        CA_Startup(&gvar);\r
 //     printf("                done!\n");\r
        PRINTBB;\r
@@ -149,9 +151,8 @@ for(w=0;w<2;w++)
        printf("bakapee1=%s\n", bakapee1);\r
        printf("bakapee2=%s\n", bakapee2);\r
        MM_FreePtr(&bigbuffer, &gvar);\r
-#ifdef __DEBUG_PM__\r
-       PM_Shutdown(&gvar);\r
-#endif\r
+       if(pmdebug>0)\r
+               PM_Shutdown(&gvar);\r
        CA_Shutdown(&gvar);\r
        MM_Shutdown(&gvar);\r
        free(bakapee1); free(bakapee2);\r
index 9e4d608afd777e52f12bef049104d87a31020145..b472e58b2c3f124c8d3935bb4b49320c52e5947f 100755 (executable)
@@ -29,6 +29,8 @@
 #include "src/lib/16_pm.h"\r
 #pragma hdrstop\r
 \r
+boolean pmdebug=0;\r
+\r
 /*\r
 //     Main Mem specific variables\r
        boolean                 MainPresent;\r
index b9d801e11f86c99afbf9f2feaeaccd33b29365fc..a8510f1762abc7581fc7c51d25c452ea3faf13c5 100755 (executable)
@@ -33,6 +33,8 @@
 #include "src/lib/16_mm.h"\r
 #include <dos.h>\r
 \r
+extern boolean pmdebug;\r
+\r
 /*//   NOTE! PMPageSize must be an even divisor of EMSPageSize, and >= 1024\r
 #define        EMSPageSize             16384\r
 #define        EMSPageSizeSeg  (EMSPageSize >> 4)\r
@@ -110,5 +112,5 @@ extern      void    PM_Startup(global_game_variables_t *gvar),
 extern memptr  PM_GetPageAddress(int pagenum, global_game_variables_t *gvar),\r
                                PM_GetPage(int pagenum, global_game_variables_t *gvar);         // Use this one to cache page\r
 \r
-//void PM_SetMainMemPurge(int level, global_game_variables_t *gvar);\r
+void PM_SetMainMemPurge(int level, global_game_variables_t *gvar);\r
 #endif\r