From: sparky4 Date: Tue, 28 Feb 2017 22:58:00 +0000 (-0600) Subject: wwww debugging EMS on 386+ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=c9ea53d56f793c6abcf528c20590c02804dde275;p=16.git wwww debugging EMS on 386+ --- diff --git a/MEMINFO.16W b/MEMINFO.16W deleted file mode 100755 index e69de29b..00000000 diff --git a/db.exe b/db.exe index af80cac8..457a9fa1 100755 Binary files a/db.exe and b/db.exe differ diff --git a/l4get.bat b/l4get.bat new file mode 100755 index 00000000..78617810 --- /dev/null +++ b/l4get.bat @@ -0,0 +1,60 @@ +@echo off +iff exist %* then + del %* +endiff +setlocal +set url="138.47.241.23" +rem for %@eval[%#+1] in (%*) do ( +rem for %# in (1,1,%*) do ( +:loop + set /a o=0 +:oooo + set /a q=%@EVAL[%@LEN[%1] - 4] + set w=%@INSTR[0,%q,%1] + iff NOT "%w" == "" then + set /a o=%o+1 + set y=%w.z%o +rem echo y=%y + if %o lt 100 ( + if %o lt 10 ( + set z=00%o + ) else ( + set z=0%o + ) endif + ) else if %o gt 99 ( + set z=%o + ) endif + + htget http://%url/%1.zip.%z > %y +rem pause + iff NOT "%@FILESIZE[%y,b]" == "0" then + type %y >> %w.zip + iff "%@FILESIZE[%y,b]" == "65536" then +rem echo o=%o + goto oooo + endiff + iff NOT "%#" == "0" then + shift /1 + iff exist %w.zip then + unzip %w.zip + del %w.z* + endiff + goto loop + else + del %# + endiff + else + del %y + echo Error null zip file wwww + endiff + else + rem del %y.z* + rem need to add a cleaner wwww + echo done~ wwww + endiff +rem echo y="%y" +rem echo q=%q +rem echo o=%o +rem echo w=%w +rem echo %%1=%1 +endlocal diff --git a/src/exmmtest.c b/src/exmmtest.c index 881a1356..6834df66 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -294,7 +294,7 @@ PRINTBB; printf("\n\npress any key to continue!\n"); getch(); printf("debugmm: %u\t", dbg_debugmm); #endif #ifdef __DEBUG_PM__ - printf("debugpm: %u", dbg_ddebugpm); + printf("debugpm: %u", dbg_debugpm); #endif printf("\n"); #endif diff --git a/src/lib/16_dbg.h b/src/lib/16_dbg.h index 3d7ef4af..61bbff8b 100755 --- a/src/lib/16_dbg.h +++ b/src/lib/16_dbg.h @@ -10,7 +10,7 @@ #define __DEBUG_InputMgr__ #define __DEBUG_MAP__ //#define __DEBUG_CA__ -//#define __DEBUG_PM__ +#define __DEBUG_PM__ //#define __DEBUG_MM__ diff --git a/src/lib/16_pm.c b/src/lib/16_pm.c index 53eb8603..03df0237 100755 --- a/src/lib/16_pm.c +++ b/src/lib/16_pm.c @@ -158,13 +158,16 @@ boolean PML_StartupEMS(global_game_variables_t *gvar) { int i; - long size; + //long size; byte err=0, str[64]; boolean errorflag=false; static char emmname[] = "EMMXXXX0"; //fix by andrius4669 unsigned int EMSVer = 0; unsigned totalEMSpages,freeEMSpages,EMSPageFrame,EMSHandle=0,EMSAvail=0; +#ifdef __DEBUG_PM__ + word e=0; +#endif totalEMSpages = freeEMSpages = EMSPageFrame = 0; gvar->pm.emm.EMSPresent = false; // Assume that we'll fail gvar->pm.emm.EMSAvail = 0; @@ -175,27 +178,37 @@ PML_StartupEMS(global_game_variables_t *gvar) mov ax,0x3d00 int EMM_INT // try to open EMMXXXX0 device jc error1 - +#ifdef __DEBUG_PM__ + add e,1 +#endif mov bx,ax mov ax,0x4400 int EMM_INT // get device info jc error1 - +#ifdef __DEBUG_PM__ + add e,1 +#endif and dx,0x80 jz error1 - +#ifdef __DEBUG_PM__ + add e,1 +#endif mov ax,0x4407 int EMM_INT // get status jc error1 or al,al jz error1 - +#ifdef __DEBUG_PM__ + add e,1 +#endif mov ah,0x3e int EMM_INT // close handle jc error1 - +#ifdef __DEBUG_PM__ + add e,1 +#endif mov ah,EMS_STATUS int EMS_INT jc error1 // make sure EMS hardware is present @@ -232,6 +245,9 @@ PML_StartupEMS(global_game_variables_t *gvar) error1: #ifdef __BORLANDC__ __asm { +#endif +#ifdef __DEBUG_PM__ + mov e,1 #endif mov err,ah mov errorflag,1 @@ -244,7 +260,7 @@ End1: #ifdef __WATCOMC__ } #endif -//* +/* if(errorflag==false) { // Don't hog all available EMS @@ -255,7 +271,7 @@ End1: gvar->pm.emm.EMSAvail = size / EMSPageSize; } } -//*/ +*/ __asm { mov ah,EMS_ALLOCPAGES mov bx,[EMSAvail]; @@ -270,6 +286,9 @@ End1: error2: #ifdef __BORLANDC__ __asm { +#endif +#ifdef __DEBUG_PM__ + mov e,1 #endif mov err,ah mov errorflag,1 @@ -296,6 +315,10 @@ End2: strcpy(str,"PML_StartupEMS: EMS error "); MM_EMSerr(str, err); printf("%s\n",str); +#ifdef __DEBUG_PM__ + printf("e=%u\n", e); + getch(); +#endif return(gvar->pm.emm.EMSPresent); } diff --git a/wcpu.exe b/wcpu.exe index dc69eb74..6a5fae4e 100755 Binary files a/wcpu.exe and b/wcpu.exe differ