From: sparky4 Date: Mon, 5 Dec 2016 14:59:00 +0000 (-0600) Subject: wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=ede5cec5321f853b0c9c3485ee5cd08fb4086985;p=16.git wwww --- diff --git a/TC0000.SWP b/TC0000.SWP new file mode 100755 index 00000000..0e56afc8 Binary files /dev/null and b/TC0000.SWP differ diff --git a/bcexmm.dsk b/bcexmm.dsk index e1d0305c..37ef3946 100755 Binary files a/bcexmm.dsk and b/bcexmm.dsk differ diff --git a/bcexmm.prj b/bcexmm.prj index bf1d7a44..17f3fb09 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/src/exmmtest.c b/src/exmmtest.c index fc4eb11d..d973ba59 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -87,7 +87,10 @@ main(int argc, char *argv[]) //file name // gvar.mm.mmstarted=0; + +#ifdef __DEBUG_PM__ dbg_debugpm=1; //debug pm +#endif //PRINTBB if(argv[1]){ bakapee1 = argv[1]; @@ -101,13 +104,17 @@ main(int argc, char *argv[]) MM_Startup(&gvar); //printf("ok\n"); //#ifdef __WATCOMC__ +#ifdef __DEBUG_PM__ if(dbg_debugpm>0) { +#endif PM_Startup(&gvar); //printf("pmstarted ok\n"); //PM_CheckMainMem(&gvar); PM_UnlockMainMem(&gvar); +#ifdef __DEBUG_PM__ } +#endif //#endif CA_Startup(&gvar); // printf(" done!\n"); @@ -157,7 +164,9 @@ for(w=0;w<2;w++) //printf("bakapee2=%s\n", bakapee2); MM_FreePtr(&bigbuffer, &gvar); //#ifdef __WATCOMC__ +#ifdef __DEBUG_PM__ if(dbg_debugpm>0) +#endif PM_Shutdown(&gvar); //#endif CA_Shutdown(&gvar); diff --git a/src/lib/16_dbg.c b/src/lib/16_dbg.c index 7766a1d4..13d5846d 100755 --- a/src/lib/16_dbg.c +++ b/src/lib/16_dbg.c @@ -10,6 +10,15 @@ unsigned char _DEBUG_INITed = 0; struct info_8250 *_DEBUG_uart = NULL; +#ifdef __DEBUG__ +#ifdef __DEBUG_PM__ +boolean dbg_debugpm=0; +#endif +#ifdef __DEBUG_InputMgr__ +boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0; +#endif +#endif + int _DEBUG_INIT() { if (!_DEBUG_INITed) { unsigned int i; diff --git a/src/lib/16_dbg.h b/src/lib/16_dbg.h index d02abb39..1454e091 100755 --- a/src/lib/16_dbg.h +++ b/src/lib/16_dbg.h @@ -2,10 +2,19 @@ #ifndef _SRC_LIB_16_DBG #define _SRC_LIB_16_DBG -#define __DEBUG__ +//#define __DEBUG__ //#define __DEBUG_PM__ //#define __DEBUG_MM__ +#ifdef __DEBUG__ +#ifdef __DEBUG_PM__ +extern boolean dbg_debugpm=0; +#endif +#ifdef __DEBUG_InputMgr__ +extern boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0; +#endif +#endif + # ifdef DEBUGSERIAL # include diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 0d3b29c7..69324ee2 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -38,10 +38,6 @@ #include "src/lib/16_in.h" -#ifdef __DEBUG_InputMgr__ -boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0; -#endif - static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ /* diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 3c104633..7ee2c61e 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -36,10 +36,6 @@ #include "src/lib/16_enti.h" //#include "src/lib/bitmap.h" //old format #endif -#ifdef __DEBUG__ -#define __DEBUG_InputMgr__ -extern boolean dbg_testkeyin,dbg_testcontrolnoisy; -#endif //if else for gfxtesting and direction //player[pn].d == 2 || diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index b68eea9c..b160ac65 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -30,7 +30,6 @@ #ifdef __DEBUG__ // 1 == Debug/Dev ; 0 == Production/final #define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%lu bytes\n" -extern boolean dbg_debugpm; #else #define OUT_OF_MEM_MSG "\npee\n" #endif diff --git a/src/lib/16_pm.c b/src/lib/16_pm.c index 7ecab1eb..bf7ad829 100755 --- a/src/lib/16_pm.c +++ b/src/lib/16_pm.c @@ -29,10 +29,6 @@ #include "src/lib/16_pm.h" #pragma hdrstop -#ifdef __DEBUG__ -boolean dbg_debugpm=0; -#endif - // Main Mem specific variables //boolean MainPresent; /* memptr MainMemPages[PMMaxMainMem]; diff --git a/src/lib/16_pm.h b/src/lib/16_pm.h index 4c015e98..567b953e 100755 --- a/src/lib/16_pm.h +++ b/src/lib/16_pm.h @@ -32,11 +32,10 @@ #include "src/lib/16_hc.h" #include "src/lib/16_mm.h" #include "src/lib/16_ca.h" -#include - -#ifdef __DEBUG__ -extern boolean dbg_debugpm; +#ifdef __WATCOMC__ +#include "src/lib/16_dbg.h" #endif +#include /*// NOTE! PMPageSize must be an even divisor of EMSPageSize, and >= 1024 #define EMSPageSize 16384 diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index d9d37b16..b22affdd 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -29,8 +29,6 @@ #include "src/lib/16_ca.h" #include "src/lib/16_in.h" -extern boolean dbg_debugpm; - void DebugMemory_(global_game_variables_t *gvar, boolean q); void Shutdown16(global_game_variables_t *gvar); void Startup16(global_game_variables_t *gvar); diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index a27b6b85..be0cdc91 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -342,7 +342,7 @@ typedef struct } global_game_variables_t; extern char global_temp_status_text[512]; - +#ifdef __WATCOMC__ #define EINVFMT EMFILE - +#endif #endif /* _TYPEDEFSTRUCT_H_ */ diff --git a/src/vrstest.c b/src/vrstest.c index 743fe4af..d9ab0f70 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -52,8 +52,9 @@ void main() { word w=0; gvar.mm.mmstarted=0; +#ifdef __DEBUG_PM__ dbg_debugpm=1; - +#endif // DOSLIB: check our environment probe_dos();