From c9ea53d56f793c6abcf528c20590c02804dde275 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Tue, 28 Feb 2017 16:58:00 -0600 Subject: [PATCH] wwww debugging EMS on 386+ --- MEMINFO.16W | 0 db.exe | Bin 13186 -> 13186 bytes l4get.bat | 60 +++++++++++++++++++++++++++++++++++++++++++++++ src/exmmtest.c | 2 +- src/lib/16_dbg.h | 2 +- src/lib/16_pm.c | 39 +++++++++++++++++++++++------- wcpu.exe | Bin 13328 -> 13312 bytes 7 files changed, 93 insertions(+), 10 deletions(-) delete mode 100755 MEMINFO.16W create mode 100755 l4get.bat diff --git a/MEMINFO.16W b/MEMINFO.16W deleted file mode 100755 index e69de29b..00000000 diff --git a/db.exe b/db.exe index af80cac81c36b2b54df02442584b23793f3cadcb..457a9fa192d31529e39312c63fcfc8b50357625a 100755 GIT binary patch delta 822 zcmZ9KZAep57{|}qZhF0Y^Bw2f-85b0aE&<>Wm=Y-6uq#Cikfeq41y$_A5y_#h#ePW zaIjh+xYRyYa3M^n)+`mI=))k1eF{di+1mn*u&rlW6dm|o{^xL?|9Q^yJY#)heclJ7 z$^wLZKp1#gh)@E^S0SVU?ubL8yFdr%LEr}92lV?9ss}CrVITtJG9l5N8sdR-JVKMe zG_VLf2KqG!eFYwZ-y*OBx{wKRqIoSsQ$+|33DuaeSWA~OY&cWkI0rspU}lXB+3f7@ zYH#aUTgXQ8x@b6ytc(W+FYoQ<>8ONfOpM=5{gNCIvu3&=xwOy3xbw|aFD=J@+9o}Q zYv^t15Pn7TWaW5)uWY*9MZY1?Dhu|oMdj58xaoLbflS$g=tS#zJnbPj2yQ?1UPWX zq|0I$Y`3K}LM}_0)AYy73SRYlUflm)Tr8~H?qqeYGYlIOgr2Nb5q>Tl&Xr`S2R?eq zItea>M4t5|KO_Dv=EUUnMughcy*Qf+>gJp{A^+P$MHzEg2JjVwV0 z?IccC<#7V;c_RY>BpnhXt&rsP0O9|(5<1yrceFeTiFOlr zR~i{NZ=j#F1*HatKrB2iE{|4l-q>1Gst;R@60K9zvF2`+!mYhjU-TKesw!6DkWf{u z7OAFLUo76z+Dsx>HyN@_x^~Ff1bG8LM`?eFHM5rW#=dRDSrS0IOL$V!kcLkQV*Sr_ fB8sU@4bg}4)>fh*frQS zJmc2qBQy@gfVTw*kwS!ufHL4wT7;VfIzjgV4}mG5vIwC@pc{w*2_T0=xTjk1*CEsj z3e}HX+Xj5iqk^d3U;r`0~uGLSe*H%%P~q z_3VM-7LKr7r4diE)5;n=#`=_6JR*%MM=>sB)#?yVur2i~w;%iM0uB4$iHkNKA-do> zS>9U?Z$rdt?muCzb=QhM8&5+kv6UDO4UzjRF{2sbkX@v$d}4LJyWiqvtZvrYuA(XCsgkP%hfs6_6!<^ z8aB~Qx}=H^umN3@S}&&|`Wjvj(eJAGWA<6sj2+CPZ^JHjSFgb%?1{cFRo6N*J8U?M zO{~XIcclvIY$5)R9V(lRaP%_gkKPGV-M_{`-&&fQFTIFxVE0FT$1TJMX783O)BE0) zzS~&;N1x0GuB(A6LLnTD(oI#|$dttga62n2{-z!KN`oylyc=R@{1owg!R925wl7x( z*WO5#2ell&$1ap=aEx6mwFx!+aN@_>I!}YrTxmlFz9^+t{FZ4D%BWX@Lu&7Vw)_EMa}2rw 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 dc69eb74367539890f767ce8868d1d928b5bfdc5..6a5fae4e3fd918f9bbf60ed7c83cc5b9a7215290 100755 GIT binary patch delta 2414 zcmZ9O3v83u702(rcEE9h$vd%=m^_`A?ZlJ?Qi36+F=K-^4*?}82_5Q+L|1KK6K!Qp z7|WE4iDkG*$tXk6OlrqA6iA3nx^^a^2{dB}Ryso%rIT3g7!^jW@V58A4tr>pe&_Rd z?m6e)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